/* Coastal Drift — hero styles */

:root {
  --bg-deep: #0d0a1f;
  --bg-mid: #1a1530;
  --bg-soft: #241a44;
  --ink: #f5f0ff;
  --ink-dim: rgba(245, 240, 255, 0.72);
  --ink-mute: rgba(245, 240, 255, 0.5);
  --accent-1: #ff3d8b;
  --accent-2: #c47bff;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "ss01", "ss02", "cv11";
  min-height: 100vh;
  overflow-x: hidden;
}

#root { display: contents; }

.cd-root {
  position: relative;
  width: 100%;
  min-height: 100vh;
  /* NB: no max-width here. Sections (About / Work / Contact) own coloured
     backgrounds — capping .cd-root would leave a hard seam against the
     body's --bg-deep on viewports wider than 1800px. We cap the *visual
     framing* (hero stage + nav content) individually instead. */
}

/* ── Hero section ───────────────────────────────────────────────────────── */
.cd-hero-section {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  overflow: hidden;
}

/* The hero's visual frame: photo + headline live inside this 1800px-centred
   wrapper. The hero-section itself is full-bleed so dark space on the sides
   of an ultrawide viewport reads as body --bg-deep, not as a colour seam. */
.cd-hero-frame {
  position: relative;
  max-width: 1800px;
  min-height: 100vh;
  margin: 0 auto;
}

/* ── Stage / background (scoped to hero section, right-anchored) ────────── */
.cd-stage {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 1800px;
  z-index: 0;
  overflow: hidden;
}

/* Past 2000px, let the stage grow with the viewport so the photo doesn't
   feel marooned in the right quarter of an ultrawide screen. Grows ~70% of
   the extra viewport width above 2000px. */
@media (min-width: 2000px) {
  .cd-stage {
    max-width: calc(1800px + (100vw - 2000px) * 0.7);
  }
}

.cd-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  pointer-events: none;
  filter: saturate(1.05);
}

.cd-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 80% 50%, transparent 40%, rgba(8,5,22,0.55) 100%),
    radial-gradient(60% 70% at 50% 0%, rgba(20,10,45,0.4) 0%, transparent 60%);
  pointer-events: none;
}

.cd-left-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(10,7,28,0.85) 0%,
    rgba(10,7,28,0.55) 18%,
    rgba(10,7,28,0.2) 32%,
    transparent 46%);
  pointer-events: none;
}

.cd-top-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(10,7,28,0.7) 0%,
    rgba(10,7,28,0.35) 22%,
    rgba(10,7,28,0.05) 40%,
    transparent 55%);
  pointer-events: none;
  display: none;
}

/* ── Nav ────────────────────────────────────────────────────────────────── */
/* Nav is full-width so the background gradient extends edge-to-edge, but the
   inner content (brand + links + actions) stays within a 1800px frame via
   dynamic side padding. Below 1800px the padding clamps to the usual 40px. */
.cd-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 22px max(40px, calc((100vw - 1720px) / 2));
  background: linear-gradient(180deg, rgba(10,7,28,0.55) 0%, transparent 100%);
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
}

.cd-brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-family: "Atma", "Fraunces", cursive;
  font-weight: 500;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.005em;
  justify-self: start;
  text-shadow:
    0 0 6px color-mix(in oklab, var(--accent-1) 85%, transparent),
    0 0 18px color-mix(in oklab, var(--accent-1) 55%, transparent),
    0 0 38px color-mix(in oklab, var(--accent-2) 40%, transparent);
}

.cd-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.cd-links a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.005em;
  transition: color 200ms ease, background 200ms ease, text-shadow 200ms ease;
}

.cd-links a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  text-shadow: 0 0 12px color-mix(in oklab, var(--accent-2) 60%, transparent);
}

.cd-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  justify-self: end;
}

.cd-login {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 4px;
  transition: color 180ms ease;
}
.cd-login:hover { color: var(--ink); }

