/* FlashFood · web
   Los tokens son los de la app de cliente (flash_food_user/lib/core/app_tokens.dart).
   Dos desvíos deliberados, ambos por contraste AA en texto de párrafo:
   --sub sube de 55 % a 68 %, y el texto sobre el naranja es tinta oscura fija
   (el blanco sobre #FF5A2B da 3,1:1, que solo alcanza para texto grande). */

/* Fuentes servidas desde el propio sitio (subset latin de Google Fonts,
   que cubre todo el español). Sin peticiones a terceros. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("../fonts/BricolageGrotesque-600_800-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/DMMono-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/DMMono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/InstrumentSans-400_700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --brand: #FF5A2B;
  --brand-pressed: #D8451F;
  --accent: #B7F04B;
  --success: #2E8B2E;
  --on-brand: #15130F;

  --bg: #FFFFFF;
  --bg-fade: rgba(255, 255, 255, .86);
  --card: #FFFFFF;
  --ink: #15130F;
  --sub: rgba(21, 19, 15, .68);
  --line: rgba(21, 19, 15, .10);
  --line2: rgba(21, 19, 15, .22);
  --chip: rgba(21, 19, 15, .055);
  --map: #E4E0D6;
  --map-road: #FFFFFF;
  --map-block: rgba(21, 19, 15, .07);
  --shadow: 0 18px 40px -18px rgba(21, 19, 15, .35), 0 2px 6px -2px rgba(21, 19, 15, .12);

  --f-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --r-card: 16px;
  --r-sheet: 26px;
  --header-h: 68px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.16, 1, .3, 1);

  color-scheme: light;
}

/* Tema: claro por defecto. El botón de la cabecera guarda "light", "dark" o
   "system" en data-theme (ver el script del <head>). Sin JS queda en claro. */
