/* ============================================================
   grainframe — design system
   ============================================================ */

:root {
  --bg: #0e0e0e;
  --bg-2: #161513;
  --bg-3: #1c1a17;
  --fg: #f2eee6;
  --fg-2: #d8d2c5;
  --mid: #7a7670;
  --mid-2: #4a4742;
  --accent: #c9a86a;
  --accent-2: #8a7350;
  --line: rgba(242, 238, 230, 0.10);
  --line-strong: rgba(242, 238, 230, 0.22);

  --font-display: "Instrument Serif", "EB Garamond", Georgia, serif;
  --font-body: "Geist", "Inter Tight", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --maxw: 1480px;
  --gutter: clamp(20px, 4vw, 64px);
  --grid-density: 1;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}

body {
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* ---------- Grain overlay ---------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- Typography ---------- */
.display, h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.95;
  text-wrap: balance;
}

h1 { font-size: clamp(56px, 9vw, 168px); margin: 0; }
h2 { font-size: clamp(40px, 6vw, 96px); margin: 0; }
h3 { font-size: clamp(28px, 3.4vw, 56px); margin: 0; }

.italic { font-style: italic; }

.mono, .meta, .eyebrow, .caption {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--mid);
}

.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
  transform: translateY(-1px);
}

.lead {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 36px);
  line-height: 1.25;
  color: var(--fg-2);
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

p { text-wrap: pretty; }

a { color: inherit; text-decoration: none; }

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding: clamp(80px, 12vh, 160px) 0;
  position: relative;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
}

.row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: clamp(24px, 3vw, 48px);
}

@media (max-width: 840px) {
  .row, .row-3 { grid-template-columns: 1fr; }
}

.stack-sm > * + * { margin-top: 12px; }
.stack-md > * + * { margin-top: 24px; }
.stack-lg > * + * { margin-top: 48px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  mix-blend-mode: difference;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }

.nav__brand {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
  color: #fff;
}

.nav__links {
  display: flex;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.nav__links a {
  position: relative;
  transition: opacity .3s var(--ease-out);
}
.nav__links a:hover { opacity: 0.55; }
.nav__links a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -10px; top: 50%;
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateY(-50%);
}

.nav__cta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 10px 18px;
  border-radius: 999px;
  transition: background .3s var(--ease-out), color .3s var(--ease-out);
}
.nav__cta:hover {
  background: #fff;
  color: #000;
}

@media (max-width: 720px) {
  .nav__links { display: none; }
}

/* ---------- Buttons / links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: background .3s var(--ease-out), color .3s var(--ease-out), border-color .3s var(--ease-out), transform .4s var(--ease-out);
}
.btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1411;
}
.btn--accent:hover { background: var(--fg); color: #000; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  padding: 8px 0;
  border-bottom: 1px solid var(--line-strong);
  transition: color .3s var(--ease-out), gap .4s var(--ease-out);
}
.link-arrow:hover { gap: 18px; color: var(--accent); }
.link-arrow svg { width: 14px; height: 14px; }

/* ---------- Footer ---------- */
.footer {
  padding: 80px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  position: relative;
}

.footer__big {
  font-family: var(--font-display);
  font-size: clamp(80px, 16vw, 280px);
  line-height: 0.88;
  letter-spacing: -0.03em;
  margin: 0 0 60px;
  color: var(--fg);
}

.footer__big .accent { color: var(--accent); font-style: italic; }

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.footer__col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
  margin: 0 0 16px;
  font-weight: 400;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; }
.footer__col li { margin-bottom: 8px; font-size: 15px; }
.footer__col a:hover { color: var(--accent); }

.footer__base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mid);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 840px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__base { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ---------- Placeholder media (no real photos available) ---------- */
.media {
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: block;
  isolation: isolate;
}

.media__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  transition: transform 1.4s var(--ease-out);
  z-index: 2;
}

/* Real photo inside .media */
.media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 1.6s var(--ease-out), filter .6s var(--ease-out);
  filter: saturate(1.02) contrast(1.02);
}
.media:hover > img { transform: scale(1.04); }

/* Soft bottom-gradient so labels stay legible over any photo */
.media[data-photo]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 0%, transparent 55%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

.media__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 238, 230, 0.7);
  z-index: 2;
}

.media__corner {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(242, 238, 230, 0.5);
  z-index: 2;
}

.media__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.media__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(242, 238, 230, 0.04) 0 2px,
      transparent 2px 12px
    );
}