.cd-signup {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.005em;
  color: #1a0a25;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent-2) 0%, var(--accent-1) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 6px 24px color-mix(in oklab, var(--accent-1) 35%, transparent);
  transition: transform 220ms cubic-bezier(.2,.7,.3,1), box-shadow 280ms ease, filter 220ms ease;
}

.cd-signup:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 10px 36px color-mix(in oklab, var(--accent-1) 60%, transparent),
    0 0 50px color-mix(in oklab, var(--accent-2) 50%, transparent);
}

/* ── Mobile menu toggle ─────────────────────────────────────────────────── */
.cd-menu-toggle {
  display: none;
  justify-self: end;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--ink);
  position: relative;
  border-radius: 999px;
  transition: background 200ms ease;
}
.cd-menu-toggle:hover { background: rgba(255, 255, 255, 0.06); }
.cd-menu-toggle:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--accent-1) 85%, white 10%);
  outline-offset: 2px;
}
.cd-menu-toggle span {
  position: absolute;
  left: 50%;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transform: translateX(-50%);
  transition: transform 220ms cubic-bezier(.2,.7,.3,1), top 220ms cubic-bezier(.2,.7,.3,1);
}
.cd-menu-toggle span:nth-child(1) { top: 17px; }
.cd-menu-toggle span:nth-child(2) { top: 25px; }
.cd-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  top: 21px;
  transform: translateX(-50%) rotate(45deg);
}
.cd-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  top: 21px;
  transform: translateX(-50%) rotate(-45deg);
}

/* ── Mobile menu overlay ────────────────────────────────────────────────── */
.cd-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 60px;
  gap: 32px;
  background:
    radial-gradient(80% 50% at 50% 30%, color-mix(in oklab, var(--accent-2) 14%, transparent) 0%, transparent 70%),
    var(--bg-deep);
  opacity: 0;
  visibility: hidden;
  transition: opacity 280ms cubic-bezier(.2,.7,.3,1), visibility 0s linear 280ms;
}
.cd-mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 280ms cubic-bezier(.2,.7,.3,1), visibility 0s linear 0s;
}

.cd-menu-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  cursor: pointer;
  transition: background 200ms ease;
}
.cd-menu-close:hover { background: rgba(255, 255, 255, 0.1); }
.cd-menu-close:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--accent-1) 85%, white 10%);
  outline-offset: 2px;
}

.cd-mobile-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  transform: translateY(12px);
  opacity: 0;
  transition: opacity 320ms cubic-bezier(.2,.7,.3,1) 80ms,
              transform 320ms cubic-bezier(.2,.7,.3,1) 80ms;
}
.cd-mobile-menu.is-open .cd-mobile-links {
  opacity: 1;
  transform: none;
}

.cd-mobile-links a {
  font-family: "Fraunces", serif;
  font-weight: 380;
  font-size: clamp(32px, 8vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  transition: text-shadow 220ms ease, color 220ms ease;
}
.cd-mobile-links a:hover {
  text-shadow:
    0 0 14px color-mix(in oklab, var(--accent-1) 55%, transparent),
    0 0 32px color-mix(in oklab, var(--accent-2) 40%, transparent);
}
.cd-mobile-links a:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--accent-1) 85%, white 10%);
  outline-offset: 4px;
}

