/* ============================================================
   Bench Café · Dirección B «Morning paper»
   Front page de periódico: papel crema, tinta, una nota roja.
   Rojo reservado a: kickers, la única regla roja y el link de
   Uber Eats. Nada más.
   ============================================================ */

:root {
  --paper: #F5F1E6;        /* papel periódico */
  --paper-raised: #FBF8EF; /* passepartout de fotografías y orejas */
  --paper-deep: #EDE6D3;   /* cajas de clasificados */
  --ink: #1D1A16;          /* tinta */
  --ink-soft: #4A443B;     /* tinta diluida (8.5:1 sobre papel) */
  --accent: #B3282D;       /* la única nota roja (5.7:1 sobre papel) */
  --rule-strong: rgba(29, 26, 22, 0.9);
  --rule-soft: rgba(29, 26, 22, 0.35);
  --rule-hair: rgba(29, 26, 22, 0.22);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ink); color: var(--paper); }

img { max-width: 100%; }

a { color: inherit; }

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  z-index: 10;
}

.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.sheet {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

/* ---------- Reglas de imprenta ---------- */

.rule {
  border: 0;
  border-top: 1px solid var(--rule-strong);
  margin: 0;
}

.rule-double {
  border: 0;
  border-top: 4px double var(--rule-strong);
  margin: 0;
}

/* La única regla roja de la página */
.rule-accent {
  display: inline-block;
  width: 72px;
  height: 3px;
  background: var(--accent);
}

/* ---------- Mástil ---------- */

.folio {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.55rem;
}

.folio-item {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.masthead-row {
  display: grid;
  grid-template-columns: 1fr minmax(0, 2.2fr) 1fr;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: clamp(1rem, 2.5vw, 1.75rem);
}

.masthead-title { text-align: center; }

.masthead-name {
  margin: 0;
  font-size: clamp(2.5rem, 10vw, 6.5rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.masthead-dateline {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  font-style: italic;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

/* Orejas del mástil, como cajetines de utilidad pública */
.ear {
  border: 1px solid var(--rule-strong);
  padding: 0.7rem 0.85rem;
  background: var(--paper-raised);
}

.ear-label {
  margin: 0 0 0.4rem;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.ear-strong {
  margin: 0.15rem 0 0;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
}

.ear-soft {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* Caja de estrellas, como el boletín del tiempo.
   Fila de fondo en el flujo; fila llena superpuesta al 94% (4.7/5). */
.stars {
  position: relative;
  display: inline-flex;
  height: 14px;
  line-height: 0;
}

.stars-row {
  display: flex;
  gap: 2px;
  white-space: nowrap;
}

.stars-bg { color: var(--ink); }
.stars-bg .star { fill: none; stroke: currentColor; stroke-width: 1.4; }

.stars-fill {
  position: absolute;
  inset: 0;
  width: 94%;
  overflow: hidden;
  color: var(--ink);
}
.stars-fill .star { fill: currentColor; }

.star { width: 13px; height: 13px; flex: none; }

/* ---------- Nav de secciones ---------- */

.sections-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 2.5rem;
  padding-block: 0.65rem;
}

.sections-nav a {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}

.sections-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Portada ---------- */

section { scroll-margin-top: 1.25rem; }

.front-page {
  padding-block: clamp(1.75rem, 4vw, 3rem) clamp(2rem, 4.5vw, 3.25rem);
}

.front-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.5rem, 3.5vw, 3rem);
  align-items: start;
}

.lead-story { max-width: 42rem; }

.kicker {
  margin: 0 0 0.55rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead-title {
  margin: 0;
  font-size: clamp(2.1rem, 5.2vw, 3.9rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.01em;
}

.lead-deck {
  margin: 1rem 0 1.4rem;
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  font-style: italic;
  line-height: 1.55;
  color: var(--ink-soft);
}

.link-button {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  color: var(--ink);
  transition: text-decoration-thickness 120ms ease;
}

.link-button:hover { text-decoration-thickness: 3px; }

.link-button:active { transform: translateY(1px); }

/* Columna del reportaje: la fotografía principal y el sándwich
   de la semana comparten columna, con regla vertical propia. */
.feature-col {
  border-left: 1px solid var(--rule-strong);
  padding-left: clamp(1.25rem, 2.5vw, 2rem);
}

.feature-col .rule { margin-block: 1.1rem; }

.feature-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
}

.feature-deck {
  margin: 0.7rem 0 0.9rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--ink-soft);
}

.feature-note { margin: 0; font-size: 0.95rem; }

.link-red {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-red:hover { text-decoration-thickness: 2px; }

/* Fotografía de prensa */
.press {
  margin: 0;
  border: 1px solid var(--rule-strong);
  background: var(--paper-raised);
  padding: 10px;
}

.press img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--rule-soft);
}

.press figcaption {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--rule-soft);
  font-size: 0.8rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* ---------- El pan de hoy ---------- */

.pan-section {
  border-top: 1px solid var(--rule-strong);
  padding-block: clamp(1.75rem, 4vw, 3rem);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1.1rem;
  margin-bottom: clamp(1.4rem, 3vw, 2.1rem);
}

.section-title {
  margin: 0;
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  font-weight: 900;
  line-height: 1.05;
}

.section-note {
  margin: 0;
  font-size: 0.92rem;
  font-style: italic;
  color: var(--ink-soft);
}

.pan-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(1.5rem, 3.5vw, 3rem);
  align-items: start;
}

.pan-grid .headlines {
  border-left: 1px solid var(--rule-strong);
  padding-left: clamp(1.25rem, 2.5vw, 2rem);
}

.headlines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.headline-item { min-width: 0; }

.headline-item + .headline-item {
  border-left: 1px solid var(--rule-soft);
  padding-left: 1.25rem;
}

.headline-title {
  margin: 0;
  font-size: clamp(1.2rem, 1.9vw, 1.5rem);
  font-weight: 700;
  line-height: 1.18;
}

.headline-deck {
  margin: 0.55rem 0 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------- La carta ---------- */

.carta-section {
  border-top: 1px solid var(--rule-strong);
  padding-block: clamp(1.75rem, 4vw, 3rem);
}

.carta-grid {
  display: grid;
  grid-template-columns: minmax(0, 9fr) minmax(0, 3fr);
  gap: clamp(1.5rem, 3.5vw, 3rem);
  align-items: start;
}

.menu-wrap { min-width: 0; }

.carta-grid .press-side {
  border-left: 1px solid var(--rule-strong);
  padding-left: clamp(1.25rem, 2.5vw, 2rem);
}

.menu-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.menu-section { min-width: 0; }

.menu-section + .menu-section {
  border-left: 1px solid var(--rule-soft);
  padding-left: 1.25rem;
}

.menu-heading {
  margin: 0;
  padding-bottom: 0.45rem;
  border-bottom: 3px solid var(--rule-strong);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.menu-gloss {
  margin: 0.5rem 0 0.15rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-soft);
}

.menu-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-item {
  padding-block: 0.6rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.menu-item + .menu-item { border-top: 1px solid var(--rule-hair); }

.menu-item strong { display: block; font-weight: 700; }

.menu-item span {
  display: block;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-soft);
}

.menu-footer {
  margin: 1.4rem 0 0;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--ink-soft);
}

/* ---------- Clasificados ---------- */

.classifieds-section {
  border-top: 1px solid var(--rule-strong);
  padding-block: clamp(1.75rem, 4vw, 3rem);
}

.classifieds-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.classified {
  border: 1px solid var(--rule-strong);
  background: var(--paper-deep);
  padding: 0.95rem 1.1rem;
}

.classified-label {
  margin: 0 0 0.35rem;
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.classified-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.classified-text a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.classified-text a:hover { text-decoration-thickness: 2px; }

/* ---------- Colofón ---------- */

.colophon {
  padding-block: 1.5rem 3rem;
}

.colophon .rule-double { margin-bottom: 1.25rem; }

.colophon-line {
  margin: 0;
  max-width: 62rem;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.colophon-line a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.colophon-line a:hover { text-decoration-thickness: 2px; }

.colophon-note {
  margin: 0.6rem 0 0;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ============================================================
   Colapsado de columnas. Cada regla vertical se vuelve
   horizontal, para conservar el ritmo de imprenta en móvil.
   ============================================================ */

@media (max-width: 960px) {
  .front-grid,
  .pan-grid,
  .carta-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-col {
    border-left: 0;
    border-top: 1px solid var(--rule-strong);
    padding-left: 0;
    padding-top: 1.4rem;
  }

  .pan-grid .headlines,
  .carta-grid .press-side {
    border-left: 0;
    border-top: 1px solid var(--rule-strong);
    padding-left: 0;
    padding-top: 1.4rem;
  }

  .menu-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .menu-section:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }

  .menu-section:nth-child(n + 3) {
    border-top: 1px solid var(--rule-soft);
    padding-top: 1.1rem;
  }
}

@media (max-width: 820px) {
  .masthead-row { grid-template-columns: minmax(0, 1fr); gap: 0.9rem; }

  .masthead-title { order: -1; }

  .ear {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.9rem;
    align-items: center;
  }

  .ear .ear-label { grid-column: 1 / -1; }

  .ear .stars { grid-row: 2; }

  .ear .ear-strong,
  .ear .ear-soft { margin: 0; }
}

@media (max-width: 700px) {
  .headlines { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }

  .headline-item + .headline-item {
    border-left: 0;
    border-top: 1px solid var(--rule-soft);
    padding-left: 0;
    padding-top: 1.1rem;
  }
}

@media (max-width: 640px) {
  .classifieds-grid { grid-template-columns: minmax(0, 1fr); }

  /* Retrato de prensa a media pantalla, sin desbordar */
  .press img { max-height: 45svh; }
}

@media (max-width: 560px) {
  .menu-cols { grid-template-columns: minmax(0, 1fr); }

  .menu-section + .menu-section {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--rule-soft);
    padding-top: 1.1rem;
  }

  .folio { flex-direction: column; gap: 0.15rem; }
}


/* QA cap: masthead fits first viewport on phones (assembly t_5922044a) */
@media (max-width: 560px) {
  .masthead-name { font-size: clamp(2.1rem, 11.5vw, 3rem); letter-spacing: 0.03em; }
  .masthead-row { padding-block: 0.7rem; gap: 0.7rem; }
  .folio { padding-block: 0.3rem; }
  .ear { font-size: 0.62rem; }
  .ear .ear-strong, .ear .ear-soft { font-size: 0.66rem; }
  .sections-nav { padding-block: 0.45rem; }
}
