/* ---------- tokens ----------
   Scene: 7 a.m. after a night shift. White walls, pale blue sky,
   cool morning light. Light theme. OKLCH only; hue anchored 233-245. */
:root {
  --bg:     oklch(98.5% 0.007 235);  /* morning-lit white  */
  --ink:    oklch(27% 0.02 245);     /* pre-dawn blue-gray */
  --muted:  oklch(47% 0.02 240);     /* overcast blue-gray */
  --accent: oklch(50% 0.14 242);     /* the one saturated: clear-sky blue */

  /* quiet surfaces derived from the four tokens */
  --bg-deep:     oklch(94.5% 0.018 233);  /* pale-sky band      */
  --ink-deep:    oklch(30% 0.02 245);     /* dusk-blue gallery  */
  --accent-tint: oklch(88% 0.05 235);     /* sky tint on dark   */
  --line:        oklch(27% 0.02 245 / .13);

  --nav-h: 92px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --pad: clamp(20px, 5vw, 72px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
/* While Lenis drives scrolling it must not fight CSS smooth-scroll (Lenis recommended CSS) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- header: brand on top, toolbar beneath ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px var(--pad) 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--serif); font-size: 1.35rem; letter-spacing: .01em;
  text-decoration: none;
}
.brand span { color: var(--accent); }

.site-nav ul { list-style: none; display: flex; gap: clamp(10px, 2.5vw, 34px); }
.nav-item { position: relative; }
.nav-link {
  font: 500 .86rem/1 var(--sans); letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; background: none; border: 0;
  padding: 8px 2px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.nav-link:hover { color: var(--accent); }
.nav-link[aria-current="page"], .has-menu.current > button { color: var(--accent); }
.nav-link .caret { font-size: .62rem; translate: 0 1px; }

.menu {
  position: absolute; top: 100%; left: 50%; min-width: 200px;
  background: oklch(99.2% 0.004 235);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 18px 40px oklch(27% 0.02 245 / .12);
  padding: 8px; list-style: none;
  opacity: 0; visibility: hidden; translate: -50% 8px;
  transition: opacity .18s ease, translate .18s ease, visibility .18s;
}
.has-menu:hover .menu,
.has-menu.open .menu { opacity: 1; visibility: visible; translate: -50% 0; }
.menu a {
  display: block; padding: 10px 12px; border-radius: 7px;
  font: 500 .88rem/1.3 var(--sans); text-decoration: none;
}
.menu a:hover { background: var(--bg-deep); color: var(--accent); }
.menu a[aria-current="page"] { color: var(--accent); }

/* ---------- shared section chrome ---------- */
section { padding: clamp(72px, 12vh, 140px) var(--pad); }
.eyebrow {
  font: 600 .75rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}

/* subpages have no full-bleed hero, so clear the fixed header */
body.subpage main { padding-top: var(--nav-h); }
.page-title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 28px; }

/* ---------- media placeholders ---------- */
.ph {
  position: relative; overflow: hidden; border-radius: 14px;
  border: 1.5px dashed oklch(27% 0.02 245 / .35);
  background:
    repeating-linear-gradient(45deg, oklch(27% 0.02 245 / .045) 0 14px, transparent 14px 28px),
    var(--bg-deep);
  display: grid; place-items: center; text-align: center;
  color: var(--muted); padding: 18px;
}
.ph strong { display: block; font: 600 .8rem/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.ph em { font: 400 .78rem/1.5 var(--sans); font-style: normal; }
.ph-16x9 { aspect-ratio: 16 / 9; }
.ph-4x3 { aspect-ratio: 4 / 3; }
.ph-3x4 { aspect-ratio: 3 / 4; }
.ph-tall { min-height: 46vh; }

/* ---------- media frames & captions ---------- */
figure { display: block; }
.media-frame { overflow: hidden; border-radius: 14px; }
.media-frame img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.caption {
  margin-top: 12px;
  font: 500 .85rem/1.5 var(--sans); color: var(--muted);
}
.caption em { color: var(--accent); font-style: normal; font-weight: 600; }

/* ---------- hero (push-through) ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; align-items: end;
  padding: calc(var(--nav-h) + 24px) var(--pad) clamp(48px, 9vh, 96px);
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0; z-index: 0;
  will-change: transform;
}
.hero-media .ph {
  position: absolute; inset: 0; border-radius: 0; border: 0;
  background:
    linear-gradient(180deg, oklch(24% 0.03 245 / .5) 0%, oklch(22% 0.03 245 / .78) 100%),
    repeating-linear-gradient(45deg, oklch(27% 0.02 245 / .06) 0 14px, transparent 14px 28px),
    oklch(80% 0.025 235);
}
.hero-media .ph strong, .hero-media .ph em { color: oklch(98.5% 0.006 235); }
.hero-content { position: relative; z-index: 1; color: oklch(98.5% 0.006 235); max-width: 30ch; }
.hero-content h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); margin: 14px 0 18px; }
.hero-content .eyebrow { color: var(--accent-tint); }
.hero-content p { font-size: clamp(1rem, 1.4vw, 1.15rem); max-width: 44ch; }

/* ---------- thesis ---------- */
.thesis { background: var(--bg); text-align: center; }
.thesis .thesis-line {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.7rem, 4.2vw, 3.1rem); line-height: 1.25;
  max-width: 24ch; margin: 0 auto;
}
.thesis .thesis-line em { color: var(--accent); font-style: normal; }

/* ---------- feature blocks ---------- */
.feature {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 72px); align-items: center;
}
.feature + .feature { padding-top: 0; }
.feature.flip .feature-media { order: -1; }
.feature h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); margin-bottom: 16px; }
.feature p { color: var(--muted); max-width: 46ch; }

