/* =============================================================
   Drift — página oficial
   Arquetipo 05 · Mouse-Reactive Gradient
   Fondo casi negro, paleta monocroma con UN solo acento (ámbar),
   tipografía enorme y un degradado que reacciona al cursor o, en
   táctil, al scroll.
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  /* Los mismos del design system de la app (src/theme/index.js), para
     que la web y el teléfono se reconozcan como la misma cosa. */
  --bg:        #000000;
  --bg-2:      #0F0F0F;
  --bg-3:      #1A1A1A;
  --line:      #2D2D2D;
  --ink:       #FFFFFF;
  --mute:      #A0A0A0;
  --dim:       #555555;
  --accent:    #F5A800;
  --accent-2:  #D48E00;

  /* Posición del degradado. Las mueve main.js (cursor o scroll). */
  --mx: 50%;
  --my: 34%;

  --wrap: 1080px;
  --gutter: clamp(18px, 5vw, 32px);

  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
}

/* =============================================================
   2. Reset y base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  /* Que el ancla no quede debajo de la barra fija */
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* =============================================================
   3. Utilidades
   ============================================================= */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #000; padding: 10px 16px; font-weight: 700;
}
.skip:focus { left: 8px; top: 8px; }

/* Foco visible en todo lo interactivo. */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================================
   4. Tipografía
   ============================================================= */
h1, h2, h3 { line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; }

/* La tipografía enorme es la firma del arquetipo. clamp() con mínimo
   generoso: si se aprieta demasiado, las letras se cortan en pantallas
   de 320 px (gotcha B.4). */
h1 {
  font-size: clamp(40px, 11vw, 104px);
  font-weight: 900;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(28px, 6.2vw, 56px);
  font-weight: 900;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h3 { font-size: clamp(17px, 2.2vw, 20px); font-weight: 700; letter-spacing: -0.01em; }

.kicker {
  font-size: 12px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
}
.lead { color: var(--mute); font-size: clamp(16px, 2.1vw, 19px); max-width: 62ch; }

em { font-style: normal; color: var(--accent); }

/* =============================================================
   5. Componentes
   ============================================================= */

/* ── Botones ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 28px; border-radius: 999px; text-decoration: none;
  font-size: 15.5px; font-weight: 800; letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--bg-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn[aria-disabled="true"] { opacity: .5; cursor: default; }
.btn[aria-disabled="true"]:hover { background: var(--accent); }

/* ── Enlace con subrayado animado (efecto firma) ──────────── */
.ulink {
  position: relative; text-decoration: none; color: var(--accent);
  font-weight: 700;
}
.ulink::after {
  content: ""; position: absolute; left: 0; bottom: -3px;
  width: 100%; height: 1.5px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .32s cubic-bezier(.2,.7,.3,1);
}
.ulink:hover::after, .ulink:focus-visible::after { transform: scaleX(1); transform-origin: left; }

/* ── Tarjetas ─────────────────────────────────────────────── */
.card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 16px; padding: clamp(18px, 3vw, 26px);
  transition: border-color .22s ease, background .22s ease;
}
.card:hover { border-color: #3d3d3d; background: var(--bg-3); }
.card p { color: var(--mute); font-size: 15px; margin-top: 7px; }

.num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; margin-bottom: 14px;
  background: rgba(245,168,0,.13); color: var(--accent);
  font-weight: 900; font-size: 15px;
}

/* ── Maqueta de teléfono ──────────────────────────────────── */
/* La captura va dentro de un marco para que se lea como "esto es la
   app", no como una imagen suelta. El marco es CSS: cero peso extra. */
.phone {
  position: relative;
  border: 1px solid #333; border-radius: 26px; padding: 7px;
  background: linear-gradient(160deg, #1c1c1c, #0a0a0a);
  box-shadow: 0 30px 60px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.03) inset;
}
.phone img { border-radius: 20px; width: 100%; height: auto; }
.phone-cap {
  margin-top: 14px; color: var(--mute); font-size: 14px; text-align: center;
}
.phone-cap b { color: var(--ink); font-weight: 700; }

