/* Quepa Sopa Drino — oscuro de lujo */
@font-face { font-family: "Instrument Serif"; src: url(../fonts/instrument-serif-normal.woff2) format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(../fonts/instrument-serif-italic.woff2) format("woff2"); font-style: italic; font-weight: 400; 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: #09080a;
  --bg-2: #131015;
  --card: rgba(255, 244, 236, 0.035);
  --ink: #f3ece6;
  --muted: #9b9199;
  --line: rgba(243, 236, 230, 0.12);
  --magenta: #e0307f;
  --magenta-deep: #8f1450;
  --peach: #f4a27c;
  --serif: "Instrument Serif", "Times New Roman", 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 { 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(--magenta); color: #fff; }

.mono { font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.display { font: 400 clamp(44px, 7.4vw, 118px)/0.92 var(--serif); letter-spacing: -0.02em; margin: 0; }
.display em { font-style: italic; color: var(--peach); }
.lead { font-size: clamp(15px, 1.25vw, 18px); color: #c9bfc5; max-width: 34ch; margin: 0; }
.kicker { margin: 0 0 18px; }
.layer { position: relative; z-index: 2; }

/* ---------- fondo y lienzo ---------- */
.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; }
.glow--a { width: 60vmax; height: 60vmax; left: 50%; top: 45%; translate: -50% -50%; background: radial-gradient(circle, rgba(224, 48, 127, 0.38), transparent 62%); }
.glow--b { width: 42vmax; height: 42vmax; right: -12vmax; bottom: -18vmax; background: radial-gradient(circle, rgba(244, 162, 124, 0.22), transparent 65%); }
.grain {
  position: absolute; inset: -50%; opacity: 0.07;
  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 { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 1; pointer-events: none; transition: opacity 0.2s linear; }

/* ---------- cargador ---------- */
.loader { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; }
.loader__inner { width: min(420px, 80vw); }
.loader__count { font: 400 clamp(90px, 16vw, 180px)/0.85 var(--serif); margin: 10px 0 18px; }
.loader__count small { font-size: 0.3em; color: var(--muted); margin-left: 6px; }
.loader__bar { height: 1px; background: var(--line); overflow: hidden; }
.loader__bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--magenta), var(--peach)); transform-origin: left; transform: scaleX(0); }
.loader__foot { margin-top: 14px; }

/* ---------- navegación ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  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(9, 8, 10, 0.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav__logo { font: 400 24px/1 var(--serif); letter-spacing: -0.01em; margin: 0; }
.nav__logo em { color: var(--magenta); padding: 0 0.12em; }
.nav__links { display: flex; gap: 28px; }
.nav__links a { font: 500 13px/1 var(--sans); color: #cfc5cb; position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--peach); transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 22px; border-radius: 999px; font: 500 14px/1 var(--sans); transition: transform 0.35s var(--ease), background 0.35s, border-color 0.35s, color 0.35s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: linear-gradient(120deg, var(--magenta), #ff5f9e); color: #fff; box-shadow: 0 10px 40px -12px rgba(224, 48, 127, 0.7); }
.btn--ghost { border: 1px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--peach); color: var(--peach); }
.btn--pill { height: 38px; padding: 0 16px; border: 1px solid var(--line); font-size: 13px; }
.btn--pill:hover { border-color: var(--magenta); }

/* ---------- 01 hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; position: relative; display: grid; grid-template-rows: 1fr auto; padding: 110px var(--pad) 76px; overflow: hidden; }
.hero__word {
  position: absolute; z-index: 0; left: 0; right: 0; top: 50%; translate: 0 -54%;
  display: flex; justify-content: center; gap: 0.01em;
  font: 400 clamp(150px, 31vw, 520px)/0.8 var(--serif); letter-spacing: -0.02em;
  color: transparent; -webkit-text-stroke: 1px rgba(243, 236, 230, 0.16);
  background: linear-gradient(180deg, rgba(243, 236, 230, 0.09), rgba(243, 236, 230, 0)); -webkit-background-clip: text; background-clip: text;
  user-select: none; pointer-events: none;
}
.hero__word span { display: inline-block; }
.hero__meta { position: absolute; top: 84px; left: var(--pad); right: var(--pad); display: flex; justify-content: space-between; margin: 0; }
.hero__copy { align-self: end; max-width: 620px; }
.hero__title { font-size: clamp(56px, 8.4vw, 136px); }
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero__title .line > * { display: inline-block; }
.hero__lead { margin: 22px 0 30px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__specs { position: absolute; right: var(--pad); bottom: 84px; display: grid; gap: 14px; margin: 0; text-align: right; }
.hero__specs dt { color: #6f666d; }
.hero__specs dd { margin: 2px 0 0; color: var(--ink); }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.scroll-cue i { width: 1px; height: 46px; background: linear-gradient(var(--peach), 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; } }

/* ---------- 02 historia ---------- */
.story__pin { height: 100vh; height: 100svh; position: relative; display: grid; align-items: center; padding: 0 var(--pad); }
.story__beats { position: relative; height: 60vh; max-width: 560px; }
.beat { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 22px; opacity: 0; }
.beat:first-child { opacity: 1; }
.beat__time { color: var(--peach); margin: 0; }
.evidence { position: absolute; z-index: 2; right: calc(var(--pad) + 2vw); bottom: 12vh; width: clamp(160px, 17vw, 250px); margin: 0; padding: 10px 10px 0; background: #efe7df; border-radius: 4px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8); rotate: 5deg; opacity: 0; }
.evidence img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; }
.evidence figcaption { display: flex; justify-content: space-between; gap: 8px; padding: 10px 2px; color: #4b3f45; font-size: 9px; }
.story__dots { position: absolute; left: 50%; translate: -50% 0; bottom: 40px; display: flex; gap: 8px; }
.story__dots i { width: 22px; height: 2px; background: var(--line); transition: background 0.4s; }
.story__dots i.is-on { background: var(--peach); }

/* ---------- 03 despiece ---------- */
.explode__pin { height: 100vh; height: 100svh; position: relative; }
.explode__head { position: absolute; top: 110px; left: var(--pad); max-width: 420px; display: grid; gap: 18px; }
.explode__head .display { font-size: clamp(44px, 6vw, 96px); }
.callout-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible; }
.callout-lines line { stroke: rgba(243, 236, 230, 0.45); stroke-width: 1; }
.callout-lines circle { fill: var(--peach); }
.callouts { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; pointer-events: none; }
.callout { position: absolute; left: 0; top: 0; width: 210px; text-shadow: 0 1px 10px rgba(9, 8, 10, 0.95), 0 0 2px rgba(9, 8, 10, 0.9); display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 2px; opacity: 0; will-change: transform, opacity; }
.callout__n { grid-row: span 2; color: var(--peach); padding-top: 2px; }
.callout b { font: 500 14px/1.25 var(--sans); }
.callout small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.explode__meter { position: absolute; left: 50%; translate: -50% 0; bottom: 40px; display: flex; align-items: center; gap: 14px; }
.explode__meter i { width: 160px; height: 1px; background: var(--line); }
.explode__meter b { display: block; height: 100%; width: 100%; background: var(--peach); transform-origin: left; transform: scaleX(0); }

/* ---------- 04 ficha ---------- */
.specs { padding: 18vh var(--pad) 12vh; }
.section-head { display: grid; gap: 18px; margin-bottom: 56px; max-width: 900px; }
.section-head .display { font-size: clamp(42px, 6vw, 92px); }
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(220px, auto); gap: 14px; }
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.card p { margin: 0; color: #b9afb5; font-size: 14px; }
.card .card__num { font: 400 clamp(56px, 6vw, 96px)/0.9 var(--serif); color: var(--ink) !important; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card__num small { font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.card--img { padding: 0; }
.card--img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card--img:hover img { transform: scale(1.05); }
.card__cap { position: relative; margin-top: auto; padding: 60px 22px 20px; background: linear-gradient(transparent, rgba(9, 8, 10, 0.85)); display: grid; gap: 4px; }
.card__cap b { font-weight: 500; }
.card__cap span { font-size: 13px; color: #c9bfc5; }
.card--tall { grid-row: span 2; }
.card--wide { grid-column: span 2; }
.card--accent { background: linear-gradient(140deg, rgba(224, 48, 127, 0.28), rgba(143, 20, 80, 0.12)); border-color: rgba(224, 48, 127, 0.35); }

/* ---------- 05 ediciones ---------- */
.editions { min-height: 100vh; display: grid; align-items: center; padding: 12vh var(--pad); }
.editions__copy { max-width: 470px; display: grid; gap: 22px; }
.swatches { display: grid; gap: 8px; margin-top: 8px; }
.swatch { display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; border-radius: 999px; border: 1px solid transparent; text-align: left; transition: border-color 0.3s, background 0.3s; }
.swatch i { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15); flex: none; }
.swatch span { font-size: 15px; color: #cfc5cb; }
.swatch:hover { background: var(--card); }
.swatch.is-active { border-color: var(--line); background: var(--card); }
.swatch.is-active span { color: var(--ink); }
.editions__price { display: flex; gap: 32px; margin: 10px 0 0; }
.editions__price dd { margin: 4px 0 0; color: var(--ink); font-size: 12px; }

/* ---------- 06 AR ---------- */
.ar { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 4vw; align-items: center; padding: 14vh var(--pad); }
.ar__copy { display: grid; gap: 22px; max-width: 520px; }
.ar__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.seg { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 999px; width: max-content; }
.seg button { padding: 9px 16px; border-radius: 999px; font-size: 13px; color: var(--muted); transition: background 0.3s, color 0.3s; }
.seg button.is-active { background: var(--ink); color: var(--bg); }
.qr { display: flex; align-items: center; gap: 18px; margin-top: 6px; }
.qr[hidden] { display: none; }
.qr__code { width: 112px; height: 112px; padding: 8px; background: #f3ece6; border-radius: 14px; }
.qr__code svg, .qr__code img { width: 100%; height: 100%; display: block; }
.qr p { margin: 0; }
.ar__viewer { position: relative; aspect-ratio: 1; border-radius: 28px; border: 1px solid var(--line); background: radial-gradient(circle at 50% 60%, rgba(224, 48, 127, 0.2), transparent 60%), var(--bg-2); overflow: hidden; }
model-viewer { width: 100%; height: 100%; --poster-color: transparent; background: transparent; }
.mv-ar { position: absolute; right: 16px; bottom: 16px; padding: 10px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); }
.ar__hint { position: absolute; left: 20px; bottom: 18px; margin: 0; pointer-events: none; }

/* ---------- 07 archivo ---------- */
.gallery { padding: 16vh 0 10vh; overflow: hidden; }
.gallery .section-head { padding: 0 var(--pad); }
.ring-wrap { height: clamp(320px, 46vw, 520px); perspective: 1500px; cursor: grab; touch-action: pan-y; user-select: none; }
.ring-wrap.is-drag { cursor: grabbing; }
.ring { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.ring__card { --w: clamp(190px, 24vw, 340px); position: absolute; left: calc(var(--w) / -2); top: calc(var(--w) * -0.4); width: var(--w); margin: 0; backface-visibility: hidden; }
.ring__card img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); pointer-events: none; background: var(--bg-2); }
.ring__card figcaption { margin-top: 10px; }
.ring__hint { text-align: center; margin: 12px 0 0; }

/* ---------- 08 final ---------- */
.finale { min-height: 100vh; display: grid; place-items: center; padding: 14vh var(--pad); text-align: center; }
.finale__inner { display: grid; justify-items: center; gap: 22px; padding-top: 40vh; }
.finale .display { font-size: clamp(56px, 10vw, 170px); }
.finale .lead { max-width: 42ch; }
.finale__price { display: grid; gap: 6px; margin: 6px 0 10px; }
.finale__price b { font: 400 clamp(40px, 5vw, 64px)/1 var(--serif); background: linear-gradient(90deg, var(--magenta), var(--peach)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 70; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 12px 30px -10px rgba(37, 211, 102, 0.8); transition: transform 0.35s var(--ease); }
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 25px; height: 25px; }
@media (max-width: 680px) { .wa-float { right: 12px; bottom: 12px; width: 44px; height: 44px; } }

.footer { display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; padding: 40px var(--pad); border-top: 1px solid var(--line); }
.footer__note { margin: 0; font-size: 13px; color: var(--muted); max-width: 70ch; }
.footer__meta { display: grid; gap: 4px; text-align: right; margin: 0; }

/* palabras de los títulos (las crea main.js) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.w > i { display: inline-block; font-style: inherit; }

/* ---------- responsivo ---------- */
@media (max-width: 1020px) {
  .nav__links { display: none; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .ar { grid-template-columns: 1fr; }
  .ar__viewer { max-width: 560px; width: 100%; }
}
@media (max-width: 680px) {
  .hero { padding-top: 96px; }
  .hero__meta { top: 70px; font-size: 9px; }
  .hero__word { top: 30%; }
  .hero__specs { display: none; }
  .hero__copy { padding-bottom: 36px; }
  .story__pin { align-items: end; padding-bottom: 12vh; }
  .story__beats { height: 46vh; }
  .evidence { top: 92px; bottom: auto; right: var(--pad); width: 130px; }
  .explode__head { top: 84px; }
  .explode__head .lead { display: none; }
  .callout { width: 150px; }
  .callout b { font-size: 12px; }
  .callout small { display: none; }
  .bento { grid-template-columns: 1fr; }
  .card--tall { grid-row: span 1; min-height: 340px; }
  .card--wide { grid-column: span 1; min-height: 300px; }
  .editions { align-items: end; padding-top: 52vh; }
  .footer { grid-template-columns: 1fr; text-align: left; }
  .footer__meta { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .grain, .scroll-cue i { animation: none; }
}
