/* Starter stylesheet for the website skill. Layout: one long scroll story; full-bleed scenes, a centred column
   for reading. Change the tokens for each client: palette and faces come from the subject's own world.
   Single dark look by default (Jayden prefers dark); a client who needs light gets both themes (references/theming.md). */
@property --a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

:root {
  --bg: #06070a;          /* page ground */
  --bg-2: #0d1017;        /* panels */
  --sky: #13284a;         /* hero glow */
  --accent: #d6a54b;      /* the one accent */
  --accent-hi: #f6dc98;
  --accent-lo: #8d5f22;
  --heat: #ff7b1c;        /* fire, used sparingly */
  --text: #ece3d1;
  --muted: #a99d87;
  --line: rgba(214, 165, 75, .26);
  --display: 'Cinzel', Georgia, serif;                       /* pick per subject */
  --serif: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --gutter: clamp(16px, 4.2vw, 72px);
  --max: 1440px;
  --ease: cubic-bezier(.7, 0, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body { background: var(--bg); color: var(--text); font-family: var(--serif); font-size: clamp(18px, 1.22vw, 21px); line-height: 1.6;
  font-weight: 500; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 1px solid var(--accent-hi); outline-offset: 4px; }
h1, h2, h3 { text-wrap: balance; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { position: relative; padding-block: clamp(100px, 16vh, 200px); }

/* atmosphere */
#embers { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 80; pointer-events: none; }
.grain { position: fixed; inset: -50%; z-index: 81; pointer-events: none; opacity: .06; animation: grain 1.2s steps(6) infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-4%, 3%); } 50% { transform: translate(3%, -5%); } 75% { transform: translate(-6%, -2%); } 100% { transform: translate(0, 0); } }
.cursor-glow { position: fixed; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; pointer-events: none; z-index: 79;
  opacity: 0; transition: opacity .8s; background: radial-gradient(circle, rgba(246, 210, 140, .085), rgba(214, 165, 75, .035) 35%, transparent 70%); }
.has-pointer .cursor-glow { opacity: 1; }

/* type */
.eyebrow { font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: .38em; text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: 16px; }
.eyebrow::before { content: ''; width: 38px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); }
.display { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; line-height: 1.05; font-size: clamp(36px, 5.6vw, 88px); }
.grad { background: linear-gradient(180deg, #fff3cc 0%, var(--accent-hi) 26%, var(--accent) 52%, var(--accent-lo) 70%, #e8c16d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { color: #d9cfbb; max-width: 62ch; }
.wm { display: inline-block; overflow: hidden; vertical-align: top; padding: .06em .02em .12em; margin: -.06em -.02em -.12em; }
.wi { display: inline-block; will-change: transform; }

/* buttons */
.btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; gap: 14px; font-family: var(--display);
  font-weight: 600; font-size: 12.5px; letter-spacing: .26em; text-transform: uppercase; padding: 17px 28px; border: 1px solid var(--accent);
  color: var(--accent-hi); background: rgba(6, 7, 10, .35); transition: color .45s var(--ease); cursor: pointer; }
.btn::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--accent-lo), var(--accent) 45%, var(--accent-hi));
  transform: translateX(-101%); transition: transform .65s var(--ease); }
