/* ───────── Tokens ───────── */
:root {
  --bone: #EEE8DC;
  --bone-2: #E3DBC9;
  --ink: #14120F;
  --ink-2: #1D1A16;
  --muted: #6F695E;
  --sky: #B7D8F3;
  --blue: #2C6FB0;
  --line: rgba(20, 18, 15, .16);
  --gutter: clamp(20px, 5vw, 72px);
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --body: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font: 400 1.0625rem/1.5 var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.eyebrow {
  font: 500 .75rem/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--light { color: rgba(238, 232, 220, .55); }

/* ───────── Botones ───────── */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .95em 1.5em;
  border-radius: 999px;
  font: 600 1rem/1 var(--body);
  transition: transform .35s var(--ease), background .25s, color .25s, box-shadow .35s;
}
.btn:hover { transform: translateY(-2px); }
.btn--ink { background: var(--ink); color: var(--bone); }
.btn--ink:hover { box-shadow: 0 10px 30px -10px rgba(20, 18, 15, .6); }
.btn--ghost { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bone); }
.btn--big { background: var(--ink); color: var(--bone); font-size: clamp(1.1rem, 2vw, 1.5rem); padding: 1.1em 1.9em; }

/* ───────── Loader ───────── */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-content: center; gap: 18px; justify-items: center;
  background: var(--bone);
  font: 500 .8rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  transition: opacity .7s var(--ease), visibility .7s;
}
.loader__bar { width: min(260px, 60vw); height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.loader__bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .25s; }
.is-ready .loader { opacity: 0; visibility: hidden; }

/* ───────── Capa fija: disco + canvas ───────── */
.disc {
  position: fixed; left: 0; top: 0; z-index: 1;
  width: 1000px; height: 1000px; border-radius: 50%;
  background: var(--sky);
  will-change: transform;
  transform: translate(-2000px, 0);
  pointer-events: none;
}
#stage {
  position: fixed; inset: 0; z-index: 5;
  width: 100vw; height: 100vh;
  pointer-events: none;
}

