/* ==========================================================================
   EROS SHOP — BASE
   Tokens de marca, reset, tipografía, botones y piezas reutilizables.
   Para cambiar colores o fuentes de todo el sitio, edita solo :root.
   ========================================================================== */

:root {
  /* — Paleta Eros — */
  --ink: #0A0A0A;
  --ink-2: #141414;
  --ink-3: #1E1E1E;
  --paper: #F1ECE3;       /* hueso / crema (como el hoodie crema) */
  --paper-2: #E6DFD3;
  --paper-3: #D9D0C1;
  --paper-hi: #FBF8F2;
  --red: #B3122A;         /* Rojo Eros — acento principal */
  --red-lit: #E5394F;     /* rojo para texto pequeño sobre negro (contraste AA) */
  --red-deep: #7E0B1C;
  --forest: #1F3B2D;
  --heather: #8E8A84;
  --muted-ink: #A7A29A;   /* texto secundario sobre negro */
  --muted-paper: #625D56; /* texto secundario sobre papel */
  --line-ink: rgba(241, 236, 227, .14);
  --line-paper: rgba(10, 10, 10, .14);

  /* — Tipografía — */
  --f-serif: 'Bodoni Moda', 'Bodoni 72', Didot, 'Times New Roman', serif;
  --f-sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* — Medidas — */
  --gutter: clamp(16px, 4.2vw, 64px);
  --maxw: 1560px;
  --nav-h: 64px;
  --announce-h: 32px;
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.7, 0, .2, 1);
  --intro: 0s;            /* retraso de la entrada del hero (lo sube la intro) */
}
.intro { --intro: 1.45s; }
@media (min-width: 900px) { :root { --nav-h: 76px; } }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font-family: var(--f-sans); font-size: 16px; line-height: 1.55; font-weight: 400;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip; text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
a[data-wa] { cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, blockquote, fieldset { margin: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
[hidden] { display: none !important; }
::selection { background: var(--red); color: var(--paper); }
:focus-visible { outline: 2px solid var(--red-lit); outline-offset: 3px; border-radius: 2px; }
.sec--paper :focus-visible, .sec--sketch :focus-visible, .drawer :focus-visible, .modal :focus-visible { outline-color: var(--red); }
section[id], footer[id] { scroll-margin-top: calc(var(--nav-h) - 1px); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 999; padding: 10px 16px; background: var(--paper); color: var(--ink); transform: translateY(-160%); transition: transform .2s; font-weight: 600; }
.skip:focus { transform: none; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Tipografía ---------- */
em { font-style: italic; }
.kicker {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-family: var(--f-sans); font-size: 11px; line-height: 1.2; font-weight: 600;
  font-stretch: 118%; letter-spacing: .2em; text-transform: uppercase;
}
.kicker__rule { width: 36px; height: 1px; background: currentColor; opacity: .5; }
.kicker__ico { width: 18px; height: 18px; }
.sec-title {
  font-family: var(--f-serif); font-weight: 400; font-optical-sizing: auto;
  font-size: clamp(2.6rem, 7.2vw, 6.6rem); line-height: .96; letter-spacing: -.022em;
  text-wrap: balance;
}
.sec-title em { font-weight: 400; }
.sec--ink .sec-title em { color: var(--paper); }
.sec-lead { font-size: clamp(1rem, 1.25vw, 1.125rem); line-height: 1.6; max-width: 46ch; }
.sec--paper .sec-lead, .sec--sketch .sec-lead { color: var(--muted-paper); }
.sec--ink .sec-lead { color: var(--muted-ink); }
.mono { font-family: var(--f-mono); }

/* ---------- Secciones ---------- */
.sec { position: relative; padding-block: clamp(84px, 11vw, 168px); isolation: isolate; }
.sec--ink { background: var(--ink); color: var(--paper); }
.sec--paper { background: var(--paper); color: var(--ink); }
.sec--sketch { background: var(--paper-2); color: var(--ink); }
/* Grano de película (estático, barato) */
.sec::before, .ftr::before, .hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background-image: var(--grain-img); background-size: 180px 180px; opacity: var(--grain-o, .5);
}
.sec--paper, .sec--sketch { --grain-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .06 0 0 0 0 .05 0 0 0 0 .04 0 0 0 .55 -.18'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); --grain-o: .55; }
.sec--ink, .ftr, .hero { --grain-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .97 0 0 0 0 .93 0 0 0 .5 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); --grain-o: .45; }

.sec-head { display: grid; gap: clamp(16px, 2vw, 26px); margin-bottom: clamp(40px, 6vw, 88px); }
.sec-head--split { grid-template-columns: 1fr; align-items: end; }
@media (min-width: 900px) { .sec-head--split { grid-template-columns: 1.3fr 1fr; gap: 48px; } }

/* ---------- Papel rasgado entre secciones ---------- */
.tear { position: absolute; left: 0; right: 0; top: 0; height: 34px; transform: translateY(-96%); z-index: 2; pointer-events: none; }
.tear::before, .tear::after {
  content: ""; position: absolute; inset: 0;
  -webkit-mask: url("../img/brand/rasgado.svg") repeat-x 0 100% / 900px 100%;
          mask: url("../img/brand/rasgado.svg") repeat-x 0 100% / 900px 100%;
}
.tear::before { -webkit-mask-image: url("../img/brand/rasgado-borde.svg"); mask-image: url("../img/brand/rasgado-borde.svg"); }
.tear--paper::after { background: var(--paper); }
.tear--paper::before { background: var(--paper-hi); filter: drop-shadow(0 -2px 3px rgba(0,0,0,.35)); }
.tear--ink::after { background: var(--ink); }
.tear--ink::before { background: #3a3835; }
.tear--flip { top: auto; bottom: 0; transform: translateY(96%) scaleY(-1); }

/* ---------- Botones ---------- */
.btn {
  --bg: transparent; --fg: currentColor; --bd: currentColor;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 26px; border: 1px solid var(--bd); border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font-family: var(--f-sans); font-size: 12px; font-weight: 700; font-stretch: 116%; letter-spacing: .14em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; isolation: isolate;
  transition: color .35s var(--ease), border-color .35s var(--ease), background-color .35s var(--ease), transform .35s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--arrow svg, .btn svg[viewBox="0 0 44 12"] { width: 34px; height: 10px; transition: transform .45s var(--ease); }
.btn:hover svg[viewBox="0 0 44 12"] { transform: translateX(6px); }
.btn::before { /* barrido de color al hover */
  content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit;
  background: var(--sweep, var(--paper)); transform: translateY(101%); transition: transform .5s var(--ease-out);
}
.btn:hover::before { transform: none; }
.btn--red { --bg: var(--red); --fg: var(--paper); --bd: var(--red); --sweep: var(--paper); }
.btn--red:hover { color: var(--ink); border-color: var(--paper); }
.btn--ghost { --fg: var(--paper); --bd: rgba(241,236,227,.5); --sweep: var(--paper); }
.btn--ghost:hover { color: var(--ink); border-color: var(--paper); }
.btn--paper { --bg: var(--paper); --fg: var(--ink); --bd: var(--paper); --sweep: var(--red); }
.btn--paper:hover { color: var(--paper); border-color: var(--red); }
.btn--ink { --bg: var(--ink); --fg: var(--paper); --bd: var(--ink); --sweep: var(--red); }
.btn--ink:hover { border-color: var(--red); }
.btn--ghost-ink { --fg: var(--ink); --bd: rgba(10,10,10,.35); --sweep: var(--ink); }
.btn--ghost-ink:hover { color: var(--paper); border-color: var(--ink); }
.btn--block { width: 100%; }
.btn--lg { min-height: 60px; padding: 0 32px; font-size: 13px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.text-btn { font: inherit; color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.text-btn:hover { color: var(--red); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 14px; padding-block: 8px;
  font-size: 12px; font-weight: 700; font-stretch: 116%; letter-spacing: .14em; text-transform: uppercase;
  border-bottom: 1px solid currentColor;
}
.link-arrow svg { width: 38px; height: 10px; transition: transform .45s var(--ease); }
.link-arrow:hover svg { transform: translateX(8px); }

/* ---------- Sellos / etiquetas rotadas ---------- */
.stamp {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 5px;
  border: 1.5px solid currentColor; border-radius: 3px; color: var(--red-lit);
  font-family: var(--f-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  transform: rotate(-6deg); transform-origin: left center;
}
.stamp--ink { color: var(--ink); }
.badge {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 2px;
  background: var(--paper); color: var(--ink);
  font-family: var(--f-mono); font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.badge--red { background: var(--red); color: var(--paper); }
.badge--ink { background: var(--ink); color: var(--paper); }

/* ---------- Firma que se escribe (máscara con trazos en orden) ---------- */
.firma { fill: currentColor; }
.firma-ink { width: 100%; height: auto; overflow: visible; fill: var(--red); }
.firma-ink use { fill: inherit; }
/* El hero se anima solo con CSS; las demás firmas esperan a que el JS las active al verse */
.js .hero .firma-ink__strokes path,
.ready .firma-ink[data-ink-on-view] .firma-ink__strokes path { stroke-dasharray: 1 2; stroke-dashoffset: 1; opacity: 0; }
.js .hero .firma-ink__full,
.ready .firma-ink[data-ink-on-view] .firma-ink__full { opacity: 0; }
.firma-ink.is-inked .firma-ink__strokes path,
.js .hero .firma-ink__strokes path {
  animation: ink calc(var(--t) * var(--k, 1)) calc(var(--d) * var(--k, 1) + var(--ink-delay, 0s)) cubic-bezier(.45, .05, .35, 1) both;
}
.firma-ink.is-inked .firma-ink__full,
.js .hero .firma-ink__full { animation: ink-full .5s calc(2.8s * var(--k, 1) + var(--ink-delay, 0s)) ease forwards; }
.js .hero .firma-ink { --ink-delay: calc(var(--intro) + .55s); }
@keyframes ink { 0% { stroke-dashoffset: 1; opacity: 0; } 1% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }
@keyframes ink-full { to { opacity: 1; } }

/* ---------- Intro (flecha de Cupido que abre la página) ---------- */
.intro-screen { display: none; }
.intro .intro-screen {
  display: block; position: fixed; inset: 0; z-index: 200; pointer-events: none;
  animation: intro-off 0s 1.9s forwards;
}
.intro-screen__half { position: absolute; left: 0; right: 0; height: 50.5%; background: var(--ink); }
.intro-screen__half--top { top: 0; animation: intro-up .8s .95s var(--ease-in-out) forwards; }
.intro-screen__half--bottom { bottom: 0; animation: intro-down .8s .95s var(--ease-in-out) forwards; }
.intro-screen__half--top::after, .intro-screen__half--bottom::before {
  content: ""; position: absolute; left: 0; right: 0; height: 18px;
  background: var(--ink);
  -webkit-mask: url("../img/brand/rasgado.svg") repeat-x 0 0 / 700px 100%; mask: url("../img/brand/rasgado.svg") repeat-x 0 0 / 700px 100%;
}
.intro-screen__half--top::after { bottom: -17px; transform: scaleY(-1); }
.intro-screen__half--bottom::before { top: -17px; }
.intro-screen__label {
  position: absolute; left: 50%; top: calc(50% - 44px); transform: translateX(-50%);
  display: flex; gap: 18px; white-space: nowrap; color: var(--paper);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  animation: intro-label 1s .05s var(--ease) both;
}
.intro-screen__label span:nth-child(2) { color: var(--red-lit); }
.intro-screen__arrow {
  position: absolute; top: calc(50% - 7px); left: 0; width: 120px; height: 14px; color: var(--red-lit);
  animation: intro-arrow .75s .3s cubic-bezier(.55, 0, .25, 1) both;
}
.intro-screen::after { /* estela de la flecha */
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--red-lit);
  transform-origin: left; transform: scaleX(0); animation: intro-trail .75s .3s cubic-bezier(.55, 0, .25, 1) forwards, intro-fade .3s 1s forwards;
}
@keyframes intro-arrow { from { transform: translateX(-140px); } to { transform: translateX(calc(100vw + 20px)); } }
@keyframes intro-trail { to { transform: scaleX(1); } }
@keyframes intro-fade { to { opacity: 0; } }
@keyframes intro-label { 0% { opacity: 0; letter-spacing: .5em; } 60% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; letter-spacing: .24em; } }
@keyframes intro-up { to { transform: translateY(-105%); } }
@keyframes intro-down { to { transform: translateY(105%); } }
@keyframes intro-off { to { visibility: hidden; } }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 400; display: grid; gap: 8px; transform: translateX(-50%); width: min(92vw, 420px); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 999px;
  background: var(--paper); color: var(--ink); box-shadow: 0 18px 40px rgba(0,0,0,.35);
  font-size: 14px; font-weight: 500; pointer-events: auto;
  animation: toast-in .5s var(--ease-out) both;
}
.toast svg { width: 18px; height: 18px; color: var(--red); flex: none; }
.toast.is-out { animation: toast-out .35s var(--ease) forwards; }
.toast button { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 3px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(20px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(12px); } }

/* ---------- Cursor (solo mouse) ---------- */
.cursor { display: none; }
.has-cursor .cursor {
  display: block; position: fixed; left: 0; top: 0; z-index: 500; pointer-events: none;
  transform: translate3d(var(--cx, -100px), var(--cy, -100px), 0);
}
.cursor__ring {
  position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(241,236,227,.7); mix-blend-mode: difference;
  transition: transform .35s var(--ease-out), background-color .35s, border-color .35s;
}
.cursor__label {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) scale(.6); opacity: 0;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); white-space: nowrap;
  transition: opacity .25s, transform .35s var(--ease-out);
}
.cursor.is-hover .cursor__ring { transform: scale(.45); background: var(--paper); border-color: transparent; }
.cursor.is-label .cursor__ring { transform: scale(2.3); background: var(--paper); border-color: transparent; mix-blend-mode: normal; }
.cursor.is-label .cursor__label { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cursor.is-hidden { opacity: 0; }

/* ---------- Revelados al hacer scroll (solo si el JS cargó: .ready) ---------- */
.ready [data-reveal] { opacity: 0; translate: 0 38px; transition: opacity 1s var(--ease-out) var(--rd, 0s), translate 1.3s var(--ease-out) var(--rd, 0s); }
.ready [data-reveal].is-in { opacity: 1; translate: none; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .hero .firma-ink__strokes path, .ready .firma-ink[data-ink-on-view] .firma-ink__strokes path { opacity: 1; stroke-dashoffset: 0; }
  .js .hero .firma-ink__full, .ready .firma-ink[data-ink-on-view] .firma-ink__full { opacity: 1; }
  .ready .sketchbook__draw .sk, .ready .steps__arrow path { stroke-dashoffset: 0 !important; }
  .ready [data-reveal] { opacity: 1; translate: none; }
  .marca__ring { animation: none; }
}
