/* Chronos Terra — noche azul, crema y oro */
@font-face { font-family: "Nord"; src: url(../fonts/nord-medium.woff2) format("woff2"); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url(../fonts/inter-tight-normal.woff2) format("woff2"); font-style: normal; font-weight: 300 600; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(../fonts/jetbrains-mono-normal.woff2) format("woff2"); font-style: normal; font-weight: 400 500; font-display: swap; }

:root {
  --bg: #07090f;
  --bg-2: #0d1220;
  --card: rgba(244, 240, 229, 0.035);
  --ink: #f4f0e5;
  --muted: #8d93a3;
  --line: rgba(244, 240, 229, 0.12);
  --gold: #ba8e59;
  --gold-hi: #e3c18e;
  --navy: #1a233b;
  /* Nord no trae acentos: si un titular lleva uno, el glifo cae en Inter Tight */
  --display: "Nord", "Inter Tight", system-ui, sans-serif;
  --sans: "Inter Tight", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --pad: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); color-scheme: dark; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--gold); color: var(--bg); }
:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 4px; }

.mono { font: 500 11px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0; }
.display { font: 500 clamp(32px, 4.8vw, 80px)/1.02 var(--display); letter-spacing: 0.08em; margin: 0; }
.display--sm { font-size: clamp(28px, 4.2vw, 64px); }
.lead { font-size: clamp(15px, 1.2vw, 18px); color: #c3c6cf; max-width: 38ch; margin: 0; font-weight: 300; }
.kicker { margin: 0 0 22px; color: var(--gold); }
.layer { position: relative; z-index: 2; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 22px; border-radius: 999px; font: 500 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; transition: background 0.3s, color 0.3s, border-color 0.3s; }
.btn--ghost { border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-hi); }
.btn--line { border: 1px solid var(--line); height: 38px; padding: 0 16px; }
.btn--line:hover { background: var(--ink); color: var(--bg); }
.btn--gold { background: var(--gold); color: #10131c; }
.btn--gold:hover { background: var(--gold-hi); }

/* ---------- fondo y lienzo ---------- */
.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.glow { position: absolute; border-radius: 50%; filter: blur(100px); }
.glow--a { width: 70vmax; height: 70vmax; left: 50%; top: 48%; translate: -50% -50%; background: radial-gradient(circle, rgba(32, 52, 104, 0.55), transparent 62%); }
.glow--b { width: 40vmax; height: 40vmax; right: -14vmax; bottom: -16vmax; background: radial-gradient(circle, rgba(186, 142, 89, 0.14), transparent 65%); }
.grain {
  position: absolute; inset: -50%; opacity: 0.06;
  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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0); } 50% { transform: translate(-4%, 3%); } 100% { transform: translate(3%, -2%); } }
#stage, #seq { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 1; pointer-events: none; }
#seq { transform-origin: 50% 60%; }

/* ---------- cargador ---------- */
.loader { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: grid; place-items: center; }
.loader__inner { width: min(320px, 76vw); display: grid; gap: 14px; justify-items: center; text-align: center; }
.loader__logo { width: 76px; height: auto; animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.55; transform: scale(0.96); } }
.loader__row { display: flex; align-items: baseline; gap: 6px; }
.loader__num { font: 500 54px/1 var(--display); letter-spacing: 0.06em; }
.loader__track { width: 100%; height: 1px; background: var(--line); overflow: hidden; }
.loader__track i { display: block; height: 100%; background: var(--gold); transform-origin: left; transform: scaleX(0); }

