:root { --intro: 1.7s; }
:root.seen { --intro: .15s; }
body { overflow-x: clip; } /* "hidden" would stop the pinned section from sticking */

/* ---------- curtain intro (CSS only, so it can never get stuck) ---------- */
#curtain { position: fixed; inset: 0; z-index: 300; direction: ltr; pointer-events: none; animation: gone 0s linear 2.8s forwards; }
:root.seen #curtain { display: none; }
@keyframes gone { to { visibility: hidden; } }
.drape { position: absolute; top: 0; bottom: 0; width: 50.5%; pointer-events: auto; transform-origin: top; animation: draw-open 1.3s cubic-bezier(.76, 0, .2, 1) 1.35s forwards;
  background: linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 22%, rgba(0, 0, 0, .45)),
    repeating-linear-gradient(90deg, #2b0a12 0, #631927 34px, #8e2a3d 52px, #631927 70px, #2b0a12 104px); }
.drape.left { left: 0; --go: -101%; --skew: 7deg; box-shadow: 8px 0 30px rgba(0, 0, 0, .5); border-right: 2px solid var(--gold); }
.drape.right { right: 0; --go: 101%; --skew: -7deg; box-shadow: -8px 0 30px rgba(0, 0, 0, .5); border-left: 2px solid var(--gold); }
@keyframes draw-open { 45% { transform: translateX(calc(var(--go) * .35)) skewX(var(--skew)); } 100% { transform: translateX(var(--go)); } }
.label { position: absolute; top: 50%; left: 50%; translate: -50% -50%; display: grid; justify-items: center; gap: .8rem; padding: 1.8rem 2.6rem; border-radius: 22px; background: var(--blue-900); border: 1px solid var(--gold); box-shadow: 0 24px 60px rgba(0, 0, 0, .6); animation: lift .7s cubic-bezier(.6, 0, .4, 1) 1.25s forwards; }
.label img { width: 74px; animation: emerge 1s var(--ease) both; }
.label img.word { width: 130px; animation: wipe .9s var(--ease) .3s both; }
@keyframes lift { to { opacity: 0; transform: translateY(-70px) scale(.9); } }

/* ---------- gold confetti ---------- */
#burst { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 140; pointer-events: none; }

/* ---------- section dividers ---------- */
.section-head h2::after { display: none; }
.section-head::after { content: ''; display: block; width: min(320px, 70%); height: 40px; margin: .7rem auto 0; background: url('/assets/auld-mark.png') center / auto 34px no-repeat, linear-gradient(90deg, transparent, var(--gold) 80%, transparent) left center / calc(50% - 24px) 1px no-repeat, linear-gradient(90deg, transparent, var(--gold) 20%, transparent) right center / calc(50% - 24px) 1px no-repeat; }

/* ---------- the runway: a pinned, scroll-driven lookbook ---------- */
.runway { height: 320vh; margin-top: 5rem; --p: 0; }
.pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; color: #eef2f5; background: radial-gradient(circle at 80% 20%, var(--blue-500), transparent 55%), radial-gradient(circle at 10% 100%, var(--burgundy), transparent 55%), var(--blue-900); border-block: 1px solid var(--gold); }
.backword { position: absolute; top: 50%; left: 0; translate: calc(var(--p) * -55%) -50%; direction: ltr; white-space: nowrap; font-family: var(--display); font-size: 30vh; color: transparent; -webkit-text-stroke: 1px rgba(220, 192, 132, .28); }
.act { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 2rem; padding: 4rem clamp(1.2rem, 8vw, 8rem); opacity: 0; visibility: hidden; transition: opacity .7s var(--ease), visibility .7s; }
.act.on { opacity: 1; visibility: visible; }
.act > div { transform: translateY(60px); transition: transform .9s var(--ease); }
.act.on > div { transform: none; }
.act b { display: block; font-family: 'Cinzel', serif; font-size: clamp(1.4rem, 3vw, 2.2rem); color: var(--gold-300); }
.act h2 { font-size: clamp(2.4rem, 6vw, 5.4rem); margin-bottom: 1rem; }
.act p { max-width: 28rem; color: #b9c8d6; font-size: 1.15rem; margin-bottom: 1.6rem; }
.frame { justify-self: center; height: min(72vh, 600px); aspect-ratio: 4 / 5; max-width: 100%; padding: 0; border: 1px solid var(--gold); border-radius: 24px; overflow: hidden; box-shadow: 22px 22px 0 -1px rgba(168, 139, 85, .22), 0 40px 80px rgba(0, 0, 0, .45); clip-path: inset(100% 0 0 0 round 24px); transition: clip-path 1.1s var(--ease); }
.frame img { width: 100%; height: 100%; object-fit: cover; scale: 1.35; transition: scale 1.6s var(--ease); }
.act.on .frame { clip-path: inset(-60px -60px -60px -60px round 24px); }
.act.on .frame img { scale: 1; }
.act.on .frame:hover img { scale: 1.07; }
.dots { position: absolute; bottom: 24px; inset-inline: 0; display: flex; justify-content: center; gap: .6rem; }
.dots i { width: 44px; height: 3px; border-radius: 3px; background: rgba(220, 192, 132, .28); transition: background .4s; }
.dots i.on { background: var(--gold-200); }

/* ---------- living gold border on cards ---------- */
@property --spin { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.card::after { content: ''; position: absolute; inset: 0; z-index: 5; padding: 2px; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: conic-gradient(from var(--spin), transparent 0 55%, var(--gold-200) 75%, var(--burgundy-400) 88%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.card:hover::after, .card:focus-within::after { opacity: 1; animation: orbit 2.4s linear infinite; }
@keyframes orbit { to { --spin: 360deg; } }

/* ---------- sizes ---------- */
.quick .price-row { margin-top: 0; }
.sizes { display: flex; flex-wrap: wrap; gap: .5rem; }
.size { min-width: 46px; padding: .45rem .8rem; border-radius: 10px; border: 1px solid var(--line); direction: ltr; transition: .25s var(--ease); }
.size:hover { border-color: var(--gold); }
.size.on { background: var(--gold-grad); border-color: transparent; color: #1a1305; font-weight: 600; }
.sizes.shake { animation: shake .45s; }
@keyframes shake { 25% { translate: -8px 0; } 75% { translate: 8px 0; } }
.size-hint { color: var(--muted); font-size: .8rem; direction: ltr; text-align: start; }
:root[dir='rtl'] .size-hint { text-align: end; }

@media (max-width: 800px) {
  .act { grid-template-columns: 1fr; align-content: center; text-align: center; gap: 1.2rem; padding: 2rem 1.2rem 4rem; }
  .act .frame { order: -1; height: 44vh; }
  .act p { margin-inline: auto; margin-bottom: 1rem; font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { #curtain { display: none; } }
