/* Art direction: see ../DESIGN.md
   Base styles are a complete static layout. Pinned / horizontal modes are
   switched on by JS via .is-h / .is-pinned, so the page works without GSAP. */
:root {
  --paper: #F4F0E8;
  --paper-2: #EBE5D8;
  --card: #FBF8F2;
  --ink: #16231F;
  --brass: #A98B5B;
  --brass-d: #8A6F42;
  --muted: #5E685F;
  --line: rgba(22, 35, 31, .14);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --pad: clamp(1.25rem, 5vw, 4.5rem);
  --section: clamp(5rem, 12vw, 10rem);
  --serif: "Frank Ruhl Libre", "Times New Roman", serif;
  --sans: "Heebo", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
html.is-loading { overflow: hidden; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 300 1.0625rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
em { font-style: normal; color: var(--brass-d); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 4px; }

.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 200; }
.skip:focus { top: 1rem; }
.eyebrow { font-size: .8125rem; letter-spacing: .18em; color: var(--brass-d); font-weight: 500; margin-bottom: 1.5rem; }

/* film grain */
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .07; mix-blend-mode: multiply;
  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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* loader */
.loader { position: fixed; inset: 0; z-index: 150; background: var(--ink); color: var(--paper); display: grid; place-items: center; overflow: hidden; }
.loader-brand { font-family: var(--serif); font-size: clamp(2.6rem, 8vw, 6rem); font-weight: 300; letter-spacing: .02em; display: block; }
.loader-brand i, .brand span, .wordmark i { font-style: normal; color: var(--brass); margin-inline: .15em; }
.loader-count { position: absolute; bottom: 2rem; inset-inline-end: var(--pad); font-family: var(--serif); font-size: 1.1rem; color: var(--brass); font-variant-numeric: tabular-nums; direction: ltr; }
html:not(.js) .loader, .no-gsap .loader { display: none; }

.progress { position: fixed; top: 0; inset-inline: 0; height: 2px; background: var(--brass); transform-origin: right; transform: scaleX(0); z-index: 120; }

/* header */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem var(--pad);
  transition: background .5s var(--ease), padding .5s var(--ease), box-shadow .5s var(--ease), transform .6s var(--ease);
}
.site-header.is-solid { background: rgba(244, 240, 232, .9); backdrop-filter: blur(10px); padding-block: .8rem; box-shadow: 0 1px 0 var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.brand { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; letter-spacing: .02em; }
.site-header ul { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem); font-size: .95rem; }
.site-header li a { position: relative; padding-block: .3rem; }
.site-header li:not(:last-child) a::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease); }
.site-header li:not(:last-child) a:hover::after { transform: scaleX(1); }
.nav-cta { border: 1px solid var(--ink); padding: .5rem 1.2rem !important; transition: background .4s var(--ease), color .4s var(--ease); }
.nav-cta:hover { background: var(--ink); color: var(--paper); }

.btn { display: inline-block; cursor: pointer; border: 0; background: var(--ink); color: var(--paper); font: 400 1rem var(--sans); padding: 1rem 2.2rem; transition: background .4s var(--ease); will-change: transform; }
.btn:hover { background: var(--brass-d); }
.link { display: inline-flex; gap: .5rem; align-items: center; border-bottom: 1px solid var(--line); padding-block: .3rem; transition: border-color .4s; }
.link:hover { border-color: var(--ink); }
.link span { transition: transform .5s var(--ease); }
.link:hover span { transform: translateX(-6px); }

