:root {
  --bg: #9e1b32; --fg: #f6ecdc; --ac: #f4b942;
  --serif: 'Fraunces', Georgia, serif; --sans: 'Inter', system-ui, sans-serif;
  --pad: clamp(20px, 5vw, 72px);
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--fg); background: var(--bg); font-family: var(--sans); font-weight: 300; line-height: 1.55;
  overflow-x: hidden;
}
a { color: inherit; }
.scroller { height: 500vh; }

/* Layers ------------------------------------------------------------------------------ */
#bigword { position: fixed; inset: 0; z-index: 0; display: grid; place-items: center; pointer-events: none; overflow: hidden; }
#bigword span {
  font: italic 300 36vw/0.8 var(--serif); font-variation-settings: 'opsz' 144; letter-spacing: -.045em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1.4px var(--fg); opacity: .22;
  transition: opacity .5s ease, transform .8s cubic-bezier(.2,.7,.2,1);
}
#bigword span.solid { color: var(--fg); text-shadow: 0 0.04em 0.12em color-mix(in srgb, var(--bg) 40%, black 20%); -webkit-text-stroke: 0; opacity: .95; transform: translateY(-25vh); }
#bigword span.solid.out { transform: translateY(-20vh) scale(.98); }
#bigword span.out { opacity: 0; transform: translateY(5vh) scale(.98); }
#stage { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; touch-action: pan-y; }
/* the shawl behind every chapter: woven wool over the page colour, folds, and the Kullu borders */
/* Woven wool in each chapter's colour: one ready-made layer per chapter. Scrolling only fades
   between two of them (a cheap compositor fade); nothing is repainted while you scroll. */
#woolTex { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#woolTex i { position: absolute; inset: 0; opacity: 0; will-change: opacity;
  background-image: repeating-linear-gradient(90deg, #fff 0, #e6e6e6 7vw, #fff 11vw, #efefef 16vw, #fff 23vw), var(--wool, none);
  background-size: auto, 56px 56px; background-blend-mode: multiply, multiply; transition: background-color .9s ease; }
#woolTex i:first-child { opacity: 1; }
/* text colours change once per chapter, with a short fade */
.nav, .logo, .nav-links a, .btn, .btn-ghost, .menu-btn span, .dots button, .kicker, .arrow { transition: color .5s ease, background-color .5s ease, border-color .5s ease, box-shadow .5s ease, opacity .3s, transform .25s; }
#bands { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#bands .band { position: absolute; left: 0; top: 0; width: 100%; will-change: transform; }
body.intro-open #bands, body.intro-open #woolTex { visibility: hidden; }
.scrim { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .6s;
  background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 32%, transparent 58%); }
body[data-chapter="1"] .scrim { opacity: .9; background: linear-gradient(270deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 32%, transparent 58%); }

/* Intro ------------------------------------------------------------------------------- */
body.intro-open { overflow: hidden; }
.intro {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; text-align: center; cursor: default; overflow: hidden;
  background: #2a1f1a;     /* dark wood behind the shawl, seen only through the fringe */
  color: #7d1426;
  transition: opacity .6s ease 1.1s, visibility .6s 1.1s, background-color .9s ease .3s;
}
/* The shawl itself: painted by intro.js, with soft fold shading, a vignette and a slow drape sway */
.intro-bg {
  position: absolute; inset: -3%; background: #e4d6bd; transform-style: preserve-3d;
  transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(1.02);
  transition: transform 1.4s cubic-bezier(.65,0,.25,1), opacity 1s ease .4s;
}
.intro-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .9s ease; }
.intro-bg.ready canvas { opacity: 1; }
.intro-bg::before {      /* folds: gentle light and shadow running down the cloth */
  content: ''; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply;
  background: repeating-linear-gradient(90deg, rgba(60,40,20,0) 0, rgba(60,40,20,.13) 6vw, rgba(255,250,240,.0) 10vw, rgba(60,40,20,.08) 15vw, rgba(60,40,20,0) 21vw);
  background-size: 140% 100%; animation: drape 11s ease-in-out infinite alternate;
}
.intro-bg::after {       /* vignette + a soft pool of light where the brand sits */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 55% at 50% 46%, rgba(255,250,240,.35), rgba(255,250,240,0) 60%), radial-gradient(120% 100% at 50% 50%, rgba(0,0,0,0) 55%, rgba(40,20,10,.38) 100%);
}
@keyframes drape { from { background-position: 0 0; } to { background-position: 18vw 0; } }
@media (max-aspect-ratio: 20/21) { .intro-bg::before { background-image: repeating-linear-gradient(0deg, rgba(60,40,20,0) 0, rgba(60,40,20,.12) 6vh, rgba(255,250,240,0) 10vh, rgba(60,40,20,.07) 15vh, rgba(60,40,20,0) 21vh); background-size: 100% 140%; } }
/* leaving: the shawl is drawn up and away like cloth pulled off, revealing the site */
body:not(.intro-open) .intro-bg { transform: perspective(1400px) translateY(-108%) rotateX(18deg) skewY(-4deg); }
body:not(.intro-open) .intro { background-color: rgba(42,31,26,0); }
.intro-inner { position: relative; display: grid; justify-items: center; gap: 26px; padding: 24px; transition: transform 1.3s cubic-bezier(.6,0,.2,1), opacity .9s ease, filter 1.1s ease; }
body:not(.intro-open) .intro { opacity: 0; visibility: hidden; pointer-events: none; }
/* leaving: the brand rushes toward the viewer and dissolves, as the camera flies into the scene behind */
body:not(.intro-open) .intro-inner { transform: scale(1.9) translateY(-2vh); opacity: 0; filter: blur(10px); }
.kicker { font: 600 11px/1.4 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--ac); }
.intro-mark { margin: 0; padding: 0 .08em; border: 0; background: none; color: #7d1426; font: 400 clamp(150px, 31vw, 400px)/0.86 var(--serif); font-variation-settings: 'opsz' 144;

  letter-spacing: -.035em; display: flex; cursor: pointer; transition: transform .5s cubic-bezier(.2,.8,.2,1), filter .5s; }