.btn:hover, .btn:focus-visible { color: #170e02; }
.btn:hover::before, .btn:focus-visible::before { transform: none; }

/* nav: fixed to the top edge, so it adds the safe-area inset to its own padding */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: calc(20px + env(safe-area-inset-top, 0px)) var(--gutter) 20px; transition: transform .6s var(--ease), background .6s, padding .6s; }
.nav.scrolled { background: linear-gradient(180deg, rgba(6, 7, 10, .92), rgba(6, 7, 10, .72)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  padding-top: calc(12px + env(safe-area-inset-top, 0px)); padding-bottom: 12px; }
.nav.hide { transform: translateY(-105%); }
.nav-links { display: flex; gap: clamp(16px, 2vw, 34px); }
.nav-links a { font-family: var(--display); font-size: 11.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: #d6c9ae; }
.nav-links a.active, .nav-links a:hover { color: var(--accent-hi); }
.menu-btn { display: none; width: 46px; height: 46px; border: 1px solid var(--line); background: rgba(6, 7, 10, .5); align-items: center;
  justify-content: center; flex-direction: column; gap: 7px; cursor: pointer; }
.menu-btn span { width: 20px; height: 1px; background: var(--accent-hi); transition: transform .5s var(--ease); }
.menu-open .menu-btn span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-btn span:last-child { transform: translateY(-4px) rotate(-45deg); }
.menu { position: fixed; inset: 0; z-index: 99; display: grid; align-content: center; gap: 6px; padding: 100px var(--gutter) 60px; background: var(--bg);
  clip-path: circle(0 at calc(100% - 46px) 42px); visibility: hidden; transition: clip-path .9s var(--ease), visibility 0s .9s; }
.menu-open .menu { clip-path: circle(150% at calc(100% - 46px) 42px); visibility: visible; transition: clip-path .9s var(--ease), visibility 0s; }
.menu a { font-family: var(--display); font-size: clamp(30px, 8vw, 54px); font-weight: 600; text-transform: uppercase; opacity: 0; transform: translateY(30px);
  transition: opacity .6s, transform .8s var(--ease); }
.menu-open .menu a { opacity: 1; transform: none; transition-delay: calc(.25s + var(--i, 0) * .06s); }
@media (max-width: 1080px) { .nav-links, .nav-cta { display: none; } .menu-btn { display: flex; } }

/* progress rail: --progress 0..1 is set by motion.js */
.progress { position: fixed; right: clamp(12px, 1.5vw, 28px); top: 28vh; height: 44vh; width: 1px; z-index: 90; pointer-events: none; background: rgba(214, 165, 75, .16); }
.progress::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, var(--accent)); transform-origin: top; transform: scaleY(var(--progress, 0)); }
@media (max-width: 760px) { .progress { display: none; } }