/* HERO */
.hero {
  position: relative; height: 100svh; min-height: 640px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: 7rem var(--pad) 5rem;
  background:
    radial-gradient(60% 50% at 15% 85%, rgba(169, 139, 91, .18), transparent 70%),
    radial-gradient(40% 40% at 90% 10%, rgba(22, 35, 31, .06), transparent 70%);
}
.hero-art { position: absolute; inset-inline-end: 1%; top: 50%; width: min(60vw, 860px); transform: translateY(-48%); color: var(--brass-d); opacity: .65; transform-origin: 50% 80%; will-change: transform; }
.hero-copy { position: relative; z-index: 2; }
.hero-title { font-size: clamp(3rem, 9.5vw, 8.5rem); font-weight: 300; max-width: 14ch; margin-bottom: 2rem; }
.line { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.line > span { display: block; }
.hero-sub { max-width: 36ch; font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--muted); margin-bottom: 2.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2rem; }
.hero-meta { position: absolute; z-index: 2; inset-inline: var(--pad); bottom: 2rem; display: flex; justify-content: space-between; font-size: .8rem; letter-spacing: .2em; color: var(--muted); pointer-events: none; }
.hero-scroll { position: absolute; z-index: 2; bottom: 2rem; inset-inline-start: 50%; translate: 50% 0; display: grid; justify-items: center; gap: .6rem; font-size: .75rem; letter-spacing: .25em; color: var(--muted); }
.hero-scroll i { display: block; width: 1px; height: 3rem; background: linear-gradient(var(--brass), transparent); animation: drip 2.4s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.hero-veil { position: absolute; inset: 0; z-index: 3; background: var(--ink); opacity: 0; pointer-events: none; }

/* STATEMENT */
.statement { min-height: 100svh; background: var(--ink); color: var(--paper); display: grid; place-items: center; padding: var(--section) var(--pad); }
.statement-text { font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 5.4vw, 5rem); line-height: 1.22; max-width: 20em; }
.statement-text .w { display: inline-block; will-change: opacity; }

/* MARQUEE */
.marquee { background: var(--brass); color: var(--ink); overflow: hidden; padding-block: clamp(1rem, 2.5vw, 2rem); }
.m-track { display: flex; align-items: center; gap: clamp(1.5rem, 4vw, 4rem); width: max-content; font-family: var(--serif); font-weight: 300; font-size: clamp(2.4rem, 7vw, 6.5rem); line-height: 1; white-space: nowrap; will-change: transform; }
.m-track i { font-style: normal; font-size: .4em; opacity: .6; }

/* STATS */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--pad); padding: var(--section) var(--pad); }
.stat { text-align: center; will-change: transform; }
.stat strong { display: block; direction: ltr; unicode-bidi: isolate; font-family: var(--serif); font-weight: 300; font-size: clamp(3rem, 9vw, 8rem); line-height: 1; margin-bottom: .8rem; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); }
.stat:nth-child(2) strong { color: var(--brass-d); }

/* AREAS: static layout by default, horizontal when .is-h */
.hscroll { background: var(--paper-2); padding: var(--section) var(--pad); }
.h-track { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.h-intro { grid-column: 1 / -1; margin-bottom: 2rem; }
.h-intro h2 { font-size: clamp(2.4rem, 6vw, 5.5rem); font-weight: 300; max-width: 12ch; }
.h-hint, .h-ui { display: none; }
.h-card { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); padding: clamp(1.5rem, 3vw, 3rem); display: flex; flex-direction: column; justify-content: flex-end; gap: 1.5rem; min-height: 26rem; }
.h-card.is-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.h-num { position: absolute; top: .5rem; inset-inline-end: 1.5rem; font-family: var(--serif); font-weight: 300; font-size: clamp(7rem, 16vw, 15rem); line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--brass); opacity: .8; will-change: transform; }
.h-card h3 { font-size: clamp(1.8rem, 3vw, 2.8rem); margin-bottom: .8rem; }
.h-card p { color: var(--muted); max-width: 38ch; }
.h-card.is-dark p { color: rgba(244, 240, 232, .72); }
.h-card ul { margin-top: 1.2rem; border-top: 1px solid var(--line); }
.h-card.is-dark ul { border-color: rgba(244, 240, 232, .2); }
.h-card li { padding: .6rem 0; border-bottom: 1px solid var(--line); display: flex; gap: .8rem; align-items: center; font-size: .95rem; }
.h-card.is-dark li { border-color: rgba(244, 240, 232, .2); }
.h-card li::before { content: ""; width: .4rem; height: .4rem; background: var(--brass); transform: rotate(45deg); flex: none; }

