/* ============================================================
   Pequeño Saigón · Dirección B «La casa del caldo»
   Steam-editorial magazine: warm ivory daylight, numbered
   journal chapters, staggered steam display type.
   ============================================================ */

:root {
  --ivory: #F4EDE2;      /* fondo dominante */
  --ink: #2A1B12;        /* texto, tinta café caldo */
  --ink-soft: #5A4634;   /* texto secundario (7.6:1 sobre marfil) */
  --amber: #B4622D;      /* acento ámbar caldo (solo texto grande) */
  --chili: #8F2D1E;      /* acento chile (uso escaso, texto pequeño ok) */
  --bone: #E3D7C5;       /* paneles hueso */
  --star-empty: #D9C6AC;
  --hairline: rgba(42, 27, 18, 0.16);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --grot: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --shell-pad: clamp(20px, 4vw, 56px);
  --shell-max: 1260px;
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--grot);
  font-size: 1rem;
  line-height: 1.6;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }

a { color: inherit; }

::selection { background: rgba(180, 98, 45, 0.28); }

a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--chili);
  outline-offset: 3px;
}

.shell {
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

/* ---------- Masthead ---------- */

.site-head {
  border-bottom: 1px solid var(--hairline);
}

.site-head .shell {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 40px;
  padding-block: 22px;
}

.brand { text-decoration: none; }

.brand-mark {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.brand-sub {
  display: block;
  margin-top: 2px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.site-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.site-nav a:hover {
  color: var(--chili);
  border-bottom-color: var(--chili);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: clip;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  align-items: center;
  gap: clamp(28px, 4.5vw, 72px);
  padding-left: var(--shell-pad);
}

.hero-photo {
  margin: 0;
  height: clamp(430px, 74vh, 780px);
  height: clamp(430px, 74svh, 780px);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  padding-block: clamp(40px, 6vh, 72px) clamp(44px, 7vh, 84px);
  max-width: 620px;
}

.steam-display {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.3rem, 8vw, 6.8rem);
  font-weight: 530;
  font-variation-settings: "opsz" 110;
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.steam-display .st {
  position: relative;
  display: inline-block;
}

.steam-display .st-2 { top: -0.24em; }

.hero-promise {
  margin: clamp(20px, 3vh, 34px) 0 0;
  max-width: 30ch;
  font-family: var(--serif);
  font-size: clamp(1.1875rem, 1.6vw, 1.375rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-soft);
}

.hero-promise em {
  font-style: italic;
  color: var(--amber);
}

.cta {
  display: inline-block;
  margin-top: clamp(26px, 4vh, 40px);
  padding: 15px 32px;
  background: var(--ink);
  border: 1px solid var(--ink);
  color: var(--ivory);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease,
    transform 180ms ease;
}

.cta:hover {
  background: var(--chili);
  border-color: var(--chili);
  transform: translateY(-1px);
}

.cta:active { transform: translateY(1px); }

/* Línea de vapor: regla delgada ascendente */
.rise-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.rise-rule {
  position: absolute;
  width: 1px;
  height: clamp(90px, 16vh, 170px);
  background: linear-gradient(to top, rgba(180, 98, 45, 0), var(--amber));
  transform: rotate(21deg);
  transform-origin: bottom center;
}

.hero .rise-rule {
  left: min(47%, 640px);
  top: 18%;
}

.rise-rule.small {
  position: static;
  display: inline-block;
  width: 1px;
  height: 46px;
  background: var(--amber);
  transform: rotate(21deg);
  flex: none;
}

/* ---------- Capítulos (01 · 02 · 03) ---------- */

.chapter-head {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: clamp(30px, 5vh, 52px);
}

.chapter-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 350;
  font-size: 1.0625rem;
  letter-spacing: 0.08em;
  color: var(--amber);
  padding-bottom: 0.5em;
}

.chapter-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  font-weight: 530;
  font-variation-settings: "opsz" 90;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.chapter-title .st {
  position: relative;
  display: inline-block;
}

.chapter-title .st-b { top: -0.14em; }
.chapter-title .st-c { top: -0.26em; }

/* 01 · El caldo: columna de texto desfasada contra foto a sangre */

.chapter-caldo .shell {
  padding-right: 0;
}

.chapter-body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 84px);
  align-items: center;
}

.chapter-text {
  align-self: start;
  padding-top: clamp(8px, 4vw, 56px);
  max-width: 44ch;
}

.chapter-text p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.4vw, 1.3125rem);
  line-height: 1.62;
  color: var(--ink);
}

.chapter-text p + p { margin-top: 1em; }

/* Capital de revista solo en el capítulo 01 */
.dropcap::first-letter {
  float: left;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 3.4em;
  line-height: 0.82;
  padding-right: 0.12em;
  padding-top: 0.06em;
  color: var(--amber);
}

.chapter-photo { margin: 0; }