/* the logo is the door: it lifts and glows under the pointer */
.intro-mark:hover, .intro-mark:focus-visible { transform: scale(1.03); outline: none; }
.intro-mark:focus-visible { outline: 2px solid #7d1426; outline-offset: 10px; }
.intro-mark.waiting { animation: breathe 1.2s ease-in-out infinite; }
.intro-mark span { display: inline-block; opacity: 0; transform: translateY(.35em) rotateX(55deg); transform-origin: 50% 100%; animation: letter 1.1s cubic-bezier(.2,.8,.2,1) forwards; }
.intro-mark > span:nth-child(1) { animation-delay: .2s; }
.intro-mark > span:nth-child(2) { animation-delay: .3s; }
.intro-mark em { font-style: italic; font-weight: 300; color: #c27c0e; display: flex; }
.intro-mark em span:nth-child(1) { animation-delay: .4s; }
.intro-mark em span:nth-child(2) { animation-delay: .5s; }
/* Inside the letters (set up by intro.js): woven wool, with a Kullu border drifting through the
   middle of the name. Matte: no glow, no highlight. */
.intro-mark.woven span { color: transparent; text-shadow: none; -webkit-background-clip: text; background-clip: text;
  background-image: var(--border-strip), var(--wool-red);
  background-repeat: repeat-x, repeat; background-size: auto 34%, 48px 48px; background-position: 0 56%, 0 0;
  animation: letter 1.1s cubic-bezier(.2,.8,.2,1) forwards, weave-through 26s linear 1.2s infinite; }
.intro-mark.woven em span { background-image: var(--border-strip), var(--wool-gold); }
.intro-mark.woven > span:nth-child(1) { animation-delay: .2s, 1.2s; }
.intro-mark.woven > span:nth-child(2) { animation-delay: .3s, 1.2s; }
.intro-mark.woven em span:nth-child(1) { animation-delay: .4s, 1.2s; }
.intro-mark.woven em span:nth-child(2) { animation-delay: .5s, 1.2s; }
@keyframes weave-through { from { background-position: 0 56%, 0 0; } to { background-position: -900px 56%, -96px 0; } }
@keyframes letter { to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { transform: scaleX(1); } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ac) 55%, transparent); } 100% { box-shadow: 0 0 0 26px color-mix(in srgb, var(--ac) 0%, transparent); } }
@keyframes breathe { 50% { transform: scale(.97); } }
@media (max-width: 560px) {
}
#bigword { transition: opacity 1.4s ease .9s; }
body.intro-open #bigword { opacity: 0; transition: none; }
@media (prefers-reduced-motion: reduce) {
  .intro-mark span { animation: none !important; opacity: 1; transform: none; }
}