/* ---------- gallery collage ---------- */
.gallery { background: var(--ink-deep); color: oklch(96% 0.008 235); }
.collage {
  display: grid; grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: clamp(150px, 22vw, 300px);
  gap: clamp(14px, 2vw, 24px);
}
.collage .ph { height: 100%; }
.collage .span-2 { grid-column: span 2; }
.collage .span-r2 { grid-row: span 2; }
.gallery .ph {
  border-color: oklch(96% 0.008 235 / .4);
  background:
    repeating-linear-gradient(45deg, oklch(96% 0.008 235 / .05) 0 14px, transparent 14px 28px),
    oklch(35% 0.022 243);
  color: oklch(85% 0.012 238);
}
.gallery .ph strong { color: oklch(96% 0.008 235); }
.gallery .caption { color: oklch(85% 0.012 238); }
.gallery .caption em { color: var(--accent-tint); }

/* ---------- detail rows ---------- */
.detail-row {
  display: grid; grid-template-columns: 64px 1fr 2fr; gap: clamp(14px, 3vw, 40px);
  align-items: baseline; padding: 26px 0; border-top: 1px solid var(--line);
}
.detail-row:last-child { border-bottom: 1px solid var(--line); }
.detail-num { font-family: var(--serif); color: var(--accent); font-size: 1.1rem; }
.detail-row h3 { font-size: 1.25rem; }
.detail-row p { color: var(--muted); font-size: .95rem; max-width: 52ch; }

/* ---------- CTA ---------- */
.cta { background: var(--bg-deep); text-align: center; }
.cta .cta-line {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.5rem, 3.2vw, 2.4rem); line-height: 1.3;
  max-width: 26ch; margin: 0 auto 30px;
}
.btn {
  display: inline-block; padding: 16px 34px; border-radius: 999px;
  background: var(--accent); color: oklch(98.5% 0.007 235); text-decoration: none;
  font: 600 .9rem/1 var(--sans); letter-spacing: .05em; text-transform: uppercase;
  transition: background .2s ease, transform .2s ease;
}
.btn:hover { background: oklch(43% 0.13 242); transform: translateY(-2px); }

/* ---------- placeholder page grids ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 24px); margin-top: 24px; }

/* ---------- footer ---------- */
.site-footer {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  padding: 28px var(--pad); border-top: 1px solid var(--line);
  font-size: .82rem; color: var(--muted);
}

/* ---------- responsive ---------- */
@media (max-width: 840px) {
  :root { --nav-h: 118px; }
  .site-nav ul { flex-wrap: wrap; justify-content: center; row-gap: 2px; }
  .nav-link { font-size: .78rem; }
  .feature, .card-grid { grid-template-columns: 1fr; }
  .collage { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(130px, 30vw, 200px); }
  .feature.flip .feature-media { order: 0; }
  .detail-row { grid-template-columns: 44px 1fr; }
  .detail-row p { grid-column: 2; }
}

/* ---------- motion safety ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; }
}
