/* =========================================================
   PERFUMANÍA — Inicio: una historia en tres tiempos
   ========================================================= */
:root { --salida: #ECEDDA; --corazon: #EBD4D7; }

/* ---------- Hero: el video vive dentro del frasco ---------- */
.hero { position: relative; height: 230vh; height: 230svh; background: var(--nuit); color: var(--nacre); }
.hero__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero__mist { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero__media {
  --ms: 66vh; --mx: 64%; --my: 46%;
  position: absolute; inset: 0; z-index: 2;
  background: radial-gradient(ellipse at 50% 60%, #8a4e66 0%, #4a2440 45%, #24142a 100%);
  -webkit-mask-image: url(../img/vial-mask.svg); mask-image: url(../img/vial-mask.svg);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: auto var(--ms); mask-size: auto var(--ms);
  -webkit-mask-position: var(--mx) var(--my); mask-position: var(--mx) var(--my);
  will-change: mask-size, -webkit-mask-size;
}
.hero__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) contrast(1.05); }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(28, 18, 32, .05) 40%, rgba(28, 18, 32, .45)); }
.hero__spray { position: absolute; z-index: 4; width: 70px; height: 70px; border-radius: 50%; border: 0; background: transparent; transform: translate(-50%, -50%); }
.hero__spray::after { content: ""; position: absolute; inset: 22px; border-radius: 50%; border: 1px solid rgba(227, 178, 106, .9); animation: ring 2.4s var(--ease) infinite; }
@keyframes ring { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }
.hero__copy { position: absolute; inset: auto 0 0; z-index: 3; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; gap: 2rem; padding-bottom: clamp(2.2rem, 7vh, 5rem); }
.hero__title { font-size: clamp(3rem, 1rem + 6.6vw, 8.6rem); line-height: .9; letter-spacing: -.04em; max-width: 9ch; text-wrap: balance; }
.hero__side { justify-self: end; max-width: 380px; }
.hero__lead { color: rgba(238, 231, 227, .82); font-size: 1.02rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.hero__after { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; text-align: center; font-family: var(--serif); font-size: clamp(2.2rem, 1rem + 5vw, 6rem); line-height: 1; letter-spacing: -.03em; pointer-events: none; opacity: 0; }
.hero__after span { display: block; transform: translateY(calc((1 - var(--a, 0)) * 40px)); }
.hero__after span:last-child { font-style: italic; color: var(--ambre-l); }
.hero__scroll { position: absolute; left: 50%; bottom: 1.2rem; z-index: 3; transform: translateX(-50%); font-size: .74rem; color: rgba(238, 231, 227, .6); display: grid; justify-items: center; gap: .4rem; }
.hero__scroll span { width: 1px; height: 38px; background: linear-gradient(rgba(238, 231, 227, .7), transparent); animation: drip 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 860px) {
  .hero__media { --mx: 50%; --my: 30%; }
  .hero__copy { grid-template-columns: 1fr; gap: 1rem; }
  .hero__title { font-size: clamp(2.6rem, 12vw, 4.4rem); max-width: 11ch; }
  .hero__side { justify-self: start; }
  .hero__lead { font-size: .95rem; }
  .hero__scroll { display: none; }
}
@media (max-height: 560px) and (orientation: landscape) { .hero__lead { display: none; } .hero__title { font-size: clamp(2.2rem, 7vw, 3.6rem); } }

/* ---------- Navegación de actos ---------- */
.acts-nav { position: fixed; left: clamp(12px, 1.6vw, 28px); top: 50%; transform: translate(-20px, -50%); z-index: 50; display: grid; gap: 1.1rem; opacity: 0; pointer-events: none; transition: opacity .4s, transform .5s var(--ease); }
.acts-nav.is-on { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
.acts-nav a { display: flex; align-items: center; gap: .7rem; text-decoration: none; font-size: .78rem; color: var(--nav-c, var(--nuit)); }
.acts-nav i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid currentColor; transition: background .3s, transform .4s var(--ease); }
.acts-nav span { opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .4s var(--ease); }
.acts-nav a[aria-current="true"] i { background: var(--ambre); border-color: var(--ambre); transform: scale(1.3); }
.acts-nav a[aria-current="true"] span, .acts-nav:hover span { opacity: 1; transform: none; }
.acts-nav.is-dark { --nav-c: var(--nacre); }
@media (max-width: 1180px) { .acts-nav { display: none; } }

/* ---------- Actos ---------- */
.act { position: relative; padding: clamp(5rem, 14vh, 10rem) 0 clamp(4rem, 10vh, 7rem); }
.act__head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1rem, 3vw, 3rem); align-items: end; margin-bottom: clamp(3rem, 9vh, 6rem); }
.act__num { font-family: var(--serif); font-style: italic; font-size: clamp(4.5rem, 2rem + 11vw, 13rem); line-height: .78; margin: 0; color: transparent; -webkit-text-stroke: 1px currentColor; opacity: .45; }
.act__title { font-size: var(--t-3xl); line-height: .88; letter-spacing: -.04em; }
.act__def { font-family: var(--serif); font-size: var(--t-lg); line-height: 1.3; max-width: 34ch; margin: 1rem 0 0; }

