/* ==========================================================================
   Guía Bre-B — hoja de estilos principal
   Sin frameworks. Mobile-first. Modo claro / oscuro.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #fbf8f1;
  --bg-2: #f4efe3;
  --surface: #ffffff;
  --surface-2: #f7f4ec;
  --ink: #14111f;
  --ink-2: #3a3650;
  --muted: #6a6680;
  --line: rgba(20, 17, 31, 0.1);
  --line-strong: rgba(20, 17, 31, 0.18);

  --blue: #2f45ff;
  --blue-ink: #1d2bc4;
  --yellow: #ffc83d;
  --coral: #ff5b4f;
  --green: #00a676;
  --violet: #7b5cff;

  --brand: var(--blue);
  --brand-soft: rgba(47, 69, 255, 0.1);
  --on-brand: #ffffff;
  --danger: #e0392d;
  --danger-soft: rgba(224, 57, 45, 0.1);
  --ok: #00895f;
  --ok-soft: rgba(0, 166, 118, 0.12);

  --glass: rgba(251, 248, 241, 0.72);
  --shadow-sm: 0 1px 2px rgba(20, 17, 31, 0.06), 0 2px 8px rgba(20, 17, 31, 0.04);
  --shadow: 0 2px 4px rgba(20, 17, 31, 0.04), 0 12px 32px -8px rgba(20, 17, 31, 0.14);
  --shadow-lg: 0 4px 8px rgba(20, 17, 31, 0.04), 0 30px 60px -20px rgba(20, 17, 31, 0.28);

  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-xl: 40px;

  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(72px, 11vw, 140px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0a13;
    --bg-2: #110f1c;
    --surface: #15131f;
    --surface-2: #1b1828;
    --ink: #f4f2fb;
    --ink-2: #d2cee3;
    --muted: #9893ad;
    --line: rgba(244, 242, 251, 0.09);
    --line-strong: rgba(244, 242, 251, 0.16);
    --brand: #6f7dff;
    --brand-soft: rgba(111, 125, 255, 0.14);
    --danger: #ff6b60;
    --danger-soft: rgba(255, 107, 96, 0.12);
    --ok: #2fd39f;
    --ok-soft: rgba(47, 211, 159, 0.12);
    --glass: rgba(11, 10, 19, 0.7);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.75);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b0a13;
  --bg-2: #110f1c;
  --surface: #15131f;
  --surface-2: #1b1828;
  --ink: #f4f2fb;
  --ink-2: #d2cee3;
  --muted: #9893ad;
  --line: rgba(244, 242, 251, 0.09);
  --line-strong: rgba(244, 242, 251, 0.16);
  --brand: #6f7dff;
  --brand-soft: rgba(111, 125, 255, 0.14);
  --danger: #ff6b60;
  --danger-soft: rgba(255, 107, 96, 0.12);
  --ok: #2fd39f;
  --ok-soft: rgba(47, 211, 159, 0.12);
  --glass: rgba(11, 10, 19, 0.7);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.75);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.025em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
::selection { background: var(--yellow); color: #14111f; }

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

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

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 1000;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease);
}
.skip-link:focus { transform: none; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: clamp(48px, 7vw, 88px); }
.section--alt { background: var(--bg-2); }

.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 200;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--yellow), var(--coral), var(--blue));
}

/* ---------- Top notice (no oficial) ---------- */
.notice {
  position: relative;
  z-index: 60;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.8125rem;
  line-height: 1.4;
  text-align: center;
  padding: 9px var(--gutter);
}
.notice a { color: inherit; font-weight: 600; }
.notice strong { color: var(--yellow); font-weight: 700; }
:root[data-theme="dark"] .notice strong { color: #14111f; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .notice strong { color: #14111f; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom-color: var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}
.brand__mark { width: 36px; height: 36px; flex: none; }
.brand__tag {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px 8px;
  margin-left: 2px;
}

.nav__links {
  display: none;
  list-style: none;
  align-items: center;
  gap: 4px;
}
.nav__links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: background-color 0.2s, color 0.2s;
}
.nav__links a:hover { background: var(--brand-soft); color: var(--ink); }
.nav__links a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); }

.nav__actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  transition: transform 0.2s var(--ease), background-color 0.2s;
}
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