.cd-mobile-email {
  font-size: 14px;
  color: var(--ink-dim);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 200ms ease, text-shadow 200ms ease;
  opacity: 0;
  transition: opacity 320ms cubic-bezier(.2,.7,.3,1) 140ms,
              color 200ms ease,
              text-shadow 200ms ease;
}
.cd-mobile-menu.is-open .cd-mobile-email { opacity: 1; }
.cd-mobile-email:hover {
  color: var(--ink);
  text-shadow: 0 0 18px color-mix(in oklab, var(--accent-2) 50%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .cd-mobile-menu,
  .cd-mobile-links,
  .cd-mobile-email { transition: none; }
  .cd-mobile-links { transform: none; }
}

/* ── Headline ───────────────────────────────────────────────────────────── */
.cd-hero {
  position: relative;
  z-index: 10;
  max-width: 560px;
  padding: 140px 40px 60px 56px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.cd-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.cd-h1 {
  margin: 0;
  font-family: "Fraunces", "Inter Tight", serif;
  font-weight: 380;
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
  color: var(--ink);
  font-feature-settings: "ss01";
}

.cd-sub {
  margin: 0;
  max-width: 460px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-dim);
  text-wrap: pretty;
}

.cd-cta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.cd-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff 0%, #efe7ff 100%);
  color: #1a0a25;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 8px 32px rgba(0, 0, 0, 0.35);
  transition: transform 220ms cubic-bezier(.2,.7,.3,1), box-shadow 280ms ease;
}

.cd-cta-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 60px color-mix(in oklab, var(--accent-2) 30%, transparent);
}

.cd-cta-primary svg { transition: transform 220ms cubic-bezier(.2,.7,.3,1); }
.cd-cta-primary:hover svg { transform: translateX(3px); }

.cd-cta-secondary {
  display: inline-flex;
  align-items: center;
  padding: 14px 18px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: background 220ms ease, border-color 220ms ease;
}

.cd-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.32);
}

.cd-meta {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 18px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 380px;
  display:none;
}

.cd-meta-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.cd-meta-num {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: 32px;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.cd-meta-lbl {
  font-size: 11px;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
}

.cd-meta-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.12);
}

/* ── Toast ──────────────────────────────────────────────────────────────── */
.cd-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 14px;
  background: rgba(18, 12, 36, 0.85);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 32px color-mix(in oklab, var(--accent-1) 30%, transparent);
  animation: cd-toast-in 280ms cubic-bezier(.2,.7,.3,1);
}
.cd-toast b { font-weight: 600; }
@keyframes cd-toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.cd-toast-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-1);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent-1) 70%, transparent);
  animation: cd-pulse-ring 1.4s ease-out infinite;
}
@keyframes cd-pulse-ring {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent-1) 60%, transparent); }
  100% { box-shadow: 0 0 0 14px color-mix(in oklab, var(--accent-1) 0%, transparent); }
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .cd-hero { padding: 130px 32px 40px 32px; max-width: 480px; }
  .cd-nav { padding: 18px 24px; }
}

@media (max-width: 820px) {
  .cd-nav {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 16px 20px;
  }
  .cd-links { display: none; }
  .cd-menu-toggle { display: inline-flex; }

  /* Use the dark top half of the portrait artwork for the hero text */
  .cd-left-fade { display: none; }
  .cd-top-fade { display: block; }

  .cd-hero {
    padding: 92px 22px 24px 22px;
    max-width: 100%;
    gap: 16px;
    text-align: center;
    align-items: center;
  }

  .cd-eyebrow {
    margin: 0 auto;
  }

  .cd-h1 {
    font-size: clamp(34px, 8.4vw, 48px);
    line-height: 1.04;
  }

  .cd-sub {
    max-width: 360px;
    font-size: 15px;
  }

  .cd-cta-row {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Meta strip takes too much vertical space on mobile; hide it so the
     artwork below the headline stays visible */
  .cd-meta { display: none; }
}

@media (max-width: 540px) {
  .cd-actions .cd-login { display: none; }
  .cd-nav { padding: 14px 16px; }
  .cd-hero { padding: 82px 18px 20px 18px; gap: 14px; }
  .cd-h1 { font-size: clamp(30px, 9vw, 42px); }
  .cd-sub { font-size: 14px; max-width: 320px; }
  .cd-cta-primary, .cd-cta-secondary { padding: 12px 18px; font-size: 14px; }
}

/* Very tall narrow phones — the portrait artwork's negative space at the top
   is enormous, so we can give the hero some breathing room */
@media (max-width: 820px) and (min-aspect-ratio: 9/19) {
  .cd-hero { padding-top: 100px; }
}
@media (max-width: 820px) and (max-aspect-ratio: 9/18) {
  .cd-hero { padding-top: 110px; gap: 18px; }
}

/* ── Page-level scroll behavior ─────────────────────────────────────────── */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Bottom fade on hero photo so it dissolves into --bg-deep before About.
   Top of About then re-introduces accent glow as a seam. */
.cd-bottom-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 32%;
  background: linear-gradient(180deg,
    rgba(13, 10, 31, 0) 0%,
    rgba(13, 10, 31, 0.5) 55%,
    var(--bg-deep) 100%);
  pointer-events: none;
}