.act--salida { background: var(--salida); margin-top: -14vh; border-radius: 50% 50% 0 0 / 14vh 14vh 0 0; z-index: 5; padding-top: 20vh; }
.act--corazon { background: linear-gradient(var(--salida), var(--corazon) 26vh); }
.act--fondo { background: linear-gradient(var(--corazon), var(--nuit) 42vh); padding-top: 34vh; }

/* Bienvenida */
.welcome { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 7rem); align-items: center; margin-bottom: clamp(5rem, 12vh, 8rem); }
.welcome__img { aspect-ratio: 4 / 5.2; position: relative; background: linear-gradient(170deg, #e9dc8d, #b59545); }
.welcome__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.welcome__big { font-family: var(--serif); font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.4rem); line-height: 1.22; letter-spacing: -.01em; }
.welcome__txt p:not(.welcome__big) { max-width: 52ch; color: rgba(28, 18, 32, .75); }
@media (max-width: 820px) { .welcome { grid-template-columns: 1fr; } .welcome__img { max-width: 420px; } }

/* Tiras de prueba */
.blotters { margin-bottom: clamp(4rem, 10vh, 6rem); }
.blotters__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.blotters__title { font-size: var(--t-xl); }
.blotters__row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: start; }
.blotters__strips { display: flex; gap: clamp(.8rem, 2vw, 1.6rem); padding-top: 22px; position: relative; }
.blotters__strips::before { content: ""; position: absolute; left: -12px; right: -12px; top: 10px; height: 1px; background: rgba(28, 18, 32, .3); }
.blot { --soak: 0%; --tint: #ddd; position: relative; width: clamp(64px, 8vw, 96px); height: clamp(260px, 42vh, 380px); border: 0; padding: 0; background: #FBF9F3; transform-origin: 50% -10px; box-shadow: 0 10px 24px rgba(28, 18, 32, .12); clip-path: polygon(0 0, 100% 0, 100% 86%, 50% 100%, 0 86%); transition: transform .6s var(--ease); }
.blot::before { content: ""; position: absolute; left: 50%; top: -14px; width: 16px; height: 22px; transform: translateX(-50%); background: var(--ambre); border-radius: 3px; }
.blot::after { content: ""; position: absolute; inset: auto 0 0; height: var(--soak); background: linear-gradient(transparent, var(--tint) 30%); opacity: .85; transition: height 1.2s var(--ease); }
.blot span { position: absolute; left: 50%; top: 18px; transform: translateX(-50%) rotate(180deg); writing-mode: vertical-rl; font-family: var(--serif); font-size: clamp(1.1rem, 1.6vw, 1.5rem); white-space: nowrap; z-index: 1; }
.blot:hover { transform: rotate(-2deg); }
.blot.is-on { --soak: 62%; animation: swing 1.4s var(--ease); }
@keyframes swing { 20% { transform: rotate(7deg); } 45% { transform: rotate(-5deg); } 70% { transform: rotate(2.5deg); } 100% { transform: rotate(0); } }
.blot-card { min-height: 100%; padding: clamp(1.4rem, 3vw, 2.4rem); background: rgba(255, 255, 255, .55); border-radius: 28px; display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 1.5rem; align-items: center; }
.blot-card__note { font-family: var(--serif); font-size: clamp(2rem, 1.2rem + 2.6vw, 3.6rem); line-height: 1; margin-bottom: .6rem; }
.blot-card__smell { font-size: 1.05rem; max-width: 40ch; }
.blot-card__in { font-size: .9rem; color: rgba(28, 18, 32, .7); margin: 1.2rem 0 .4rem; }
.blot-card__name { font-family: var(--serif); font-size: 1.5rem; text-decoration: none; }
.blot-card__row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; }
.blot-card__bottle { width: 150px; }
.blot-card.is-swap { animation: msgIn .6s var(--ease); }
@media (max-width: 820px) {
  .blotters__row { grid-template-columns: 1fr; }
  .blotters__strips { justify-content: center; }
  .blot-card { grid-template-columns: 1fr 96px; }
  .blot-card__bottle { width: 96px; }
}