.hscroll.is-h { height: 100svh; padding: 0; overflow: hidden; position: relative; }
.is-h .h-track { display: flex; width: max-content; height: 100%; gap: clamp(1rem, 2vw, 2rem); padding: 7rem var(--pad) 6.5rem; align-items: stretch; will-change: transform; }
.is-h .h-intro { grid-column: auto; width: min(34vw, 30rem); margin: 0; display: flex; flex-direction: column; justify-content: center; flex: none; }
.is-h .h-card { flex: none; width: clamp(340px, 46vw, 680px); min-height: 0; }
.is-h .h-hint { display: block; margin-top: 2rem; color: var(--muted); font-size: .9rem; letter-spacing: .12em; }
.is-h .h-hint span { display: inline-block; animation: nudge 1.8s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateX(-8px); } }
.is-h .h-ui { display: flex; align-items: center; gap: 1rem; position: absolute; inset-inline: var(--pad); bottom: 2.2rem; font-family: var(--serif); font-variant-numeric: tabular-nums; color: var(--muted); }
.h-progress { flex: 1; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.h-progress i { position: absolute; inset: 0; background: var(--brass-d); transform-origin: right; transform: scaleX(0); }

/* PROCESS: stacked list by default, pinned swap when .is-pinned */
.process { background: var(--ink); color: var(--paper); padding: var(--section) var(--pad); display: grid; gap: clamp(3rem, 7vw, 6rem); }
.process .eyebrow { color: var(--brass); }
.process-head h2 { font-size: clamp(2.2rem, 5vw, 4.4rem); font-weight: 300; max-width: 12ch; }
.p-nav { display: none; }
.steps { display: grid; gap: 2.5rem; max-width: 36rem; }
.pstep { display: grid; gap: .5rem; border-top: 1px solid rgba(244, 240, 232, .18); padding-top: 1.2rem; }
.p-big { font-family: var(--serif); font-weight: 300; font-size: 2.4rem; color: var(--brass); line-height: 1; }
.pstep h3 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.pstep p { color: rgba(244, 240, 232, .72); max-width: 40ch; }

.process.is-pinned { height: 100svh; grid-template-columns: 1fr 1.2fr; align-items: center; padding-block: 6rem; }
.is-pinned .steps { position: relative; height: min(66svh, 34rem); max-width: none; display: block; }
.is-pinned .pstep { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 1rem; border: 0; padding: 0; }
.is-pinned .p-big { position: absolute; top: 0; inset-inline-start: 0; font-size: clamp(8rem, 17vw, 16rem); color: transparent; -webkit-text-stroke: 1px var(--brass); opacity: .7; z-index: 0; }
.is-pinned .pstep h3, .is-pinned .pstep p { position: relative; z-index: 1; }
.is-pinned .pstep h3 { font-size: clamp(2.2rem, 4.2vw, 4rem); }
.is-pinned .pstep p { font-size: 1.15rem; }
.is-pinned .p-nav { display: grid; gap: .8rem; margin-top: 3rem; position: relative; padding-inline-start: 1.6rem; color: rgba(244, 240, 232, .4); font-size: .95rem; }
.p-nav::before, .p-nav::after { content: ""; position: absolute; inset-inline-start: 0; top: .6rem; bottom: .6rem; width: 1px; }
.p-nav::before { background: rgba(244, 240, 232, .18); }
.p-nav::after { background: var(--brass); transform-origin: top; transform: scaleY(var(--p, 0)); }
.p-nav li { transition: color .5s var(--ease); }
.p-nav li.is-on { color: var(--paper); }

/* VOICE */
.voice { background: var(--paper); margin-top: -1px; }
.voice-card { background: var(--ink); color: var(--paper); min-height: 100svh; display: grid; place-items: center; padding: var(--section) var(--pad); will-change: clip-path; }
.voice blockquote { margin: 0; max-width: 56rem; text-align: center; }
.voice blockquote p { font-family: var(--serif); font-weight: 300; font-size: clamp(1.9rem, 4.6vw, 3.8rem); line-height: 1.25; }
.voice blockquote .w { display: inline-block; }
.voice footer { margin-top: 2rem; color: var(--brass); font-size: .95rem; }
.voice footer small { opacity: .7; }

/* CONTACT */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); padding: var(--section) var(--pad); }
.contact h2 { font-size: clamp(2.8rem, 7vw, 6rem); font-weight: 300; margin-bottom: 1.2rem; }
.contact-intro > p:not(.eyebrow) { color: var(--muted); max-width: 34ch; }
.details { margin: 2.5rem 0 0; display: grid; gap: 1.2rem; }
.details div { border-top: 1px solid var(--line); padding-top: .8rem; }
.details dt { font-size: .8rem; letter-spacing: .15em; color: var(--brass-d); }
.details dd { margin: 0; }
.form { display: grid; gap: 1.4rem; align-content: start; }
.form label { display: grid; gap: .4rem; font-size: .9rem; color: var(--muted); }
.form input, .form select, .form textarea { font: 300 1.0625rem var(--sans); color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--ink); padding: .6rem 0; border-radius: 0; width: 100%; transition: border-color .3s; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 0; border-color: var(--brass); box-shadow: 0 1px 0 var(--brass); }
.form input[aria-invalid="true"] { border-color: #A33; }
.form .btn { justify-self: start; }
.form-note { min-height: 1.5em; color: var(--brass-d); }

/* FOOTER */
.site-footer { background: var(--ink); color: rgba(244, 240, 232, .6); padding: clamp(3rem, 8vw, 7rem) var(--pad) 2rem; overflow: hidden; font-size: .85rem; }
.wordmark { overflow: hidden; line-height: .85; margin-bottom: 2rem; }
.wordmark span { display: block; font-family: var(--serif); font-weight: 300; font-size: clamp(6rem, 26vw, 24rem); color: var(--paper); text-align: center; white-space: nowrap; }

/* mobile / tablet */
@media (max-width: 860px) {
  .site-header li:not(:last-child) { display: none; }
  .hero { padding-top: 6rem; justify-content: flex-start; padding-top: 7rem; }
  .hero-art { width: 120vw; inset-inline-end: -30vw; top: auto; bottom: 4rem; transform: none; opacity: .4; }
  .hero-scroll { display: none; }
  .h-track { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; gap: 3rem; }
  .contact { grid-template-columns: 1fr; }
}

.motion-toggle { position: fixed; z-index: 130; bottom: 4.6rem; inset-inline-start: 1rem; font: 400 .8rem var(--sans); background: var(--paper); color: var(--ink); border: 1px solid var(--ink); padding: .5rem 1rem; cursor: pointer; }
.motion-toggle[hidden] { display: none; }
.motion-toggle:hover { background: var(--ink); color: var(--paper); }

/* honour the OS setting unless the visitor opted in (JS adds .motion-on) */
@media (prefers-reduced-motion: reduce) {
  html:not(.motion-on) { scroll-behavior: auto; }
  html:not(.motion-on) *, html:not(.motion-on) *::before, html:not(.motion-on) *::after { transition-duration: .01ms !important; animation: none !important; }
  html:not(.motion-on) .loader { display: none; }
}

/* a11y: contrast-safe small text */
:root { --brass-t: #6B5330; }
.eyebrow { color: var(--brass-t); }
.process .eyebrow { color: var(--brass); }
.voice footer small { opacity: 1; }
.p-nav { color: rgba(244, 240, 232, .62) !important; }
.details dt { color: var(--brass-t); }
