/* Nido Finanzas — web informativa. Mismos tokens de marca que la app (app/src/styles/tokens.css):
   verde agua sobre grises claros y blanco, ámbar de acento; en oscuro, grises azulados y verde agua claro.
   Sin JavaScript (la CSP no lo permite): tema, animaciones y aparición al scrollear son solo CSS. */

@font-face {
  font-family: 'Sora';
  src: url('/fonts/sora.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

/* ---------- Tokens ---------- */

/* Navegadores viejos (sin light-dark()): siempre claro */
:root {
  color-scheme: light;
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --hero-a: #0f766e;
  --hero-b: #134e4a;
  --hero-text: #ffffff;
  --hero-muted: #ccfbf1;
  --hero-link: #fde68a;
  --brand: #0d9488;
  --brand-ink: #ffffff;
  --brand-hover: #0f766e;
  --brand-bright: #14b8a6;
  --brand-soft: #e6f7f5;
  --brand-text: #0f766e;
  --accent: #f59e0b;
  --accent-hover: #fbbf24;
  --accent-ink: #3a2600;
  --ok: #22c55e;
  --warning: #f59e0b;
  --cards: #2d6ae3;
  --scheduled: #b45309;
  --credits: #7b4fd6;
  --app-hero: #0d9488;
  --shadow: 0 1px 2px rgb(17 24 39 / 0.04), 0 2px 8px rgb(17 24 39 / 0.04);
  --shadow-lift: 0 2px 4px rgb(17 24 39 / 0.04), 0 16px 32px -8px rgb(13 148 136 / 0.22);
  --glow-a: rgb(20 184 166 / 0.55);
  --glow-b: rgb(245 158 11 / 0.28);
  --radius: 24px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Claro u oscuro según el sistema; el botón del encabezado invierte la elección (ver .theme) */
@supports (color: light-dark(#000, #fff)) {
  :root {
    color-scheme: light dark;
    --bg: light-dark(#f9fafb, #0d1117);
    --surface: light-dark(#ffffff, #161b22);
    --surface-2: light-dark(#f3f4f6, #21262d);
    --border: light-dark(#e5e7eb, #30363d);
    --text: light-dark(#111827, #f3f4f6);
    --muted: light-dark(#6b7280, #9ca3af);
    --hero-a: light-dark(#0f766e, #0d5c56);
    --hero-b: light-dark(#134e4a, #0a2e2c);
    --brand: light-dark(#0d9488, #14b8a6);
    --brand-ink: light-dark(#ffffff, #042f2e);
    --brand-hover: light-dark(#0f766e, #2dd4bf);
    --brand-soft: light-dark(#e6f7f5, #11302d);
    --brand-text: light-dark(#0f766e, #2dd4bf);
    --accent: light-dark(#f59e0b, #fbbf24);
    --accent-hover: light-dark(#fbbf24, #fcd34d);
    --accent-ink: light-dark(#3a2600, #2a1c00);
    --warning: light-dark(#f59e0b, #fbbf24);
    --cards: light-dark(#2d6ae3, #4d85f0);
    --scheduled: light-dark(#b45309, #d6782a);
    --credits: light-dark(#7b4fd6, #977af5);
    --app-hero: light-dark(#0d9488, #0f766e);
    --shadow: 0 1px 2px light-dark(rgb(17 24 39 / 0.04), transparent), 0 2px 8px light-dark(rgb(17 24 39 / 0.04), transparent);
    --shadow-lift: 0 16px 32px -8px light-dark(rgb(13 148 136 / 0.22), rgb(0 0 0 / 0.55));
    --glow-a: light-dark(rgb(20 184 166 / 0.55), rgb(20 184 166 / 0.35));
    --glow-b: light-dark(rgb(245 158 11 / 0.28), rgb(251 191 36 / 0.16));
  }
  @media (prefers-color-scheme: light) {
    :root:has(#tema:checked) {
      color-scheme: dark;
    }
  }
  @media (prefers-color-scheme: dark) {
    :root:has(#tema:checked) {
      color-scheme: light;
    }
  }
}

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

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  interpolate-size: allow-keywords;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 1.0625rem/1.6 'Manrope', system-ui, sans-serif;
  overflow-x: hidden;
}
h1,
h2,
h3 {
  font-family: 'Sora', 'Manrope', system-ui, sans-serif;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}
h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 800;
}
h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
}
h3 {
  font-size: 1.15rem;
  font-weight: 700;
}
p {
  margin: 0;
}
a {
  color: inherit;
}
img {
  display: block;
}
::selection {
  background: color-mix(in oklab, var(--brand-bright) 35%, transparent);
}
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 8px;
}
.hero :focus-visible,
.cta :focus-visible {
  outline-color: var(--hero-link);
}

/* Cambio de tema suave: los colores se funden en vez de saltar */
body,
.topbar,
.section--alt,
.feature,
.step,
.checks li,
.install__card,
.phone__screen,
.mock-card,
.footer,
.theme {
  transition:
    background-color 0.4s var(--ease),
    border-color 0.4s var(--ease),
    color 0.4s var(--ease);
}

.wrap {
  width: min(1160px, 100% - 32px);
  margin-inline: auto;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 12px;
  z-index: 100;
}
.skip:focus {
  left: 16px;
}

/* ---------- Botones ---------- */

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease),
    box-shadow 0.25s var(--ease),
    transform 0.2s var(--ease);
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: scale(0.97);
}
.btn--lg {
  min-height: 54px;
  padding: 0 26px;
  font-size: 1.0625rem;
}
.btn--primary {
  background: var(--brand);
  color: var(--brand-ink);
}
.btn--primary:hover {
  background: var(--brand-hover);
  box-shadow: 0 8px 20px -6px color-mix(in oklab, var(--brand) 60%, transparent);
}
.btn--ghost:hover {
  background: var(--surface-2);
}
.btn--accent {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 24px -8px rgb(245 158 11 / 0.6);
}
.btn--accent:hover {
  background: var(--accent-hover);
  box-shadow: 0 14px 32px -10px rgb(245 158 11 / 0.75);
}
/* Brillo que cruza el botón principal al pasar el mouse */
.btn--accent::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 0.55) 50%, transparent 65%);
  translate: -120% 0;
  transition: translate 0.7s var(--ease);
}
.btn--accent:hover::after {
  translate: 120% 0;
}
.btn--light {
  background: rgb(255 255 255 / 0.12);
  color: var(--hero-text);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.28);
  backdrop-filter: blur(6px);
}
.btn--light:hover {
  background: rgb(255 255 255 / 0.22);
}
.btn__arrow {
  transition: translate 0.25s var(--ease);
}
.btn:hover .btn__arrow {
  translate: 4px 0;
}

/* ---------- Barra superior ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 1.2rem 'Sora', sans-serif;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand img {
  border-radius: 28%;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.12);
  transition: transform 0.4s var(--ease-spring);
}
.brand:hover img {
  transform: rotate(-8deg) scale(1.06);
}
.brand__light {
  font-weight: 600;
  color: var(--muted);
}
.brand--small {
  font-size: 1rem;
}
.nav {
  display: none;
  gap: 2px;
  margin-left: auto;
}
.nav a {
  position: relative;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.nav a::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-bright);
  scale: 0 1;
  transition: scale 0.3s var(--ease);
}
.nav a:hover {
  color: var(--text);
}
.nav a:hover::after {
  scale: 1 1;
}
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
@media (min-width: 960px) {
  .nav {
    display: flex;
  }
  .topbar__actions {
    margin-left: 8px;
  }
}
@media (max-width: 520px) {
  .hide-sm {
    display: none;
  }
}

/* Botón de tema (checkbox: sin JS, no se recuerda entre visitas) */
.theme {
  position: relative;
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
}
@supports (color: light-dark(#000, #fff)) {
  .theme {
    display: grid;
  }
}
.theme:hover {
  background: var(--surface-2);
  color: var(--text);
}
.theme:has(:focus-visible) {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}
.theme input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.theme svg {
  grid-area: 1 / 1;
  transition:
    opacity 0.3s var(--ease),
    rotate 0.5s var(--ease-spring),
    scale 0.4s var(--ease-spring);
}
/* Se muestra el ícono del tema al que se pasa: luna en claro, sol en oscuro */
.theme__sun {
  opacity: 0;
  rotate: -90deg;
  scale: 0.5;
}
@media (prefers-color-scheme: light) {
  :root:has(#tema:checked) .theme__moon {
    opacity: 0;
    rotate: 90deg;
    scale: 0.5;
  }
  :root:has(#tema:checked) .theme__sun {
    opacity: 1;
    rotate: 0deg;
    scale: 1;
  }
}
@media (prefers-color-scheme: dark) {
  :root:not(:has(#tema:checked)) .theme__moon {
    opacity: 0;
    rotate: 90deg;
    scale: 0.5;
  }
  :root:not(:has(#tema:checked)) .theme__sun {
    opacity: 1;
    rotate: 0deg;
    scale: 1;
  }
}

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

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(160deg, var(--hero-a), var(--hero-b));
  color: var(--hero-text);
  padding: clamp(48px, 8vw, 104px) 0;
}
/* Luces de fondo que se mueven lento */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
}
.hero::before {
  width: 620px;
  height: 620px;
  left: -220px;
  bottom: -300px;
  background: radial-gradient(circle, var(--glow-a), transparent 65%);
}
.hero::after {
  width: 560px;
  height: 560px;
  right: -160px;
  top: -260px;
  background: radial-gradient(circle, var(--glow-b), transparent 65%);
}
/* Trama de puntos muy sutil */
.hero__dots {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgb(255 255 255 / 0.09) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000, transparent);
  pointer-events: none;
}
.hero__grid {
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--hero-link);
  margin-bottom: 14px;
}
.eyebrow--pill {
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.1);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18);
  color: var(--hero-text);
}
.eyebrow__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5eead4;
  box-shadow: 0 0 0 0 rgb(94 234 212 / 0.6);
}
.eyebrow--brand {
  color: var(--brand-text);
}
.mark {
  color: var(--hero-link);
}
.lead {
  margin-top: 20px;
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  color: var(--hero-muted);
  max-width: 36ch;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.hero__note {
  margin-top: 18px;
  font-size: 0.95rem;
  color: var(--hero-muted);
}

/* ---------- Ilustración de la app (sigue el tema, como la app) ---------- */

.phone {
  justify-self: center;
  width: min(360px, 100%);
  padding: 12px;
  border-radius: 40px;
  background: rgb(255 255 255 / 0.1);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.2),
    0 30px 80px rgb(0 0 0 / 0.35);
  rotate: -2deg;
}
.phone__screen {
  display: grid;
  gap: 12px;
  padding: 18px 14px;
  border-radius: 30px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
}
.mock-hello {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mock-hello small {
  display: block;
  color: var(--muted);
}
.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #c2410c;
  color: #fff;
  font-weight: 800;
}
.mock-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 2px;
  padding: 16px;
  border-radius: 22px;
  background: var(--app-hero);
  color: #fff;
}
/* Los círculos de la tarjeta destacada de la app (HeroCard) */
.mock-hero::before,
.mock-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.mock-hero::before {
  width: 200px;
  height: 200px;
  right: -70px;
  bottom: -90px;
  background: rgb(255 255 255 / 0.06);
}
.mock-hero::after {
  width: 90px;
  height: 90px;
  right: 30px;
  top: -40px;
  background: rgb(255 255 255 / 0.1);
}
.mock-hero small {
  color: #f0fdfa;
}
.mock-big {
  font: 800 1.9rem 'Sora', sans-serif;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.mock-usd {
  font: 700 1.05rem 'Sora', sans-serif;
}
.mock-split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgb(255 255 255 / 0.2);
}
.mock-split b {
  display: block;
  font-family: 'Sora', sans-serif;
}
.mock-link {
  color: #fef3c7;
  font-weight: 700;
}
.mock-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.mock-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mock-card li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mock-card li span {
  flex: 1;
}
.mock-card small {
  color: var(--muted);
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot--card {
  background: var(--cards);
}
.dot--sched {
  background: var(--scheduled);
}
.dot--credit {
  background: var(--credits);
}
.mock-budget {
  display: grid;
  gap: 4px;
}
.mock-budget__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}
.mock-budget__row small {
  font-variant-numeric: tabular-nums;
}
.mock-bar {
  height: 8px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}
.mock-bar span {
  display: block;
  height: 100%;
  border-radius: 99px;
  transform-origin: left;
}
/* Verde < 80 %, ámbar 80–100 % (como las barras de presupuesto de la app) */
.mock-bar__fill--ok {
  width: 62%;
  background: var(--ok);
}
.mock-bar__fill--warn {
  width: 88%;
  background: var(--warning);
}

/* ---------- Secciones ---------- */

.section {
  padding: clamp(56px, 8vw, 104px) 0;
}
.section--alt {
  background: var(--surface);
  border-block: 1px solid var(--border);
}
.section__lead {
  margin-top: 12px;
  max-width: 60ch;
  color: var(--muted);
  font-size: 1.1rem;
}

.features {
  display: grid;
  gap: 16px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .features {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.feature {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition:
    background-color 0.4s var(--ease),
    border-color 0.3s var(--ease),
    color 0.4s var(--ease),
    box-shadow 0.3s var(--ease),
    translate 0.3s var(--ease);
}
.feature:hover {
  translate: 0 -4px;
  border-color: color-mix(in oklab, var(--brand-bright) 45%, var(--border));
  box-shadow: var(--shadow-lift);
}
.feature p {
  color: var(--muted);
  font-size: 1rem;
}
.feature__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand-text);
  transition:
    background-color 0.3s var(--ease),
    color 0.3s var(--ease),
    rotate 0.45s var(--ease-spring),
    scale 0.45s var(--ease-spring);
}
.feature:hover .feature__icon {
  background: var(--brand);
  color: var(--brand-ink);
  rotate: -8deg;
  scale: 1.08;
}

.steps {
  position: relative;
  display: grid;
  gap: 16px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  /* Línea que une los tres pasos */
  .steps::before {
    content: '';
    position: absolute;
    left: 48px;
    right: 48px;
    top: 48px;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--brand-bright) 0 8px, transparent 8px 16px);
    opacity: 0.5;
    transform-origin: left;
  }
}
.step {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  transition:
    background-color 0.4s var(--ease),
    border-color 0.3s var(--ease),
    color 0.4s var(--ease),
    translate 0.3s var(--ease);
}
.step:hover {
  translate: 0 -3px;
  border-color: color-mix(in oklab, var(--brand-bright) 45%, var(--border));
}
.step p {
  color: var(--muted);
}
.step__n {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font: 800 1.2rem 'Sora', sans-serif;
  box-shadow: 0 0 0 6px var(--bg);
  transition: box-shadow 0.4s var(--ease);
}

.security {
  display: grid;
  gap: 32px;
}
@media (min-width: 960px) {
  .security {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }
  .security__intro {
    position: sticky;
    top: 110px;
  }
}
.checks {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.checks li {
  position: relative;
  padding: 18px 20px 18px 56px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  transition:
    background-color 0.4s var(--ease),
    border-color 0.3s var(--ease),
    color 0.4s var(--ease),
    translate 0.3s var(--ease);
}
.checks li:hover {
  translate: 4px 0;
  border-color: color-mix(in oklab, var(--brand-bright) 45%, var(--border));
}
.checks li b {
  color: var(--text);
}
.checks li::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 20px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-bright);
}
.checks li::after {
  content: '';
  position: absolute;
  left: 26px;
  top: 25px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.install {
  display: grid;
  gap: 28px;
}
@media (min-width: 860px) {
  .install {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}
.install__cards {
  display: grid;
  gap: 12px;
}
.install__card {
  display: grid;
  gap: 6px;
  padding: 20px;
  border-radius: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  transition:
    background-color 0.4s var(--ease),
    border-color 0.3s var(--ease),
    color 0.4s var(--ease),
    translate 0.3s var(--ease);
}
.install__card:hover {
  translate: 0 -3px;
  border-color: color-mix(in oklab, var(--brand-bright) 45%, var(--border));
}
.install__card p {
  color: var(--muted);
}

.faq {
  max-width: 820px;
}
.faq h2 {
  margin-bottom: 28px;
}
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 14px 0;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s var(--ease);
}
.faq summary:hover {
  color: var(--brand-text);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-soft);
  font: 400 1.4rem/1 'Sora', sans-serif;
  color: var(--brand-text);
  transition:
    rotate 0.35s var(--ease-spring),
    background-color 0.3s var(--ease),
    color 0.3s var(--ease);
}
.faq details[open] summary::after {
  rotate: 45deg;
  background: var(--brand);
  color: var(--brand-ink);
}
.faq details p {
  padding: 0 0 20px;
  color: var(--muted);
}
/* Apertura con altura animada donde se puede; si no, el texto aparece suave */
@supports selector(::details-content) {
  .faq details::details-content {
    block-size: 0;
    overflow: clip;
    transition:
      block-size 0.35s var(--ease),
      content-visibility 0.35s allow-discrete;
  }
  .faq details[open]::details-content {
    block-size: auto;
  }
}

.cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(56px, 8vw, 96px) 0;
  background: linear-gradient(160deg, var(--hero-a), var(--hero-b));
  color: var(--hero-text);
  text-align: center;
}
.cta::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 700px;
  height: 700px;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-a), transparent 60%);
  filter: blur(30px);
  pointer-events: none;
}
.cta__inner {
  display: grid;
  justify-items: center;
  gap: 8px;
}
.cta p {
  color: var(--hero-muted);
  font-size: 1.15rem;
}
.cta .hero__ctas {
  justify-content: center;
}
/* Logo que se dibuja solo */
.cta__logo {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin-bottom: 16px;
  border-radius: 28%;
  background: #fff;
  color: #1f2a2b;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.25);
}
.cta__logo svg {
  width: 78px;
  height: 78px;
}

.footer {
  padding: 32px 0 calc(32px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s var(--ease);
}
.footer nav a:hover {
  color: var(--brand-text);
}
.footer__copy {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.95rem;
}

.cta--full {
  min-height: 100dvh;
  display: grid;
  place-items: center;
}

/* ---------- Movimiento ----------
   Misma curva que la app; solo opacidad y transform. Con "reducir movimiento" no se anima nada
   y todo queda visible desde el principio. */

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 24px;
  }
}
@keyframes rise-sm {
  from {
    opacity: 0;
    translate: 0 10px;
  }
}
@keyframes phone-in {
  from {
    opacity: 0;
    translate: 0 60px;
    rotate: 6deg;
    scale: 0.94;
  }
}
@keyframes float {
  50% {
    translate: 0 -12px;
  }
}
@keyframes drift-a {
  to {
    translate: 140px -90px;
    scale: 1.15;
  }
}
@keyframes drift-b {
  to {
    translate: -120px 110px;
    scale: 0.9;
  }
}
@keyframes grow-x {
  from {
    transform: scaleX(0);
  }
}
@keyframes pop {
  0% {
    opacity: 0;
    scale: 0.4;
  }
  70% {
    opacity: 1;
    scale: 1.12;
  }
}
@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px rgb(94 234 212 / 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgb(94 234 212 / 0);
  }
}
@keyframes breathe {
  50% {
    scale: 1.15;
    opacity: 0.7;
  }
}
@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
}
@keyframes shadow-in {
  to {
    box-shadow: 0 6px 24px -12px rgb(0 0 0 / 0.25);
  }
}
@keyframes progress {
  from {
    scale: 0 1;
  }
}
@keyframes topbar-in {
  from {
    opacity: 0;
    translate: 0 -100%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .topbar {
    animation: topbar-in 0.6s var(--ease) both;
  }

  /* Hero: entra en cascada al cargar */
  .hero__copy > * {
    animation: rise 0.8s var(--ease) both;
  }
  .hero__copy > :nth-child(2) {
    animation-delay: 0.08s;
  }
  .hero__copy > :nth-child(3) {
    animation-delay: 0.16s;
  }
  .hero__copy > :nth-child(4) {
    animation-delay: 0.24s;
  }
  .hero__copy > :nth-child(5) {
    animation-delay: 0.32s;
  }
  .eyebrow__dot {
    animation: pulse 2s var(--ease) infinite;
  }
  .hero::before {
    animation: drift-a 18s ease-in-out infinite alternate;
  }
  .hero::after {
    animation: drift-b 22s ease-in-out infinite alternate;
  }

  /* El celular sube, se acomoda y queda flotando */
  .phone {
    animation:
      phone-in 1s var(--ease) 0.2s both,
      float 7s ease-in-out 1.2s infinite;
  }
  .phone__screen > * {
    animation: rise-sm 0.6s var(--ease) both;
  }
  .phone__screen > :nth-child(1) {
    animation-delay: 0.55s;
  }
  .phone__screen > :nth-child(2) {
    animation-delay: 0.65s;
  }
  .phone__screen > :nth-child(3) {
    animation-delay: 0.75s;
  }
  .phone__screen > :nth-child(4) {
    animation-delay: 0.85s;
  }
  .mock-card li .dot {
    animation: pop 0.45s var(--ease) both;
  }
  .mock-card li:nth-child(1) .dot {
    animation-delay: 1s;
  }
  .mock-card li:nth-child(2) .dot {
    animation-delay: 1.08s;
  }
  .mock-card li:nth-child(3) .dot {
    animation-delay: 1.16s;
  }
  .mock-bar span {
    animation: grow-x 1.1s var(--ease) 1.15s both;
  }
  .mock-budget:nth-child(3) .mock-bar span {
    animation-delay: 1.3s;
  }

  .cta::before {
    animation: breathe 9s ease-in-out infinite;
  }

  /* Al scrollear: la barra se marca, aparece el progreso y las secciones entran al verse.
     Solo donde existen las animaciones ligadas al scroll; en el resto todo se ve de entrada. */
  @supports (animation-timeline: view()) {
    .topbar {
      animation:
        topbar-in 0.6s var(--ease) both,
        shadow-in linear both;
      animation-timeline: auto, scroll(root);
      animation-range: normal, 0 120px;
    }
    .topbar::after {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      bottom: -1px;
      height: 2px;
      background: linear-gradient(90deg, var(--brand-bright), var(--accent));
      transform-origin: left;
      animation: progress linear both;
      animation-timeline: scroll(root);
    }

    .reveal,
    .features > li,
    .steps > li,
    .checks > li,
    .install__card,
    .faq details {
      animation: rise var(--ease) both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
    /* Escalonado dentro de cada fila */
    .features > li:nth-child(4n + 2),
    .steps > li:nth-child(2),
    .install__card:nth-child(2) {
      animation-range: entry 8% entry 78%;
    }
    .features > li:nth-child(4n + 3),
    .steps > li:nth-child(3) {
      animation-range: entry 16% entry 86%;
    }
    .features > li:nth-child(4n + 4) {
      animation-range: entry 24% entry 94%;
    }
    .steps::before {
      animation: grow-x linear both;
      animation-timeline: view();
      animation-range: entry 40% cover 45%;
    }
    .step__n {
      animation: pop var(--ease) both;
      animation-timeline: view();
      animation-range: entry 50% entry 100%;
    }
    .checks li::before,
    .checks li::after {
      animation: pop var(--ease) both;
      animation-timeline: view();
      animation-range: entry 40% entry 100%;
    }
    .cta__logo path,
    .cta__logo circle {
      stroke-dasharray: 1;
      animation: draw var(--ease) both;
      animation-timeline: view();
      animation-range: entry 10% cover 45%;
    }
    .cta__logo circle {
      animation-name: pop;
      transform-box: fill-box;
      transform-origin: center;
    }
  }
}