/* ───────── Nav ───────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px var(--gutter);
  transition: color .3s;
}
.nav__logo { font: 800 1.25rem/1 var(--display); letter-spacing: -.02em; }
.nav__logo span { opacity: .45; }
.nav__links { display: flex; gap: 32px; font-weight: 500; font-size: .95rem; margin-left: auto; margin-right: 8px; }
.nav__links a { position: relative; padding: 4px 0; }
.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 .35s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); }
.nav__cta {
  font-weight: 600; font-size: .9rem; padding: .7em 1.2em; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px currentColor;
  transition: background .25s, color .25s;
}
.nav__cta:hover { background: var(--ink); color: var(--bone); box-shadow: none; }
.nav.is-dark { color: var(--bone); }
.nav.is-dark .nav__cta:hover { background: var(--bone); color: var(--ink); }

/* ───────── Hero ───────── */
.hero {
  position: relative; height: 100vh; min-height: 680px;
  user-select: none; -webkit-user-select: none;
  touch-action: pan-y;
  cursor: grab;
}
.hero:active { cursor: grabbing; }
.hero__word {
  position: absolute; left: 50%; top: 37%; z-index: 2;
  transform: translate(-50%, -50%);
  font: 800 clamp(6.5rem, min(27vw, 50vh), 31rem)/.78 var(--display);
  letter-spacing: -.05em; white-space: nowrap;
  color: var(--blue);
  pointer-events: none;
  will-change: transform, opacity;
}
.hero__copy {
  position: absolute; z-index: 10; left: var(--gutter); bottom: clamp(36px, 9vh, 100px);
  width: min(30rem, 46vw);
  display: grid; gap: 22px;
  will-change: transform, opacity;
}
.hero__lead { font-size: clamp(1.15rem, 1.7vw, 1.5rem); line-height: 1.3; font-weight: 500; text-wrap: balance; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__specs { display: flex; gap: clamp(20px, 3vw, 44px); padding-top: 22px; border-top: 1.5px solid var(--ink); }
.hero__specs li { display: grid; gap: 2px; }
.hero__specs b { font: 800 clamp(2rem, 3.4vw, 3rem)/1 var(--display); letter-spacing: -.03em; }
.hero__specs small { font-size: .45em; font-weight: 600; margin-left: .15em; letter-spacing: 0; }
.hero__specs span { font: 500 .72rem/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hero__hint {
  position: absolute; z-index: 10; left: 50%; bottom: 2.4vh; transform: translateX(-50%);
  font: 500 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  transition: opacity .5s;
}
.hero__hint span { display: inline-block; margin-right: .5em; animation: nudge 1.8s var(--ease) infinite; }
.hero__hint.is-hidden { opacity: 0; }
@keyframes nudge { 0%, 100% { transform: translateX(-3px); } 50% { transform: translateX(3px); } }

/* Entrada del hero */
.hero__copy > *, .hero__word, .hero__hint { opacity: 0; }
.is-ready .hero__word { animation: rise 1.1s .15s var(--ease) forwards; }
.is-ready .hero__copy > * { animation: rise .9s var(--ease) forwards; }
.is-ready .hero__copy > :nth-child(1) { animation-delay: .5s; }
.is-ready .hero__copy > :nth-child(2) { animation-delay: .62s; }
.is-ready .hero__copy > :nth-child(3) { animation-delay: .74s; }
.is-ready .hero__copy > :nth-child(4) { animation-delay: .86s; }
.is-ready .hero__hint { animation: fade 1s 1.8s forwards; }
@keyframes rise { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }
@keyframes fade { to { opacity: 1; } }

/* ───────── Despiece ───────── */
.story { position: relative; height: 900vh; }
.story__sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  user-select: none; -webkit-user-select: none;
  touch-action: pan-y; cursor: grab;
}
.story__sticky:active { cursor: grabbing; }

.story__rail {
  position: absolute; z-index: 10; left: var(--gutter); top: 50%; transform: translateY(-50%);
  display: grid; gap: 6px;
}
.story__rail button {
  display: flex; align-items: center; gap: 12px; padding: 6px 0;
  font: 500 .72rem/1 var(--mono); letter-spacing: .1em; color: var(--muted);
  transition: color .3s;
}
.story__rail i {
  display: block; width: 10px; height: 10px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px currentColor; transition: all .4s var(--ease);
}
.story__rail span { opacity: 0; translate: -6px 0; transition: all .4s var(--ease); white-space: nowrap; }
.story__rail button.is-active { color: var(--ink); }
.story__rail button.is-active i { background: var(--ink); transform: scale(1.5); }
.story__rail button.is-active span { opacity: 1; translate: 0 0; }
.story__rail button:hover { color: var(--ink); }

.story__panels {
  position: absolute; z-index: 10; right: var(--gutter); top: 50%; transform: translateY(-50%);
  width: min(27rem, 38vw);
  display: grid;
}
.panel {
  grid-area: 1 / 1;
  opacity: 0; translate: 0 22px; pointer-events: none;
  transition: opacity .45s var(--ease), translate .7s var(--ease);
}
.panel.is-active { opacity: 1; translate: 0 0; pointer-events: auto; }
.panel__kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.panel__dot { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--ink); }
.panel h2 {
  font: 800 clamp(3.2rem, 7vw, 6.4rem)/.9 var(--display); letter-spacing: -.045em;
  margin-bottom: 20px; text-wrap: balance;
}
.panel__text { font-size: 1.15rem; line-height: 1.4; max-width: 25rem; margin-bottom: 26px; text-wrap: pretty; }
.panel__facts { border-top: 1.5px solid var(--ink); }
.panel__facts div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.panel__facts dt { font: 500 .72rem/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.panel__facts dd { font: 500 .95rem/1.5 var(--mono); }
.panel--intro h2, .panel--outro h2 { font-size: clamp(2.8rem, 6vw, 5.4rem); }

/* ───────── Secciones comunes ───────── */
.section-head { display: grid; gap: 22px; margin-bottom: clamp(40px, 8vh, 90px); }
.section-head h2, .cta h2 {
  font: 800 clamp(3rem, 9vw, 8.5rem)/.88 var(--display); letter-spacing: -.045em;
}

.reveal { opacity: 0; translate: 0 28px; transition: opacity .9s var(--ease) var(--d, 0s), translate 1s var(--ease) var(--d, 0s); }
.reveal.in { opacity: 1; translate: 0 0; }

/* ───────── Colores ───────── */
.colors {
  position: relative; z-index: 6;
  background: var(--ink); color: var(--bone);
  border-radius: clamp(24px, 4vw, 48px) clamp(24px, 4vw, 48px) 0 0;
  padding: clamp(80px, 16vh, 180px) var(--gutter);
  margin-top: -2px;
}
.colors__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.6vw, 24px); }
.swatch {
  display: flex; flex-direction: column; justify-content: space-between; gap: 64px;
  min-height: clamp(320px, 42vh, 440px);
  padding: clamp(22px, 2.4vw, 34px);
  background: var(--ink-2);
  box-shadow: inset 0 0 0 1px rgba(238, 232, 220, .09);
  border-radius: 28px;
  transition: transform .5s var(--ease), box-shadow .4s;
}
.swatch:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 1px rgba(238, 232, 220, .25); }
.swatch__chip { width: clamp(88px, 9vw, 128px); aspect-ratio: 1; border-radius: 50%; }
.swatch__chip--negro  { background: radial-gradient(circle at 30% 24%, #5a5348, #17140F 62%); box-shadow: 0 0 0 1.5px rgba(238, 232, 220, .3); }
.swatch__chip--piel   { background: radial-gradient(circle at 30% 24%, #F7D2B4, #D9976C 70%); }
.swatch__chip--blanco { background: radial-gradient(circle at 30% 24%, #FFFFFF, #D6D1C3 72%); }
.swatch h3 { font: 800 clamp(2.4rem, 4.6vw, 4.2rem)/.95 var(--display); letter-spacing: -.04em; margin-bottom: 14px; }
.swatch p { font: 500 .85rem/1.7 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: rgba(238, 232, 220, .6); min-height: 5.1em; }

/* ───────── Ficha ───────── */
.specs {
  position: relative; z-index: 6; background: var(--bone);
  padding: clamp(80px, 16vh, 180px) var(--gutter);
}
.specs__grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1.5px solid var(--ink); }
.stat { padding: 26px 20px 30px 0; display: grid; gap: 38px; align-content: space-between; min-height: 220px; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
.stat dt { font: 500 .75rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat dd { font: 800 clamp(3.2rem, 7vw, 7rem)/.9 var(--display); letter-spacing: -.05em; white-space: nowrap; }
.stat small { font-size: .32em; font-weight: 600; letter-spacing: 0; margin-left: .2em; }
.specs__note { margin-top: clamp(36px, 6vh, 64px); max-width: 38rem; color: var(--muted); font-size: 1.1rem; text-wrap: pretty; }

/* ───────── Pedido ───────── */
.cta {
  position: relative; z-index: 6;
  background: var(--sky);
  border-radius: clamp(24px, 4vw, 48px) clamp(24px, 4vw, 48px) 0 0;
  padding: clamp(90px, 18vh, 200px) var(--gutter) clamp(80px, 14vh, 150px);
  display: grid; gap: 28px; justify-items: start;
}
.cta .eyebrow { color: rgba(20, 18, 15, .6); }
.cta h2 { font-size: clamp(3.4rem, 13vw, 13rem); }
.cta__lead { font-size: clamp(1.2rem, 2vw, 1.7rem); font-weight: 500; }
.cta .btn { margin-top: 12px; }

.foot {
  position: relative; z-index: 6;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 26px var(--gutter);
  background: var(--ink); color: var(--bone);
  font: 500 .78rem/1.4 var(--mono); letter-spacing: .06em;
}
.foot__dim { opacity: .5; }

/* ───────── Mobile ───────── */
@media (max-width: 860px) {
  .nav { padding: 16px var(--gutter); }
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }

  .hero__word { top: 24%; font-size: 30vw; }
  .hero__copy { width: auto; right: var(--gutter); bottom: 28px; gap: 16px; }
  .hero__lead { font-size: 1.1rem; }
  .hero__specs { padding-top: 14px; }
  .hero__specs b { font-size: 1.7rem; }
  .hero__hint { display: none; }

  .story__rail {
    left: 50%; top: 78px; transform: translateX(-50%);
    display: flex; gap: 10px;
  }
  .story__rail span { display: none; }
  .story__panels {
    left: var(--gutter); right: var(--gutter); top: auto; bottom: 22px; transform: none; width: auto;
    padding: 18px 20px 20px;
    background: rgba(238, 232, 220, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-radius: 22px;
    box-shadow: 0 0 0 1px var(--line);
  }
  .panel__kicker { margin-bottom: 8px; }
  .panel h2, .panel--intro h2, .panel--outro h2 { font-size: 2.6rem; margin-bottom: 10px; }
  .panel__text { font-size: 1rem; margin-bottom: 14px; }
  .panel__facts div { padding: 8px 0; }

  .colors__grid { grid-template-columns: 1fr; }
  .swatch { min-height: 240px; flex-direction: row; align-items: flex-end; gap: 24px; }
  .swatch__chip { align-self: flex-start; }
  .specs__grid { grid-template-columns: 1fr 1fr; }
  .stat { min-height: 170px; }
  .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition-duration: .01s; }
  .hero__hint span { animation: none; }
}