/* Marquesina */
.marquee { overflow: hidden; padding: 1.4rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.marquee__track { display: flex; width: max-content; animation: marq 48s linear infinite; }
.marquee__track span { font-family: var(--serif); font-style: italic; font-size: clamp(2rem, 1rem + 3.6vw, 4.4rem); white-space: nowrap; padding: 0 1.4rem; display: flex; align-items: center; gap: 2.8rem; }
.marquee__track span::after { content: ""; width: 12px; height: 12px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--ambre); }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marq { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* Familias en horizontal */
.fams { position: relative; margin-bottom: clamp(4rem, 10vh, 7rem); }
.fams__pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.fams__track { display: flex; gap: clamp(1.2rem, 3vw, 3rem); padding: 0 var(--gut); will-change: transform; }
.fam { flex: none; width: clamp(270px, 30vw, 440px); text-decoration: none; display: block; }
.fam__img { position: relative; height: min(56vh, 560px); border-radius: var(--arch); overflow: hidden; background: var(--fc); }
.fam__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.fam__img::after { content: ""; position: absolute; inset: 0; background: var(--fc); mix-blend-mode: color; opacity: .55; transition: opacity .6s; }
.fam:hover .fam__img img { transform: scale(1.07); }
.fam:hover .fam__img::after { opacity: .15; }
.fam__line { position: absolute; left: 0; right: 0; bottom: 1.2rem; z-index: 1; text-align: center; font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .4); }
.fam__body { padding-top: 1.1rem; display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; align-items: baseline; }
.fam__name { font-family: var(--serif); font-size: clamp(1.8rem, 1.3rem + 1.4vw, 2.6rem); line-height: 1; }
.fam__count { font-size: .82rem; color: rgba(28, 18, 32, .6); }
.fam__desc { grid-column: 1 / -1; font-size: .92rem; color: rgba(28, 18, 32, .72); margin: .5rem 0 0; max-width: 38ch; }
.fam--intro { width: clamp(260px, 26vw, 360px); align-self: center; }
.fam--intro p { font-family: var(--serif); font-size: clamp(1.4rem, 1rem + 1.2vw, 2rem); line-height: 1.25; }
.fams__bar { margin: 2.4rem var(--gut) 0; height: 1px; background: rgba(28, 18, 32, .2); }
.fams__bar i { display: block; height: 100%; width: 100%; background: var(--nuit); transform-origin: left; transform: scaleX(var(--p, 0)); }
@media (max-width: 860px) {
  .fams__pin { position: static; height: auto; display: block; }
  .fams__track { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gut); padding-bottom: 1rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .fam--intro { display: none; }
  .fams__track::-webkit-scrollbar { display: none; }
  .fam { scroll-snap-align: start; width: 78vw; }
  .fam__img { height: 64vw; max-height: 420px; }
  .fams__bar { display: none; }
  .fams { height: auto !important; }
}