/* ── Generic section frame & reveal ─────────────────────────────────────── */
/* Reveal animates the INNER content only — section backgrounds are present
   from page load so there's no contrast pop against the document bg as the
   section enters the viewport. */
.cd-section {
  position: relative;
  scroll-margin-top: 88px;
  padding: clamp(88px, 12vw, 160px) clamp(24px, 5vw, 72px);
}

.cd-section-inner {
  max-width: 1120px;
  margin: 0 auto;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 900ms cubic-bezier(.16,.84,.3,1),
    transform 900ms cubic-bezier(.16,.84,.3,1);
}
.cd-section.is-revealed .cd-section-inner { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .cd-section-inner { opacity: 1; transform: none; transition: none; }
}

.cd-h2 {
  margin: 18px 0 28px;
  font-family: "Fraunces", "Inter Tight", serif;
  font-weight: 380;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.022em;
  text-wrap: balance;
  color: var(--ink);
  font-feature-settings: "ss01";
}

.cd-prose, .cd-prose-single {
  max-width: 62ch;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-dim);
  text-wrap: pretty;
}
.cd-prose { display: flex; flex-direction: column; gap: 20px; }
.cd-prose-single { margin: 0; }

.cd-link {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--accent-1) 55%, transparent);
  text-shadow: 0 0 18px color-mix(in oklab, var(--accent-2) 30%, transparent);
  transition: border-color 200ms ease, text-shadow 200ms ease;
}
.cd-link:hover {
  border-bottom-color: var(--accent-1);
  text-shadow: 0 0 24px color-mix(in oklab, var(--accent-2) 65%, transparent);
}

/* ── About ──────────────────────────────────────────────────────────────── */
.cd-about {
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 100%);
  overflow: hidden;
}

/* The seam: soft accent glow bridging photo → flat surface */
.cd-about::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  width: 110%;
  height: 220px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side,
    color-mix(in oklab, var(--bg-deep) 34%, transparent) 0%,
    color-mix(in oklab, #37516e 14%, transparent) 40%,
    transparent 78%);
  filter: blur(40px);
  mix-blend-mode: screen;
  pointer-events: none;
}

/* About uses the standard 1120px section frame — prose self-constrains
   to 62ch via .cd-prose so we don't need to cap the inner here. */
.cd-about-inner { /* shares .cd-section-inner; no width cap */ }

/* ── Work (editorial list) ──────────────────────────────────────────────── */
.cd-work { background: var(--bg-mid); }

.cd-work-list {
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
}

.cd-work-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(72px, 96px) 1fr;
  align-items: start;
  gap: clamp(24px, 4vw, 64px);
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-top-color 360ms ease;
}
.cd-work-item:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cd-work-item.is-flagship { padding: 56px 0; }

.cd-work-item:hover,
.cd-work-item:focus-within {
  border-top-color: color-mix(in oklab, var(--accent-1) 45%, rgba(255, 255, 255, 0.08));
}
.cd-work-item:hover + .cd-work-item,
.cd-work-item:focus-within + .cd-work-item {
  border-top-color: color-mix(in oklab, var(--accent-1) 45%, rgba(255, 255, 255, 0.08));
}

