/* Hilo — landing (26-sep-2026, Etapa 59). Diseño APROBADO por el founder: docs/mockups/landing_media_26sep2026/ (repo de backend).
 * Móvil primero. El ancho lo mide su contenedor (.frame) con @container, no la ventana: así se puede revisar la vista de teléfono en un computador.
 * Colores, tipografía y radios salen de css/tokens.css; acá solo hay lo propio de la landing. */

body.landing {
  --bg-sunk: #F1EFEA;
  --text-muted: #6E6C76;         /* más oscuro que el del sistema: el texto chico tiene que leerse en móvil */
  --gutter: 16px;
}
@media (prefers-color-scheme: dark) {
  body.landing { --bg-sunk: #121116; --text-muted: #A5A2AE; }
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--hilo-ink); color: #fff; padding: var(--space-2xs) var(--space-md);
  border-radius: 0 0 var(--radius-sm) 0; font-size: var(--text-sm); font-weight: 700; text-decoration: none;
}
.skip-link:focus { left: 0; }
.frame { container-type: inline-size; container-name: page; position: relative; background: var(--bg-canvas); }

* { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body.landing { margin: 0; background: var(--bg-canvas); color: var(--text-primary); font: 400 16px/1.55 var(--font-body); -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; }
  img, video { max-width: 100%; display: block; }
  a { color: inherit; }
  b { font-weight: 700; }
  :focus-visible { outline: 3px solid var(--hilo-coral); outline-offset: 2px; border-radius: 6px; }

  /* ---------- Encabezado: una sola fila ---------- */
  .top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px var(--gutter); background: color-mix(in srgb, var(--bg-canvas) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-subtle); }
  .brand { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; text-decoration: none; }
  .brand img { width: 30px; height: 30px; object-fit: contain; }
  .brand span { font: 700 20px/1 var(--font-display); letter-spacing: -.01em; }
  .nav-links { display: none; gap: 4px; }
  .nav-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none; font-weight: 500; color: var(--text-secondary); border-radius: var(--radius-sm); }
  .nav-links a:hover { color: var(--text-primary); }
  .lang { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg-sunk); border-radius: var(--radius-full); }
  .lang button { min-width: 40px; min-height: 38px; padding: 0 8px; border: 0; border-radius: var(--radius-full); background: none; color: var(--text-secondary); font: 700 13px var(--font-body); cursor: pointer; }
  .lang button[aria-current="true"] { background: var(--bg-surface); color: var(--text-primary); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
  .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: var(--radius-full); text-decoration: none; font: 700 15px var(--font-body); white-space: nowrap; }
  .btn-primary { color: #fff; background: var(--accent-gradient); box-shadow: 0 4px 16px var(--accent-glow-coral); }
  .btn-ghost { display: none; color: var(--text-primary); border: 1px solid var(--border-subtle); background: var(--bg-surface); }
  .top .btn-primary { min-height: 40px; padding: 0 16px; font-size: 14px; }

  /* ---------- Bloques ---------- */
  section { padding: 40px var(--gutter); }
  .eyebrow { margin: 0 0 8px; font: 700 12.5px/1.2 var(--font-body); letter-spacing: .09em; text-transform: uppercase; color: var(--text-accent); }
  h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
  h2 { font-size: clamp(1.5rem, 6.4cqw, 2.2rem); line-height: 1.15; font-weight: 700; letter-spacing: -.015em; }
  p { margin: 0; }
  .lead { color: var(--text-secondary); font-size: 16px; }
  .thread { height: 3px; margin: 0 var(--gutter); border: 0; border-radius: 2px; background: var(--accent-gradient); opacity: .55; }

  /* ---------- Héroe ---------- */
  .hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 24px; padding-bottom: 32px; }
  .hero h1 { font-size: clamp(2rem, 9cqw, 3.6rem); line-height: 1.06; font-weight: 800; letter-spacing: -.025em; }
  .hero .sub { font-size: 17px; line-height: 1.5; color: var(--text-secondary); }
  .txt { display: flex; flex-direction: column; gap: 14px; }
  .hero-media { position: relative; margin: 2px 0 4px; overflow: hidden; aspect-ratio: 16 / 9; background: #111; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
  .hero-media video { width: 100%; height: 100%; object-fit: cover; }
  .chip-made { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; font: 700 12.5px/1 var(--font-body); color: #fff; background: rgba(20,19,24,.62); backdrop-filter: blur(6px); border-radius: var(--radius-full); }
  .chip-made i { width: 7px; height: 7px; border-radius: 50%; background: var(--hilo-coral); }
  .watch { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; font: 700 14px var(--font-body); color: #fff; background: rgba(20,19,24,.7); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.28); border-radius: var(--radius-full); cursor: pointer; }
  .watch svg { width: 18px; height: 18px; }
  .cta-row { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
  .cta-row .btn { min-height: 52px; font-size: 16px; }
  .fine { font-size: 13.5px; color: var(--text-muted); }
  .fine a { color: var(--text-accent); font-weight: 600; }
  .fine.acct { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; min-height: 44px; }
  .fine.acct a { display: inline-flex; align-items: center; min-height: 44px; }
  .cap { font-size: 13.5px; color: var(--text-muted); }

  /* ---------- La diferencia + mismas escenas ---------- */
  .diff .statement { font: 700 clamp(1.4rem, 6.2cqw, 2.1rem)/1.2 var(--font-display); letter-spacing: -.015em; text-wrap: balance; }
  .diff .lead { margin-top: 10px; }
  .film { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 22px; position: relative; }
  .film::before { content: ""; position: absolute; left: 6%; right: 6%; top: calc(50% - 14px); height: 2px; background: var(--accent-gradient); z-index: 0; opacity: .7; }
  .film figure { position: relative; z-index: 1; margin: 0; }
  .film img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-md); border: 2px solid var(--bg-canvas); box-shadow: var(--shadow-md); }
  .film figcaption { margin-top: 6px; font: 600 12.5px var(--font-body); color: var(--text-muted); text-align: center; }
  .film-cap { margin-top: 12px; font-size: 14px; color: var(--text-secondary); }
  .film-cap b { color: var(--text-primary); }
  .link-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 8px; padding: 0 16px 0 12px; font: 700 14.5px var(--font-body); color: var(--text-accent); background: var(--accent-tint-bg); border: 1px solid var(--accent-tint-border); border-radius: var(--radius-full); cursor: pointer; }
  .link-btn svg { width: 16px; height: 16px; }

  /* ---------- Carruseles ---------- */
  .rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 18px calc(-1 * var(--gutter)) 0; padding: 4px var(--gutter) 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .rail::-webkit-scrollbar { display: none; }
  .rail > * { flex: 0 0 78%; scroll-snap-align: center; min-width: 0; }
  .rail-hint { display: flex; justify-content: center; gap: 6px; margin-top: 2px; }
  .rail-hint i { width: 7px; height: 7px; border-radius: 50%; background: var(--border-subtle); }
  .rail-hint i.on { background: var(--hilo-coral); width: 18px; border-radius: 4px; }

  .mc { display: flex; flex-direction: column; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; }
  .mc-media { position: relative; aspect-ratio: 1 / 1.05; background: var(--bg-sunk); overflow: hidden; }
  .mc-media > img, .mc-media > video { width: 100%; height: 100%; object-fit: cover; }
  .mc-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
  .tag { align-self: flex-start; justify-self: start; padding: 3px 10px; font: 700 13px/1.3 var(--font-body); letter-spacing: .02em; color: var(--text-accent); background: var(--accent-tint-bg); border: 1px solid var(--accent-tint-border); border-radius: var(--radius-full); }
  .mc-title { font: 600 16px/1.3 var(--font-display); }
  .play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: #fff; background: var(--accent-gradient); box-shadow: 0 6px 20px rgba(0,0,0,.35); cursor: pointer; }
  .play svg { width: 26px; height: 26px; margin-left: 3px; }
  .play[data-state="playing"] svg { margin-left: 0; }
  .mc-media.panel { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 18px; background: linear-gradient(160deg, #1F3872 0%, #3A4D9B 45%, #C25A3A 130%); color: #fff; }
  .mc-media.panel .play { position: static; margin: 0; width: 56px; height: 56px; flex: 0 0 auto; }
  .wave { display: flex; align-items: center; gap: 3px; height: 72px; }
  .wave i { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: rgba(255,255,255,.4); }
  .wave i.on { background: #fff; }
  .panel .row { display: flex; align-items: center; gap: 14px; }
  .panel .time { font: 600 13px var(--font-body); opacity: .9; font-variant-numeric: tabular-nums; }
  .quote { font: 600 15.5px/1.5 var(--font-display); text-wrap: pretty; }
  .quote.scroll { max-height: 9.5em; overflow: hidden; }

  /* ---------- Personas (filas que se abren) ---------- */
  .persona-list { display: flex; flex-direction: column; margin-top: 18px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; }
  .persona-list details { border-top: 1px solid var(--border-subtle); }
  .persona-list details:first-child { border-top: 0; }
  .persona-list summary { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 12px 16px; cursor: pointer; list-style: none; font: 600 16px/1.35 var(--font-display); }
  .persona-list summary::-webkit-details-marker { display: none; }
  .persona-list summary::after { content: ""; flex: 0 0 auto; width: 10px; height: 10px; margin-left: auto; border-right: 2.5px solid var(--text-muted); border-bottom: 2.5px solid var(--text-muted); transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
  .persona-list details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
  .persona-list details[open] summary { color: var(--text-accent); }
  .persona-list .maps { padding: 0 16px 16px; color: var(--text-secondary); font-size: 15px; }
  .persona-list .maps b { color: var(--text-primary); }
  .persona-note { margin-top: 14px; padding: 14px 16px; font-size: 15px; color: var(--text-secondary); background: var(--accent-tint-bg); border: 1px solid var(--accent-tint-border); border-radius: var(--radius-md); }
  .persona-note b { color: var(--text-primary); }

  /* ---------- Los 10 espacios ---------- */
  .rail.spaces > * { flex-basis: 44%; }
  .sp { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
  .sp-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-sunk); }
  .sp-media img { width: 100%; height: 100%; object-fit: cover; }
  .sp-media.wavebg { display: grid; place-items: center; background: linear-gradient(160deg, #1F3872, #C25A3A); }
  .sp-media.wavebg .wave { width: 76%; height: 44px; }
  .sp-media.todo { display: grid; place-items: center; background: repeating-linear-gradient(135deg, var(--bg-sunk) 0 10px, var(--bg-surface) 10px 20px); }
  .sp-media.todo svg { width: 34px; height: 34px; color: var(--text-muted); }
  .sp-body { padding: 10px 12px 12px; }
  .sp-name { font: 600 14.5px/1.25 var(--font-display); }
  .sp-unit { margin-top: 2px; font-size: 13px; color: var(--text-muted); }
  .sp .flag { position: absolute; left: 8px; top: 8px; padding: 2px 8px; font: 700 12px/1.4 var(--font-body); color: #5B3B00; background: #FFF3CC; border: 1px dashed #D9A400; border-radius: var(--radius-full); }
  .pillars { display: flex; flex-direction: column; margin-top: 22px; }
  .pillar { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-content: start; gap: 4px 12px; padding: 16px 0; border-top: 1px solid var(--border-subtle); }
  .pillar .dot { grid-row: 1 / span 3; width: 12px; height: 12px; margin-top: 6px; border-radius: 50%; background: var(--accent-gradient); }
  .pillar .tag { grid-column: 2; }
  .pillar h3 { grid-column: 2; font-size: 17px; line-height: 1.3; font-weight: 600; }
  .pillar p { grid-column: 2; color: var(--text-secondary); font-size: 15px; }

  /* ---------- Cómo funciona (el hilo como línea real) ---------- */
  .steps { position: relative; display: flex; flex-direction: column; gap: 22px; margin-top: 20px; padding-left: 0; }
  .steps::before { content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 3px; border-radius: 2px; background: var(--accent-gradient); opacity: .7; }
  .step { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); align-content: start; gap: 4px 14px; }
  .step .n { grid-row: 1 / span 3; z-index: 1; width: 36px; height: 36px; display: grid; place-items: center; font: 700 15px var(--font-display); color: #fff; background: var(--accent-gradient); border-radius: 50%; box-shadow: 0 0 0 5px var(--bg-canvas); }
  .step h3 { font-size: 17px; line-height: 1.3; font-weight: 600; padding-top: 6px; }
  .step p { color: var(--text-secondary); font-size: 15px; }
  .mosaic { grid-column: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 8px; padding: 8px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
  .mosaic img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }

  /* ---------- Confianza ---------- */
  .trust-card { padding: 22px 18px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); }
  .trust-card h2 { margin-bottom: 8px; }
  .trust-card .punch { margin-top: 10px; font-weight: 600; }
  .facts { display: flex; flex-direction: column; gap: 12px; margin: 18px 0; }
  .fact { position: relative; padding-left: 22px; font-size: 14.5px; color: var(--text-secondary); }
  .fact::before { content: ""; position: absolute; left: 0; top: .5em; width: 9px; height: 9px; border-radius: 50%; background: var(--hilo-coral); }
  .fact b { color: var(--text-primary); }
  .trust-card .btn { width: 100%; min-height: 52px; font-size: 16px; }

  /* ---------- Planes ---------- */
  .rail.plans > * { flex-basis: 80%; }
  .plan { display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); }
  .plan.free { border-color: var(--hilo-coral); box-shadow: 0 0 0 1px var(--hilo-coral); }
  .plan.pro { background: linear-gradient(160deg, var(--bg-surface), var(--accent-tint-bg)); border-color: var(--accent-tint-border); }
  .plan h3 { font-size: 18px; font-weight: 700; }
  .price { font: 800 30px/1 var(--font-display); letter-spacing: -.02em; }
  .price small { font: 500 14px var(--font-body); color: var(--text-muted); letter-spacing: 0; }
  .plan .d { font-size: 14.5px; color: var(--text-secondary); }
  .plan .not { margin-top: auto; padding-top: 8px; font-size: 13.5px; color: var(--text-muted); border-top: 1px dashed var(--border-subtle); }
  .plan .not b { color: var(--text-secondary); }
  .plan .btn { margin-top: 10px; width: 100%; min-height: 48px; font-size: 15px; }
  .plan .btn-out { color: var(--text-primary); background: var(--bg-surface); border: 1px solid var(--border-subtle); }
  .plans-note { margin-top: 6px; font-size: 14px; color: var(--text-secondary); }

  /* ---------- Pie ---------- */
  footer { padding: 32px var(--gutter) 28px; background: var(--bg-sunk); border-top: 1px solid var(--border-subtle); }
  .f-brand { display: flex; gap: 12px; align-items: center; }
  .f-brand img { width: 32px; height: 32px; object-fit: contain; flex: 0 0 auto; }
  .f-brand p { font-size: 14px; color: var(--text-secondary); }
  .f-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin-top: 18px; }
  .f-col h4 { margin: 0 0 4px; font: 700 12.5px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
  .f-col a { display: flex; align-items: center; min-height: 44px; font-size: 14.5px; text-decoration: none; color: var(--text-secondary); }
  .f-col a:hover { color: var(--text-primary); }
  .f-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-subtle); font-size: 13px; color: var(--text-muted); }

  /* ---------- Botón fijo (solo móvil) ---------- */
  .dock { position: sticky; bottom: 0; z-index: 25; height: 0; pointer-events: none; }
  .dock .bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--bg-canvas) 70%, transparent); transform: translateY(110%); opacity: 0; transition: transform .25s, opacity .25s; }
  .dock .bar .btn { width: 100%; min-height: 52px; font-size: 16px; pointer-events: auto; }
  .dock.show .bar { transform: none; opacity: 1; }

  /* ---------- Vista completa del piloto ---------- */
  .modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(10,9,12,.88); }
  .modal.open { display: flex; }
  .modal .box { position: relative; width: min(100%, 900px); }
  .modal video { width: 100%; max-height: 80vh; background: #000; border-radius: var(--radius-md); }
  .modal .x { position: absolute; right: 0; top: -52px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font: 400 26px/1 var(--font-body); cursor: pointer; }
  .modal .mcap { margin-top: 10px; font-size: 14px; color: #D8D5DF; text-align: center; }

  /* ---------- Pantalla ancha (la landing responde al ancho de SU contenedor) ---------- */
  @container page (min-width: 700px) {
    section, .top, footer { padding-inline: 32px; }
    section { padding-block: 64px; }
    .nav-links { display: flex; }
    .btn-ghost { display: inline-flex; }
    .top { padding-inline: 32px; }
    .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; column-gap: 40px; padding-block: 48px 56px; }
    .hero h1 { font-size: clamp(2.2rem, 3.2cqw, 2.8rem); }
    .hero > .eyebrow, .hero > h1, .hero > .txt { grid-column: 1; }
    .hero > .txt { gap: 16px; }
    .hero > .hero-media { grid-column: 2; grid-row: 1 / span 3; align-self: center; margin: 0; }
    .hero > .cap { grid-column: 2; }
    .cta-row { flex-direction: row; align-items: center; }
    .cta-row .btn { min-height: 54px; padding-inline: 28px; }
    .rail { overflow: visible; margin-inline: 0; padding-inline: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
    .rail > * { flex: initial; }
    .rail-hint { display: none; }
    .rail.spaces { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
    .rail.plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .diff { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center; }
    .film { margin-top: 0; }
    .film-cap { margin-top: 14px; font-size: 15.5px; }
    .persona-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; background: none; border: 0; gap: 12px; overflow: visible; }
    .persona-list details { border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-surface); }
    .pillars { flex-direction: row; gap: 24px; }
    .pillar { flex: 1 1 0; grid-template-columns: minmax(0, 1fr); border-top: 0; padding: 0; }
    .pillar .dot { grid-row: auto; margin-bottom: 8px; }
    .pillar .tag, .pillar h3, .pillar p { grid-column: 1; }
    .steps { flex-direction: row; gap: 28px; }
    .steps::before { display: none; }
    .step { flex: 1 1 0; grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .step .n { grid-row: auto; }
    .step .mosaic { grid-column: 1; }
    .trust-card { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; padding: 32px; }
    .trust-card .btn { width: auto; padding-inline: 28px; }
    .facts { margin: 0 0 20px; justify-content: center; }
    .f-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dock { display: none; }
    .diff .statement { max-width: 22ch; }
  }
  @container page (min-width: 1000px) {
    .rail.plans { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
    .plan { padding: 16px; }
    .price { font-size: 26px; }
    section { padding-inline: max(32px, calc((100cqw - 1160px) / 2)); }
    .top, footer { padding-inline: max(32px, calc((100cqw - 1160px) / 2)); }
    .thread { margin-inline: max(32px, calc((100cqw - 1160px) / 2)); }
  }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .dock .bar { transition: none; } }