/* Atelier */
.atelier { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .9fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; padding-top: clamp(1rem, 4vh, 3rem); }
.atelier__title { font-size: var(--t-2xl); margin-bottom: 1rem; }
.atelier__notes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem .6rem; margin-top: 1.8rem; }
.note { border: 0; background: none; padding: 0; display: grid; justify-items: center; gap: .45rem; font-size: .8rem; position: relative; }
.note__dot { width: clamp(46px, 5vw, 62px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .7), transparent 45%), var(--nc); box-shadow: 0 0 0 0 var(--nc), inset 0 -6px 12px rgba(0, 0, 0, .15); transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.note:hover .note__dot { transform: scale(1.08) translateY(-3px); }
.note[aria-pressed="true"] .note__dot { box-shadow: 0 0 0 3px var(--lait), 0 0 0 5px var(--nuit), inset 0 -6px 12px rgba(0, 0, 0, .15); }
.note__n { position: absolute; top: -4px; right: 10%; width: 22px; height: 22px; border-radius: 50%; background: var(--nuit); color: var(--lait); font-size: .72rem; font-weight: 700; display: grid; place-items: center; transform: scale(0); transition: transform .4s var(--ease); }
.note[aria-pressed="true"] .note__n { transform: scale(1); }
.atelier__actions { margin-top: 1.4rem; min-height: 1.5em; }
.atelier__reset { border: 0; background-color: transparent; font-size: .9rem; padding: 0 0 2px; }
.atelier__vial { text-align: center; position: sticky; top: calc(var(--hdr) + 2rem); }
.atelier__bottle { width: min(300px, 70%); margin: 0 auto; perspective: 700px; }
.atelier__bottle .bottle { transition: transform .6s var(--ease); }
.atelier__bottle .b-liquid rect { transition: y .9s var(--ease), height .9s var(--ease); }
.atelier__read { margin-top: 1rem; display: grid; gap: .3rem; }
.atelier__chord { font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; }
.atelier__fam { font-size: .9rem; color: rgba(28, 18, 32, .7); }
.atelier__matches { display: grid; gap: .8rem; }
.atelier__matches h4 { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--prune); margin-bottom: .2rem; }
.atelier__empty { font-size: .95rem; color: rgba(28, 18, 32, .7); border: 1px dashed rgba(28, 18, 32, .3); border-radius: 22px; padding: 1.4rem; }
@media (max-width: 1080px) { .atelier { grid-template-columns: 1fr 1fr; } .atelier__matches { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
@media (max-width: 680px) {
  .atelier { grid-template-columns: 1fr; gap: 1rem; }
  .atelier__intro { display: contents; }
  .atelier__title { order: 1; margin-bottom: 0; }
  .atelier__intro > .muted { order: 2; }
  .atelier__vial { position: static; order: 3; display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 1rem; text-align: left; }
  .atelier__bottle { width: 120px; margin: 0; }
  .atelier__read { margin: 0; }
  .atelier__chord { font-size: 1.25rem; }
  .atelier__notes { order: 4; margin-top: .4rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .atelier__actions { order: 5; margin-top: 0; min-height: 0; }
  .atelier__matches { order: 6; margin-top: 1rem; }
}

/* Más vendidos */
.best { margin-bottom: clamp(5rem, 13vh, 9rem); }
.best__head { display: flex; justify-content: space-between; align-items: end; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 2.4rem; }
.best__title { font-size: var(--t-2xl); }
.on-dark .chip { border-color: rgba(238, 231, 227, .3); }
.on-dark .chip:hover { border-color: var(--nacre); }
.on-dark .chip.is-on { background: var(--nacre); color: var(--nuit); border-color: var(--nacre); }
.best__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 2.4rem); margin-bottom: 2.6rem; min-height: 300px; }
.best__grid .pcard { animation: msgIn .6s var(--ease) both; }
.best__grid .pcard:nth-child(2) { animation-delay: .07s; } .best__grid .pcard:nth-child(3) { animation-delay: .14s; } .best__grid .pcard:nth-child(4) { animation-delay: .21s; }
@media (max-width: 1000px) { .best__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Interludio */
.interlude { position: relative; margin-bottom: clamp(5rem, 12vh, 8rem); }
.interlude__media { height: 82vh; min-height: 460px; margin: 0 var(--gut); border-radius: var(--arch); }
.interlude__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(28, 18, 32, .85)); }
.interlude__txt { position: absolute; inset: auto 0 0; padding-bottom: clamp(2rem, 6vh, 4rem); z-index: 2; }
.interlude__big { font-family: var(--serif); font-size: var(--t-2xl); line-height: 1; letter-spacing: -.02em; max-width: 14ch; margin-left: clamp(0rem, 3vw, 3rem); }
.interlude__sub { max-width: 46ch; color: rgba(238, 231, 227, .8); margin-left: clamp(0rem, 3vw, 3rem); }