/* =============================================================
   6. Secciones
   ============================================================= */

/* ── Barra superior ───────────────────────────────────────── */
.head {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease;
}
.head.is-stuck {
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
/* Sin backdrop-filter (navegadores viejos de gama baja) el fondo tiene
   que ser sólido o el texto queda ilegible sobre el degradado. */
@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .head.is-stuck { background: rgba(0,0,0,.96); }
}
.head-in { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.brand-name {
  font-size: 21px; font-weight: 900; letter-spacing: .22em; color: var(--accent);
}
.brand-city {
  font-size: 10px; font-weight: 700; letter-spacing: .16em; color: var(--dim);
  text-transform: uppercase; border-left: 1px solid var(--line); padding-left: 10px;
}
.head-nav { display: flex; align-items: center; gap: 22px; }
.head-nav a { color: var(--mute); text-decoration: none; font-size: 14.5px; font-weight: 600; }
.head-nav a:hover { color: var(--accent); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero { position: relative; padding: clamp(48px, 9vw, 104px) 0 clamp(40px, 7vw, 80px); }

/* El degradado reactivo — efecto firma del arquetipo 05. */
.hero-mesh {
  position: absolute; inset: -20% -10% 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle 520px at var(--mx) var(--my),
      rgba(245,168,0,.30) 0%, rgba(245,168,0,0) 60%),
    radial-gradient(circle 760px at calc(var(--mx) + 12%) calc(var(--my) - 8%),
      rgba(212,142,0,.16) 0%, rgba(212,142,0,0) 62%);
  filter: blur(46px);
}
.hero-grid { display: grid; gap: clamp(34px, 6vw, 60px); align-items: center; }
.hero-title { margin-top: 18px; }
.hero-sub { margin-top: 20px; max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 16px; color: var(--dim); font-size: 13.5px; }

.hero-shot { justify-self: center; width: min(280px, 74vw); }

/* Punto que late junto al aviso de "en pruebas" */
.dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-right: 8px;
  animation: latir 2.4s ease-in-out infinite;
}
@keyframes latir { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ── Cifras ───────────────────────────────────────────────── */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-grid {
  display: grid; gap: 1px; background: var(--line);
  grid-template-columns: repeat(2, 1fr);
}
.stat { background: var(--bg); padding: clamp(22px, 4vw, 34px) clamp(14px, 3vw, 26px); }
.stat-n {
  font-size: clamp(30px, 6vw, 46px); font-weight: 900; color: var(--accent);
  letter-spacing: -0.04em; line-height: 1;
}
.stat-l { color: var(--mute); font-size: 13.5px; margin-top: 10px; line-height: 1.45; }

/* ── Secciones genéricas ──────────────────────────────────── */
.sec { padding: clamp(56px, 10vw, 104px) 0; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec-head { margin-bottom: clamp(28px, 5vw, 48px); }
.sec-head .lead { margin-top: 14px; }

.grid-4 { display: grid; gap: 14px; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 14px; grid-template-columns: 1fr; }
.shots  { display: grid; gap: clamp(22px, 4vw, 34px); grid-template-columns: 1fr; }

/* ── Seguridad ────────────────────────────────────────────── */
.split { display: grid; gap: clamp(24px, 4vw, 40px); grid-template-columns: 1fr; align-items: start; }
.checks { list-style: none; display: grid; gap: 16px; }
.checks li { display: flex; gap: 13px; align-items: flex-start; font-size: 15.5px; color: #e9e9e9; }
.tick { color: var(--accent); font-weight: 900; flex-shrink: 0; line-height: 1.5; }
.checks b { color: var(--ink); font-weight: 800; }

.panel {
  background: var(--bg-2); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 14px;
  padding: clamp(20px, 3vw, 26px);
}
.panel p { color: var(--mute); font-size: 15px; margin-top: 8px; }

/* ── Preguntas ────────────────────────────────────────────── */
.faqs { display: grid; gap: 10px; max-width: 800px; }
.faq { border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); overflow: hidden; }
.faq.is-open { border-color: rgba(245,168,0,.45); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: none; border: 0; color: var(--ink); cursor: pointer;
  font-family: inherit; font-size: 16px; font-weight: 700; text-align: left;
  padding: 18px 20px; line-height: 1.4;
}
.faq-q:hover { color: var(--accent); }
.faq-ico { position: relative; width: 14px; height: 14px; flex-shrink: 0; }
.faq-ico::before, .faq-ico::after {
  content: ""; position: absolute; background: var(--accent);
  transition: transform .26s cubic-bezier(.2,.7,.3,1);
}
.faq-ico::before { left: 0; top: 6px; width: 14px; height: 2px; }
.faq-ico::after  { left: 6px; top: 0; width: 2px; height: 14px; }
.faq.is-open .faq-ico::after { transform: scaleY(0); }
.faq-a { padding: 0 20px 20px; }
.faq-a p { color: var(--mute); font-size: 15px; max-width: 68ch; }

/* ── Cierre ───────────────────────────────────────────────── */
.cierre { text-align: center; }
.cierre .lead { margin-inline: auto; }
.cierre .hero-cta { justify-content: center; }

/* ── Pie ──────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); padding: clamp(38px, 6vw, 56px) 0 44px; }
.foot-grid { display: grid; gap: 30px; grid-template-columns: 1fr; }
.foot-t {
  color: var(--dim); font-size: 11px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; margin-bottom: 13px;
}
.foot a { color: var(--mute); text-decoration: none; font-size: 14.5px; display: block; margin-bottom: 9px; }
.foot a:hover { color: var(--accent); }
.foot-desc { color: var(--mute); font-size: 14.5px; max-width: 34ch; }
.copy {
  margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line);
  color: var(--dim); font-size: 13px;
}

/* =============================================================
   7. Efectos
   ============================================================= */

/* Revelado al entrar en pantalla. El estado inicial SOLO se aplica si
   hay JS (la clase .js la pone el propio documento): sin JS nada se
   oculta y la página se lee entera. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}
.js [data-reveal].is-revealed { opacity: 1; transform: none; }
.js [data-reveal][data-delay="1"] { transition-delay: .08s; }
.js [data-reveal][data-delay="2"] { transition-delay: .16s; }
.js [data-reveal][data-delay="3"] { transition-delay: .24s; }

/* Inversión al pasar por encima de la tipografía enorme (efecto firma).
   Solo donde hay cursor: en táctil el :hover se queda pegado. */
@media (hover: hover) {
  .invert {
    transition: background-color .2s ease, color .2s ease;
    padding: 0 .06em; margin: 0 -.06em; border-radius: 3px;
  }
  .invert:hover { background: var(--accent); color: #000; }
  .invert:hover em { color: #000; }
}

/* =============================================================
   8. Responsive (mobile-first)
   ============================================================= */
@media (min-width: 640px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .shots  { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .shots  { grid-template-columns: repeat(4, 1fr); }
  .split  { grid-template-columns: 1.15fr .85fr; }
  .hero-grid { grid-template-columns: 1.25fr .75fr; }
  .hero-shot { width: min(300px, 100%); justify-self: end; }
}

/* =============================================================
   9. Reduced-motion — SOLO lo intrusivo
   ============================================================= */
/* Windows lo trae activado en muchas instalaciones. Apagar aquí los
   fades y las transiciones dejaría la página muerta para esa gente,
   así que solo se apaga el bucle infinito del punto. Los revelados,
   el degradado y los hovers se quedan. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dot { animation: none; }
}