/* hero with the intro: a line falls, the logo opens from it */
.hero { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; isolation: isolate; display: grid; place-items: center; }
.hero-sky { position: absolute; inset: -10%; z-index: -3; background: radial-gradient(ellipse 62% 55% at 50% 42%, var(--sky) 0%, #0c1831 30%, #070e1c 58%, var(--bg) 86%); }
.intro-rays { position: absolute; left: 50%; top: -6%; width: 220vmax; height: 220vmax; margin-left: -110vmax; transform-origin: 50% 0; opacity: 0; z-index: -2;
  background: repeating-conic-gradient(from 90deg at 50% 0%, rgba(255, 222, 160, 0) 0deg, rgba(255, 222, 160, .07) 1.6deg, rgba(255, 222, 160, 0) 4.5deg, rgba(255, 222, 160, 0) 8deg);
  -webkit-mask-image: radial-gradient(ellipse 26% 30% at 50% 0%, #000, rgba(0, 0, 0, .4) 45%, transparent 75%); mask-image: radial-gradient(ellipse 26% 30% at 50% 0%, #000, rgba(0, 0, 0, .4) 45%, transparent 75%);
  filter: blur(5px); animation: rays 22s ease-in-out infinite alternate; }
@keyframes rays { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
.hero-content { width: 100%; display: flex; flex-direction: column; align-items: center; padding: 0 var(--gutter); gap: clamp(22px, 5vh, 54px); }
.intro-logo { position: relative; width: min(94vw, 1300px); aspect-ratio: var(--logo-ratio, 3.2); }
.intro-glow { position: absolute; inset: -30% -8%; z-index: -1; opacity: 0; background: radial-gradient(ellipse 46% 42% at 50% 52%, rgba(214, 165, 75, .2), transparent 70%); }
.intro-art { position: absolute; inset: 0; }
.intro-art img { width: 100%; height: 100%; object-fit: contain; }
/* the shine: a brightened copy of the logo, shown only through a moving gradient band. A gradient mask needs no image
   fetch, so it also works on file:// (an image mask is blocked there by CORS). --shine is tweened by motion.js. */
.intro-art img.intro-shine { position: absolute; inset: 0; pointer-events: none; filter: brightness(1.7) saturate(1.1);
  -webkit-mask-image: linear-gradient(105deg, transparent 0 42%, #000 50%, transparent 58% 100%);
  mask-image: linear-gradient(105deg, transparent 0 42%, #000 50%, transparent 58% 100%);
  -webkit-mask-size: 300% 100%; mask-size: 300% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: var(--shine, 150%) 0; mask-position: var(--shine, 150%) 0; }
.intro-strike { position: absolute; left: var(--center, 50%); top: 0; height: var(--strike-end, 95%); width: 3px; margin-left: -1.5px; border-radius: 2px; opacity: 0; transform: scaleY(0); transform-origin: top;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fffbea 26%, #ffe2a0 80%, #fff); box-shadow: 0 0 16px 4px rgba(255, 220, 150, .75), 0 0 70px 14px rgba(255, 160, 60, .35); }
.intro-flash { position: absolute; left: var(--center, 50%); top: var(--strike-end, 95%); width: 70vmin; height: 70vmin; margin: -35vmin 0 0 -35vmin; border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 252, 238, 1) 0%, rgba(255, 214, 140, .55) 14%, rgba(255, 140, 40, .14) 36%, transparent 62%); }
.intro-streak { position: absolute; left: var(--streak-l, -10%); right: var(--streak-r, -10%); top: var(--streak-y, var(--strike-end, 95%)); height: 2px; margin-top: -1px; opacity: 0; transform: scaleX(0);
  background: linear-gradient(90deg, transparent, #ffe4a8 30%, #fffdf4 50%, #ffe4a8 70%, transparent); box-shadow: 0 0 24px 3px rgba(255, 200, 120, .6); }
.tagline { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px clamp(18px, 3.2vw, 52px); font-family: var(--display); font-weight: 600; letter-spacing: .3em;
  text-transform: uppercase; font-size: clamp(11px, 1.1vw, 15px); color: var(--accent); text-align: center; }

/* scrubbed quote: words light as you scroll */
.scrub { font-style: italic; font-weight: 400; font-size: clamp(32px, 5vw, 80px); line-height: 1.12; max-width: 24ch; margin: 30px 0 60px; }
.scrub .w { display: inline-block; }
.js .scrub .w { opacity: .12; }
.scrub .hi { color: var(--accent-hi); }

/* stages: a pinned scene, one word per stage over changing backgrounds */
.stages { position: relative; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate; }
.stage-bg { position: absolute; inset: 0; z-index: -2; }
.stage-bg figure { position: absolute; inset: 0; }
.stage-bg img { width: 100%; height: 100%; object-fit: cover; }
.stages::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6, 7, 10, .94), rgba(6, 7, 10, .55) 46%, rgba(6, 7, 10, .2)),
  linear-gradient(180deg, var(--bg), transparent 18%, transparent 80%, var(--bg)); }
.stage { position: absolute; left: var(--gutter); right: var(--gutter); top: 50%; transform: translateY(-50%); max-width: var(--max); margin: 0 auto; }
.verb { display: flex; font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(58px, 12.5vw, 200px); line-height: .92;
  overflow: hidden; padding: .04em 0 .06em; margin: 18px 0 6px; }   /* flex, not block: a block box leaks rising letters below the line */
.verb .ch { display: inline-block; will-change: transform; }
.stage-meter { position: absolute; right: var(--gutter); bottom: clamp(28px, 7vh, 70px); display: flex; align-items: flex-end; gap: 26px; font-family: var(--display); color: var(--accent-hi); }
.stage-meter [data-stage-count] { font-size: clamp(34px, 4vw, 56px); line-height: 1; }
.stage-bars { display: flex; gap: 8px; padding-bottom: 10px; }
.stage-bars span { width: clamp(36px, 5vw, 70px); height: 2px; background: rgba(236, 227, 209, .16); position: relative; overflow: hidden; }
.stage-bars i { position: absolute; inset: 0; background: var(--accent-hi); transform-origin: left; transform: scaleX(0); }

/* sideways track: pinned on wide screens, native swipe below --trackMin */
.track-pin { padding-top: clamp(80px, 11vh, 130px); }
.track-viewport { overflow: hidden; }
.track-inner { display: flex; gap: clamp(16px, 2vw, 28px); padding: 0 var(--gutter) 30px; width: max-content; }
.track-card { position: relative; isolation: isolate; overflow: hidden; flex: none; width: clamp(290px, 29vw, 430px); height: clamp(400px, calc(100vh - 330px), 640px);
  display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(24px, 2.4vw, 36px); border: 1px solid rgba(214, 165, 75, .16); background: var(--bg-2); }
.track-img { position: absolute; inset: 0 -12%; z-index: -2; }
.track-img img { width: 100%; height: 100%; object-fit: cover; }
.track-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, rgba(6, 7, 10, .94) 80%); }
.track-bar { margin: 6px var(--gutter) 0; height: 1px; background: rgba(214, 165, 75, .16); position: relative; }
.track-bar i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); }
@media (max-width: 899px) {
  .track-viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .track-card { width: 82vw; height: 520px; scroll-snap-align: center; }
  .track-bar { display: none; }
}