.cd-work-index {
  font-family: "Fraunces", serif;
  font-weight: 380;
  font-size: clamp(34px, 3.6vw, 44px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  transition: color 360ms ease, text-shadow 360ms ease;
}
.cd-work-item.is-flagship .cd-work-index {
  font-size: clamp(40px, 4.4vw, 56px);
  color: color-mix(in oklab, var(--ink) 75%, var(--accent-2) 25%);
  text-shadow:
    0 0 12px color-mix(in oklab, var(--accent-1) 35%, transparent),
    0 0 32px color-mix(in oklab, var(--accent-2) 25%, transparent);
}
.cd-work-item:hover .cd-work-index,
.cd-work-item:focus-within .cd-work-index {
  color: var(--ink);
  text-shadow:
    0 0 10px color-mix(in oklab, var(--accent-1) 70%, transparent),
    0 0 30px color-mix(in oklab, var(--accent-2) 50%, transparent);
}

.cd-work-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 62ch;
}

.cd-work-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 4px;
}

.cd-work-name {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 380;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}
.cd-work-item.is-flagship .cd-work-name {
  font-size: clamp(36px, 4.4vw, 56px);
}

.cd-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent-1) 10%, rgba(255, 255, 255, 0.04));
  border: 1px solid color-mix(in oklab, var(--accent-1) 30%, rgba(255, 255, 255, 0.1));
  font-family: "Inter Tight", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
}

.cd-work-desc {
  margin: 0;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ink);
  text-wrap: pretty;
}

.cd-work-blurb {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-dim);
  text-wrap: pretty;
}
.cd-work-item.is-flagship .cd-work-blurb { font-size: 16.5px; }

/* ── Contact ────────────────────────────────────────────────────────────── */
.cd-contact {
  background: linear-gradient(180deg, var(--bg-mid) 0%, var(--bg-deep) 100%);
}

.cd-contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}
.cd-contact-copy { max-width: 480px; }

.cd-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  background: color-mix(in oklab, var(--bg-deep) 75%, var(--bg-soft) 25%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cd-field { display: flex; flex-direction: column; gap: 8px; }
.cd-field-turnstile { min-height: 65px; }

.cd-field label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.cd-field input,
.cd-field textarea {
  appearance: none;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
  transition: border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}
.cd-field textarea { resize: vertical; min-height: 120px; }

.cd-field input:hover,
.cd-field textarea:hover { border-color: rgba(255, 255, 255, 0.2); }

.cd-field input:focus-visible,
.cd-field textarea:focus-visible {
  outline: none;
  border-color: color-mix(in oklab, var(--accent-1) 65%, rgba(255, 255, 255, 0.2));
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 0 0 3px color-mix(in oklab, var(--accent-1) 22%, transparent),
    0 0 26px color-mix(in oklab, var(--accent-2) 22%, transparent);
}

.cd-field input[aria-invalid="true"],
.cd-field textarea[aria-invalid="true"] {
  border-color: color-mix(in oklab, var(--accent-1) 65%, transparent);
}

.cd-err {
  display: block;
  font-size: 13px;
  color: color-mix(in oklab, var(--accent-1) 70%, var(--ink));
}

.cd-form-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.cd-form-submit {
  border: 0;
  cursor: pointer;
  font: inherit;
}
.cd-form-submit:disabled {
  opacity: 0.65;
  cursor: progress;
}

.cd-form-fallback {
  font-size: 13px;
  color: var(--ink-mute);
}

.cd-form-status { min-height: 18px; }

/* ── Focus visible (page-wide baseline) ─────────────────────────────────── */
:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--accent-1) 85%, white 10%);
  outline-offset: 3px;
  border-radius: 4px;
}
.cd-cta-primary:focus-visible {
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 0 3px color-mix(in oklab, var(--accent-1) 35%, transparent),
    0 0 60px color-mix(in oklab, var(--accent-2) 40%, transparent);
}
.cd-links a:focus-visible,
.cd-footer-col a:focus-visible,
.cd-link:focus-visible {
  outline: none;
  text-shadow: 0 0 18px color-mix(in oklab, var(--accent-2) 70%, transparent);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent-1) 70%, transparent);
  border-radius: 999px;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.cd-footer {
  background: var(--bg-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 72px clamp(24px, 5vw, 72px) 32px;
  position: relative;
}

.cd-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: 56px;
}

