/* RutaQR · rutaqr.online · ronda 2 de diseño.
   Principal: lienzo blanco «de día» con un solo capítulo nocturno (estilo Flighty);
   préstamos de Apple: enunciados monumentales, cejas 21 px, panel de prueba
   cuantificada. El color vive en las capturas, no en los fondos. Sin frameworks. */

:root {
  --bg: #ffffff;
  --porcelain: #fafafa;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgb(0 0 0 / 0.08);
  --link: #0066cc;
  --live: #0a84ff;
  --night: #05010d;
  --night-panel: #050408;
  --carbon: #1d1d1f;
  --stage: 1000px;
  --gutter: 24px;
  --radius: 20px;
  --shadow-2: 0 0 0 1px rgb(0 0 0 / 0.04), 0 2px 4px rgb(0 0 0 / 0.02), 0 12px 32px rgb(0 0 0 / 0.02);
  --sans: system-ui, -apple-system, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0, 0, 0.5, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.47 var(--sans);
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--live); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: #fff; padding: 10px 16px; border-radius: 999px; z-index: 30; }
.skip:focus { left: 16px; }

.stage { width: 100%; max-width: calc(var(--stage) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.stage-wide { max-width: calc(1400px + 2 * var(--gutter)); }
.narrow { max-width: calc(737px + 2 * var(--gutter)); }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- Navegación: cápsula flotante ---------- */
.nav-wrap { position: fixed; top: 12px; left: 0; right: 0; z-index: 20; padding: 0 12px; pointer-events: none; }
.nav-capsule {
  pointer-events: auto;
  max-width: var(--stage); height: 56px; margin: 0 auto; padding: 0 10px 0 18px;
  display: flex; align-items: center; gap: 24px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.45);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--shadow-2);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav { display: flex; align-items: center; gap: 22px; margin-left: auto; font-size: 15px; font-weight: 500; }
.nav a { color: var(--text); }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: none; color: #000; }
.nav .lang { font-size: 13px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.nav-dark .nav-capsule { background: rgb(5 1 13 / 0.45); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08); }
.nav-dark .brand, .nav-dark .nav a, .nav-dark .menu summary { color: #fff; }
.nav-dark .nav .lang { border-color: rgb(255 255 255 / 0.2); }
.nav-dark .nav .btn-primary { background: #fff; color: #000; }
.menu { display: none; margin-left: auto; position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--text); }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] .menu-panel { display: flex; }
.menu-panel { display: none; flex-direction: column; position: absolute; right: 0; top: 50px; min-width: 220px; background: #fff; border-radius: 20px; padding: 8px; box-shadow: var(--shadow-2), 0 24px 48px rgb(0 0 0 / 0.06); }
.menu-panel a { padding: 12px 14px; border-radius: 12px; color: var(--text); }
.menu-panel a:hover { background: var(--porcelain); text-decoration: none; }

/* ---------- Botones: píldora 44 px, ícono 18 px antes del texto ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 40px;
  font: 600 17px/1 var(--sans); letter-spacing: -0.022em; border: 0;
  transition: transform .2s var(--ease);
}
.btn:hover { text-decoration: none; transform: scale(1.02); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: #000; color: #fff; }
.btn-light { background: #fff; color: #000; }
.btn-ghost { color: var(--link); padding: 0 8px; }
.btn-small { height: 36px; padding: 0 16px; font-size: 15px; }
.btn-small svg { width: 16px; height: 16px; }
.soon { display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 40px; background: var(--porcelain); color: var(--muted); font-size: 15px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
.center .actions, .actions.center { justify-content: center; }

/* ---------- Tipografía (Apple: grande, tracking negativo según tamaño) ---------- */
.eyebrow { font-size: 21px; font-weight: 600; color: var(--muted); margin: 0 0 8px; letter-spacing: 0.011em; }
h1, h2, h3 { margin: 0; color: inherit; }
.hero-title { font-size: clamp(44px, 7vw, 72px); font-weight: 700; line-height: 1.05; letter-spacing: -1px; }
.chapter { font-size: clamp(44px, 8vw, 96px); font-weight: 700; line-height: 1.02; letter-spacing: -0.015em; }
h2 { font-size: clamp(32px, 5vw, 56px); font-weight: 700; line-height: 1.07; letter-spacing: -0.01em; }
h3 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; line-height: 1.12; letter-spacing: -0.009em; }
.lead { font-size: clamp(17px, 1.8vw, 19px); font-weight: 500; color: var(--muted); line-height: 1.42; max-width: 737px; margin: 20px 0 0; }
.center .lead, .lead.center { margin-left: auto; margin-right: auto; }
.note { font-size: 14px; color: var(--muted); }
.panel p { color: var(--muted); margin: 12px 0 0; }

/* ---------- Secciones ---------- */
section { padding: 120px 0; }
.day-return { padding-top: 180px; }

/* ---------- Héroe centrado con halo ---------- */
.hero { padding: 152px 0 0; text-align: center; overflow: hidden; }
.halo-stage { position: relative; height: 640px; margin-top: 72px; }
.halo-stage .phone { position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 340px; }
.halo { list-style: none; margin: 0; padding: 0; }
.halo li {
  position: absolute; width: 260px; text-align: left; z-index: 2;
  background: #fff; border-radius: 16px; padding: 16px;
  box-shadow: var(--shadow-2);
}
.halo strong { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; }
.halo span { display: block; font-size: 15px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.halo li:nth-child(1) { top: 64px;  left: calc(50% - 470px); opacity: 1; }
.halo li:nth-child(2) { top: 150px; right: calc(50% - 470px); opacity: 1; }
.halo li:nth-child(3) { top: 300px; left: calc(50% - 440px); opacity: .6; }
.halo li:nth-child(4) { top: 400px; right: calc(50% - 450px); opacity: .6; }
.halo li:nth-child(5) { top: 520px; left: calc(50% - 400px); opacity: .3; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live); margin-right: 6px; vertical-align: 2px; }

/* ---------- Marco de teléfono (CSS) ---------- */
.phone {
  position: relative; margin: 0; width: min(300px, 76vw);
  padding: 11px; border-radius: 56px; background: #0b0b0d;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.05) inset, 0 30px 60px -30px rgb(0 0 0 / 0.25);
}
.phone::before { content: ""; position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 92px; height: 26px; border-radius: 999px; background: #000; z-index: 1; }
.phone img { border-radius: 45px; width: 100%; background: #f2f2f2; }
.phone figcaption { margin-top: 14px; text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- Paneles (radio 20, relleno 40, capturas recortadas por el borde) ---------- */
.panel { position: relative; background: var(--porcelain); border-radius: var(--radius); padding: 40px; overflow: hidden; }
.panel-wide { min-height: 480px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.panel-wide .panel-text { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; max-width: 420px; }
.panel-wide .bleed { position: relative; }
.panel-wide .bleed .phone { position: absolute; right: 20px; top: 0; width: 320px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 32px; }
.pair .panel { min-height: 420px; }
.pair .panel.tall { min-height: 560px; }
.pair .bleed-bottom { position: absolute; left: 50%; bottom: -220px; transform: translateX(-50%); width: 280px; }
.big-word { font-size: clamp(56px, 8vw, 96px); font-weight: 700; letter-spacing: -0.015em; line-height: 1; margin-top: 40px; color: var(--text); }
a.panel { color: inherit; display: block; transition: transform .3s var(--ease); }
a.panel:hover { text-decoration: none; transform: scale(1.01); }
a.panel .more { color: var(--link); font-weight: 500; margin-top: 16px; display: inline-block; }

/* ---------- Capítulo nocturno «En vivo» ---------- */
.night { background: var(--night); color: #fff; padding: 160px 0; }
.night .eyebrow { color: #86868b; }
.night h2 { color: #fff; font-size: clamp(36px, 5vw, 56px); }
.night .lead { color: #cccccc; font-size: clamp(19px, 2vw, 22px); font-weight: 400; }
.night .panel { background: var(--night-panel); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08); }
.night .panel p { color: #a1a1a6; }
.night .panel h3 { color: #fff; }
.night-stage { margin-top: 64px; min-height: 560px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; }
.night-stage .bleed { position: relative; }
.night-stage .bleed .phone { position: absolute; right: 0; top: 0; width: 300px; }
.map { width: 100%; height: auto; border-radius: 14px; }
.map .street { stroke: rgb(255 255 255 / 0.07); stroke-width: 10; fill: none; }
.map .route { stroke: rgb(255 255 255 / 0.55); stroke-width: 5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.map .stop { fill: var(--night-panel); stroke: rgb(255 255 255 / 0.7); stroke-width: 3; }
.map .combi { fill: var(--live); }
.map .combi-halo { fill: var(--live); opacity: .25; }
.map-caption { margin-top: 18px; font-size: 15px; color: #a1a1a6; }
.rows { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.rows li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 16px; background: rgb(255 255 255 / 0.04); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06); color: #f5f5f7; font-weight: 600; }
.rows small { color: #a1a1a6; font-weight: 400; font-size: 15px; }
.rows svg { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; margin-right: 6px; }
.night-close { text-align: center; margin-top: 120px; }
.night-close h2 { font-size: clamp(32px, 4vw, 44px); }

/* ---------- Panel de prueba cuantificada (Apple) ---------- */
.proof { background: var(--carbon); color: #fff; border-radius: 28px; padding: 40px; }
.proof .eyebrow { color: #86868b; }
.proof h2 { color: #fff; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.tile { background: #000; border-radius: 28px; padding: 32px 28px; min-height: 180px; display: flex; flex-direction: column; justify-content: space-between; }
.tile .num { font-size: 48px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.05; color: #fff; }
.tile .num.words { font-size: 32px; }
.tile .q { color: #a1a1a6; font-size: 17px; margin-top: 16px; }
.proof .note { color: #a1a1a6; margin-top: 24px; }

/* ---------- Pasos ---------- */
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 22px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-2); font-weight: 600; font-size: 16px; }
.steps strong { display: block; font-size: 19px; }
.steps p { margin: 4px 0 0; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 20px 0 0; list-style: none; }
.chips li { background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 15px; font-weight: 500; box-shadow: var(--shadow-2); }

/* ---------- Preguntas ---------- */
.faq { margin-top: 32px; }
.faq details { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 19px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; color: var(--muted); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 12px 0 0; color: var(--muted); }

/* ---------- Despedida y familia de producto ---------- */
.farewell { text-align: center; padding-bottom: 40px; overflow: hidden; }
.farewell h2 { font-size: 48px; }
.family { display: flex; justify-content: center; align-items: center; gap: 56px; margin-top: 88px; padding: 40px 0 80px; }
.family .phone { width: 260px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 30px 60px -20px rgb(0 0 0 / 0.12); }
.family .phone:first-child { transform: rotate(-7deg); }
.family .phone:last-child { transform: rotate(6deg) translateY(30px); }
.qr-card { width: 220px; background: #fff; border-radius: 18px; padding: 22px; transform: rotate(3deg) translateY(-20px); box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 24px 48px -16px rgb(0 0 0 / 0.12); text-align: center; }
.qr-card svg { width: 100%; height: auto; }
.qr-card strong { display: block; margin-top: 14px; font-size: 17px; }
.qr-card span { display: block; font-size: 13px; color: var(--muted); }

/* ---------- Texto legal ---------- */
.prose { padding: 152px 0 120px; }
.prose h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.05; }
.prose h2 { font-size: 28px; margin: 48px 0 12px; }
.prose h3 { font-size: 21px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose p a, .prose li a, .callout a, .prose td a { text-decoration: underline; text-underline-offset: 3px; }
.prose .updated { font-size: 15px; color: var(--muted); margin: 16px 0 40px; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--text); font-weight: 600; }
.table-scroll { overflow-x: auto; }
.callout { background: var(--porcelain); border-radius: var(--radius); padding: 24px 28px; margin: 24px 0; }
.callout p { margin: 0; }

/* ---------- Pie ---------- */
.site-footer { background: var(--porcelain); padding: 64px 0 40px; font-size: 15px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 32px; }
.footer-icon { width: 48px; height: 48px; border-radius: 12px; }
.footer-grid p { margin: 14px 0 0; }
.site-footer h2 { font-size: 13px; font-weight: 600; color: var(--text); margin: 0 0 12px; letter-spacing: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.signature { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tiles-mini { display: flex; gap: 6px; }
.tiles-mini svg { width: 48px; height: 48px; border-radius: 10px; }
.signature .copy { margin-left: auto; }

/* ---------- 404 ---------- */
.notfound { min-height: 80vh; display: grid; place-items: center; text-align: center; padding: 160px 0 100px; }
.notfound .big-word { color: #86868b; margin: 0 0 12px; }

/* ---------- Movimiento (todo se apaga con «reducir movimiento» y sin JS) ---------- */
.map .combi-group { transform: translate(230px, 190px); }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .halo li { transition: opacity .5s var(--ease), transform .5s var(--ease); }
  .js .halo:not(.in) li { opacity: 0; transform: translateY(16px); }
  .js .halo.in li:nth-child(2) { transition-delay: 80ms; }
  .js .halo.in li:nth-child(3) { transition-delay: 160ms; }
  .js .halo.in li:nth-child(4) { transition-delay: 240ms; }
  .js .halo.in li:nth-child(5) { transition-delay: 320ms; }
  .live-dot { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgb(10 132 255 / 0.45); } 50% { box-shadow: 0 0 0 6px rgb(10 132 255 / 0); } }
  .map .combi-group { transform: none; offset-path: path("M60 330 L60 250 L230 250 L230 130 L430 130 L430 60 L560 60"); offset-rotate: 0deg; animation: drive 16s ease-in-out infinite alternate; }
  @keyframes drive { from { offset-distance: 0%; } to { offset-distance: 100%; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, a.panel { transition: none; }
}

/* ---------- Tabletas y teléfonos ---------- */
@media (max-width: 960px) {
  .halo li:nth-child(1) { left: 0; }
  .halo li:nth-child(2) { right: 0; }
  .halo li:nth-child(n+3) { display: none; }
  .panel-wide, .night-stage { grid-template-columns: 1fr; }
  .panel-wide .bleed, .night-stage .bleed { min-height: 420px; }
  .panel-wide .bleed .phone, .night-stage .bleed .phone { left: 50%; right: auto; transform: translateX(-50%); }
  .tiles { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .family { gap: 24px; }
  .family .phone { width: 200px; }
  .qr-card { width: 170px; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .menu { display: block; }
  section { padding: 88px 0; }
  .day-return { padding-top: 120px; }
  .night { padding: 112px 0; }
  .hero { padding-top: 124px; }
  .halo-stage { height: 560px; margin-top: 48px; }
  .halo-stage .phone { width: 280px; top: 70px; }
  .halo li { width: 200px; padding: 12px; }
  .halo li:nth-child(1) { top: 0; left: 0; }
  .halo li:nth-child(2) { top: 0; right: 0; left: auto; }
  .halo strong { font-size: 15px; }
  .halo span { font-size: 13px; }
  .panel { padding: 28px; }
  .pair { grid-template-columns: 1fr; gap: 20px; }
  .tiles { grid-template-columns: 1fr; }
  .farewell h2 { font-size: 40px; }
  .family { flex-direction: column; gap: 32px; }
  .family .phone:last-child { display: none; }
  .family .phone { width: 220px; }
  .qr-card { transform: rotate(3deg); }
  .footer-grid { grid-template-columns: 1fr; }
  .signature .copy { margin-left: 0; }
  .stage { padding: 0 20px; }
}

/* ---------- Piezas pequeñas compartidas ---------- */
.hero-plain { padding-bottom: 72px; }
.section-tight { padding-top: 0; }
.h3 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; line-height: 1.12; letter-spacing: -0.009em; }
.pair .panel.compact { min-height: 0; }
.spaced { margin-top: 32px; }
.app-icon { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 24px; }
.hero .note { margin-top: 16px; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; }
.nav-dark .nav a.btn-primary { color: #000; }
.pair .panel.tall { min-height: 680px; }
.pair .bleed-bottom { bottom: -200px; }
@media (max-width: 720px) { .pair .panel.tall { min-height: 620px; } }
@media (max-width: 720px) {
  .halo li { width: calc(50% - 6px); }
}