.media[data-tone="warm"] .media__bg {
  background: linear-gradient(160deg, #2a2118 0%, #3d2e20 50%, #1c1410 100%);
}
.media[data-tone="cool"] .media__bg {
  background: linear-gradient(160deg, #1a2028 0%, #252e38 50%, #11161c 100%);
}
.media[data-tone="neutral"] .media__bg {
  background: linear-gradient(160deg, #1f1d1a 0%, #2e2b26 50%, #14130f 100%);
}
.media[data-tone="gold"] .media__bg {
  background: linear-gradient(160deg, #3a2e1c 0%, #5a4628 50%, #1c1610 100%);
}
.media[data-tone="charcoal"] .media__bg {
  background: linear-gradient(160deg, #181818 0%, #252525 50%, #0a0a0a 100%);
}

/* center crosshair-style hint */
.media__bg::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 24px; height: 24px;
  transform: translate(-50%, -50%);
  background:
    linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat,
    linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
  color: rgba(242, 238, 230, 0.18);
}

.media[data-video]::before {
  content: "REC ⏺";
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.media:hover .media__inner { transform: scale(1.03); }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .40s; }

/* Split line reveal for headlines */
.split-line {
  display: block;
  /* overflow:hidden masks the slide-up reveal, but with the tight display
     line-height it also permanently clips serif ascenders/descenders
     (italic y/p/g). overflow:clip + clip-margin lets glyphs paint past the
     box without affecting layout, while still masking the reveal (the span
     starts translated ~1.1em away, far beyond the 0.3em margin). */
  overflow: hidden;
  overflow: clip;
  overflow-clip-margin: 0.3em;
}
.split-line > span {
  display: block;
  transform: translateY(110%);
  transition: transform 1.4s var(--ease-out);
}
.reveal.in .split-line > span,
.split-line.in > span { transform: translateY(0); }
.split-line[data-delay="1"] > span { transition-delay: .1s; }
.split-line[data-delay="2"] > span { transition-delay: .2s; }
.split-line[data-delay="3"] > span { transition-delay: .3s; }
.split-line[data-delay="4"] > span { transition-delay: .4s; }

/* ---------- Page transition ---------- */
.page-curtain {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9000;
  pointer-events: none;
  transform: translateY(100%);
  transition: transform .8s var(--ease-in-out);
}
.page-curtain.in { transform: translateY(0); }
.page-curtain.out { transform: translateY(-100%); transition-duration: .9s; }
.page-curtain__label {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(60px, 10vw, 160px);
  color: var(--fg);
  font-style: italic;
  letter-spacing: -0.02em;
}

/* ---------- Marquee ---------- */
.marquee {
  display: flex;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  gap: 60px;
  white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  gap: 60px;
  animation: scroll-x 38s linear infinite;
  flex-shrink: 0;
  padding-right: 60px;
}
.marquee__item {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 56px);
  letter-spacing: -0.02em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 60px;
  color: var(--fg);
}
.marquee__item::after {
  content: "✦";
  color: var(--accent);
  font-size: 0.5em;
}
@keyframes scroll-x {
  to { transform: translateX(-50%); }
}

/* ---------- Logo (variants controlled via [data-logo]) ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.logo__mark { display: none; }
.logo__word {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* v1 — pure wordmark */
[data-logo="wordmark"] .logo__word { font-style: normal; }

/* v2 — split: 'grain' serif italic + 'frame' mono */
[data-logo="split"] .logo__word { display: none; }
[data-logo="split"] .logo__split { display: inline-flex; align-items: baseline; gap: 2px; }
[data-logo="split"] .logo__split .a {
  font-family: var(--font-display);
  font-style: italic;
}
[data-logo="split"] .logo__split .b {
  font-family: var(--font-mono);
  font-size: 0.6em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  align-self: center;
  border-left: 1px solid currentColor;
  padding-left: 10px;
  margin-left: 8px;
  opacity: 0.75;
}

/* v3 — gf monogram in frame */
[data-logo="monogram"] .logo__mark {
  display: inline-flex;
  width: 1em; height: 1em;
  border: 1px solid currentColor;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.9em;
  font-style: italic;
}
[data-logo="monogram"] .logo__mark::before { content: "gf"; line-height: 1; }

/* v4 — bracketed wordmark, like a film frame */
[data-logo="bracket"] .logo__word::before { content: "["; color: var(--accent); margin-right: 0.08em; font-style: normal; }
[data-logo="bracket"] .logo__word::after { content: "]"; color: var(--accent); margin-left: 0.08em; font-style: normal; }

/* v5 — period mark (grainframe.) */
[data-logo="period"] .logo__word::after { content: "."; color: var(--accent); }

/* hide non-default sub-elements by default */
.logo__split { display: none; }

/* ---------- Cursor follower ---------- */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  pointer-events: none;
  z-index: 8000;
  transition: transform .2s var(--ease-out), width .3s var(--ease-out), height .3s var(--ease-out), background .3s var(--ease-out);
  mix-blend-mode: difference;
  display: none;
}
@media (min-width: 900px) {
  .cursor-dot { display: block; }
}
.cursor-dot.hover {
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  background: var(--accent);
  border-color: var(--accent);
}

/* ---------- Form ---------- */
.field {
  display: block;
  position: relative;
  padding: 28px 0 18px;
  border-bottom: 1px solid var(--line-strong);
}
.field__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 8px;
}
/* Fieldsets reuse .field — strip the native groove border + legend notch
   so the chip groups read like the text fields, not boxed-in. */
fieldset.field {
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  margin: 0;
  min-inline-size: 0;
}
legend.field__label {
  padding: 0;
}
.field__input, .field__textarea {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 32px);
  outline: none;
  resize: none;
  padding: 0;
}
.field__input::placeholder, .field__textarea::placeholder {
  color: var(--mid-2);
}
.field__textarea { min-height: 120px; }

