/* Scott K. Wagoner | scottkwagoner.com
   Design system: black canvas, one crimson signal, type as architecture.
   Five colors, one family, one rounded shape (the pill), no shadows. */

:root {
  --void: #000000;
  --ash: #cccccc;
  --frost: #ffffff;
  --graphite: #4c4c4c;
  --crimson: #fc1c46;

  --font: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --margin: clamp(22px, 8.75vw, 126px);
  --section-gap: clamp(72px, 7.5vw, 108px);
  --max: 1400px;
}

*, *::before, *::after { box-sizing: border-box; }
img { display: block; max-width: 100%; }

html {
  background: var(--void);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ash);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.25;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

a { color: inherit; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--frost);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: 22px;
  top: -100px;
  z-index: 100;
  background: var(--frost);
  color: var(--void);
  padding: 9px 22px;
  border-radius: 9999px;
  font-size: 14px;
  text-decoration: none;
}
.skip-link:focus { top: 14px; }

.wrap {
  max-width: calc(var(--max) + var(--margin) * 2);
  margin: 0 auto;
  padding: 0 var(--margin);
}

/* ---------- Type ---------- */

.display {
  margin: 0;
  color: var(--frost);
  font-size: clamp(44px, 8.4vw, 198px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.h-lg {
  margin: 0;
  color: var(--frost);
  font-size: clamp(40px, 6.3vw, 91px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.h-md {
  margin: 0;
  color: var(--frost);
  font-size: clamp(30px, 5vw, 72px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.h-sm {
  margin: 0;
  color: var(--frost);
  font-size: 27px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.eyebrow {
  margin: 0 0 29px;
  color: var(--ash);
  font-size: 15px;
  font-weight: 400;
  text-transform: uppercase;
}

.lead {
  color: var(--ash);
  font-size: 18px;
  line-height: 1.1;
  max-width: 36em;
}

.body-sm {
  font-size: 14px;
  line-height: 1.15;
}

.meta { color: var(--graphite); font-size: 14px; }

.prose p + p { margin-top: 1em; }
.prose { max-width: 40em; }

/* ---------- Actions ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 0 30px;
  border-radius: 9999px;
  background: var(--crimson);
  color: var(--frost);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.pill:hover { text-decoration: underline; text-underline-offset: 3px; }
.pill--sm { height: 40px; padding: 0 22px; font-size: 14px; }

.ghost {
  color: var(--frost);
  font-size: 17px;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
}
.ghost:hover { text-decoration: underline; text-underline-offset: 4px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px 36px;
  margin-top: 43px;
}

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
}

.site-header .wrap {
  height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  justify-self: start;
  color: var(--frost);
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--crimson);
  flex: none;
}

.tagline {
  color: var(--ash);
  font-size: 14px;
  text-align: center;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 22px;
}

.menu-toggle {
  position: relative;
  z-index: 60;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  background: none;
  border: 0;
  cursor: pointer;
}
.menu-toggle span {
  position: absolute;
  left: 8px;
  width: 28px;
  height: 1px;
  background: var(--frost);
  transition: transform 0.25s ease, top 0.25s ease;
}
.menu-toggle span:first-child { top: 15px; }
.menu-toggle span:last-child { top: 28px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 22px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 22px; transform: rotate(-45deg); }

/* ---------- Menu overlay ---------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--void);
  display: flex;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.menu.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.25s ease;
}
.menu .wrap { width: 100%; }
.menu-links a {
  display: inline-block;
  color: var(--frost);
  font-size: clamp(44px, 7vw, 91px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 4px 0;
}
.menu-links a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.menu-foot {
  margin-top: 65px;
  display: flex;
  flex-wrap: wrap;
  gap: 22px 36px;
  align-items: center;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 150px 0 var(--section-gap);
  overflow: hidden;
}
.hero > .wrap { position: relative; z-index: 2; width: 100%; }

.line { display: block; white-space: nowrap; }
.nw { white-space: nowrap; }
.hero .lead { margin-top: 43px; }

.sphere {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  top: 50%;
  right: -6vw;
  width: min(62vw, 960px);
  aspect-ratio: 1;
  transform: translateY(-52%);
}
.sphere canvas { display: block; width: 100%; height: 100%; }

.sphere.is-fallback {
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,0.18), rgba(255,255,255,0) 18%),
    radial-gradient(circle at 78% 82%, rgba(255,150,70,0.28), rgba(255,150,70,0) 38%),
    radial-gradient(circle at 18% 60%, rgba(90,110,255,0.30), rgba(90,110,255,0) 42%),
    radial-gradient(circle at 50% 50%, #050505 58%, #000 72%);
  width: min(48vw, 720px);
  right: -2vw;
}

.hero--case { min-height: 0; padding-top: 200px; padding-bottom: 43px; align-items: flex-start; }
.hero--case .sphere { width: min(46vw, 680px); right: -10vw; top: 42%; }
.hero--case .h-lg { max-width: 12em; }
.hero--case .lead { margin-top: 36px; }

.case-hero-image {
  padding: 18px 0 14px;
  overflow-x: hidden;
}
.case-hero-image .wrap {
  display: block;
  width: min(100%, 1400px);
  max-width: calc(100% - (var(--margin) * 2));
  margin: 0 auto;
  padding: 0;
}
.case-hero-image img {
  display: block;
  width: 100%;
  max-width: calc(100vw - (var(--margin) * 2));
  max-height: 540px;
  height: auto;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0d1117;
}

.section[aria-label="Engagement facts"] {
  padding-top: 20px;
}

/* ---------- Sections ---------- */

.section { padding: var(--section-gap) 0; }
.section--tight-top { padding-top: 0; }

.section-head { margin-bottom: 72px; }
.section-head .h-lg { max-width: 13em; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 43px 65px;
  align-items: start;
}

.rule-list > li {
  border-top: 1px solid var(--graphite);
  padding: 22px 0;
}
.rule-list > li:last-child { border-bottom: 1px solid var(--graphite); }

.symptoms .h-sm { font-size: clamp(22px, 2.2vw, 27px); }

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 43px 30px;
}
.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 43px 30px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 65px;
}

.item {
  border-top: 1px solid var(--graphite);
  padding-top: 22px;
}
.item .h-sm { margin-bottom: 14px; }
.item p { font-size: 17px; line-height: 1.2; }

.step-num {
  display: block;
  color: var(--graphite);
  font-size: 14px;
  margin-bottom: 36px;
}

/* Proof */
.proof > li {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 22px 65px;
  align-items: center;
  border-top: 1px solid var(--graphite);
  padding: 29px 0;
}
.proof > li:last-child { border-bottom: 1px solid var(--graphite); }
.proof .figure {
  color: var(--frost);
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.proof p { max-width: 30em; }

/* Work list */
.work-list > li { border-top: 1px solid var(--graphite); }
.work-list > li:last-child { border-bottom: 1px solid var(--graphite); }
.work-link {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 22px 65px;
  padding: 43px 0;
  text-decoration: none;
}
.work-link .eyebrow { margin: 0; padding-top: 8px; }
.work-link .h-md { margin-bottom: 22px; }
.work-link p { max-width: 34em; }
.work-link .ghost { display: inline-block; margin-top: 22px; }
.work-link:hover .ghost { text-decoration: underline; text-underline-offset: 4px; }
.work-link:hover .h-md { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }

/* Services */
.services .item p { max-width: 28em; }
.services .h-sm { margin-bottom: 9px; }

/* About */
.about .section-head .h-lg { max-width: none; }
.about-layout {
  grid-template-columns: 200px minmax(0, 1fr);
  align-items: center;
}
.about-portrait {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: #0f1115;
  box-shadow: 0 24px 60px rgba(0,0,0,0.28);
}
.about-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

/* Closing */
.closing .display { max-width: 7em; }
.closing .lead { margin-top: 36px; }

/* Case study body */
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 30px;
}
.facts dt { color: var(--graphite); font-size: 14px; margin-bottom: 7px; }
.facts dd { margin: 0; color: var(--frost); font-size: 17px; line-height: 1.2; }
.facts > div { border-top: 1px solid var(--graphite); padding-top: 22px; }

.chapter {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 22px 65px;
  border-top: 1px solid var(--graphite);
  padding: 43px 0 65px;
}
.chapter .h-md { margin: 0; }
.bullets li {
  position: relative;
  padding-left: 22px;
  margin-top: 14px;
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px;
  height: 1px;
  background: var(--ash);
}
.prose + .bullets, .bullets + .prose { margin-top: 22px; }
.note { margin-top: 29px; color: var(--ash); font-size: 14px; max-width: 40em; }

.next-link {
  display: block;
  border-top: 1px solid var(--graphite);
  border-bottom: 1px solid var(--graphite);
  padding: 43px 0;
  text-decoration: none;
}
.next-link .eyebrow { margin-bottom: 14px; }
.next-link:hover .h-lg { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 10px; }

/* ---------- Footer ---------- */

.site-footer { padding: 43px 0; }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px 29px;
  font-size: 14px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 9px 29px; }
.footer-links a { color: var(--ash); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Responsive ---------- */

.mobile-only { display: none; }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tagline { display: none; }
  .site-header .wrap { grid-template-columns: 1fr auto; }
}

@media (max-width: 800px) {
  .split, .proof > li, .work-link, .chapter, .grid-2 { grid-template-columns: 1fr; }
  .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 43px; }
  .work-link .eyebrow { padding-top: 0; }
  .chapter { padding: 29px 0 43px; }
  .sphere { width: 118vw; right: -46vw; top: 34%; opacity: 0.9; }
  .hero--case .sphere { width: 90vw; right: -42vw; top: 22%; }
  .hero--case { padding-top: 150px; }
}

@media (max-width: 600px) {
  .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .step-num { margin-bottom: 14px; }
  .header-actions .pill { display: none; }
  .mobile-only { display: inline-flex; }
  .desktop-only { display: none; }
  .brand { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .menu, .menu.is-open, .menu-toggle span { transition: none; }
}

/* Keep the close control visible above the open menu */
body.menu-open .site-header { z-index: 70; }
body.menu-open .header-actions .pill,
body.menu-open .tagline { visibility: hidden; }