/* fill words: outline that fills with the accent as it scrolls past (--p 0..1) */
.fills { border-top: 1px solid var(--line); }
.fill-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(18px, 4vw, 70px); align-items: center; padding-block: clamp(16px, 2.6vw, 34px); border-bottom: 1px solid var(--line); }
.fill { position: relative; display: block; font-family: var(--display); font-weight: 700; text-transform: uppercase; line-height: .9; font-size: clamp(56px, 10.5vw, 178px); --p: 0; }
.fill .out { color: transparent; -webkit-text-stroke: 1px rgba(214, 165, 75, .42); }
.fill .in { position: absolute; left: 0; top: 0; white-space: nowrap; background: linear-gradient(180deg, #fff3cc, var(--accent-hi) 30%, #b37a2e 62%, #e8c16d);
  -webkit-background-clip: text; background-clip: text; color: transparent; clip-path: inset(-30% calc(100% - var(--p) * 100%) -30% 0); }  /* no filter here: a glow filter paints a dark box; -30% keeps descenders inside */
.rm .fill .in, .no-js .fill .in { clip-path: none; }
@media (max-width: 760px) { .fill-row { grid-template-columns: 1fr; } }

/* a drawn line with nodes and steps */
.draw svg { display: block; width: 100%; height: auto; overflow: visible; }   /* never preserveAspectRatio="none" on a dash-drawn path */
.draw-path { fill: none; stroke: var(--accent-hi); stroke-width: 1.6; stroke-linecap: round; }
.draw-base { fill: none; stroke: rgba(214, 165, 75, .16); stroke-dasharray: 2 6; }
.draw .node { fill: var(--bg); stroke: rgba(214, 165, 75, .55); stroke-width: 1.5; transition: fill .6s, stroke .6s; }
.draw .halo { opacity: 0; transition: opacity .8s; }
.draw .on .node { fill: #fff3cc; stroke: #ffb347; }
.draw .on .halo { opacity: 1; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.steps [data-step] { transition: opacity .8s, transform .8s var(--ease); font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(22px, 2.9vw, 46px); }
.js .steps [data-step] { opacity: .2; transform: translateY(14px); }
.steps [data-step].on { opacity: 1; transform: none; }
.rm .steps [data-step] { opacity: 1; transform: none; }
@media (max-width: 700px) { .draw svg { display: none; } .steps { grid-template-columns: 1fr; text-align: left; } }

/* a line of fires */
.fire-line svg { width: 100%; height: auto; overflow: visible; display: block; }
.fire-path { fill: none; stroke: var(--accent-hi); stroke-width: 2; stroke-linecap: round; }
.fire-base { fill: none; stroke: rgba(236, 227, 209, .14); stroke-dasharray: 2 6; }
.fire-line text { font-family: var(--display); font-size: 13px; letter-spacing: .4em; fill: var(--muted); }
.fire { opacity: 0; transition: opacity .6s; transform-box: fill-box; transform-origin: center; }
.fire.lit { opacity: 1; animation: flicker 2.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes flicker { 0%, 100% { transform: scale(1); } 45% { transform: scale(1.25); opacity: .8; } 70% { transform: scale(.9); } }
@media (max-width: 700px) { .fire-line text { font-size: 40px; } .fire-path { stroke-width: 6; } .fire-base { stroke-width: 3; } }  /* the viewBox shrinks ~3x on a phone */

/* marquee: items written twice in the HTML, styled by class */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: clamp(18px, 3vh, 30px); }
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee-track span { font-style: italic; font-weight: 400; font-size: clamp(34px, 5vw, 76px); white-space: nowrap; padding-right: clamp(48px, 6vw, 92px); }
.marquee-track .a { color: var(--accent-hi); }
.marquee-track .b { color: transparent; -webkit-text-stroke: 1px rgba(236, 227, 209, .38); }

/* drifting strip (film frames, photos) */
.strip-viewport { overflow: hidden; }
.strip { display: flex; width: max-content; gap: 18px; padding: 20px 14px; }
.strip > * { width: clamp(290px, 36vw, 560px); aspect-ratio: 3 / 2; max-width: 100%; overflow: hidden; background: var(--bg-2); }
@media (max-width: 860px) { .strip-viewport { overflow-x: auto; scroll-snap-type: x mandatory; } .strip > * { width: 80vw; scroll-snap-align: center; } }

/* honest preview forms */
.panel { position: relative; isolation: isolate; padding: clamp(28px, 4vw, 56px); background: linear-gradient(180deg, rgba(18, 22, 30, .8), rgba(9, 11, 15, .92)); border: 1px solid rgba(214, 165, 75, .14); }
.panel::before { content: ''; position: absolute; inset: -1px; padding: 1px; z-index: -1; pointer-events: none;
  background: conic-gradient(from var(--a), transparent 0 62%, rgba(246, 220, 152, .9) 76%, transparent 88%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: orbit 9s linear infinite; }
@keyframes orbit { to { --a: 360deg; } }
.field { margin-top: 26px; }
.field label { display: block; font-family: var(--display); font-size: 10.5px; letter-spacing: .3em; color: var(--accent); text-transform: uppercase; margin-bottom: 8px; }
.field input, .field textarea { width: 100%; background: transparent; border: 0; border-bottom: 1px solid rgba(236, 227, 209, .25); padding: 10px 0 12px; font-size: 21px; outline: none; border-radius: 0; }
.field input:focus, .field textarea:focus { border-bottom-color: var(--accent-hi); }
.form-msg { font-style: italic; color: var(--accent-hi); min-height: 1.4em; margin-top: 16px; }

/* footer */
.footer { border-top: 1px solid var(--line); padding-block: clamp(80px, 12vh, 130px) 40px; text-align: center; }
.footer-logo { width: min(620px, 86vw); height: auto; margin: 0 auto; }
.footer-base { margin-top: 60px; padding-top: 26px; border-top: 1px solid rgba(214, 165, 75, .12); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 15px; color: var(--muted); }

/* reduced motion and no-JS: everything readable, nothing waiting on scroll (both are checked by shoot.mjs --reduced / --nojs) */
.rm .grain, .rm .intro-rays, .rm .fire.lit { animation: none !important; }
.rm .intro-rays, .no-js .intro-rays { opacity: 1; }
.rm .stages, .no-js .stages { height: auto; padding-block: 120px; }
.rm .stage, .no-js .stage { position: relative; left: auto; right: auto; top: auto; transform: none; margin: 0 auto 90px; padding-inline: var(--gutter); }
.rm .stage-bg figure + figure, .no-js .stage-bg figure + figure { display: none; }   /* one background, not a pile */
.rm .stage-meter, .no-js .stage-meter { display: none; }
.rm .scrub .w { opacity: 1; }
.rm .track-viewport, .no-js .track-viewport { overflow-x: auto; }                  /* every card reachable */
.no-js .nav { background: rgba(6, 7, 10, .92); }                                     /* no scroll script to darken it */
.no-js .intro-strike, .no-js .intro-flash, .no-js .intro-streak { display: none; }