.chip {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: background .3s var(--ease-out), color .3s var(--ease-out), border-color .3s var(--ease-out);
}
.chip:hover { border-color: var(--fg); }
.chip[data-on="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1411;
}

/* ---------- Tag/pill ---------- */
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: -1;
}
.skip-link:focus {
  left: 20px; top: 20px;
  width: auto; height: auto;
  z-index: 10000;
  background: var(--fg);
  color: var(--bg);
  padding: 10px 16px;
}

/* ============================================================
   Journal article (long-form post)
   ============================================================ */
.post-head {
  padding: 160px var(--gutter) 0;
  max-width: 880px;
  margin: 0 auto;
}
.post-head__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
  margin: 0 0 22px;
}
.post-head__meta a { color: var(--accent); }
.post-head__meta a:hover { color: var(--fg); }
.post-head h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.2vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--fg);
  text-wrap: balance;
}
.post-head h1 em { color: var(--accent); }
.post-head__standfirst {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.35;
  color: var(--fg-2);
  margin: 28px 0 0;
  max-width: 720px;
}

.article { padding: 48px 0 clamp(80px, 12vh, 140px); }
.article__hero {
  max-width: 1100px;
  margin: 0 auto 56px;
  padding: 0 var(--gutter);
}
.article__hero .media { aspect-ratio: 16 / 9; width: 100%; }

.article-body { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter); }
.article-body > p,
.article-body li {
  font-size: 17px;
  line-height: 1.78;
  color: var(--fg-2);
  text-wrap: pretty;
}
.article-body > p { margin: 0 0 22px; }
.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin: 56px 0 18px;
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.3vw, 28px);
  line-height: 1.2;
  color: var(--fg);
  margin: 36px 0 10px;
}
.article-body ul,
.article-body ol { margin: 0 0 24px; padding: 0; list-style: none; }
.article-body li { position: relative; padding: 7px 0 7px 24px; }
.article-body ul > li::before {
  content: "";
  position: absolute;
  left: 0; top: 18px;
  width: 8px; height: 1px;
  background: var(--accent);
}
.article-body ol { counter-reset: gfq; }
.article-body ol > li { padding-left: 38px; }
.article-body ol > li::before {
  counter-increment: gfq;
  content: counter(gfq);
  position: absolute;
  left: 0; top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article-body a:hover { color: var(--fg); }
.article-body strong { color: var(--fg); font-weight: 500; }

.article-faq { max-width: 720px; margin: 64px auto 0; padding: 48px var(--gutter) 0; border-top: 1px solid var(--line); }
.article-faq h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}
.article-faq__q {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.25;
  color: var(--fg);
  margin: 32px 0 8px;
}
.article-faq__a { font-size: 16px; line-height: 1.7; color: var(--fg-2); margin: 0; }

.article-cta { max-width: 720px; margin: 56px auto 0; padding: 44px var(--gutter) 0; border-top: 1px solid var(--line); }
.article-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
  margin: 0 0 20px;
}
.article-cta__links { display: flex; flex-wrap: wrap; gap: 14px; }

/* In-body article images */
.article-figure { margin: 44px 0; }
.article-figure .media { aspect-ratio: 3 / 2; width: 100%; }
.article-figure figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--mid);
  margin-top: 12px;
}

/* ============================================================
   Mobile navigation (hamburger + full-screen menu)
   Injected by shared.js on every page.
   ============================================================ */