:root[data-theme="dark"] {
  --bg: #100F0D;
  --bg-fade: rgba(16, 15, 13, .86);
  --card: #1C1A17;
  --ink: #F3EFE7;
  --sub: rgba(243, 239, 231, .68);
  --line: rgba(243, 239, 231, .11);
  --line2: rgba(243, 239, 231, .24);
  --chip: rgba(243, 239, 231, .07);
  --map: #191714;
  --map-road: rgba(243, 239, 231, .13);
  --map-block: rgba(243, 239, 231, .045);
  --shadow: 0 18px 40px -16px rgba(0, 0, 0, .7), 0 2px 6px -2px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #100F0D;
    --bg-fade: rgba(16, 15, 13, .86);
    --card: #1C1A17;
    --ink: #F3EFE7;
    --sub: rgba(243, 239, 231, .68);
    --line: rgba(243, 239, 231, .11);
    --line2: rgba(243, 239, 231, .24);
    --chip: rgba(243, 239, 231, .07);
    --map: #191714;
    --map-road: rgba(243, 239, 231, .13);
    --map-block: rgba(243, 239, 231, .045);
    --shadow: 0 18px 40px -16px rgba(0, 0, 0, .7), 0 2px 6px -2px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

/* ── Base ─────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  scrollbar-color: var(--line2) transparent;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--brand); color: var(--on-brand); }

h1, h2, h3 {
  font-family: var(--f-display);
  font-optical-sizing: auto;
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1.5px; }

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

svg { width: 1.25em; height: 1.25em; flex: none; }

svg:not(.glyph):not(.map) use,
svg:not(.glyph):not(.map) {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.glyph { fill: currentColor; }

:focus-visible {
  outline: 2.5px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 999px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: min(1200px, 100%); margin-inline: auto; padding-inline: var(--gutter); }

.muted { color: var(--sub); }

/* ── Botones ──────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 0;
  font: 600 1rem/1 var(--f-body);
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, transform .2s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: .9375rem; }
.btn--brand { background: var(--brand); color: var(--on-brand); }
.btn--brand:hover { background: var(--brand-pressed); }
/* La variante "inverse" de FfButton: superficie de tinta, texto del color del fondo. */
.btn--ink { background: var(--ink); color: var(--bg); }
.btn--ink:hover { background: color-mix(in srgb, var(--ink) 86%, var(--brand)); }

.stores { display: flex; flex-wrap: wrap; gap: 10px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 54px; padding: 8px 20px 8px 16px;
  border-radius: 14px;
  background: var(--ink); color: var(--bg);
  text-decoration: none;
  transition: transform .2s var(--ease), background-color .2s;
}
.store-btn:hover { background: color-mix(in srgb, var(--ink) 86%, var(--brand)); }
.store-btn:active { transform: scale(.97); }
.store-btn .glyph { width: 24px; height: 24px; }
.store-btn span { display: flex; flex-direction: column; font: 600 1.0625rem/1.1 var(--f-display); letter-spacing: -.01em; }
.store-btn small { font: 500 .6875rem/1.2 var(--f-body); letter-spacing: .01em; opacity: .8; }
.stores--inv .store-btn { background: var(--bg); color: var(--ink); }
.stores--inv .store-btn:hover { background: color-mix(in srgb, var(--bg) 88%, var(--brand)); }

.text-link {
  display: inline-flex; align-items: center; gap: .4em;
  font-weight: 600; text-decoration: none;
  border-bottom: 1.5px solid var(--line2); padding-bottom: 2px;
  transition: border-color .2s, gap .2s var(--ease);
}
.text-link:hover { border-color: var(--brand); gap: .6em; }
.text-link svg { width: 1.05em; height: 1.05em; color: var(--brand); }

/* ── Cabecera ─────────────────────────────────────────── */

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  background: var(--bg-fade);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header.solid { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand span { font: 700 1.3125rem/1 var(--f-display); letter-spacing: -.03em; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  padding: 10px 12px; border-radius: 999px;
  font-weight: 500; font-size: .9375rem; text-decoration: none; color: var(--sub);
  transition: color .2s, background-color .2s;
}
.nav a:hover { color: var(--ink); background: var(--chip); }
.theme-toggle {
  width: 44px; height: 44px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; background: var(--chip); color: var(--ink);
  cursor: pointer; transition: background-color .2s;
}
.theme-toggle:hover { background: var(--line2); }
.theme-toggle svg { display: none; width: 20px; height: 20px; }
:root:not([data-theme]) .theme-toggle .t-light,
:root[data-theme="light"] .theme-toggle .t-light,
:root[data-theme="dark"] .theme-toggle .t-dark,
:root[data-theme="system"] .theme-toggle .t-system { display: block; }
.nav-toggle {
  display: none;
  width: 44px; height: 44px; margin-left: 4px;
  border: 0; border-radius: 999px; background: var(--chip); color: var(--ink);
  align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded="true"] .i-open { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: block; }

/* ── El pedido en vivo ────────────────────────────────── */

.story {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 600px) minmax(0, 1fr);
  grid-template-rows: repeat(6, auto);
}

.stage {
  grid-column: 1 / -1; grid-row: 1 / -1;
  position: sticky; top: 0; align-self: start;
  height: 100vh; height: 100svh;
  overflow: hidden;
  background: var(--map);
}

.map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.m-ground { fill: var(--map); }
.m-blocks rect { fill: var(--map-block); }
.m-avenue { fill: none; stroke: var(--map-road); stroke-width: 34; }
.m-road { fill: none; stroke: var(--map-road); stroke-width: 15; }
.m-route-base {
  fill: none; stroke: var(--line2); stroke-width: 7;
  stroke-dasharray: 2 16; stroke-linecap: round; stroke-linejoin: round;
}
.m-route {
  fill: none; stroke: var(--brand); stroke-width: 9;
  stroke-linecap: round; stroke-linejoin: round;
}
.m-dest { fill: var(--brand); opacity: .16; }
.m-moto { transition: opacity .5s var(--ease); }
.no-rider .m-moto { opacity: 0; }
.m-pin image, .m-moto image { filter: drop-shadow(0 6px 6px rgba(21, 19, 15, .25)); }

.pill-rail { display: none; }
.status-pill {
  display: inline-flex;
  align-items: center; gap: 8px;
  padding: 9px 16px 9px 12px; border-radius: 999px;
  background: var(--card); box-shadow: var(--shadow);
  font-weight: 600; font-size: .9375rem; white-space: nowrap;
}
.status-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent);
}
.pill-sample {
  margin-left: 4px; padding: 3px 8px; border-radius: 999px;
  background: var(--chip); color: var(--sub); font-size: .75rem; font-weight: 600;
}
.is-done .status-dot { background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 22%, transparent); }

