/* ==========================================================================
   Nido · landing
   Tokens tomados del sistema visual real de la app.
   Orden: tokens · base · botones · navegación · hero · componentes (ventana,
   teléfono, pintura) · secciones · movimiento · responsive
   ========================================================================== */

/* ─────────────────────────────── Fuentes ─────────────────────────────── */
@font-face { font-family: "Fraunces"; src: url("assets/fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("assets/fonts/fraunces-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* ─────────────────────────────── Tokens ─────────────────────────────── */
:root {
  --rose: #d4969b;
  --lav: #a2a6ca;
  --sand: #e5d7bd;

  --bg: #fdfcfa;
  --bg-2: #f7f4ef;
  --card: #ffffff;
  --line: #ebe6df;
  --line-2: #ddd6cc;
  --ink: #1f1b1d;
  --ink-2: #4d464b;
  --muted: #6c6469;
  --accent: #9a5560;
  --btn: #231d20;

  --serif: "Fraunces", ui-serif, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-win: 0 1px 1px rgb(40 25 20 / 0.04), 0 10px 24px -12px rgb(40 25 20 / 0.18), 0 40px 80px -36px rgb(60 35 40 / 0.35);
  --shadow-soft: 0 1px 2px rgb(40 25 20 / 0.04), 0 12px 30px -18px rgb(40 25 20 / 0.22);

  --wrap: min(1200px, 100% - 48px);

  /* Gradientes de portada de la app (covers.ts) */
  --g-atardecer: radial-gradient(at 12% 30%, #e9b7bb 0px, transparent 55%), radial-gradient(at 55% 80%, #b9bce0 0px, transparent 55%), radial-gradient(at 90% 20%, #efe3cc 0px, transparent 55%), #d9c9d6;
  --g-lavanda: radial-gradient(at 15% 20%, #edeafb 0px, transparent 55%), radial-gradient(at 85% 75%, #b4aee0 0px, transparent 55%), radial-gradient(at 40% 90%, #d6cdf2 0px, transparent 55%), #cec8ee;
  --g-arena: radial-gradient(at 20% 30%, #f4eadb 0px, transparent 55%), radial-gradient(at 80% 80%, #dcc6a6 0px, transparent 55%), radial-gradient(at 70% 10%, #eedcc4 0px, transparent 50%), #e8dac4;
  --g-salvia: radial-gradient(at 10% 80%, #b7cdb4 0px, transparent 55%), radial-gradient(at 85% 20%, #e3e9d5 0px, transparent 55%), radial-gradient(at 50% 40%, #93ae97 0px, transparent 60%), #c9d6c3;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0; text-wrap: pretty; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 560;
  font-variation-settings: "opsz" 120;
  letter-spacing: -0.012em;
  line-height: 1.04;
  text-wrap: balance;
}
h1 em, h2 em {
  font-style: italic;
  font-weight: 430;
  font-variation-settings: "opsz" 120, "WONK" 0;
  color: var(--accent);
  letter-spacing: -0.008em;
}
h3 { font-size: 21px; line-height: 1.2; letter-spacing: -0.02em; font-variation-settings: "opsz" 36; }

kbd {
  display: inline-block;
  font: 500 0.78em/1 var(--sans);
  padding: 0.28em 0.45em;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--card);
  color: var(--ink-2);
  vertical-align: 0.1em;
}

.ic {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.skip {
  position: fixed; left: 16px; top: -80px; z-index: 100;
  padding: 10px 18px; border-radius: 999px; background: var(--btn); color: #fff; font-size: 14px;
  transition: top 0.2s;
}
.skip:focus { top: 12px; }

/* ─────────────────────────────── Botones ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1px solid transparent;
  font: 500 15px/1 var(--sans); letter-spacing: -0.005em;
  white-space: nowrap; cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s, border-color 0.2s;
}
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-lg { height: 54px; padding: 0 26px; font-size: 16px; }
.btn-dark { background: var(--btn); color: #fff; box-shadow: 0 1px 0 rgb(255 255 255 / 0.08) inset, 0 8px 22px -10px rgb(35 29 32 / 0.6); }
.btn-light { background: var(--card); color: var(--ink); border-color: var(--line-2); }
.btn .ic { width: 18px; height: 18px; }
.btn-light .ic { transition: transform 0.25s var(--ease); }

@media (hover: hover) {
  .btn-dark:hover { transform: translateY(-2px); background: #3a2f34; box-shadow: 0 14px 30px -12px rgb(35 29 32 / 0.65); }
  .btn-light:hover { transform: translateY(-2px); border-color: #c9c0b4; box-shadow: var(--shadow-soft); }
  .btn-light:hover .ic { transform: translateX(3px); }
}
.btn:active { transform: translateY(0) scale(0.98); }

/* ───────────────────────────── Anuncio + Nav ───────────────────────────── */
.announce {
  position: relative; z-index: 51;
  display: flex; justify-content: center;
  padding: 9px 16px;
  background: #241d21; color: #f3ecee;
  font-size: 13.5px;
}
.announce a { display: inline-flex; align-items: center; gap: 10px; }
.announce .ic { width: 15px; height: 15px; transition: transform 0.25s var(--ease); }
.announce a:hover .ic { transform: translateX(3px); }
.pill-new {
  padding: 3px 9px; border-radius: 999px;
  background: linear-gradient(90deg, var(--rose), var(--lav));
  color: #231d20; font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
}

.nav {
  position: sticky; top: 0; z-index: 50;
  transition: background-color 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}
.nav.is-stuck {
  background: rgb(253 252 250 / 0.82);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  box-shadow: 0 1px 0 var(--line);
}
.nav.is-dark { background: rgb(18 15 19 / 0.78); box-shadow: 0 1px 0 rgb(255 255 255 / 0.06); color: #f0ecee; }
.nav.is-dark .nav-links, .nav.is-dark .link-quiet { color: #cfc7d0; }
.nav.is-dark .nav-links a:hover, .nav.is-dark .link-quiet:hover { color: #fff; }
.nav.is-dark .btn-dark { background: #f0e8ea; color: #231d20; }
.nav-inner { width: var(--wrap); margin: auto; height: 68px; display: flex; align-items: center; gap: 36px; }

.brand { display: inline-flex; align-items: center; gap: 9px; font: 600 25px/1 var(--serif); letter-spacing: -0.05em; font-variation-settings: "opsz" 60; }
.brand-mark { width: 27px; height: 27px; overflow: visible; }

.nav-links { display: flex; gap: 28px; font-size: 14.5px; color: var(--ink-2); }
.nav-links a { position: relative; padding: 6px 0; transition: color 0.2s; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.link-quiet { font-size: 14.5px; color: var(--ink-2); }
.link-quiet:hover { color: var(--ink); }

/* ──────────────────────────────── Hero ──────────────────────────────── */
.hero { position: relative; isolation: isolate; padding: clamp(56px, 8vw, 104px) 0 0; }

.sky { position: absolute; inset: -120px 0 18% 0; z-index: -1; overflow: hidden; pointer-events: none; }
.sky::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, var(--bg));
}
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; }
.b1 { width: 46vw; height: 46vw; max-width: 640px; max-height: 640px; left: -8%; top: 8%; background: #ecc3c6; }
.b2 { width: 40vw; height: 40vw; max-width: 560px; max-height: 560px; right: -6%; top: 0; background: #c9cbe8; }
.b3 { width: 34vw; height: 34vw; max-width: 480px; max-height: 480px; left: 34%; top: 30%; background: #f0e3cb; }
.b4 { width: 20vw; height: 20vw; max-width: 300px; max-height: 300px; right: 18%; top: 44%; background: #e6c1c8; opacity: 0.35; }

.hero-copy { width: min(880px, 100% - 40px); margin: 0 auto; text-align: center; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: rgb(255 255 255 / 0.65); border: 1px solid rgb(255 255 255 / 0.9);
  box-shadow: 0 1px 2px rgb(40 25 20 / 0.06);
  font: 500 13.5px/1 var(--sans); color: var(--ink-2);
  backdrop-filter: blur(8px);
}
.kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, var(--rose), var(--lav)); }
.hero h1 { margin-top: 26px; font-size: clamp(46px, 7.6vw, 98px); line-height: 0.98; }
.hero-sub { max-width: 600px; margin: 26px auto 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.hero-note { margin-top: 18px; font-size: 13.5px; color: var(--muted); }

.hero-stage {
  --p: 1;
  position: relative;
  width: min(1180px, 100% - 40px);
  margin: clamp(52px, 7vw, 84px) auto 0;
  perspective: 2000px;
}
.hero-window {
  transform-origin: 50% 0%;
  transform: rotateX(calc((1 - var(--p)) * 14deg)) scale(calc(0.92 + var(--p) * 0.08)) translateY(calc((1 - var(--p)) * 24px));
  will-change: transform;
}

/* ───────────────────────────── Ventana de app ───────────────────────────── */
.window {
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid rgb(30 20 25 / 0.1);
  box-shadow: var(--shadow-win);
}
.win-bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 34px; padding: 0 0 0 14px;
  background: #f6f3ef; border-bottom: 1px solid var(--line);
  font: 500 12px/1 var(--sans); color: #6e676c;
}
.win-title { display: inline-flex; align-items: center; gap: 7px; }
.win-title svg { width: 14px; height: 14px; }
.win-ctrl { display: flex; height: 100%; }
.win-ctrl i { position: relative; width: 44px; height: 100%; }
.win-ctrl i::before { content: ""; position: absolute; left: 50%; top: 50%; translate: -50% -50%; }
.win-ctrl i:nth-child(1)::before { width: 10px; height: 1px; background: #776f74; }
.win-ctrl i:nth-child(2)::before { width: 9px; height: 9px; border: 1px solid #776f74; }
.win-ctrl i:nth-child(3)::before { content: "×"; font: 300 17px/1 var(--sans); color: #776f74; }
.window img { width: 100%; }

.window-dark { background: #161417; border-color: rgb(255 255 255 / 0.08); box-shadow: 0 40px 90px -30px rgb(0 0 0 / 0.8), 0 0 0 1px rgb(0 0 0 / 0.4); }
.window-dark .win-bar { background: #1d1a1e; border-color: #2e2a31; color: #a8a1aa; }
.window-dark .win-ctrl i:nth-child(1)::before { background: #a8a1aa; }
.window-dark .win-ctrl i:nth-child(2)::before { border-color: #a8a1aa; }
.window-dark .win-ctrl i:nth-child(3)::before { color: #a8a1aa; }

/* ─────────────────────────── Pintura (fondos de portada) ─────────────────────────── */
.paint {
  position: relative; isolation: isolate;
  padding: clamp(18px, 4.2vw, 60px);
  border-radius: 28px;
  overflow: hidden;
}
.paint::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0.22; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.paint::before {
  content: ""; position: absolute; z-index: -1; right: -6%; bottom: -12%;
  width: 46%; aspect-ratio: 1;
  background: url("assets/petalos.svg") center / contain no-repeat;
  opacity: 0.16; filter: blur(1px) saturate(0) brightness(2.4);
}
.paint-atardecer { background: var(--g-atardecer); }
.paint-lavanda { background: var(--g-lavanda); }
.paint-arena { background: var(--g-arena); }
.paint-salvia { background: var(--g-salvia); }

/* ─────────────────────────── Encabezados de sección ─────────────────────────── */
.section-head { width: min(760px, 100% - 40px); margin: 0 auto; text-align: center; }
.section-head h2 { font-size: clamp(38px, 5.2vw, 66px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  font: 600 13px/1 var(--sans); letter-spacing: 0.02em; color: var(--accent);
}
.eyebrow .ic { width: 17px; height: 17px; }
.lead { margin-top: 20px; font-size: clamp(16.5px, 1.4vw, 18.5px); line-height: 1.6; color: var(--ink-2); }
.section-head .lead { max-width: 580px; margin-inline: auto; }

/* ─────────────────────────────── Recorrido ─────────────────────────────── */
.tour { padding: clamp(96px, 11vw, 150px) 0 clamp(56px, 7vw, 96px); }
.tour-tabs {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px;
  width: var(--wrap); margin: 44px auto 0;
}
.tour-tabs button {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 9px;
  height: 48px; padding: 0 20px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--card); color: var(--ink-2);
  font: 500 15px/1 var(--sans); cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.tour-tabs button:hover { color: var(--ink); border-color: #c9c0b4; }
.tour-tabs button[aria-selected="true"] { background: var(--btn); border-color: var(--btn); color: #fff; }
.tour-tabs .bar {
  position: absolute; left: 0; bottom: 0; height: 2.5px; width: 100%;
  background: linear-gradient(90deg, var(--rose), var(--lav));
  transform: scaleX(0); transform-origin: left;
}
.tour-tabs button[aria-selected="true"] .bar.is-running { animation: tab-fill var(--tab-ms, 7000ms) linear forwards; }
.tour-tabs.is-paused .bar.is-running { animation-play-state: paused; }
@keyframes tab-fill { to { transform: scaleX(1); } }

.tour-panel { width: var(--wrap); margin: 22px auto 0; }
.tour-caption { min-height: 52px; max-width: 640px; margin: 0 auto 26px; text-align: center; font-size: 16.5px; color: var(--ink-2); }
.tour-caption b { font-weight: 600; color: var(--ink); }
.tour-paint { padding: clamp(18px, 5vw, 72px) clamp(14px, 6vw, 96px) 0; border-radius: 32px; }
.tour-window { border-radius: 14px 14px 0 0; border-bottom: 0; }
.tour-stack { position: relative; display: grid; }
.tour-stack img {
  grid-area: 1 / 1;
  opacity: 0; transform: scale(1.015);
  transition: opacity 0.6s var(--ease), transform 0.9s var(--ease);
}
.tour-stack img.is-active { opacity: 1; transform: none; }

/* ─────────────────────────────── Funciones ─────────────────────────────── */
.feature { width: var(--wrap); margin: 0 auto; padding: clamp(56px, 7vw, 96px) 0; }
.feature-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end; gap: clamp(28px, 6vw, 96px);
  margin-bottom: clamp(32px, 4vw, 52px);
}
.feature h2 { font-size: clamp(36px, 4.6vw, 60px); }
.feature .lead { max-width: 520px; }
.feat-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 28px; }
.feat-list li { display: flex; flex-direction: column; gap: 12px; }
.feat-list li > .ic {
  width: 38px; height: 38px; padding: 9px;
  border-radius: 11px; background: var(--card); border: 1px solid var(--line); color: var(--accent);
  box-shadow: 0 1px 2px rgb(40 25 20 / 0.05);
}
.feat-list b { display: block; font-weight: 600; font-size: 15.5px; }
.feat-list span { display: block; margin-top: 3px; font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.feature-paint { padding: clamp(18px, 5vw, 72px) clamp(14px, 7vw, 100px) 0; border-radius: 32px; }
.feature-window { border-radius: 14px 14px 0 0; border-bottom: 0; }

/* ───────────────────────────────── Bento ───────────────────────────────── */
.more { padding: clamp(80px, 10vw, 130px) 0; background: var(--bg-2); border-block: 1px solid var(--line); }
.bento {
  width: var(--wrap); margin: 52px auto 0;
  display: grid; gap: 16px;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    "streak streak cards"
    "offline export cards";
}
.tile {
  position: relative; overflow: hidden;
  padding: 28px; border-radius: 24px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgb(40 25 20 / 0.04);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.tile > .ic, .tile-copy > .ic { width: 22px; height: 22px; color: var(--accent); margin-bottom: 16px; }
.tile h3 { font-size: 22px; }
.tile p { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 44ch; }
@media (hover: hover) { .tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); } }

.tile-streak { grid-area: streak; background: linear-gradient(160deg, #fff, #fbf6f0); }
.tile-offline { grid-area: offline; }
.tile-cards { grid-area: cards; }
.tile-export { grid-area: export; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 999px;
  background: #f4efe9; font-size: 14px; color: var(--ink);
}
.chip .ic { width: 15px; height: 15px; color: var(--accent); }

.grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 24px; }
.mini-card {
  display: grid; gap: 6px; margin-top: 22px; padding: 18px 18px 16px;
  border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); text-align: center;
}
.mini-card small { font-size: 11px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.mini-card b { font-weight: 500; font-size: 16.5px; line-height: 1.35; }
.mini-card span { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); line-height: 1.5; }
.tile-cards .grades { margin-top: 12px; }
.g {
  display: grid; gap: 2px; padding: 10px 4px; text-align: center;
  border: 1.5px solid var(--line-2); border-radius: 12px;
  font-size: 13px; font-weight: 600;
}
.g small { font-weight: 400; font-size: 12px; opacity: 0.85; }
.g-again { border-color: #e06b6b; color: #b42d2d; }
.g-hard { border-color: #b07a2e; color: #8a5a14; }
.g-easy { border-color: #3f9b6c; color: #1f6e46; }

/* ───────────────────────────────── Noche ───────────────────────────────── */
.night {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(110px, 13vw, 170px) 0 clamp(90px, 11vw, 150px);
  background:
    radial-gradient(60% 50% at 75% 10%, rgb(162 166 202 / 0.18), transparent 70%),
    radial-gradient(50% 40% at 15% 70%, rgb(212 150 155 / 0.14), transparent 70%),
    linear-gradient(180deg, #120f13, #18141a 60%, #120f13);
  color: #f0ecee;
}
.night h2 { color: #f4eff1; }
.night h2 em { color: #e3b0b6; }
.night .eyebrow { color: #e3b0b6; }
.night .lead { color: #b9b1ba; }
.stars { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: 0.25; animation: twinkle var(--d, 5s) ease-in-out infinite; animation-delay: var(--delay, 0s); }
.moon {
  position: absolute; z-index: -1; right: 9%; top: 90px;
  width: clamp(70px, 8vw, 110px); aspect-ratio: 1; border-radius: 50%;
  box-shadow: inset -22px 4px 0 0 #efe3cc;
  filter: drop-shadow(0 0 40px rgb(239 227 204 / 0.35));
  rotate: -18deg;
}
.night-stage { position: relative; width: min(1080px, 100% - 40px); margin: 64px auto 0; }

/* ─────────────────────────────── Descargar ─────────────────────────────── */
.download { padding: clamp(100px, 12vw, 160px) 0 clamp(60px, 7vw, 90px); }
.dl-grid { width: min(980px, 100% - 40px); margin: 52px auto 0; display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
.dl-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: clamp(28px, 3.6vw, 44px); border-radius: 26px;
  background: var(--card); border: 1px solid var(--line);
}
.dl-card h3 { font-size: 27px; }
.dl-card p { color: var(--muted); }
.dl-card .btn { margin-top: 18px; }
.dl-card small { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.dl-main { background: var(--g-atardecer); border-color: transparent; }
.dl-main p, .dl-main small { color: #4a3f45; }
.dl-icon {
  display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 8px;
  border-radius: 16px; background: rgb(255 255 255 / 0.75); border: 1px solid rgb(255 255 255 / 0.9);
  color: var(--ink); box-shadow: var(--shadow-soft);
}
.dl-icon .ic { width: 26px; height: 26px; }
.dl-card:not(.dl-main) .dl-icon { background: var(--bg-2); border-color: var(--line); box-shadow: none; }

/* ──────────────────────────────── Planes ──────────────────────────────── */
.pricing { padding: clamp(80px, 10vw, 130px) 0; }
.plans { width: var(--wrap); margin: 52px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column;
  padding: 32px; border-radius: 24px; background: var(--card); border: 1px solid var(--line);
}
.plan h3 { font-size: 28px; }
.plan-tag { margin-top: 6px; color: var(--muted); font-size: 15px; }
.price { margin: 24px 0 22px; display: flex; align-items: baseline; gap: 4px; }
.price b { font: 560 46px/1 var(--serif); letter-spacing: -0.01em; }
.price span { color: var(--muted); }
.plan .btn { width: 100%; }
.plan ul { list-style: none; margin: 26px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; font-size: 14.5px; color: var(--ink-2); }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li .ic { width: 17px; height: 17px; margin-top: 2px; color: #3f9b6c; stroke-width: 2.2; }
.plan li.dev { padding-left: 27px; color: var(--muted); font-style: italic; }
.plan-featured { border: 1.5px solid #cfa6ad; box-shadow: 0 30px 60px -36px rgb(154 85 96 / 0.45); }
.soon {
  position: absolute; top: 28px; right: 28px;
  padding: 5px 10px; border-radius: 999px;
  background: #f4efe9; color: var(--ink-2); font-size: 12px; font-weight: 600;
}

/* ───────────────────────────────── FAQ ───────────────────────────────── */
.faq { padding: clamp(60px, 8vw, 110px) 0; background: var(--bg-2); border-block: 1px solid var(--line); }
.faq-list { width: min(820px, 100% - 40px); margin: 44px auto 0; }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 24px 2px; cursor: pointer; list-style: none;
  font: 500 19px/1.35 var(--sans); letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor;
  rotate: 45deg; translate: 0 -3px; transition: rotate 0.3s var(--ease), translate 0.3s var(--ease);
}
.faq details[open] summary::after { rotate: 225deg; translate: 0 3px; }
.faq details p { padding: 0 40px 26px 2px; color: var(--ink-2); font-size: 16.5px; line-height: 1.65; }

/* ─────────────────────────────── Cierre ─────────────────────────────── */
.closing { position: relative; isolation: isolate; overflow: hidden; padding: clamp(110px, 13vw, 170px) 20px; text-align: center; }
.sky-soft { inset: 0; }
.sky-soft::after { background: linear-gradient(180deg, var(--bg), transparent 30%, transparent 70%, var(--bg)); }
.sky-soft .blob { opacity: 0.45; }
.closing-mark { width: 74px; height: 74px; margin: 0 auto 30px; overflow: visible; }
.closing h2 { font-size: clamp(44px, 6.4vw, 84px); }

/* ─────────────────────────────── Idioma ─────────────────────────────── */
.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 10px 0 11px; border-radius: 999px;
  border: 1px solid transparent; background: transparent; color: var(--ink-2);
  font: 600 13px/1 var(--sans); letter-spacing: 0.02em; cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.lang-btn .ic { width: 16px; height: 16px; }
.lang-btn .chev { width: 13px; height: 13px; transition: rotate 0.25s var(--ease); }
.lang-btn[aria-expanded="true"] .chev { rotate: 180deg; }
.lang-btn:hover, .lang-btn[aria-expanded="true"] { background: rgb(255 255 255 / 0.7); border-color: var(--line); }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 168px; padding: 6px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 18px 40px -16px rgb(40 25 20 / 0.28), 0 2px 6px rgb(40 25 20 / 0.06);
  animation: pop 0.18s var(--ease) both;
}
.lang-list[hidden] { display: none; }
.lang-list button {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 10px 12px; border: 0; border-radius: 9px; background: none;
  font: 500 14px/1 var(--sans); color: var(--ink-2); text-align: left; cursor: pointer;
}
.lang-list button:hover, .lang-list button:focus-visible { background: var(--bg-2); color: var(--ink); outline: none; }
.lang-list button[aria-checked="true"] { color: var(--ink); font-weight: 600; }
.lang-list button[aria-checked="true"]::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, var(--rose), var(--lav)); }
.nav.is-dark .lang-btn { color: #d9d2da; }
.nav.is-dark .lang-btn:hover, .nav.is-dark .lang-btn[aria-expanded="true"] { background: rgb(255 255 255 / 0.08); border-color: rgb(255 255 255 / 0.12); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }

/* Mientras se aplica otro idioma, no mostramos el español un instante. */
html.lang-wait body { opacity: 0; }
body { transition: opacity 0.2s ease; }

/* ─────────────────────────────── Footer ─────────────────────────────── */
.footer { border-top: 1px solid var(--line); }
.foot-inner {
  width: var(--wrap); margin: 0 auto; padding: 64px 0 48px;
  display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px;
}
.foot-brand p { margin-top: 14px; color: var(--muted); font-size: 15px; }
.foot-col { display: flex; flex-direction: column; gap: 12px; font-size: 14.5px; color: var(--ink-2); }
.foot-col h4 { margin: 0 0 4px; font: 600 13px/1 var(--sans); color: var(--ink); }
.foot-col a:hover { color: var(--ink); }
/* Plate Studio */
.studio {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 26px; padding: 10px 18px 10px 10px;
  border-radius: 16px; border: 1px solid var(--line);
  background: var(--card);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.studio img { width: 44px; height: auto; }
.studio span { display: flex; flex-direction: column; gap: 3px; line-height: 1.1; }
.studio small { font-size: 12px; color: var(--muted); }
.studio b { font: 600 15.5px/1.1 var(--sans); color: var(--ink); letter-spacing: -0.01em; }
@media (hover: hover) { .studio:hover { border-color: var(--line-2); box-shadow: var(--shadow-soft); transform: translateY(-2px); } }
.foot-lang { all: unset; cursor: pointer; width: fit-content; font-size: 14.5px; color: var(--ink-2); }
.foot-lang:hover { color: var(--ink); }
.foot-lang[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.foot-lang:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.foot-base {
  width: var(--wrap); margin: 0 auto; padding: 22px 0 36px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}

/* ─────────────────────────────── Movimiento ─────────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes drift-a { 50% { transform: translate(5%, 7%) scale(1.06); } }
@keyframes drift-b { 50% { transform: translate(-6%, 5%) scale(0.95); } }
@keyframes twinkle { 50% { opacity: 0.9; } }
@keyframes bloom { from { opacity: 0; transform: translateY(14px) scale(0.85); } }

@media (prefers-reduced-motion: no-preference) {
  [data-hero] { animation: rise 0.9s var(--ease) both; }
  [data-hero]:nth-child(2) { animation-delay: 0.08s; }
  [data-hero]:nth-child(3) { animation-delay: 0.16s; }
  [data-hero]:nth-child(4) { animation-delay: 0.24s; }
  [data-hero]:nth-child(5) { animation-delay: 0.32s; }
  .hero-stage { animation: rise 1.2s 0.25s var(--ease) both; }

  .b1, .b3 { animation: drift-a 18s ease-in-out infinite; }
  .b2, .b4 { animation: drift-b 22s ease-in-out infinite; }

  .brand-mark ellipse, .closing-mark ellipse { transform-box: fill-box; transform-origin: 50% 100%; animation: bloom 0.8s var(--ease) both; }
  .brand-mark ellipse:nth-child(2), .closing-mark ellipse:nth-child(2) { animation-delay: 0.1s; }
  .brand-mark ellipse:nth-child(3), .closing-mark ellipse:nth-child(3) { animation-delay: 0.2s; }

  html.js [data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity 0.9s var(--ease), transform 1.1s var(--ease); }
  html.js [data-reveal].is-in { opacity: 1; transform: none; }
  html.js .bento [data-reveal]:nth-child(2) { transition-delay: 0.06s; }
  html.js .bento [data-reveal]:nth-child(3) { transition-delay: 0.12s; }
  html.js .bento [data-reveal]:nth-child(4) { transition-delay: 0.18s; }
  html.js .bento [data-reveal]:nth-child(5) { transition-delay: 0.24s; }
  html.js .plans [data-reveal]:nth-child(2), html.js .dl-grid [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
  html.js .plans [data-reveal]:nth-child(3) { transition-delay: 0.16s; }
}

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

/* ─────────────────────────────── Responsive ─────────────────────────────── */
@media (max-width: 1080px) {
  .feature-head { grid-template-columns: 1fr; align-items: start; }
  .bento { grid-template-columns: 1fr 1fr; grid-template-areas: "streak streak" "cards offline" "cards export"; }
  .plans { grid-template-columns: 1fr; max-width: 560px; }
  .foot-inner { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav-links, .link-quiet { display: none; }
  .dl-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --wrap: min(1200px, 100% - 32px); }
  .announce { font-size: 12.5px; }
  .announce a { gap: 8px; text-align: left; }
  .nav-inner { height: 60px; }
  .hero { padding-top: 44px; }
  .hero h1 { margin-top: 20px; }
  .hero-actions .btn { width: 100%; }
  .hero-actions { gap: 10px; }

  /* La app todavía se muestra como en la compu: la ventana entera, sin inclinación. */
  .hero-stage { width: var(--wrap); margin-top: 44px; perspective: none; }
  .hero-window { transform: none; }

  .tour-tabs { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding: 2px 2px 8px; scrollbar-width: none; }
  .tour-tabs::-webkit-scrollbar { display: none; }
  .tour-tabs button { flex: none; height: 44px; padding: 0 16px; font-size: 14.5px; }
  .tour-paint, .feature-paint { padding: 16px 12px 0; border-radius: 22px; }
  .feat-list { grid-template-columns: 1fr; gap: 18px; }
  .feat-list li { flex-direction: row; gap: 14px; }
  .win-bar { height: 26px; font-size: 10.5px; }
  .win-ctrl i { width: 28px; }

  .bento { grid-template-columns: 1fr; grid-template-areas: "streak" "cards" "offline" "export"; }
  .tile { padding: 24px; }

  .night-stage { width: var(--wrap); margin-top: 44px; }
  .moon { top: 60px; right: 6%; }

  .plan { padding: 26px; }
  .faq summary { font-size: 17px; padding: 20px 2px; }
  .foot-inner { grid-template-columns: 1fr; }
}