.menu-toggle .bar {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.menu-toggle .bars { display: grid; gap: 4px; }
.menu-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  padding: 120px var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s 0.3s;
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-menu a::after { content: "→"; font-size: 0.6em; color: var(--muted); }
.mobile-menu a[aria-current="page"] { color: var(--brand); }
body.menu-open { overflow: hidden; }

@media (min-width: 960px) {
  .nav__links { display: flex; }
  .menu-toggle, .mobile-menu { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--bg);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  border: 0;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, var(--blue), var(--violet) 55%, var(--coral));
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:hover::before { opacity: 1; }
.btn:hover { color: #fff; }
.btn:active { transform: translateY(0) scale(0.98); }
.btn svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
.btn--ghost::before { display: none; }
.btn--ghost:hover { color: var(--ink); background: var(--surface); }

.btn--yellow { --btn-bg: var(--yellow); --btn-fg: #14111f; }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: 0.9375rem; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.display {
  font-size: clamp(2.75rem, 8.4vw, 6.25rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 800;
}
.h2 { font-size: clamp(2.1rem, 5.2vw, 3.75rem); letter-spacing: -0.035em; }
.h3 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); letter-spacing: -0.02em; line-height: 1.15; }
.lead { font-size: clamp(1.125rem, 1.8vw, 1.3125rem); color: var(--ink-2); line-height: 1.55; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

.hl {
  position: relative;
  white-space: nowrap;
  z-index: 0;
}
.hl::after {
  content: "";
  position: absolute;
  left: -0.06em;
  right: -0.06em;
  bottom: 0.06em;
  height: 0.34em;
  z-index: -1;
  background: var(--yellow);
  border-radius: 0.2em;
  transform: scaleX(0);
  transform-origin: 0 50%;
  animation: hl-in 0.9s 0.5s var(--ease) forwards;
}
:root[data-theme="dark"] .hl::after { opacity: 0.85; }
@keyframes hl-in { to { transform: scaleX(1); } }

.grad-text {
  background: linear-gradient(100deg, var(--blue) 10%, var(--violet) 45%, var(--coral) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
:root[data-theme="dark"] .grad-text { background-image: linear-gradient(100deg, #8d98ff 10%, #b39cff 45%, #ff8a7f 90%); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .grad-text { background-image: linear-gradient(100deg, #8d98ff 10%, #b39cff 45%, #ff8a7f 90%); }
}

.section-head {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(32px, 6vw, 72px);
  padding-bottom: clamp(64px, 9vw, 120px);
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 120%;
  z-index: -1;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
}
.blob--1 { width: 46vw; height: 46vw; max-width: 620px; max-height: 620px; background: var(--yellow); top: 4%; right: -6%; animation: drift 18s ease-in-out infinite; }
.blob--2 { width: 36vw; height: 36vw; max-width: 480px; max-height: 480px; background: var(--blue); top: 28%; right: 22%; opacity: 0.35; animation: drift 22s ease-in-out infinite reverse; }
.blob--3 { width: 30vw; height: 30vw; max-width: 400px; max-height: 400px; background: var(--coral); top: 52%; right: -2%; opacity: 0.4; animation: drift 26s ease-in-out infinite; }
:root[data-theme="dark"] .blob { opacity: 0.28; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .blob { opacity: 0.28; } }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-4%, 6%) scale(1.08); }
  66% { transform: translate(5%, -3%) scale(0.95); }
}

.hero__grid {
  display: grid;
  gap: clamp(48px, 6vw, 72px);
  align-items: center;
}
@media (min-width: 980px) {
  .hero__grid { grid-template-columns: 1.15fr 0.85fr; }
}
.hero__copy { display: grid; gap: 28px; }
.hero__copy .lead { max-width: 560px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 0.9375rem;
  color: var(--muted);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta svg { width: 18px; height: 18px; color: var(--green); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
}
.pill__dot {
  display: inline-grid;
  place-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 700;
}
.pill__live {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(0, 166, 118, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 166, 118, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(0, 166, 118, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 166, 118, 0); }
}

/* ---------- Phone simulator ---------- */
.stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 600px;
  perspective: 1400px;
}
.phone {
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 9 / 19;
  border-radius: 46px;
  padding: 12px;
  background: linear-gradient(160deg, #2a2738, #0d0c14);
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.08) inset,
    0 50px 100px -30px rgba(20, 17, 31, 0.55),
    0 30px 60px -30px rgba(47, 69, 255, 0.45);
  transform: rotateY(-14deg) rotateX(6deg) rotateZ(2deg);
  transform-style: preserve-3d;
  transition: transform 0.8s var(--ease);
  will-change: transform;
}
.phone::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  translate: -50% 0;
  width: 92px;
  height: 26px;
  border-radius: 999px;
  background: #000;
  z-index: 5;
}
.screen {
  position: relative;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: #f6f4ff;
  color: #14111f;
  font-family: var(--font-body);
}
.screen__inner {
  position: absolute;
  inset: 0;
  padding: 58px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.app-top { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; color: #6a6680; }
.app-top b { color: #14111f; font-size: 0.95rem; font-family: var(--font-display); letter-spacing: -0.02em; }
.app-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--yellow), var(--coral)); }

.app-balance {
  border-radius: 20px;
  padding: 16px;
  color: #fff;
  background: linear-gradient(135deg, #2f45ff, #7b5cff);
  box-shadow: 0 12px 24px -10px rgba(47, 69, 255, 0.6);
}
.app-balance small { font-size: 0.6875rem; opacity: 0.8; display: block; }
.app-balance strong { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: -0.03em; }

.app-field {
  background: #fff;
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(20, 17, 31, 0.06);
  border: 1.5px solid transparent;
  transition: border-color 0.3s;
}
.app-field.is-active { border-color: #2f45ff; }
.app-field label { display: block; font-size: 0.6875rem; color: #6a6680; margin-bottom: 2px; }
.app-field .val { font-weight: 600; font-size: 0.95rem; min-height: 1.4em; display: flex; align-items: center; gap: 2px; }
.caret { width: 2px; height: 1.1em; background: #2f45ff; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.app-match {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0, 166, 118, 0.1);
  font-size: 0.8rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.app-match.is-on { opacity: 1; transform: none; }
.app-match .av { width: 28px; height: 28px; border-radius: 50%; background: #00a676; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.75rem; flex: none; }
.app-match b { display: block; font-size: 0.85rem; }
.app-match span { color: #3a3650; font-size: 0.72rem; }

.app-cta {
  margin-top: auto;
  height: 50px;
  border-radius: 16px;
  background: #14111f;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s var(--ease), background-color 0.3s;
}
.app-cta.is-press { transform: scale(0.96); background: #2f45ff; }

.app-success {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  background: linear-gradient(180deg, #00a676, #00805c);
  color: #fff;
  clip-path: circle(0% at 50% 88%);
  transition: clip-path 0.7s var(--ease);
}
.app-success.is-on { clip-path: circle(150% at 50% 88%); }
.app-success .check {
  width: 74px; height: 74px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
}
.app-success .check svg { width: 38px; height: 38px; }
.app-success .check path { stroke-dasharray: 40; stroke-dashoffset: 40; }
.app-success.is-on .check path { animation: draw 0.6s 0.35s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.app-success strong { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.03em; line-height: 1.1; }
.app-success p { font-size: 0.8rem; opacity: 0.9; }
.app-success .timer {
  margin-top: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.float-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  animation: bob 6s ease-in-out infinite;
  z-index: 2;
}
.float-chip i {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 9px;
  font-style: normal;
  font-size: 0.9rem;
}
.float-chip--a { top: 8%; left: 0; }
.float-chip--b { top: 38%; right: -2%; animation-delay: -2s; }
.float-chip--c { bottom: 12%; left: 4%; animation-delay: -4s; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@media (max-width: 520px) {
  .float-chip--a { left: -4px; top: 2%; }
  .float-chip--b { right: -6px; }
  .float-chip--c { left: -4px; }
  .stage { min-height: 560px; }
}

/* ---------- Marquee ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--surface);
  padding-block: 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  gap: 48px;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.marquee__item::after { content: "✦"; color: var(--coral); font-size: 0.8em; margin-left: 34px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Cards / Bento ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s;
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }

.spotlight { --mx: 50%; --my: 50%; }
.spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), var(--brand-soft), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
}
.spotlight:hover::before { opacity: 1; }

.bento {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .bento > :nth-child(1) { grid-column: span 4; }
  .bento > :nth-child(2) { grid-column: span 2; }
  .bento > :nth-child(3) { grid-column: span 2; }
  .bento > :nth-child(4) { grid-column: span 2; }
  .bento > :nth-child(5) { grid-column: span 2; }
}
.bento .card { display: flex; flex-direction: column; gap: 14px; min-height: 240px; }
.bento .card p { color: var(--ink-2); }
.bento .card--feature {
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(255, 200, 61, 0.35), transparent 50%),
    radial-gradient(90% 90% at 0% 100%, rgba(47, 69, 255, 0.18), transparent 55%),
    var(--surface);
}
.big-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4rem, 11vw, 8rem);
  line-height: 0.85;
  letter-spacing: -0.06em;
}
.big-num sub { font-size: 0.32em; letter-spacing: -0.02em; vertical-align: baseline; margin-left: 6px; color: var(--muted); }

.icon-tile {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand);
  flex: none;
}
.icon-tile svg { width: 26px; height: 26px; }
.icon-tile--yellow { background: rgba(255, 200, 61, 0.22); color: #a86f00; }
.icon-tile--coral { background: rgba(255, 91, 79, 0.14); color: var(--coral); }
.icon-tile--green { background: var(--ok-soft); color: var(--ok); }
.icon-tile--violet { background: rgba(123, 92, 255, 0.14); color: var(--violet); }
:root[data-theme="dark"] .icon-tile--yellow { color: var(--yellow); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .icon-tile--yellow { color: var(--yellow); } }

/* ---------- Steps ---------- */
.steps {
  position: relative;
  display: grid;
  gap: 20px;
  counter-reset: step;
}
@media (min-width: 880px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  position: relative;
  counter-increment: step;
  display: grid;
  gap: 16px;
  align-content: start;
}
.step__num {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
}
.step__num::before { content: counter(step, decimal-leading-zero); }
.step:nth-child(2) .step__num { background: var(--blue); color: #fff; }
.step:nth-child(3) .step__num { background: var(--yellow); color: #14111f; }
.step p { color: var(--ink-2); }
.step__visual {
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 18px;
  min-height: 132px;
  display: grid;
  place-items: center;
}

/* ---------- Llaves ---------- */
.keys {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}
.key-card {
  position: relative;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 26px 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.key-card:hover { transform: translateY(-6px) rotate(-0.5deg); box-shadow: var(--shadow-lg); }
.key-card__emoji {
  font-size: 2rem;
  width: 60px; height: 60px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: var(--surface-2);
}
.key-card h3 { font-size: 1.25rem; letter-spacing: -0.02em; }
.key-card p { font-size: 0.9375rem; color: var(--ink-2); }
.key-card code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  width: fit-content;
}
.key-card__tag {
  position: absolute;
  top: 18px; right: 18px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 200, 61, 0.25);
  color: #8a5a00;
}
:root[data-theme="dark"] .key-card__tag { color: var(--yellow); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .key-card__tag { color: var(--yellow); } }

/* ---------- Comparison ---------- */
.compare {
  display: grid;
  gap: 16px;
}
@media (min-width: 820px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare__col { padding: clamp(24px, 3.5vw, 40px); border-radius: var(--radius-lg); }
.compare__col--before { background: var(--surface); border: 1px dashed var(--line-strong); }
.compare__col--after {
  color: #fff;
  background:
    radial-gradient(80% 100% at 100% 0%, rgba(255, 200, 61, 0.35), transparent 60%),
    linear-gradient(140deg, #2f45ff, #5a3dff 60%, #7b5cff);
  box-shadow: 0 30px 60px -24px rgba(47, 69, 255, 0.55);
}
.compare__col h3 { font-size: 1.5rem; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.compare__list { list-style: none; display: grid; gap: 14px; }
.compare__list li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.compare__list li::before {
  content: "";
  width: 26px; height: 26px;
  border-radius: 50%;
  margin-top: 1px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
}
.compare__col--before li { color: var(--ink-2); }
.compare__col--before li::before {
  background-color: var(--danger-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0392d' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
}
.compare__col--after li::before {
  background-color: rgba(255, 255, 255, 0.2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

/* ---------- Stats ---------- */
.stats-band {
  position: relative;
  overflow: hidden;
  background: #0f0d1a;
  color: #f4f2fb;
  border-radius: var(--radius-xl);
  padding: clamp(36px, 6vw, 72px);
  isolation: isolate;
}
.stats-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(50% 70% at 10% 0%, rgba(47, 69, 255, 0.55), transparent 70%),
    radial-gradient(40% 60% at 100% 100%, rgba(255, 91, 79, 0.4), transparent 70%),
    radial-gradient(30% 40% at 70% 10%, rgba(255, 200, 61, 0.3), transparent 70%);
}
.stats-band .eyebrow { color: var(--yellow); }
.stats {
  display: grid;
  gap: 32px 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  margin-top: 40px;
}
.stat { display: grid; gap: 6px; border-top: 1px solid rgba(255, 255, 255, 0.16); padding-top: 20px; }
.stat__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}
.stat__label { color: rgba(244, 242, 251, 0.72); font-size: 0.9375rem; }
.stats-band .src { margin-top: 32px; font-size: 0.8125rem; color: rgba(244, 242, 251, 0.6); }
.stats-band .src a { color: inherit; }

/* ---------- Alerts / seguridad ---------- */
.alert-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.alert {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.alert--danger { border-color: rgba(224, 57, 45, 0.28); background: linear-gradient(180deg, var(--danger-soft), transparent 60%), var(--surface); }
.alert--ok { border-color: rgba(0, 166, 118, 0.3); background: linear-gradient(180deg, var(--ok-soft), transparent 60%), var(--surface); }
.alert h3 { font-size: 1.2rem; letter-spacing: -0.015em; line-height: 1.25; }
.alert p { color: var(--ink-2); font-size: 0.975rem; }
.alert__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
}
.alert--danger .alert__badge { background: var(--danger-soft); color: var(--danger); }
.alert--ok .alert__badge { background: var(--ok-soft); color: var(--ok); }

.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--yellow);
}
.callout--danger { border-left-color: var(--danger); }
.callout--info { border-left-color: var(--brand); }
.callout__icon { font-size: 1.6rem; line-height: 1; }
.callout h3, .callout strong.callout__title { font-family: var(--font-display); font-size: 1.2rem; display: block; margin-bottom: 6px; letter-spacing: -0.015em; }
.callout p { color: var(--ink-2); }
.callout p + p { margin-top: 8px; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; position: relative; display: grid; gap: 28px; padding-left: 36px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 10px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--yellow), var(--coral), var(--blue));
  border-radius: 2px;
}
.timeline li { position: relative; display: grid; gap: 4px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -32px; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--brand);
}
.timeline time { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand); }
.timeline strong { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: -0.015em; }
.timeline p { color: var(--ink-2); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.faq details[open] { border-color: var(--line-strong); box-shadow: var(--shadow); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  background-color: var(--surface-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a6680' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  background-size: 16px;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.35s var(--ease), background-color 0.3s;
}
.faq details[open] summary::after { transform: rotate(45deg); background-color: var(--yellow); }
.faq .faq__body { padding: 0 24px 24px; color: var(--ink-2); display: grid; gap: 10px; }
.faq .faq__body ul { padding-left: 20px; display: grid; gap: 6px; }

/* ---------- Page hero (subpages) ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(40px, 7vw, 96px) clamp(48px, 7vw, 88px);
}
.page-hero .hero__bg { inset: -40% -20% auto auto; width: 70%; height: 160%; }
.page-hero__inner { display: grid; gap: 22px; max-width: 860px; }
.page-hero h1 { font-size: clamp(2.5rem, 7vw, 5rem); line-height: 0.98; letter-spacing: -0.045em; font-weight: 800; }

.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.875rem; color: var(--muted); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; opacity: 0.5; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Article layout ---------- */
.article-layout { display: grid; gap: 48px; }
@media (min-width: 1000px) { .article-layout { grid-template-columns: 240px 1fr; gap: 72px; } }
.toc { position: sticky; top: 100px; align-self: start; display: none; }
@media (min-width: 1000px) { .toc { display: block; } }
.toc strong { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 12px; }
.toc ol { list-style: none; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.toc a {
  display: block;
  padding: 6px 0 6px 16px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  text-decoration: none;
  font-size: 0.9375rem;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--brand); font-weight: 600; }

.prose { max-width: 740px; display: grid; gap: 20px; }
.prose > section { display: grid; gap: 18px; scroll-margin-top: 100px; }
.prose > section + section { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--line); }
.prose h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); letter-spacing: -0.03em; }
.prose h3 { font-size: 1.3rem; letter-spacing: -0.015em; margin-top: 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 22px; display: grid; gap: 10px; }
.prose li::marker { color: var(--brand); font-weight: 700; }
.prose a { color: var(--brand); font-weight: 500; }
.prose strong { color: var(--ink); }

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; min-width: 520px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.8125rem; background: var(--brand-soft); color: var(--brand); padding: 2px 7px; border-radius: 6px; }

.numbered { list-style: none; counter-reset: n; display: grid; gap: 14px; padding: 0 !important; }
.numbered li {
  counter-increment: n;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.numbered li::before {
  content: counter(n);
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-display);
  font-weight: 800;
}

/* ---------- Key demo (página llaves) ---------- */
.demo {
  display: grid;
  gap: 20px;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.demo__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--line-strong);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8125rem;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s var(--ease-spring);
}
.chip:hover { transform: translateY(-2px); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.demo__out {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface-2);
  min-height: 92px;
}
.demo__out .key-card__emoji { background: var(--surface); }
.demo__out strong { font-family: var(--font-display); font-size: 1.15rem; display: block; }
.demo__out p { color: var(--ink-2); font-size: 0.9375rem; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius-xl);
  padding: clamp(40px, 7vw, 88px) clamp(24px, 6vw, 72px);
  background: var(--yellow);
  color: #14111f;
  display: grid;
  gap: 24px;
  justify-items: start;
}
.cta-band::after {
  content: "";
  position: absolute;
  right: -10%;
  bottom: -60%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  z-index: -1;
  background: radial-gradient(circle, rgba(255, 91, 79, 0.55), transparent 65%);
}
.cta-band h2 { font-size: clamp(2.2rem, 6vw, 4.25rem); max-width: 16ch; letter-spacing: -0.04em; }
.cta-band p { max-width: 560px; font-size: 1.125rem; color: #3a3650; }
.cta-band .btn { --btn-bg: #14111f; --btn-fg: #fff; }

/* ---------- Sources ---------- */
.sources { list-style: none; display: grid; gap: 10px; }
.sources a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.3s var(--ease);
}
.sources a:hover { border-color: var(--brand); transform: translateX(4px); }
.sources span { display: grid; }
.sources b { font-weight: 600; color: var(--ink); }
.sources small { color: var(--muted); font-size: 0.8125rem; }
.sources svg { width: 18px; height: 18px; flex: none; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: var(--section);
  padding-block: 64px 32px;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}
.footer__grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}
@media (min-width: 820px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer__col h2 { font-family: var(--font-body); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer__col ul { list-style: none; display: grid; gap: 8px; }
.footer__col a { text-decoration: none; color: var(--ink-2); }
.footer__col a:hover { color: var(--ink); text-decoration: underline; }
.footer__about { display: grid; gap: 16px; max-width: 440px; }
.footer__about p { color: var(--ink-2); font-size: 0.9375rem; }
.disclaimer {
  margin-top: 48px;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  font-size: 0.875rem;
  color: var(--muted);
}
.disclaimer strong { color: var(--ink); }
.footer__bottom {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.footer__bottom a { color: inherit; }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.notfound .big-num { font-size: clamp(7rem, 26vw, 16rem); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s 0.3s;
  box-shadow: var(--shadow);
}
.to-top.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Utilities ---------- */
.grid-2 { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.stack { display: grid; gap: 16px; }
.stack-lg { display: grid; gap: 28px; }
.center { text-align: center; }
.mt-lg { margin-top: clamp(32px, 5vw, 56px); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
  .phone { transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .notice, .progress, .to-top, .mobile-menu, .hero__bg, .stage, .marquee, .cta-band .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .js .reveal { opacity: 1; transform: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}

/* ==========================================================================
   3D — objetos, tilt de tarjetas, cubo, abanico de llaves, monedas
   ========================================================================== */

/* ---------- Reveal con giro 3D ---------- */
.js .reveal {
  transform: perspective(1000px) translateY(40px) rotateX(16deg);
  transform-origin: 50% 100%;
}
.js .reveal.is-in { transform: none; }

/* ---------- Tilt 3D en tarjetas ---------- */
.tilt { position: relative; overflow: hidden; transform-style: preserve-3d; will-change: transform; }
.alert { position: relative; overflow: hidden; transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.tilt.is-tilting { box-shadow: var(--shadow-lg); transition: transform 0.12s linear, box-shadow 0.4s var(--ease); }
.tilt-glare {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 55%);
  mix-blend-mode: soft-light;
}
.tilt.is-tilting .tilt-glare { opacity: 1; }

/* ---------- Escenario genérico para objetos 3D ---------- */
.art3d {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 300px;
  perspective: 1100px;
  -webkit-user-select: none;
  user-select: none;
}
@media (min-width: 900px) { .art3d { min-height: 420px; } }
.art3d .float-chip { z-index: 4; }
.art3d__shadow {
  position: absolute;
  bottom: 8%;
  left: 50%;
  width: 46%;
  height: 26px;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(20, 17, 31, 0.28), transparent);
  filter: blur(4px);
  animation: shadow-pulse 6s ease-in-out infinite;
}
:root[data-theme="dark"] .art3d__shadow { background: radial-gradient(closest-side, rgba(0, 0, 0, 0.7), transparent); }
@keyframes shadow-pulse { 50% { scale: 0.8; opacity: 0.6; } }

/* ---------- Objeto extruido (capas apiladas = grosor real) ---------- */
.obj3d {
  --w: 220px;
  position: relative;
  width: var(--w);
  aspect-ratio: var(--ar, 1);
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease);
  animation: obj-float 6s ease-in-out infinite;
}
.obj3d__spin {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: obj-swing var(--swing-dur, 9s) ease-in-out infinite;
}
.obj3d__layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: visible;
}
.obj3d__layer.is-side { filter: brightness(var(--side-b, 0.62)) saturate(1.1); }
.obj3d__layer.is-back { filter: brightness(0.5); }
@keyframes obj-swing {
  0%, 100% { transform: rotateY(-32deg) rotateX(8deg); }
  50% { transform: rotateY(32deg) rotateX(-6deg); }
}
@keyframes obj-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}
@media (max-width: 899px) { .obj3d { --w: 170px; } }

/* ---------- Cubo ---------- */
.cube-wrap {
  display: grid;
  place-items: center;
  min-height: 260px;
  perspective: 900px;
}
.cube {
  --s: 150px;
  position: relative;
  width: var(--s);
  height: var(--s);
  transform-style: preserve-3d;
  animation: cube-spin 16s linear infinite;
}
.cube-wrap:hover .cube { animation-play-state: paused; }
.cube__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.1rem;
  letter-spacing: -0.04em;
  line-height: 1;
  text-align: center;
  backface-visibility: hidden;
  box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.12);
}
.cube__face small { font-family: var(--font-body); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; opacity: 0.85; }
.cube__face:nth-child(1) { background: linear-gradient(135deg, #2f45ff, #5a3dff); transform: rotateY(0deg) translateZ(calc(var(--s) / 2)); }
.cube__face:nth-child(2) { background: linear-gradient(135deg, #ffc83d, #ff9f1c); color: #14111f; transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.cube__face:nth-child(3) { background: linear-gradient(135deg, #ff5b4f, #ff8a5c); transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.cube__face:nth-child(4) { background: linear-gradient(135deg, #00a676, #00c48c); transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.cube__face:nth-child(5) { background: linear-gradient(135deg, #7b5cff, #b39cff); transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.cube__face:nth-child(6) { background: linear-gradient(135deg, #14111f, #3a3650); transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }
@keyframes cube-spin {
  0% { transform: rotateX(-22deg) rotateY(0deg); }
  25% { transform: rotateX(-22deg) rotateY(-90deg); }
  50% { transform: rotateX(-22deg) rotateY(-180deg); }
  60% { transform: rotateX(-110deg) rotateY(-200deg); }
  75% { transform: rotateX(-22deg) rotateY(-270deg); }
  100% { transform: rotateX(-22deg) rotateY(-360deg); }
}
.stats-head { display: grid; gap: 24px; align-items: center; }
@media (min-width: 860px) { .stats-head { grid-template-columns: 1fr auto; } .cube-wrap { padding-right: 40px; } }

/* ---------- Abanico de tarjetas de llaves ---------- */
.fan {
  position: relative;
  width: min(320px, 78vw);
  aspect-ratio: 1.586;
  transform-style: preserve-3d;
  transform: rotateX(22deg) rotateY(-18deg) rotateZ(4deg);
  transition: transform 0.7s var(--ease);
  animation: obj-float 7s ease-in-out infinite;
}
.fan__card {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 24px 50px -18px rgba(20, 17, 31, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  transition: transform 0.7s var(--ease);
  transform-style: preserve-3d;
}
.fan__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.28) 45%, transparent 60%);
  translate: -100% 0;
  animation: sheen 5s ease-in-out infinite;
}
@keyframes sheen { 0%, 55% { translate: -100% 0; } 85%, 100% { translate: 100% 0; } }
.fan__card:nth-child(1) { background: linear-gradient(135deg, #00a676, #00805c); transform: translateZ(-60px) translate(-34px, -46px) rotateZ(-9deg); }
.fan__card:nth-child(2) { background: linear-gradient(135deg, #ff5b4f, #ff9f1c); transform: translateZ(-30px) translate(-16px, -22px) rotateZ(-4deg); }
.fan__card:nth-child(3) { background: linear-gradient(135deg, #2f45ff, #7b5cff); transform: translateZ(0); }
.art3d:hover .fan__card:nth-child(1) { transform: translateZ(-90px) translate(-70px, -88px) rotateZ(-16deg); }
.art3d:hover .fan__card:nth-child(2) { transform: translateZ(-45px) translate(-34px, -44px) rotateZ(-8deg); }
.art3d:hover .fan__card:nth-child(3) { transform: translateZ(30px) translate(10px, 8px); }
.fan__top { display: flex; justify-content: space-between; align-items: center; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.92; }
.fan__chip { width: 38px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, #ffe9a8, #ffc83d); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.fan__val { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: clamp(1.1rem, 4.6vw, 1.45rem); font-weight: 700; letter-spacing: 0.02em; }
.fan__foot { display: flex; justify-content: space-between; font-size: 0.72rem; opacity: 0.85; }

/* ---------- Monedas ---------- */
.coins { position: absolute; inset: 0; pointer-events: none; z-index: -1; perspective: 800px; }
.coins .obj3d { position: absolute; --w: 92px; animation-duration: 7s; }
.coins .obj3d .obj3d__spin { animation: coin-spin 4.5s linear infinite; }
.coins .obj3d:nth-child(1) { right: 8%; top: 12%; }
.coins .obj3d:nth-child(2) { right: 24%; bottom: 10%; --w: 64px; animation-delay: -2s; }
.coins .obj3d:nth-child(2) .obj3d__spin { animation-duration: 5.5s; animation-direction: reverse; }
.coins .obj3d:nth-child(3) { right: 3%; bottom: 18%; --w: 52px; animation-delay: -4s; }
@keyframes coin-spin {
  0% { transform: rotateY(-70deg) rotateX(12deg); }
  50% { transform: rotateY(70deg) rotateX(-8deg); }
  100% { transform: rotateY(-70deg) rotateX(12deg); }
}
@media (max-width: 700px) { .coins .obj3d:nth-child(1) { top: auto; bottom: 4%; right: 6%; --w: 70px; } .coins .obj3d:nth-child(2), .coins .obj3d:nth-child(3) { display: none; } }

/* ---------- Page hero con objeto 3D ---------- */
.page-hero__grid { display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .page-hero__grid { grid-template-columns: 1.25fr 0.75fr; gap: 40px; } }
.page-hero__grid .page-hero__inner { max-width: none; }

/* ---------- Marquee inclinado ---------- */
.marquee { rotate: -1.6deg; scale: 1.04; margin-block: 12px; box-shadow: var(--shadow); position: relative; z-index: 2; }

/* ---------- 3D: accesibilidad ---------- */
@media (prefers-reduced-motion: reduce) {
  .obj3d, .obj3d__spin, .cube, .fan, .fan__card::after, .coins .obj3d__spin { animation: none !important; }
  .obj3d__spin { transform: rotateY(-24deg) rotateX(6deg); }
  .cube { transform: rotateX(-22deg) rotateY(-35deg); }
}