.track-card {
  position: absolute; right: max(var(--gutter), calc((100vw - 1200px) / 2 + var(--gutter)));
  top: calc(var(--header-h) + 28px);
  width: 344px;
  padding: 20px 20px 18px;
  border-radius: var(--r-sheet);
  background: var(--card);
  box-shadow: var(--shadow);
}
.track-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.track-sample {
  flex: none; padding: 4px 9px; border-radius: 999px;
  background: var(--chip); color: var(--sub); font-size: .75rem; font-weight: 600;
}
.track-total { font: 500 1rem/1 var(--f-mono); color: var(--ink); }
.track-title {
  margin: 0;
  font: 700 1.25rem/1.15 var(--f-display); letter-spacing: -.02em;
}
.track-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.track-steps li {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 0;
  font-weight: 500; color: var(--sub);
  transition: color .4s;
}
.tick {
  position: relative;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--line2);
  transition: background-color .4s, border-color .4s;
}
.tick svg { width: 14px; height: 14px; stroke-width: 2.6; color: var(--on-brand); opacity: 0; transition: opacity .3s; }
.track-steps li + li .tick::before {
  content: ""; position: absolute; left: 50%; bottom: calc(100% + 1.5px);
  width: 1.5px; height: 12px; background: var(--line2); transform: translateX(-50%);
}
.track-steps li.done { color: var(--ink); }
.track-steps li.done .tick { background: var(--accent); border-color: var(--accent); }
.track-steps li.done .tick svg { opacity: 1; }
.track-steps li.now { color: var(--ink); font-weight: 600; }
.track-steps li.now .tick { border-color: var(--brand); background: var(--brand); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 20%, transparent); }
.track-steps li.now .tick::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #FFFFFF; } /* sobre el naranja: blanco fijo */
.track-steps li.now.final .tick { background: var(--accent); border-color: var(--accent); box-shadow: none; }
.track-steps li.now.final .tick::after { display: none; }
.track-steps li.now.final .tick svg { opacity: 1; }

.track-pay {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  display: grid; gap: 10px;
  font-size: .875rem; color: var(--sub);
}
.track-due { display: flex; justify-content: space-between; align-items: baseline; }
.pay-chips { display: flex; gap: 4px; }
.pay-chips b {
  font-weight: 600; font-size: .75rem; color: var(--ink);
  padding: 5px 9px; border-radius: 999px; background: var(--chip);
  transition: background-color .4s, color .4s;
}
.is-paid .pay-chips b[data-yape] { background: var(--brand); color: var(--on-brand); }

/* Los pasos del relato */

.step {
  grid-column: 1; position: relative; z-index: 1;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 24px) 0 48px var(--gutter);
}
.step--hero { grid-row: 1; }
.step-spacer { display: none; }
.step[data-step="1"] { grid-row: 3; }
.step[data-step="2"] { grid-row: 4; }
.step[data-step="3"] { grid-row: 5; }
.step[data-step="4"] { grid-row: 6; min-height: 110svh; }

.panel {
  width: min(520px, 100%);
  margin-left: max(0px, calc((100vw - 1200px) / 2));
  padding: 32px;
  border-radius: var(--r-sheet);
  background: var(--bg-fade);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.step--hero .panel { padding: 36px 32px; }
.step--hero h1 {
  font-size: clamp(2.75rem, 1.6rem + 3.9vw, 4.75rem);
  line-height: .95; letter-spacing: -.03em;
}
.lede { margin: 20px 0 26px; font-size: 1.1875rem; color: var(--sub); max-width: 36ch; }
.step--hero .stores { margin-bottom: 22px; }
.step h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); line-height: 1.02; letter-spacing: -.028em; }
.step h2 + p { margin-top: 14px; color: var(--sub); max-width: 40ch; }

.methods { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.methods li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px 10px 12px; border-radius: 999px;
  background: var(--chip); font-weight: 600;
}
.methods svg { color: var(--ink); }

/* ── Restaurantes ─────────────────────────────────────── */

.partners { padding: clamp(80px, 12vw, 160px) 0 clamp(64px, 9vw, 120px); }
.partners-grid {
  display: grid; gap: clamp(40px, 6vw, 96px);
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: start;
}
.partners-intro { position: sticky; top: calc(var(--header-h) + 32px); }
.partners-intro img { width: 56px; height: 56px; margin-bottom: 20px; }
.partners h2, .riders h2, .faq h2, .download h2 {
  font-size: clamp(2.125rem, 1.3rem + 3vw, 3.75rem);
  line-height: 1.02; letter-spacing: -.028em;
}
.partners-intro p { margin: 18px 0 28px; color: var(--sub); max-width: 34ch; font-size: 1.125rem; }

.feature-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.feature-rows li {
  display: grid; grid-template-columns: 44px 1fr; gap: 18px;
  padding: 28px 0; border-bottom: 1px solid var(--line);
}
.feature-rows svg { width: 28px; height: 28px; color: var(--ink); margin-top: 2px; }
.feature-rows h3 { font-size: 1.4375rem; letter-spacing: -.02em; line-height: 1.15; }
.feature-rows p { margin-top: 6px; color: var(--sub); }