/* Ritual */
.ritual { margin-bottom: clamp(5rem, 12vh, 8rem); }
.ritual__title { font-size: var(--t-2xl); margin-bottom: 2.6rem; }
.ritual__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; counter-reset: s; }
.ritual__steps li { border-top: 1px solid var(--line-l); padding-top: 1.4rem; }
.ritual__n { font-family: var(--serif); font-style: italic; font-size: 3rem; line-height: 1; color: var(--ambre-l); display: block; margin-bottom: 1rem; }
.ritual__steps h4 { font-size: 1.6rem; margin-bottom: .6rem; }
.ritual__steps p { color: rgba(238, 231, 227, .72); font-size: .95rem; }
@media (max-width: 900px) { .ritual__steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .ritual__steps { grid-template-columns: 1fr; } }

/* Sucursales */
.stores { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); margin-bottom: clamp(5rem, 12vh, 8rem); align-items: start; }
.stores__title { font-size: var(--t-2xl); margin-bottom: 1.2rem; }
.stores__live { display: flex; align-items: center; gap: .7rem; font-family: var(--serif); font-size: 1.4rem; }
.stores__dot { width: 10px; height: 10px; border-radius: 50%; background: #6FCF97; box-shadow: 0 0 0 0 rgba(111, 207, 151, .6); animation: pulse 2.2s infinite; flex: none; }
.stores .btn { margin-top: 1rem; }
.stores__list { list-style: none; margin: 0; padding: 0; }
.stores__list li a { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line-l); text-decoration: none; transition: padding .4s var(--ease), background .3s; }
.stores__list li a:hover { padding-left: .8rem; background: rgba(238, 231, 227, .04); }
.stores__list strong { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; }
.stores__list small { grid-column: 1; font-size: .85rem; color: rgba(238, 231, 227, .6); }
.stores__list em { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; font-size: .8rem; padding: .3rem .7rem; border-radius: 100vmax; border: 1px solid var(--line-l); white-space: nowrap; }
.stores__list em.is-open { border-color: rgba(111, 207, 151, .6); color: #A6E6C1; }
@media (max-width: 860px) { .stores { grid-template-columns: 1fr; } }

/* Regalo */
.gift { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; margin-bottom: clamp(5rem, 12vh, 8rem); }
.gift__img { aspect-ratio: 1 / 1.1; position: relative; background: linear-gradient(170deg, #5b3150, #2b1f33); }
.gift__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gift__title { font-size: var(--t-2xl); margin-bottom: 1.2rem; }
.gift__txt p { color: rgba(238, 231, 227, .78); max-width: 44ch; }
.gift__cta { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; margin-top: 1.6rem; }
@media (max-width: 860px) { .gift { grid-template-columns: 1fr; } .gift__img { max-width: 460px; } }

/* Cierre */
.finale { text-align: center; padding-bottom: clamp(2rem, 6vh, 4rem); display: grid; justify-items: center; gap: 1rem; }
.finale__q { font-family: var(--serif); font-size: var(--t-3xl); line-height: .95; letter-spacing: -.035em; max-width: 13ch; margin: 0; }
.finale .muted { max-width: 48ch; }
