/* ===== Fuentes (auto-alojadas) ===== */
@font-face { font-family: "Fredoka"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("assets/fonts/fredoka-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fredoka"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("assets/fonts/fredoka-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("assets/fonts/nunito-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("assets/fonts/nunito-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Sacramento"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/sacramento-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ===== Paleta pastel, base violeta ===== */
:root {
  --paper: #f7f2fd;
  --paper-2: #efe6fb;
  --lav-200: #e3d4f8;
  --lav-300: #cdb4f0;
  --lav-400: #ad8de2;
  --violet: #7650b8;
  --violet-deep: #5b3a96;
  --ink: #33224f;
  --ink-soft: #5f4b84;
  --pink: #f9d6e8;
  --peach: #fde2cf;
  --butter: #fbf1c4;
  --sky: #d8e7fb;
  --mint: #d7f1e6;

  --f-display: "Fredoka", ui-rounded, system-ui, sans-serif;
  --f-body: "Nunito", ui-rounded, system-ui, sans-serif;
  --f-script: "Sacramento", cursive;

  --r-lg: 28px;
  --r-md: 18px;
  --shadow-soft: 0 18px 40px -18px rgb(91 58 150 / .35), 0 2px 6px -2px rgb(91 58 150 / .12);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--lav-400) var(--paper-2); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 1.0625rem/1.6 var(--f-body);
  caret-color: var(--violet);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--lav-300); color: var(--ink); }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--lav-300); border-radius: 99px; border: 3px solid var(--paper-2); }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 10px; }