.chapter-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.chapter-photo figcaption,
.carta-side figcaption {
  margin-top: 12px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.chapter-photo figcaption::before,
.carta-side figcaption::before {
  content: "";
  display: block;
  width: 34px;
  height: 1px;
  margin-bottom: 10px;
  background: var(--amber);
}

/* 02 · La mesa: fotografía a sangre completa + fila de pie de nota */

.mesa-photo { margin: 0; }

.mesa-photo img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.mesa-row {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 20px 56px;
  padding-block: 26px 0;
}

.mesa-cap {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.mesa-cap::before {
  content: "";
  display: block;
  width: 34px;
  height: 1px;
  margin-bottom: 10px;
  background: var(--amber);
}

.mesa-copy {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  line-height: 1.55;
}

/* 03 · La carta: lista editorial + referencia de banh mi desfasada */

.carta-intro {
  margin: 0 0 clamp(30px, 5vh, 48px);
  max-width: 52ch;
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.carta-body {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.menu-group {
  border-top: 1px solid var(--hairline);
  padding-block: clamp(20px, 3vh, 30px);
}

.menu-group-title {
  margin: 0 0 clamp(16px, 2.5vh, 24px);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 480;
  font-size: 1.375rem;
  line-height: 1.3;
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vh, 28px) clamp(24px, 3vw, 44px);
}

.dish-name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 550;
  font-size: 1.25rem;
  line-height: 1.25;
}

.dish-desc {
  margin: 6px 0 0;
  max-width: 36ch;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.menu-note {
  margin: clamp(24px, 4vh, 40px) 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  font-size: 0.875rem;
  font-style: italic;
  color: var(--ink-soft);
}

.carta-side {
  margin-top: clamp(28px, 6vh, 76px);
}

.carta-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* ---------- Prueba (calificaciones) ---------- */

.prueba {
  border-bottom: 1px solid var(--hairline);
}

.prueba .shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 40px;
  padding-block: 26px;
}

.rating-badge {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stars {
  width: 118px;
  height: 20px;
  flex: none;
}

.stars-bg use { fill: var(--star-empty); }
.stars-fg use { fill: var(--amber); }

.rating-text {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
}

.badge-rule {
  width: 1px;
  align-self: stretch;
  background: var(--hairline);
}

.prueba-note {
  margin: 0 0 0 auto;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

/* ---------- Visita ---------- */

.visita {
  background: var(--bone);
}

.visita .shell { padding-block: clamp(56px, 10vh, 104px); }

.visita-title {
  margin: 0 0 clamp(28px, 5vh, 48px);
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  font-weight: 530;
  font-variation-settings: "opsz" 90;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.visita-title .st {
  position: relative;
  display: inline-block;
  top: -0.14em;
}

.visita-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 24px 72px;
  align-items: start;
}

.visita-place {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.4vw, 2.125rem);
  font-weight: 500;
  line-height: 1.25;
}

.visita-note {
  margin: 14px 0 0;
  max-width: 38ch;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.platforms-label {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--ink);
}

.platforms {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
}

.platforms li {
  font-size: 1rem;
  font-weight: 500;
}

/* ---------- Footer ---------- */

.site-foot {
  background: var(--ink);
  color: var(--bone);
}

.site-foot .shell { padding-block: clamp(48px, 8vh, 80px); }

.foot-mark {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 560;
  line-height: 1.15;
  color: var(--ivory);
}

.foot-sub {
  margin: 6px 0 0;
  font-size: 0.9375rem;
  color: rgba(244, 237, 226, 0.78);
}

.foot-rule {
  width: 100%;
  height: 1px;
  margin: 30px 0 24px;
  border: 0;
  background: rgba(244, 237, 226, 0.22);
}

.colophon {
  margin: 0;
  max-width: 76ch;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: rgba(244, 237, 226, 0.72);
}

.disclosure {
  margin: 18px 0 0;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  color: rgba(244, 237, 226, 0.85);
}

/* ---------- Movimiento (solo si no se prefiere movimiento reducido) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .steam-display .st,
  .hero-promise,
  .hero-copy .cta {
    animation: steam-rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .steam-display .st-1 { animation-delay: 0.05s; }
  .steam-display .st-2 { animation-delay: 0.16s; }
  .hero-promise { animation-delay: 0.34s; }
  .hero-copy .cta { animation-delay: 0.48s; }

  .hero .rise-rule {
    animation: steam-sway 7s ease-in-out infinite alternate;
  }

  @keyframes steam-rise {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes steam-sway {
    from {
      transform: rotate(21deg) translateY(0);
      opacity: 0.75;
    }
    to {
      transform: rotate(24deg) translateY(-8px);
      opacity: 1;
    }
  }
}

/* ---------- Colapso tableta ---------- */

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 0;
    padding-left: 0;
  }

  .hero-photo {
    height: clamp(320px, 52vh, 560px);
    height: clamp(320px, 52svh, 560px);
  }

  .hero-copy {
    max-width: none;
    padding-inline: var(--shell-pad);
    padding-block: 36px 56px;
  }

  .hero .rise-rule { display: none; }

  .chapter-caldo .shell { padding-right: var(--shell-pad); }

  .chapter-body,
  .carta-body,
  .visita-grid {
    grid-template-columns: 1fr;
  }

  .chapter-text {
    padding-top: 0;
    max-width: 56ch;
  }

  .carta-side {
    margin-top: 0;
    max-width: 420px;
  }

  .mesa-photo img { aspect-ratio: 16 / 9; }

  .mesa-row { grid-template-columns: 1fr; }

  .prueba-note { margin-left: 0; flex-basis: 100%; }
}

/* ---------- Colapso móvil (390px) ---------- */

@media (max-width: 640px) {
  .site-head .shell {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding-block: 18px 16px;
  }

  .site-nav { gap: 6px 22px; }

  /* Héroe: foto primero, tope 45svh, CTA alcanzable */
  .hero-photo {
    height: min(45vh, 430px);
    height: min(45svh, 430px);
  }

  .hero-copy { padding-block: 30px 46px; }

  .steam-display { font-size: clamp(3rem, 14vw, 3.6rem); }

  .menu-list { grid-template-columns: 1fr; }

  .chapter-head {
    align-items: baseline;
    gap: 12px;
  }

  .rise-rule.small { display: none; }

  .mesa-photo img { aspect-ratio: 4 / 3; }
}