/* Nav --------------------------------------------------------------------------------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px var(--pad); }
.logo { font: 400 22px/1 var(--serif); text-decoration: none; letter-spacing: -.01em; }
.nav-links { display: flex; gap: 30px; }
.nav-links a { text-decoration: none; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; opacity: .85; }
.nav-links a:hover { opacity: 1; }
.nav-right { display: flex; align-items: center; gap: 14px; }
.menu-btn { display: none; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; flex-direction: column; justify-content: center; gap: 6px; align-items: center; }
.menu-btn span { width: 22px; height: 1.5px; background: var(--fg); display: block; }
.menu { position: fixed; inset: 0; z-index: 39; background: var(--bg); display: none; flex-direction: column; justify-content: center; padding: var(--pad); gap: 18px; }
.menu.open { display: flex; }
.menu a { font: 300 clamp(32px, 8vw, 48px)/1.1 var(--serif); text-decoration: none; }

/* Buttons ----------------------------------------------------------------------------- */
.btn {
  display: inline-block; padding: 15px 28px; border-radius: 999px; border: 0; cursor: pointer; background: var(--fg); color: var(--bg); text-decoration: none;
  font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; transition: transform .25s, opacity .25s;
}
.btn:hover { transform: translateY(-2px); background: var(--ac); color: var(--bg); }
.btn-small { background: var(--ac); color: var(--bg); }
.btn-small { padding: 11px 20px; font-size: 11px; }
.btn-ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--fg); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ac); }

/* Chapter panels: text sits directly on the colour, no boxes ---------------------------- */
.panel {
  position: fixed; z-index: 20; top: 50%; width: min(460px, calc(100vw - 2 * var(--pad)));
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-50%) translateY(30px);
  transition: opacity .7s ease, transform 1s cubic-bezier(.2,.7,.2,1), visibility .7s;
}
.panel.on { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(-50%); }
.panel.left { left: var(--pad); }
.panel.right { right: var(--pad); }
.panel h2 { font: 300 clamp(38px, 4.8vw, 66px)/1 var(--serif); font-variation-settings: 'opsz' 120; letter-spacing: -.025em; margin: 14px 0 20px; }
.panel p { font-size: clamp(15px, 1.15vw, 17px); max-width: 42ch; opacity: .88; }
.small { font-size: 12px !important; opacity: .6 !important; }

.hero { top: auto; bottom: max(7vh, calc(var(--border-rest, 95px) + 20px)); left: var(--pad); width: min(560px, calc(100vw - 2 * var(--pad))); transform: translateY(30px); }
.hero.on { transform: none; }
.statement { font: italic 300 clamp(26px, 2.6vw, 38px)/1.12 var(--serif) !important; color: var(--fg); margin: 12px 0 10px; opacity: 1 !important; }
.hint { font-size: 12px !important; letter-spacing: .06em; opacity: .65 !important; }

.facts { list-style: none; padding: 0; margin: 26px 0 0; display: flex; gap: 30px; }
.facts li { display: grid; gap: 4px; }
.facts strong { font: 400 28px/1 var(--serif); color: var(--ac); }
.facts li { padding-left: 14px; border-left: 1px solid color-mix(in srgb, var(--ac) 55%, transparent); }
.facts span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }

#collection { top: auto; bottom: max(5vh, calc(var(--border-rest, 95px) + 14px)); left: 50%; width: min(620px, calc(100vw - 2 * var(--pad))); text-align: center; transform: translateX(-50%) translateY(30px); }
#collection.on { transform: translateX(-50%); }
#collection .kicker { display: flex; justify-content: space-between; }
.pick { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 12px; }
.pick h2 { margin: 8px 0 6px; font-size: clamp(34px, 4vw, 54px); }
.pick p { margin: 0 auto; }
.arrow { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--fg); background: transparent; color: var(--fg); font-size: 20px; cursor: pointer; transition: background .25s, color .25s; }
.arrow:hover { background: var(--ac); border-color: var(--ac); color: var(--bg); }
.sh-spec { font-size: 11px !important; letter-spacing: .14em; text-transform: uppercase; color: var(--ac); opacity: 1 !important; margin: 8px auto 0 !important; }
.sh-dots { display: flex; justify-content: center; gap: 6px; margin: 12px auto 18px !important; }
.sh-dots i { width: 14px; height: 14px; border-radius: 50%; display: block; box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--fg) 50%, transparent); }
.sh-dots i.wool { width: 28px; border-radius: 7px; margin-left: 6px; }
.pick-line { font: italic 400 19px/1.3 var(--serif) !important; opacity: 1 !important; color: var(--ac); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 18px; }

/* Chapter dots ------------------------------------------------------------------------ */
.dots { position: fixed; right: 20px; top: 50%; transform: translateY(-50%); z-index: 30; display: grid; gap: 12px; }
.dots button { width: 7px; height: 7px; border-radius: 50%; border: 0; background: var(--fg); opacity: .35; cursor: pointer; padding: 0; transition: transform .3s, opacity .3s; }
.dots button.on { opacity: 1; transform: scale(1.6) rotate(45deg); border-radius: 1px; background: var(--ac); }