/* ---------- navegación ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px var(--pad); transition: background 0.4s, backdrop-filter 0.4s; }
.nav.is-solid { background: rgba(7, 9, 15, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav__brand img { height: 30px; width: auto; }
.nav__links { display: flex; gap: clamp(16px, 2.4vw, 36px); }
.nav__links a { font: 500 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: #c3c6cf; transition: color 0.3s; }
.nav__links a:hover { color: var(--gold-hi); }
.nav__cta { height: 38px; }

/* ---------- hero ---------- */
.hero { position: relative; height: 100vh; min-height: 560px; display: grid; align-items: end; padding: 0 var(--pad) clamp(28px, 5vh, 56px); overflow: hidden; }
.hero__word { position: absolute; inset: 0; z-index: 0; margin: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; pointer-events: none;
  font: 500 clamp(56px, 12.5vw, 230px)/0.96 var(--display); letter-spacing: 0.14em; text-indent: 0.14em;
  background: linear-gradient(180deg, rgba(244, 240, 229, 0.92) 0%, rgba(186, 196, 214, 0.42) 60%, rgba(186, 196, 214, 0.08) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__word span { display: block; }
.hero__foot { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.hero__meta { display: grid; gap: 12px; }
.scroll-cue { display: flex; align-items: center; gap: 12px; }
.scroll-cue i { width: 1px; height: 46px; background: linear-gradient(var(--gold), transparent); animation: cue 2s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- secciones con texto a un lado ---------- */
.split { min-height: 120vh; display: flex; align-items: center; padding: 20vh var(--pad); }
.split__text { max-width: 560px; display: grid; gap: 22px; }
.split--right { justify-content: flex-end; }
.ticks { list-style: none; padding: 18px 0 0; margin: 0; display: flex; gap: 34px; border-top: 1px solid var(--line); }
.ticks b { display: block; font: 500 34px/1 var(--display); color: var(--ink); letter-spacing: 0.04em; margin-bottom: 8px; }

/* ---------- despiece ---------- */
/* al fijarse, GSAP le da su propio plano de apilado: debe quedar sobre el lienzo 3D */
.explode__pin { position: relative; z-index: 2; height: 100vh; overflow: hidden; }
.explode__head { position: absolute; top: clamp(90px, 14vh, 140px); left: var(--pad); }
.explode__foot { position: absolute; left: var(--pad); right: var(--pad); bottom: clamp(24px, 5vh, 48px); display: flex; align-items: center; gap: 18px; }
.explode__bar { flex: 1; max-width: 360px; height: 1px; background: var(--line); }
.explode__bar i { display: block; height: 100%; background: var(--gold); transform-origin: left; transform: scaleX(0); }
.callout-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.callout-lines line { stroke: rgba(227, 193, 142, 0.7); stroke-width: 1; }
.callout-lines circle { fill: var(--gold-hi); }
.callout { position: absolute; left: 0; top: 0; z-index: 3; opacity: 0; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(13, 18, 32, 0.66); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: grid; gap: 3px; white-space: nowrap; will-change: transform, opacity; }
.callout b { font: 500 13px/1.2 var(--sans); }
.callout .mono { font-size: 10px; }

/* ---------- configurador ---------- */
.config { position: relative; min-height: 100vh; touch-action: pan-y; padding: clamp(110px, 16vh, 160px) var(--pad) 60px; display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.3fr) minmax(260px, 340px); grid-template-rows: auto 1fr; gap: 24px; }
.config__head { grid-column: 1; display: grid; gap: 18px; align-content: start; }
.config__hint { color: var(--gold); }
.editions { grid-column: 1; grid-row: 2; align-self: end; display: grid; gap: 10px; max-width: 300px; }
.edition { display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; border: 1px solid var(--line); border-radius: 999px; text-align: left; transition: border-color 0.3s, background 0.3s; }
.edition i { width: 30px; height: 30px; border-radius: 50%; background: conic-gradient(var(--b) 0 50%, var(--a) 0 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); flex: none; }
.edition span { font: 500 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.edition:hover { border-color: rgba(244, 240, 229, 0.3); }
.edition.is-active { border-color: var(--gold); background: rgba(186, 142, 89, 0.1); }
.panel { grid-column: 3; grid-row: 1 / span 2; align-self: center; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(13, 18, 32, 0.6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); display: grid; gap: 18px; }
.panel__title { color: var(--gold); }
.panel__groups { display: grid; gap: 16px; }
.pgroup { display: grid; gap: 9px; }
.pgroup__head { display: flex; justify-content: space-between; gap: 10px; }
.pgroup__head .mono:last-child { color: var(--ink); }
.pgroup__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); position: relative; transition: transform 0.25s var(--ease); }
.opt::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid transparent; transition: border-color 0.25s; }
.opt:hover { transform: scale(1.08); }
.opt.is-active::after { border-color: var(--gold-hi); }
.panel__sum { line-height: 1.6; }

/* ---------- colección ---------- */
.collection, .film, .gallery, .specs { position: relative; padding: clamp(90px, 14vh, 150px) var(--pad); }
.section-head { display: grid; gap: 4px; margin-bottom: clamp(34px, 6vh, 64px); }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card { position: relative; display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, rgba(26, 35, 59, 0.55), rgba(13, 18, 32, 0.4)); overflow: hidden; transition: border-color 0.35s, transform 0.5s var(--ease); }
.card:hover { border-color: rgba(186, 142, 89, 0.6); transform: translateY(-6px); }
.card img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: contain; transition: transform 0.8s var(--ease); }
.card:hover img { transform: scale(1.04) rotate(-1.5deg); }
.card__tag { position: absolute; top: 16px; left: 16px; z-index: 1; padding: 6px 10px; border-radius: 999px; background: rgba(186, 142, 89, 0.16); color: var(--gold-hi); }
.card__body { display: grid; gap: 6px; }
.card__body h3 { font: 500 18px/1.1 var(--display); letter-spacing: 0.1em; margin: 0; text-transform: uppercase; }
.dots { display: flex; gap: 6px; margin-top: 4px; }
.dots b { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.card__btn { justify-self: start; }

/* ---------- película ---------- */
.film__frame { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: #000; aspect-ratio: 16 / 9; }
.film__frame video { width: 100%; height: 100%; object-fit: cover; }
.film__toggle { position: absolute; inset: 0; display: grid; place-items: end start; padding: 22px; }
.film__toggle .mono { padding: 8px 14px; border-radius: 999px; background: rgba(7, 9, 15, 0.6); color: var(--ink); backdrop-filter: blur(6px); }
.film__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, 0.1); }
/* sonido: botón de silencio + volumen (arranca al 60 %) */
.film__audio { position: absolute; right: 18px; bottom: 18px; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border-radius: 999px; background: rgba(7, 9, 15, 0.6); color: var(--ink); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.film__mute { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; transition: background 0.3s; }
.film__mute:hover { background: rgba(244, 240, 229, 0.12); }
.film__mute svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.film__mute .cruz, .film__audio.is-muted .ondas { display: none; }
.film__audio.is-muted .cruz { display: inline; }
.film__vol { -webkit-appearance: none; appearance: none; width: 110px; height: 4px; border-radius: 4px; cursor: pointer;
  background: linear-gradient(var(--gold-hi), var(--gold)) 0 0 / var(--v, 60%) 100% no-repeat, rgba(244, 240, 229, 0.2); }
.film__vol::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--gold-hi); box-shadow: 0 0 0 4px rgba(186, 142, 89, 0.25); }
.film__vol::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--gold-hi); }
.film__aviso { display: none; font-size: 11px; letter-spacing: 0.06em; color: var(--gold-hi); }
.film__audio.necesita-gesto .film__aviso { display: inline; animation: aviso 1.6s ease-in-out infinite; }
@keyframes aviso { 50% { opacity: 0.45; } }
@media (max-width: 760px) { .film__audio { right: 10px; bottom: 10px; } .film__vol { width: 72px; } .film__aviso { display: none !important; } }
.film__progress i { display: block; height: 100%; background: var(--gold); transform-origin: left; transform: scaleX(0); }