.nav__toggle { display: none; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;            /* below the fixed nav (100) so the toggle stays tappable */
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px var(--gutter) 48px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .35s var(--ease-out), transform .45s var(--ease-out), visibility .35s;
}
.mobile-menu.open { opacity: 1; visibility: visible; transform: none; }
.mobile-menu__inner { display: flex; flex-direction: column; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(34px, 9vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--fg);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.mobile-menu__cta {
  color: var(--accent);
  font-style: italic;
  border-bottom: 0 !important;
  margin-top: 14px;
}
body.menu-open { overflow: hidden; }
@media (min-width: 721px) { .mobile-menu { display: none; } }

@media (max-width: 720px) {
  .nav__toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    margin-left: 10px;
    padding: 0;
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
  }
  .nav__toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: currentColor;
    transition: transform .3s var(--ease-out), opacity .2s var(--ease-out);
  }
  .nav__toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav__toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  /* Group the CTA + toggle together on the right */
  .nav__cta { margin-left: auto; padding: 9px 13px; font-size: 10px; }
}

/* ============================================================
   Case study (project) pages
   ============================================================ */
  .project-hero {
    padding: 140px var(--gutter) 0;
  }
  .project-hero__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--mid);
    padding-bottom: 20px;
  }
  .project-hero__meta a:hover { color: var(--accent); }
  .project-hero__h1 {
    font-size: clamp(80px, 18vw, 320px);
    line-height: 0.88;
    letter-spacing: -0.03em;
    margin: 30px 0 20px;
  }
  .project-hero__h1 em { color: var(--fg); }
  .project-hero__sub {
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 44px);
    line-height: 1.2;
    color: var(--fg-2);
    margin: 0 0 60px;
    max-width: 800px;
  }
  .project-hero__data {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    padding: 28px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin: 0 0 60px;
  }
  .project-hero__data > div { display: flex; flex-direction: column; gap: 6px; }
  .project-hero__data dt {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mid);
  }
  .project-hero__data dd { margin: 0; font-size: 15px; color: var(--fg); }
  @media (max-width: 840px) {
    .project-hero__data { grid-template-columns: repeat(2, 1fr); }
  }
  .project-hero__media {
    margin: 0;
    aspect-ratio: 16 / 9;
    background: var(--bg-2);
    overflow: hidden;
    width: 100%;
  }
  .project-hero__media img { width: 100%; height: 100%; object-fit: cover; }

  .brief-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 60px;
  }
  @media (max-width: 840px) {
    .brief-row { grid-template-columns: 1fr; }
  }

  .bleed {
    margin: 0;
    width: 100%;
    aspect-ratio: 21 / 9;
    background: var(--bg-2);
    overflow: hidden;
  }
  .bleed img { width: 100%; height: 100%; object-fit: cover; }

  .pair-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(16px, 2vw, 24px);
    padding: 0 var(--gutter);
    max-width: var(--maxw);
    margin: 0 auto;
  }
  .pair-grid .media { aspect-ratio: 4 / 5; }
  @media (max-width: 720px) {
    .pair-grid { grid-template-columns: 1fr; }
  }

  .project-quote { text-align: center; padding: 120px var(--gutter); }
  .project-quote blockquote {
    font-family: var(--font-display);
    font-size: clamp(36px, 5vw, 72px);
    line-height: 1.15;
    letter-spacing: -0.015em;
    margin: 0 auto;
    max-width: 1100px;
    color: var(--fg);
    text-wrap: balance;
  }
  .project-quote blockquote p { margin: 0; }
  .project-quote em { color: var(--accent); }
  .project-quote cite {
    display: block;
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mid);
    margin-top: 30px;
  }

  .trio-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: clamp(16px, 2vw, 24px);
  }
  .trio-grid .media { aspect-ratio: 3 / 4; }
  .trio-grid .media:nth-child(2) { aspect-ratio: 4 / 5; }
  @media (max-width: 840px) {
    .trio-grid { grid-template-columns: 1fr; }
  }

  .deliverable-list {
    list-style: none;
    padding: 0;
    margin: 32px 0 0;
    border-top: 1px solid var(--line);
  }
  .deliverable-list li {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: clamp(20px, 2.4vw, 28px);
    line-height: 1.3;
    align-items: baseline;
  }
  .deliverable-list .mono {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.1em;
  }

  .project-next { padding-bottom: 160px; }
  .next-card {
    display: block;
    margin-top: 40px;
    color: var(--fg);
  }
  .next-card__title {
    font-size: clamp(48px, 8vw, 120px);
    line-height: 0.95;
    margin: 0 0 30px;
  }
  .next-card__title .italic { color: var(--mid); }
  .next-card__media {
    aspect-ratio: 21 / 9;
    margin-bottom: 24px;
  }