a { color: var(--violet-deep); text-underline-offset: .2em; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
.ico { width: 1.25em; height: 1.25em; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 20; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 12px; }
.skip:focus { top: 1rem; }

/* ===== Botones ===== */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font: 600 1rem/1 var(--f-display); letter-spacing: .01em;
  padding: .95rem 1.4rem; border-radius: 99px; text-decoration: none;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), background-color .3s;
}
.btn-solid { background: var(--violet); color: #fff; box-shadow: 0 10px 24px -10px rgb(91 58 150 / .7); }
.btn-solid:hover { background: var(--violet-deep); transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgb(91 58 150 / .75); }
.btn-ghost { background: rgb(255 255 255 / .7); color: var(--violet-deep); box-shadow: inset 0 0 0 1.5px var(--lav-300); }
.btn-ghost:hover { background: #fff; transform: translateY(-2px); }
.btn-lg { font-size: 1.15rem; padding: 1.15rem 1.8rem; }

/* ===== HERO texto-máscara ===== */
.hero {
  position: relative; isolation: isolate;
  min-height: 100svh; overflow: hidden;
  display: grid;
}
.sky, .mask, .hero-copy { grid-area: 1 / 1; }
.sky { position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, #6f95e0 0%, #8f6fd6 50%, #e690bf 100%); }
.sky canvas, .sky video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.sky video { opacity: 0; transition: opacity 1.2s ease; }
.sky.has-video video { opacity: 1; }

/* Capa en "screen": el negro deja ver el cielo, el papel lila se queda */
.mask {
  position: absolute; inset: 0; z-index: 1;
  background: var(--paper);
  mix-blend-mode: screen;
  display: grid; place-items: center;
}
.mask-word {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(3.4rem, 15.4vw, 17rem);
  line-height: .9; letter-spacing: -0.02em;
  color: #000;
  transform: translateY(-2vh);
  white-space: nowrap;
}

.hero-copy {
  position: relative; z-index: 2;
  display: grid; grid-template-rows: 1fr auto 1fr;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  pointer-events: none;
}
.hero-copy > * { pointer-events: auto; }
.tagline {
  align-self: end; justify-self: center; text-align: center;
  font-family: var(--f-script); color: var(--violet);
  font-size: clamp(2rem, 4.6vw, 3.9rem); line-height: 1;
  transform: translateY(calc(-1 * clamp(5rem, 10.5vw, 12rem)));
}
.hero-foot {
  grid-row: 3; align-self: start;
  display: grid; justify-items: center; gap: 1.4rem; text-align: center;
  transform: translateY(clamp(4.4rem, 8.6vw, 9rem));
}
.lede { font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--ink-soft); max-width: 34ch; font-weight: 600; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; }
.signature {
  position: absolute; left: clamp(1.25rem, 3vw, 2.5rem); bottom: clamp(1rem, 2.5vw, 2rem);
  font-size: .9rem; color: var(--ink-soft); font-weight: 700;
}

/* ===== TALLER: masonry ===== */
.taller { padding: clamp(3rem, 7vw, 6.5rem) clamp(1rem, 3vw, 2.5rem); }
.taller-grid {
  max-width: 1320px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: clamp(1rem, 1.8vw, 1.5rem); align-items: start;
}
.bear-col { position: sticky; top: 1.25rem; }

.bear-tile { margin: 0; --tile-bg: #fff; --fade: 2.4rem; }
.viewer {
  position: relative; aspect-ratio: 1 / 1.02; max-height: 72svh; width: 100%;
  --tile-bg:
    radial-gradient(60% 55% at 50% 42%, #fff 0%, rgb(255 255 255 / 0) 70%),
    linear-gradient(170deg, var(--lav-200), var(--pink) 75%, var(--peach));
  --fade: 3rem;
  touch-action: none;
}
.viewer canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.viewer canvas:active { cursor: grabbing; }
.viewer-state {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .8rem;
  font: 600 1rem var(--f-display); color: var(--ink-soft); text-align: center; padding: 2rem;
  transition: opacity .6s var(--ease-out);
}
.viewer-state.is-hidden { display: none; }
.viewer-state.is-error { color: var(--ink); }
.viewer-state.is-error .loader { display: none; }
.loader { width: 34px; height: 34px; border-radius: 50%; border: 3px dashed var(--lav-400); animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

.drop-hint {
  position: absolute; inset: .8rem; border-radius: 22px; border: 2.5px dashed var(--violet);
  background: rgb(247 242 253 / .82); display: grid; place-items: center;
  font: 600 1.25rem var(--f-display); color: var(--violet-deep);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.viewer.is-drag .drop-hint { opacity: 1; }

.viewer-tools { position: absolute; top: .9rem; right: .9rem; display: flex; gap: .5rem; }
.tool {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgb(255 255 255 / .85); color: var(--violet-deep);
  display: grid; place-items: center; box-shadow: 0 6px 14px -8px rgb(91 58 150 / .6);
  transition: background-color .25s, transform .35s var(--ease-out);
}
.tool:hover { background: #fff; transform: translateY(-1px); }
.tool[aria-pressed="true"] { background: var(--violet); color: #fff; }

.studio { padding: clamp(1.25rem, 2.4vw, 2rem); display: grid; gap: 1.1rem; }
.studio-title { font-size: clamp(1.6rem, 2.4vw, 2.1rem); color: var(--ink); }
.studio-note { color: var(--ink-soft); max-width: 58ch; }

.upload {
  display: flex; align-items: center; gap: .9rem; cursor: pointer;
  padding: 1rem 1.15rem; border-radius: var(--r-md);
  background: var(--paper); border: 2px dashed var(--lav-300); color: var(--violet-deep);
  transition: border-color .25s, background-color .25s;
}
.upload:hover, .upload:focus-within { border-color: var(--violet); background: var(--paper-2); }
.upload:focus-within { outline: 3px solid var(--violet); outline-offset: 3px; }
.upload .ico { width: 1.7rem; height: 1.7rem; }
.upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload-text { display: grid; line-height: 1.3; }
.upload-text strong { font: 600 1.05rem var(--f-display); }
.upload-text small { color: var(--ink-soft); font-size: .88rem; font-weight: 600; overflow-wrap: anywhere; }
.upload.is-error small { color: #a3284f; }

/* Qué foto subir: solo la prenda, no personas */
.photo-tips {
  background: var(--paper); border-radius: var(--r-md); padding: .9rem 1.05rem 1rem;
  box-shadow: inset 0 0 0 1.5px var(--lav-200);
}
.photo-tips-title { margin: 0; font: 600 1rem var(--f-display); color: var(--ink); }
.photo-tips-title strong { color: var(--violet-deep); }
.photo-tips-why { margin: .25rem 0 .7rem; font-size: .88rem; line-height: 1.45; color: var(--ink-soft); }
.photo-tips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .35rem 1rem; }
.tips { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; font-size: .88rem; font-weight: 600; line-height: 1.35; }
.tips li { display: grid; grid-template-columns: 1.15rem 1fr; gap: .45rem; align-items: start; }
.tips li::before {
  display: grid; place-items: center; width: 1.15rem; height: 1.15rem; border-radius: 50%;
  font: 700 .7rem/1 var(--f-body); margin-top: .05rem;
}
.tips-ok li { color: var(--ink); }
.tips-ok li::before { content: "✓"; background: #d8f0e2; color: #2c6b48; }
.tips-no li { color: var(--ink-soft); }
.tips-no li::before { content: "✕"; background: #f8dbe3; color: #a3284f; }

.swatches { display: flex; flex-wrap: wrap; gap: .5rem; }
.swatch {
  display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
  font: 700 .88rem var(--f-body); color: var(--ink-soft);
  background: #fff; border: 1.5px solid var(--lav-200); border-radius: 99px; padding: .35rem .8rem .35rem .35rem;
  transition: border-color .2s, color .2s, background-color .2s;
}
.swatch:hover { border-color: var(--lav-400); color: var(--ink); }
.swatch.is-on { border-color: var(--violet); background: var(--paper-2); color: var(--violet-deep); }
.swatch span { width: 26px; height: 26px; border-radius: 50%; background: var(--sw, #ddd); box-shadow: inset 0 0 0 1px rgb(51 34 79 / .12); }
.sw-cuadros { background: repeating-linear-gradient(0deg, rgb(118 80 184 / .55) 0 4px, transparent 4px 9px), repeating-linear-gradient(90deg, rgb(118 80 184 / .45) 0 4px, #f3d9e7 4px 9px) !important; }
.sw-rayas { background: repeating-linear-gradient(90deg, #f2f6fd 0 4px, #8fb1e3 4px 8px) !important; }
.sw-puntos { background: radial-gradient(circle, #fff 1.6px, transparent 2px) 0 0 / 7px 7px, #c9b3ef !important; }
.sw-mezclilla { background: repeating-linear-gradient(45deg, #5a7bb0 0 1.5px, #47669c 1.5px 3px) !important; }

.range-row { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; font-weight: 700; font-size: .92rem; color: var(--ink-soft); }
input[type="range"] { accent-color: var(--violet); width: 100%; min-height: 44px; }

/* Columna de info en masonry */
.info-col { columns: 2 220px; column-gap: clamp(1rem, 1.8vw, 1.5rem); }
.tile {
  break-inside: avoid; margin-bottom: clamp(1rem, 1.8vw, 1.5rem);
  padding: clamp(1.7rem, 2.6vw, 2.2rem);
}
.tile h3 { font-size: 1.35rem; margin-bottom: .9rem; color: var(--ink); }

.tile-story { --tile-bg: var(--violet); color: #fff; padding-block: clamp(1.8rem, 3vw, 2.6rem); }
.tile-story h2 { font-size: clamp(1.75rem, 2.6vw, 2.35rem); margin-bottom: 1rem; }
.tile-story p { color: #f3ecff; font-size: 1.05rem; }

.tile-price { --tile-bg: var(--butter); text-align: center; }
.price { font: 700 clamp(3.6rem, 6vw, 5.2rem)/1 var(--f-display); color: var(--violet-deep); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-bottom: .4rem; }
.price .cur { font-size: .5em; vertical-align: .75em; margin-right: .05em; }
.tile-price h3 { margin-bottom: .3rem; }
.price-sub { color: #6a5428; font-weight: 700; font-size: .95rem; }

.tile-quote { --tile-bg: var(--pink); }
.tile-quote p { font: 400 clamp(2rem, 3vw, 2.6rem)/1.1 var(--f-script); color: var(--violet-deep); }

.tile-steps { --tile-bg: linear-gradient(160deg, #fff, var(--paper-2)); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 1rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.1rem 1fr; gap: .7rem; color: var(--ink-soft); line-height: 1.45; }
.steps li::before {
  content: counter(s); width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--lav-200); color: var(--violet-deep);
  font: 700 1rem var(--f-display);
}
.steps strong { color: var(--ink); }

.tile-places { --tile-bg: var(--sky); }
.places, .for { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.places li { display: flex; gap: .65rem; align-items: flex-start; font-weight: 700; color: var(--ink); line-height: 1.35; }
.places li .ico { color: var(--violet); margin-top: .05em; }
.places small { display: block; font-weight: 600; color: #4a5f86; font-size: .9rem; }

.tile-for { --tile-bg: var(--mint); }
.for li { display: flex; gap: .6rem; align-items: center; font-weight: 700; color: #2f4a40; }
.for .ico { color: #3f8a6c; }

/* ===== Recuadros sin orilla: el color se desvanece hacia el fondo =====
   El color vive en una capa detrás (::before) con máscara; el contenido
   (texto, botones, el oso) queda nítido encima. --fade = cuánto mide el desvanecido. */
.tile, .bear-tile, .viewer, .contact-inner { position: relative; isolation: isolate; }
.tile::before, .bear-tile::before, .viewer::before, .contact-inner::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--tile-bg);
  --m-x: linear-gradient(to right, transparent, #000 var(--fade, 1.6rem), #000 calc(100% - var(--fade, 1.6rem)), transparent);
  --m-y: linear-gradient(to bottom, transparent, #000 var(--fade, 1.6rem), #000 calc(100% - var(--fade, 1.6rem)), transparent);
  -webkit-mask-image: var(--m-x), var(--m-y);
  -webkit-mask-composite: source-in;
  mask-image: var(--m-x), var(--m-y);
  mask-composite: intersect;
}

/* ===== Contacto ===== */
.contact { padding: 0 clamp(1rem, 3vw, 2.5rem) clamp(3rem, 7vw, 6rem); }
.contact-inner {
  max-width: 1320px; margin: 0 auto; text-align: center;
  --tile-bg:
    radial-gradient(80% 120% at 0% 0%, var(--pink) 0%, transparent 55%),
    radial-gradient(70% 110% at 100% 100%, var(--sky) 0%, transparent 55%),
    var(--lav-200);
  --fade: 4rem;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.25rem, 4vw, 3rem);
  display: grid; justify-items: center; gap: 1.3rem;
}
.contact h2 { font-size: clamp(2rem, 4.4vw, 3.6rem); max-width: 18ch; color: var(--ink); }
.contact p { max-width: 52ch; color: var(--ink-soft); font-size: 1.1rem; }

.foot { text-align: center; padding: 0 1rem 2.5rem; color: var(--ink-soft); font-size: .92rem; font-weight: 600; }
.foot-mark { font-family: var(--f-display); font-weight: 600; color: var(--violet-deep); }

.wa-float {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 10;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: var(--violet); color: #fff;
  box-shadow: 0 14px 28px -10px rgb(91 58 150 / .75);
  transition: transform .4s var(--ease-out), background-color .3s, opacity .4s;
}
.wa-float .ico { width: 28px; height: 28px; }
.wa-float:hover { transform: translateY(-3px); background: var(--violet-deep); }
.wa-float.is-away { opacity: 0; transform: translateY(12px); pointer-events: none; }

[hidden] { display: none !important; }

/* ===== Prenda: modo, escudo y tela ===== */
.garment { display: grid; gap: 1rem; }
.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
  padding: 4px; border-radius: 99px; background: var(--paper-2);
  box-shadow: inset 0 0 0 1.5px var(--lav-200);
}
.seg-btn {
  border: 0; cursor: pointer; border-radius: 99px; min-height: 44px; padding: .5rem 1rem;
  font: 600 .98rem var(--f-display); color: var(--ink-soft); background: transparent;
  transition: background-color .25s, color .25s, box-shadow .3s var(--ease-out);
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.is-on { background: #fff; color: var(--violet-deep); box-shadow: 0 4px 12px -6px rgb(91 58 150 / .5); }
.seg-sm .seg-btn { min-height: 36px; font-size: .88rem; padding: .3rem .8rem; }

.crest { display: grid; grid-template-columns: minmax(0, 210px) 1fr; gap: 1.1rem; align-items: start; }
.crest-stage {
  position: relative; border-radius: 14px; overflow: hidden; background: var(--paper-2);
  touch-action: none; user-select: none;
}
.crest-stage canvas { display: block; width: 100%; }
.crest-box {
  position: absolute; border: 2px solid #fff; border-radius: 10px; cursor: move;
  box-shadow: 0 0 0 9999px rgb(51 34 79 / .45), 0 2px 8px rgb(51 34 79 / .35);
}
.crest-box:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.crest-handle {
  position: absolute; right: -9px; bottom: -9px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--violet); border: 2.5px solid #fff; cursor: nwse-resize;
}
.crest-handle::after { content: ""; position: absolute; inset: -12px; } /* área táctil */
.crest-side { display: grid; gap: .7rem; align-content: start; }
.crest-title { font: 600 1.1rem var(--f-display); color: var(--ink); }
.crest-help { font-size: .9rem; color: var(--ink-soft); line-height: 1.45; }
.check { display: flex; align-items: center; gap: .55rem; font-weight: 700; font-size: .95rem; color: var(--ink); cursor: pointer; min-height: 32px; }
.check input { width: 20px; height: 20px; accent-color: var(--violet); }
.mini-range { display: grid; gap: 0; font-weight: 700; font-size: .88rem; color: var(--ink-soft); }
.mini-range input { min-height: 32px; }
.fabric-kind { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.fabric-label { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; font-size: .9rem; color: var(--ink-soft); }
.chip { width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px rgb(51 34 79 / .18); }

.disclaimer {
  font-size: .86rem; line-height: 1.5; color: var(--ink-soft);
  background: var(--paper); border-radius: 12px; padding: .75rem .95rem;
  box-shadow: inset 0 0 0 1.5px var(--lav-200);
}
.disclaimer strong { color: var(--ink); }

@media (max-width: 560px) {
  .crest { grid-template-columns: 1fr; }
  .crest-stage { max-width: 260px; }
}

/* ===== Entrada de la máscara (momento único) ===== */
@media (prefers-reduced-motion: no-preference) {
  .mask-word { animation: rise 1.6s var(--ease-out) both; }
  .tagline { animation: fadeIn 1.4s .5s var(--ease-out) both; }
  @keyframes rise { from { letter-spacing: .08em; filter: blur(10px); } }
  @keyframes fadeIn { from { opacity: 0; filter: blur(6px); } }
}

/* ===== Historia (storytelling): foto fija, capítulos que pasan ===== */
.story { padding: clamp(3rem, 8vw, 7rem) clamp(1rem, 3vw, 2.5rem) 0; }
.story-grid {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem);
}
.story-visual { position: relative; }
.story-frame {
  position: sticky; top: 9vh; height: 82vh; max-height: 760px;
  border-radius: 36px; overflow: hidden; background: var(--lav-200);
  box-shadow: 0 30px 60px -30px rgb(91 58 150 / .55);
}
.story-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  clip-path: inset(100% 0 0 0 round 36px); transform: scale(1.08);
  transition: clip-path 1.1s var(--ease-out), transform 1.6s var(--ease-out);
}
.story-img.is-on { clip-path: inset(0 0 0 0 round 36px); transform: scale(1); z-index: 1; }
.story-img.was-on { clip-path: inset(0 0 0 0 round 36px); transform: scale(1); z-index: 0; transition: none; }
.story-progress { position: absolute; left: 1.4rem; right: 1.4rem; bottom: 1.3rem; height: 4px; border-radius: 99px; background: rgb(255 255 255 / .45); z-index: 2; }
.story-progress span { display: block; height: 100%; width: 25%; border-radius: inherit; background: #fff; transition: width .9s var(--ease-out); }

.story-chapters { display: grid; }
.chapter { min-height: 82vh; display: grid; align-content: center; gap: 1.2rem; padding-block: 8vh; }
.chapter h2 { font-size: clamp(2.2rem, 4.4vw, 3.9rem); line-height: 1.02; color: var(--ink); max-width: 13ch; letter-spacing: -0.02em; }
.chapter p { font-size: clamp(1.1rem, 1.5vw, 1.3rem); color: var(--ink-soft); max-width: 34ch; }
.chapter-img { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .chapter h2, .chapter p { transition: opacity .9s var(--ease-out), transform .9s var(--ease-out), filter .9s var(--ease-out); }
  .js .chapter:not(.is-on) h2, .js .chapter:not(.is-on) p { opacity: .18; transform: translateY(18px); filter: blur(2px); }
}
@media (prefers-reduced-motion: reduce) {
  .story-img { transition: opacity .3s; clip-path: none; transform: none; opacity: 0; }
  .story-img.is-on, .story-img.was-on { opacity: 1; }
}

/* ===== Galería (carrusel) ===== */
.gallery { padding: 0 0 clamp(3rem, 7vw, 6rem); }
.gallery-head {
  max-width: 1320px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2.5rem) 1.6rem;
  display: flex; align-items: end; justify-content: space-between; gap: 1rem;
}
.gallery-head h2 { font-size: clamp(2rem, 4vw, 3.2rem); color: var(--ink); }
.gallery-head p { color: var(--ink-soft); margin-top: .5rem; font-size: 1.1rem; }
.gallery-nav { display: flex; gap: .6rem; }
.gal-btn { background: #fff; box-shadow: inset 0 0 0 1.5px var(--lav-200), 0 6px 14px -8px rgb(91 58 150 / .5); width: 52px; height: 52px; }
.gal-btn:disabled { opacity: .4; cursor: default; transform: none; }
.gallery-track {
  display: flex; gap: clamp(.8rem, 1.6vw, 1.25rem);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: .5rem max(clamp(1rem, 3vw, 2.5rem), calc((100vw - 1320px) / 2 + 2.5rem)) 1.2rem;
  scroll-padding-inline: max(clamp(1rem, 3vw, 2.5rem), calc((100vw - 1320px) / 2 + 2.5rem));
  scrollbar-width: none; cursor: grab;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.gallery-track:focus-visible { outline-offset: -3px; }
.gal-item {
  flex: none; margin: 0; scroll-snap-align: start; position: relative;
  height: clamp(340px, 58vh, 560px); aspect-ratio: 3 / 4;
  border-radius: 28px; overflow: hidden; background: var(--lav-200);
  box-shadow: 0 18px 40px -22px rgb(91 58 150 / .5);
}
.gal-wide { aspect-ratio: 1200 / 552; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; user-select: none; transition: transform 1.2s var(--ease-out); }
.gal-item:hover img { transform: scale(1.03); }
.gal-item figcaption {
  position: absolute; left: .9rem; bottom: .9rem;
  font: 600 .95rem var(--f-display); color: var(--ink);
  background: rgb(255 255 255 / .88); padding: .45rem .85rem; border-radius: 99px;
}

/* ===== Portada: la palabra se acerca al bajar ===== */
@media (prefers-reduced-motion: no-preference) {
  .mask-word { scale: calc(1 + var(--hero-p, 0) * 0.35); }
  .hero-copy { opacity: calc(1 - var(--hero-p, 0) * 1.6); translate: 0 calc(var(--hero-p, 0) * -6vh); }
}

@media (max-width: 860px) {
  .story-grid { grid-template-columns: 1fr; gap: 0; }
  .story-visual { display: none; }
  .chapter { min-height: auto; padding-block: 2.2rem; }
  .chapter-img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 28px; box-shadow: 0 20px 40px -24px rgb(91 58 150 / .55); }
  .js .chapter:not(.is-on) h2, .js .chapter:not(.is-on) p { opacity: 1; transform: none; filter: none; }
  .gallery-head { align-items: start; flex-direction: column; }
  .gallery-nav { display: none; }
  .gal-item { height: clamp(300px, 52vh, 420px); }
}

/* ===== Responsivo ===== */
@media (max-width: 960px) {
  .taller-grid { grid-template-columns: 1fr; }
  .bear-col { position: static; }
  .viewer { aspect-ratio: 1 / 1; max-height: 68svh; }
}
@media (max-width: 560px) {
  .info-col { columns: 1; }
  .tagline { transform: translateY(-3.6rem); }
  .hero-foot { transform: translateY(3.4rem); }
  .signature { left: 0; right: 0; text-align: center; }
  .range-row { grid-template-columns: 1fr; gap: 0; }
}