/* Phones ------------------------------------------------------------------------------ */
@media (max-width: 820px) {
  .nav-links { display: none; }
  .menu-btn { display: flex; }
  .panel, .panel.left, .panel.right { left: var(--pad); right: var(--pad); width: auto; top: auto; bottom: calc(var(--border-rest, 70px) + 14px); transform: translateY(20px); }
  .panel.on { transform: none; }
  .panel h2 { font-size: 34px; margin: 8px 0 10px; }
  .panel p { font-size: 14px; max-width: none; }
  .hero { bottom: calc(var(--border-rest, 70px) + 18px); }
  #collection { left: var(--pad); right: var(--pad); width: auto; transform: translateY(20px); }
  #collection.on { transform: none; }
  .pick { grid-template-columns: 40px 1fr 40px; gap: 6px; }
  .arrow { width: 40px; height: 40px; font-size: 16px; }
  .pick h2 { font-size: 30px; }
  .dots { display: none; }
  #bigword span.solid { transform: translateY(3vh); }
  #bigword span.solid.out { transform: translateY(7vh); }
  .facts { gap: 20px; }
  .facts strong { font-size: 22px; }
  body[data-chapter="1"] .scrim { opacity: 1; background: linear-gradient(0deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 80%, transparent) 38%, transparent 62%); }
}

/* Captions pinned to the cloth ---------------------------------------------------------- */
#captions { position: fixed; inset: 0; z-index: 21; pointer-events: none; }
.cap { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, opacity; transition: opacity .3s; }
.cap-dot { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--ac);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ac) 30%, transparent), 0 0 18px color-mix(in srgb, var(--ac) 60%, transparent); animation: capPulse 2.4s ease-in-out infinite; }
@keyframes capPulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--ac) 0%, transparent), 0 0 18px color-mix(in srgb, var(--ac) 60%, transparent); } }
.cap-line { position: absolute; left: 0; top: 0; height: 1px; transform-origin: 0 0; background: linear-gradient(90deg, var(--ac), color-mix(in srgb, var(--ac) 40%, transparent)); }
.cap-label { position: absolute; left: 0; top: 0; display: grid; gap: 3px; white-space: nowrap; padding: 8px 14px 9px 12px; margin-top: -1.6em; border-left: 2px solid var(--ac);
  background: color-mix(in srgb, var(--bg) 90%, transparent); border-radius: 0 6px 6px 0; }
.cap.flip .cap-label { padding: 8px 12px 9px 14px; border-left: 0; border-right: 2px solid var(--ac); border-radius: 6px 0 0 6px; translate: -100% 0; text-align: right; }
.cap-label b { font: 400 19px/1.1 var(--serif); color: var(--fg); }
.cap-label em { font: 500 10px/1.3 var(--sans); font-style: normal; letter-spacing: .16em; text-transform: uppercase; color: var(--ac); }
@media (max-width: 820px) {
  .cap-label b { font-size: 14px; }
  .cap-label em { font-size: 8.5px; letter-spacing: .12em; }
}

/* short phone screens: keep the order chapter compact so the 3D shawl stays visible above it */
@media (max-width: 820px) and (max-height: 740px) {
  .panel h2 { font-size: 28px; margin: 6px 0 8px; }
  .panel p { font-size: 13px; }
  #order .pick-line { font-size: 15px !important; margin: 4px 0 6px; }
  #order .care { display: none; }
  #order .cta-row { flex-wrap: nowrap; gap: 8px; margin: 12px 0 10px; }
  #order .btn { padding: 12px 15px; font-size: 10.5px; letter-spacing: .1em; }
}

/* landscape screens: the collection text sits to the right of the carousel instead of under it */
@media (min-width: 821px) and (min-aspect-ratio: 23/20) {
  #collection { left: auto; right: var(--pad); top: 50%; bottom: auto; width: min(400px, 32vw); transform: translateY(-50%) translateX(30px); }
  #collection.on { transform: translateY(-50%); }
  #collection .kicker { justify-content: center; gap: 18px; }
}

/* no JavaScript: a plain note over the front page */
.noscript { position: fixed; inset: auto 16px 24px 16px; z-index: 60; padding: 14px 18px; background: #7d1426; color: #f6ecdc; font: 500 14px/1.4 var(--sans); text-align: center; border-radius: 8px; }
/* no WebGL: the site without the 3D shawls (text, woven backgrounds and borders still work) */
body.no3d #stage, body.no3d #captions { display: none; }