.join {
  list-style: none; margin-top: clamp(48px, 7vw, 88px); margin-bottom: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
}
.join li {
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
  padding: 0 24px 0 0;
  font-weight: 500;
}
.join li::after {
  content: ""; position: absolute; top: 20px; left: 52px; right: 16px;
  border-top: 2px dashed var(--line2);
}
.join li:last-child::after { display: none; }
.join-n {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font: 500 1rem/1 var(--f-mono);
  background: var(--chip);
}
.join li:last-child .join-n { background: var(--ink); color: var(--bg); }

/* ── Repartidores ─────────────────────────────────────── */

.riders {
  background: var(--map);
  padding: clamp(80px, 11vw, 150px) 0;
  position: relative; overflow: hidden;
}
/* Las calles del mapa vuelven como textura de esta sección. */
.riders::before {
  content: ""; position: absolute; inset: -20%;
  background:
    repeating-linear-gradient(90deg, transparent 0 116px, var(--map-road) 116px 130px),
    repeating-linear-gradient(0deg, transparent 0 86px, var(--map-road) 86px 100px);
  transform: rotate(-8deg);
  opacity: .55;
  pointer-events: none;
}
.riders-grid {
  position: relative;
  display: grid; gap: clamp(32px, 6vw, 80px);
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: center;
}
.riders-copy {
  padding: clamp(28px, 4vw, 48px);
  border-radius: var(--r-sheet);
  background: var(--card);
  box-shadow: var(--shadow);
}
.riders-copy p { margin: 18px 0 28px; color: var(--sub); font-size: 1.125rem; max-width: 40ch; }
.rider-points { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--line2); }
.rider-points li {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px 0; border-bottom: 1.5px solid var(--line2);
  font-size: 1.0625rem;
}
.rider-points svg { width: 26px; height: 26px; color: var(--ink); margin-top: 0; }
.rider-points span { color: color-mix(in srgb, var(--ink) 74%, var(--map)); }
.rider-points b { color: var(--ink); font-weight: 600; }

/* ── Preguntas ────────────────────────────────────────── */

.faq { padding: clamp(80px, 11vw, 150px) 0; }
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0;
  font: 600 1.1875rem/1.3 var(--f-display); letter-spacing: -.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { color: var(--sub); transition: transform .3s var(--ease); }
.faq details[open] summary svg { transform: rotate(180deg); color: var(--brand); }
.faq details p { padding: 0 40px 24px 0; color: var(--sub); max-width: 62ch; }
.faq details a { color: var(--ink); }

/* ── Descarga ─────────────────────────────────────────── */

.download { background: var(--ink); color: var(--bg); padding: clamp(80px, 11vw, 140px) 0; }
.download-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.download-moto { width: 96px; height: 96px; margin-bottom: 16px; }
.download h2 { font-size: clamp(2.5rem, 1.4rem + 4.6vw, 5rem); }
.download p { margin: 16px 0 32px; font-size: 1.1875rem; color: color-mix(in srgb, var(--bg) 72%, transparent); }
.download .stores { justify-content: center; }

/* ── Pie ──────────────────────────────────────────────── */

.site-footer { padding: 64px 0 32px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { margin-top: 14px; color: var(--sub); }
.footer-brand .muted { margin-top: 4px; font-size: .9375rem; }
.footer-h { font: 600 .9375rem/1 var(--f-body); color: var(--sub); margin-bottom: 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-links a {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; text-decoration: none; font-weight: 500;
}
.footer-links a:hover { color: var(--brand); }
.footer-links .glyph { width: 18px; height: 18px; }
.libro {
  margin-top: 14px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--r-card);
  border: 1.5px solid var(--line2);
  font-weight: 600; text-decoration: none;
  transition: border-color .2s;
}
.libro:hover { border-color: var(--brand); }
.libro svg { width: 26px; height: 26px; color: var(--ink); }
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: .875rem; color: var(--sub);
}

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translateX(-50%);
  padding: 14px 20px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-weight: 600; box-shadow: var(--shadow);
  max-width: calc(100vw - 32px);
}

/* ── Páginas legales ──────────────────────────────────── */

