:root {
  --shadow: #0e0f0d; --charcoal: #1b1c1a; --concrete: #8a8781; --label: #a6a299;
  --limestone: #d9d2c3; --forest: #243b2a; --moss: #5f7a3a;
  --lichen: #a8b36b; --sun: #f2c47e; --verdigris: #7fc8a9;
  --display: 'Fraunces Variable', serif; --body: 'Instrument Sans Variable', sans-serif;
  --instrument: 'Martian Mono', monospace;
  --gutter: clamp(24px, 5.5vw, 100px); color-scheme: dark;
}
* { box-sizing: border-box; }
/* Header belongs to arrival; native anchors align to the measured scene boundary. */
html { scroll-padding-top: 0; }
body { margin: 0; background: var(--charcoal); color: var(--limestone); font-family: var(--body); font-size: 18px; line-height: 1.6; }
a { color: inherit; text-decoration-color: var(--verdigris); text-underline-offset: .35em; }
a:hover { color: var(--verdigris); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--verdigris); outline-offset: 6px; }
::selection { color: var(--shadow); background: var(--verdigris); }
.skip-link { position: fixed; z-index: 20; left: var(--gutter); top: 12px; transform: translateY(-160%); background: var(--limestone); color: var(--shadow); padding: 12px 20px; }
.skip-link:focus { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.og-capture .site-header, .og-capture .placeholder-badge, .og-capture .arrival-axis, .og-capture .skip-link { display: none; }
#scene-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.3s ease; }
.scene-ready #scene-canvas { opacity: 1; }
.site-header { position: absolute; z-index: 5; top: 0; left: 0; width: 100%; display: flex; gap: 32px; align-items: center; padding: max(28px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 24px max(var(--gutter), env(safe-area-inset-left)); font: 10px/1.5 var(--instrument); letter-spacing: .045em; }
.wordmark { text-transform: uppercase; text-decoration: none; margin-right: auto; white-space: nowrap; }
.wordmark span { margin-left: 20px; color: var(--concrete); }
.site-header nav { display: flex; gap: 22px; }
.site-header nav a { text-decoration: none; padding: 8px 0; }
.site-header nav a[aria-current="location"] { color: var(--verdigris); text-decoration: underline; }
#motion-toggle { display: flex; gap: 9px; align-items: center; min-height: 44px; border: 1px solid #8a87815c; border-radius: 0; padding: 9px 12px; background: #0e0f0d80; color: var(--limestone); cursor: pointer; font: inherit; }
.motion-indicator { width: 5px; height: 5px; border: 1px solid currentColor; border-radius: 50%; }
#motion-toggle[aria-pressed='true'] { border-color: var(--verdigris); }
#motion-toggle[aria-pressed='true'] .motion-indicator { background: var(--verdigris); border-color: var(--verdigris); }
main { position: relative; z-index: 1; }
section { position: relative; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
.arrival { min-height: 100svh; overflow: hidden; display: flex; align-items: center; isolation: isolate; }
/* Keep the accepted text scrim; let lower-corner vegetation emerge below it. */
.arrival::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(90deg, #0e0f0df5 0%, #0e0f0de8 32%, #0e0f0db0 45%, #0e0f0d20 64%, transparent 78%); mask-image: linear-gradient(#000 78%, #0005 100%); }
.arrival-copy { position: relative; z-index: 1; }
.arrival-art { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(ellipse at 65% 90%, #243b2a88, transparent 46%), linear-gradient(117deg, #0e0f0d 2%, #35382c 35%, #9c8e6642 47%, #1b1c1a 65%); transition: opacity 1.4s ease; }
.arrival-art::before { content: ''; position: absolute; inset: -30%; background: linear-gradient(115deg, transparent 43%, #f2c47e15 46%, #f2c47e06 53%, transparent 56%); }
.arrival-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, var(--shadow), transparent 35%), radial-gradient(ellipse at 110% 100%, var(--forest), transparent 50%); }
.monolith-silhouette { height: 126%; width: 66%; position: absolute; right: -7%; bottom: -11%; filter: drop-shadow(-20px 25px 28px #0007); }
.scene-ready .arrival-art { opacity: 0; }
.arrival-copy { padding: 150px 0 max(130px, env(safe-area-inset-bottom)); width: min(650px, 61vw); }
.eyebrow { font: 10px/1.8 var(--instrument); letter-spacing: .13em; text-transform: uppercase; margin: 0 0 26px; }
.survey-mark { font-size: 18px; margin-right: 14px; font-weight: 400; }
h1, h2, h3 { font-family: var(--display); font-weight: 650; font-variation-settings: 'SOFT' 35, 'WONK' 1; line-height: .99; letter-spacing: -.055em; text-wrap: balance; }
h1 { font-size: clamp(66px, 8.5vw, 138px); max-width: 8ch; margin: 22px 0 32px; }
h2 { font-size: clamp(46px, 5.3vw, 84px); margin: 0 0 30px; }
h3 { font-size: clamp(40px, 4vw, 62px); overflow-wrap: anywhere; margin: 24px 0; }
.intro { max-width: 28ch; font-size: 18px; }
.placeholder-badge { display: inline-block; font: 8px/1.4 var(--instrument); letter-spacing: .09em; padding: 4px 7px; border: 1px dashed #d9d2c36b; color: var(--limestone); background: #0e0f0d99; }
.entry-link { display: flex; align-items: center; gap: 48px; width: fit-content; margin-top: 40px; font-size: 15px; text-decoration: none; border-bottom: 1px solid var(--verdigris); padding-bottom: 9px; }
.entry-link span { font-size: 25px; }
.arrival-axis { position: absolute; bottom: 35px; left: var(--gutter); font: 9px var(--instrument); letter-spacing: .15em; }
.arrival-axis span { margin-left: 45px; }
.threshold { min-height: 135svh; padding-top: 30svh; background: linear-gradient(90deg, #0e0f0dab, transparent 78%); }
.section-copy { max-width: 540px; }
.section-copy > p:not(.eyebrow) { max-width: 34ch; }
.work { padding-top: 15svh; background: linear-gradient(90deg, #0e0f0d9c, transparent 80%); }
.work-heading { max-width: 600px; margin-bottom: 15svh; }
.project-stage { min-height: 220svh; position: relative; padding-bottom: 25svh; }
.project-card { position: sticky; top: max(8svh, 55px); width: min(560px, 100%); padding: 30px 32px 34px; border-top: 1px solid var(--concrete); border-left: 1px solid #8a878140; background: linear-gradient(115deg, #1b1c1af5, #0e0f0dda); box-shadow: 20px 25px 90px #0e0f0d66; }
.project-card .eyebrow { margin-bottom: 18px; }
.project-role { font-size: 13px; color: var(--limestone); }
.project-role span { font: 9px var(--instrument); color: var(--label); margin-right: 12px; text-transform: uppercase; }
.project-summary { font-size: 17px; line-height: 1.65; }
.stack { display: flex; flex-wrap: wrap; gap: 7px 16px; list-style: none; padding: 16px 0 0; margin: 24px 0; border-top: 1px solid #8a878133; font: 9px/1.7 var(--instrument); }
.project-links { font-size: 14px; }
.project-links, .closing-links { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.project-links a, .closing-links a { display: inline-flex; align-items: baseline; gap: .55em; }
.empty-work { min-height: 60svh; }
.resolution { padding-bottom: max(40px, env(safe-area-inset-bottom)); min-height: 130svh; display: flex; align-items: center; background: linear-gradient(90deg, #0e0f0db8, transparent), linear-gradient(0deg, #243b2a5e, transparent); }
.closing-links { margin-top: 42px; font-size: 16px; }
.error-page { padding: 15vh var(--gutter); max-width: 900px; }
.error-page h1 { font-size: clamp(45px, 8vw, 90px); max-width: 15ch; }
.no-webgl #scene-canvas { display: none; }
.no-webgl .arrival-art { opacity: 1; }
.no-webgl .threshold, .no-webgl .work { background: radial-gradient(ellipse at 85% 40%, #243b2a55, transparent 65%), linear-gradient(110deg, var(--shadow), var(--charcoal)); }
.reduced-motion *, .reduced-motion *::before, .reduced-motion *::after { transition: none !important; animation: none !important; }
@media (max-width: 760px) {
  :root { --gutter: 24px; }
  .site-header { flex-wrap: wrap; gap: 12px 16px; padding-top: max(18px, env(safe-area-inset-top)); }
  .site-header nav { order: 3; width: 100%; justify-content: space-between; gap: 10px; font-size: 9px; }
  .wordmark { font-size: 9px; }
  .wordmark span { display: none; }
  #motion-toggle { font-size: 8px; padding: 8px; }
  .arrival { align-items: flex-end; }
  .arrival::before { display: none; }
  .arrival-copy { width: 100%; padding-top: 210px; padding-bottom: max(105px, env(safe-area-inset-bottom)); }
  h1 { font-size: clamp(64px, 16vw, 100px); max-width: 7.5ch; }
  .arrival-art { background: radial-gradient(ellipse at 85% 35%, #736b494f, transparent 60%), var(--shadow); }
  .monolith-silhouette { width: 125%; height: 116%; right: -49%; bottom: 4%; opacity: .82; }
  .arrival { background: linear-gradient(0deg, #0e0f0d 3%, #0e0f0df0 36%, #0e0f0db8 57%, #0e0f0d25 82%, transparent); }
  .intro { font-size: 16px; }
  .threshold { padding-top: 33svh; }
  .project-card { top: 5svh; padding: 24px 22px 28px; }
  /* Reserve the upper frame for the niche. Overflow remains keyboard/ touch
     scrollable; without WebGL the full article stays in normal document flow. */
  .scene-ready .project-card {
    top: 45svh; max-height: 55svh; overflow-y: auto;
    padding: 18px 20px max(20px, env(safe-area-inset-bottom));
    scrollbar-color: var(--concrete) var(--charcoal);
  }
  .scene-ready .project-card .eyebrow { margin-bottom: 12px; }
  .scene-ready .project-card h3 { font-size: 36px; margin: 14px 0; }
  .scene-ready .project-card .stack { margin: 16px 0; padding-top: 12px; }
  .project-summary { font-size: 16px; }
  .project-role { font-size: 12px; }
  .section-copy { max-width: 90%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