.cd-footer-brand { max-width: 320px; }
.cd-footer-wordmark {
  display: inline-block;
  font-size: 28px;
}

.cd-footer-tag {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 30ch;
}

.cd-footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.cd-footer-col-h {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 14px;
}

.cd-footer-col ul {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 10px;
}

.cd-footer-col a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 14px;
  transition: color 200ms ease, text-shadow 200ms ease;
}
.cd-footer-col a:hover {
  color: var(--ink);
  text-shadow: 0 0 16px color-mix(in oklab, var(--accent-2) 55%, transparent);
}

.cd-footer-base {
  max-width: 1120px;
  margin: 56px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--ink-mute);
}

/* ── Utility ────────────────────────────────────────────────────────────── */
.cd-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip-to-content: hidden offscreen until focused. */
.cd-skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg-deep);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: top 180ms ease;
}
.cd-skip:focus-visible {
  top: 12px;
  outline: 2px solid color-mix(in oklab, var(--accent-1) 85%, white 10%);
  outline-offset: 3px;
}

/* ── Legal pages (privacy / terms / eula) ───────────────────────────────── */
.cd-legal-body { background: var(--bg-deep); }

.cd-legal {
  padding: clamp(120px, 14vw, 180px) clamp(24px, 5vw, 72px) clamp(80px, 12vw, 140px);
  background: var(--bg-deep);
  min-height: 70vh;
}

.cd-legal-inner { max-width: 720px; margin: 0 auto; position: relative; }

.cd-legal-banner {
  margin-bottom: 36px;
  padding: 14px 18px;
  border-radius: 14px;
  background: color-mix(in oklab, var(--accent-1) 10%, rgba(255, 255, 255, 0.03));
  border: 1px solid color-mix(in oklab, var(--accent-1) 32%, rgba(255, 255, 255, 0.08));
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  box-shadow: 0 0 32px color-mix(in oklab, var(--accent-1) 16%, transparent);
}
.cd-legal-banner strong { font-weight: 600; color: var(--ink); }

.cd-legal h1.cd-h2 { margin-top: 14px; }

.cd-legal-meta {
  font-size: 13px;
  color: var(--ink-mute);
  margin: -8px 0 32px;
  letter-spacing: 0.02em;
}

.cd-legal-prose {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink-dim);
}
.cd-legal-prose h2 {
  margin: 40px 0 12px;
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.cd-legal-prose p { margin: 0 0 14px; }
.cd-legal-prose ul {
  margin: 0 0 14px;
  padding-left: 22px;
}
.cd-legal-prose li { margin-bottom: 6px; }

.cd-legal-back {
  margin-top: 56px;
  font-size: 14px;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .cd-contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .cd-footer-inner { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 820px) {
  .cd-section { padding: 80px 22px 80px; }
  .cd-work-item {
    grid-template-columns: minmax(56px, 72px) 1fr;
    gap: 22px;
    padding: 32px 0;
  }
  .cd-work-item.is-flagship { padding: 40px 0; }
  .cd-work-item.is-flagship .cd-work-name { font-size: clamp(28px, 7vw, 38px); }
  .cd-footer-nav { grid-template-columns: repeat(2, 1fr); gap: 24px 32px; }
  .cd-footer { padding: 60px 22px 28px; }
  .cd-footer-base { flex-direction: column; gap: 8px; align-items: flex-start; }
  .cd-legal { padding-top: 110px; }
}

@media (max-width: 540px) {
  .cd-h2 { font-size: clamp(28px, 8.4vw, 36px); }
  .cd-prose, .cd-prose-single, .cd-legal-prose { font-size: 15.5px; }
  .cd-form { padding: 22px; }
  .cd-form-row .cd-form-submit { width: 100%; justify-content: center; }
}