.doc { padding: calc(var(--header-h) + clamp(40px, 7vw, 88px)) 0 clamp(64px, 9vw, 112px); }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.75rem); line-height: 1.02; letter-spacing: -.028em; }
.doc-meta { margin-top: 14px; color: var(--sub); }
.doc h2 { font-size: 1.5rem; letter-spacing: -.02em; margin: 44px 0 12px; }
.doc p, .doc li { color: var(--sub); max-width: 68ch; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.doc strong { color: var(--ink); }
.draft-note {
  margin-top: 28px; padding: 16px 18px; border-radius: var(--r-card);
  background: var(--chip); font-size: .9375rem;
}

.form { margin-top: 36px; display: grid; gap: 36px; }
.form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.form legend { font: 700 1.375rem/1.2 var(--f-display); letter-spacing: -.02em; margin-bottom: 16px; padding: 0; }
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label, .field-label { font-weight: 600; font-size: .9375rem; }
.form-error { margin-top: 10px; color: #D8382B; font-weight: 600; }
.form .is-invalid, .choice.is-invalid label { border-color: #D8382B; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border-radius: var(--r-card); border: 1.5px solid var(--line2);
  background: var(--card); color: var(--ink);
  font: 400 1rem/1.4 var(--f-body);
  caret-color: var(--brand);
  transition: border-color .2s;
}
.field textarea { min-height: 128px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--line2) 50%, var(--ink)); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.field input:user-invalid, .field select:user-invalid, .field textarea:user-invalid { border-color: #D8382B; }
.field .hint { font-size: .875rem; color: var(--sub); }
.choice { display: flex; gap: 10px; flex-wrap: wrap; }
.choice label {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 16px; border-radius: var(--r-card);
  border: 1.5px solid var(--line2); cursor: pointer; font-weight: 500;
}
.choice label:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.choice input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }
.libro-done { margin-top: 40px; padding: 28px; border-radius: var(--r-sheet); background: var(--chip); }
.libro-done h2 { margin-top: 0; }
.libro-done a { color: var(--ink); font-weight: 600; }
.libro-text {
  margin: 18px 0; padding: 16px; border-radius: var(--r-card);
  background: var(--card); border: 1px solid var(--line);
  font: 400 .875rem/1.55 var(--f-mono); white-space: pre-wrap; overflow-wrap: anywhere;
  max-height: 320px; overflow: auto;
}
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .9375rem; color: var(--sub); }
.check input { accent-color: var(--brand); width: 20px; height: 20px; margin: 2px 0 0; flex: none; }

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 1080px) {
  .track-card { width: 316px; }
  .nav a { padding: 10px 9px; }
}

@media (max-width: 900px) {
  :root { --header-h: 62px; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto; z-index: 49;
    flex-direction: column; gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; font-size: 1.0625rem; color: var(--ink); border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .nav-toggle { display: inline-flex; }
  .theme-toggle { margin-left: auto; }

  /* En el celular, el mapa queda fijo y los pasos suben como las hojas de la app. */
  .story { grid-template-columns: minmax(0, 1fr); }
  .stage { grid-row: 2 / -1; }
  .track-card { display: none; }
  .pill-rail {
    display: flex; justify-content: center; align-items: center;
    grid-column: 1 / -1; grid-row: 2 / -1;
    position: sticky; top: var(--header-h); align-self: start;
    height: 56px; z-index: 3;
    background: var(--bg-fade);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .pill-rail .status-pill { box-shadow: none; background: var(--card); border: 1px solid var(--line); padding-block: 7px; }
  .step { padding: 0 12px 16px; align-items: flex-end; min-height: 88svh; }
  .step--hero { grid-row: 1; min-height: 0; align-items: flex-start; padding: calc(var(--header-h) + 24px) var(--gutter) 28px; background: var(--bg); }
  .lede { margin: 14px 0 20px; font-size: 1.0625rem; }
  .step--hero .stores { margin-bottom: 16px; }
  .step--hero .panel { padding: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; margin: 0; }
  .step-spacer { display: block; grid-row: 2; height: 62svh; }
  .step[data-step="1"] { grid-row: 3; }
  .step[data-step="4"] { min-height: 92svh; padding-bottom: 24px; }
  .step:not(.step--hero) .panel {
    margin: 0; width: 100%;
    padding: 26px 22px 28px;
    background: var(--card);
    -webkit-backdrop-filter: none; backdrop-filter: none;
    box-shadow: var(--shadow);
  }
  .step:not(.step--hero) .panel::before {
    content: ""; display: block; width: 40px; height: 4px; border-radius: 4px;
    background: var(--line2); margin: -10px auto 18px;
  }

  .partners-grid, .riders-grid, .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .partners-intro { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .header-cta { display: none; }
  .join { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .join li { flex-direction: row; align-items: center; padding: 0; }
  .join li::after { display: none; }
  .stores { display: grid; grid-template-columns: 1fr 1fr; }
  .store-btn { justify-content: center; min-height: 52px; padding: 8px 10px; gap: 8px; }
  .store-btn span { font-size: .9375rem; }
  .store-btn small { font-size: .625rem; }
  .store-btn .glyph { width: 20px; height: 20px; }
  .download .stores { width: 100%; }
  .form fieldset { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .faq details p { padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