/* ---------- galería ---------- */
.gallery { padding-left: 0; padding-right: 0; overflow: hidden; z-index: 2; min-height: 100vh; display: flex; align-items: center; }
.strip { display: flex; gap: 16px; width: max-content; padding: 0 var(--pad); will-change: transform; }
.strip figure { margin: 0; width: clamp(280px, 42vw, 640px); display: grid; gap: 12px; }
.strip img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); }

/* ---------- ficha ---------- */
.specs__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); }
.specs__grid > div { padding: 28px 0 34px; border-bottom: 1px solid var(--line); display: grid; gap: 12px; }
.specs__grid > div:not(:nth-child(3n + 1)) { padding-left: clamp(16px, 3vw, 40px); border-left: 1px solid var(--line); }
.specs__grid dd { margin: 0; display: flex; align-items: baseline; gap: 10px; }
.specs__grid b { font: 500 clamp(40px, 6vw, 92px)/1 var(--display); letter-spacing: 0.02em; }
.specs__grid small { font: 500 13px/1 var(--mono); color: var(--gold); text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------- final ---------- */
.finale { position: relative; min-height: 100vh; padding: 16vh var(--pad) 10vh; display: grid; justify-items: center; align-content: center; gap: 28px; text-align: center; overflow: hidden; }
.finale__logo { width: clamp(180px, 22vw, 300px); height: auto; }
.finale__word { margin: 0; font: 500 clamp(24px, 6.2vw, 120px)/1 var(--display); letter-spacing: 0.14em; text-indent: 0.14em; white-space: nowrap;
  background: linear-gradient(180deg, rgba(244, 240, 229, 0.9), rgba(186, 196, 214, 0.15)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.finale .lead { max-width: 46ch; }
.footer { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; padding: 28px var(--pad) 40px; border-top: 1px solid var(--line); }
.footer img { width: 30px; height: auto; }
.footer__credit { margin-left: auto; text-transform: none; letter-spacing: 0.04em; }
.footer__credit a { color: var(--gold-hi); }

/* palabras que se revelan */
.w { display: inline-block; overflow: hidden; vertical-align: top; }
.w > i { display: inline-block; font-style: normal; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .config { grid-template-columns: 1fr 1fr; }
  .panel { grid-column: 2; }
}
@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__brand img { height: 24px; }
  .hero__word { font-size: clamp(42px, 15vw, 90px); justify-content: flex-start; padding-top: 18vh; }
  .hero__foot { flex-direction: column; align-items: start; }
  .split { min-height: 110vh; align-items: flex-end; padding-bottom: 12vh; }
  .split--right { justify-content: flex-start; }
  .split__text { background: linear-gradient(180deg, transparent, rgba(7, 9, 15, 0.85) 30%); padding-top: 40px; }
  .ticks { gap: 22px; }
  .config { grid-template-columns: 1fr; grid-template-rows: auto; padding-top: 100px; }
  .config__head, .editions, .panel { grid-column: 1; grid-row: auto; }
  .editions { margin-top: 46vh; max-width: none; grid-template-columns: 1fr 1fr; }
  .edition { padding: 8px; gap: 10px; }
  .edition span { font-size: 10px; }
  .grid { grid-template-columns: 1fr; }
  .specs__grid { grid-template-columns: 1fr 1fr; }
  .specs__grid > div:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .specs__grid > div:nth-child(2n) { padding-left: 16px; border-left: 1px solid var(--line); }
  .callout { padding: 6px 10px; }
  .callout b { font-size: 11px; }
  .footer__credit { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .grain, .scroll-cue i, .loader__logo { animation: none; }
}
