/* =========================================================
   Up and At ’Em — dark landing page
   Tokenised, vanilla CSS.
   ========================================================= */

:root {
  --bg: #0a0a0f;
  --bg-elev: #10101a;
  --bg-card: #14141f;
  --line: color-mix(in oklab, #ffffff 8%, transparent);
  --line-soft: color-mix(in oklab, #ffffff 4%, transparent);
  --text: #e8e7ef;
  --text-muted: #9a98ad;
  --text-dim: #6c6a82;
  --accent: #ffb347;
  --accent-2: #ff6b9a;
  --accent-3: #8c7bff;
  --ok: #4ade80;
  --warn: #facc15;
  --err: #f87171;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 36px;

  --shadow-card: 0 1px 0 0 color-mix(in oklab, #ffffff 6%, transparent) inset,
                 0 30px 60px -30px rgba(0,0,0,0.8);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  --container: 1200px;
  --pad-x: clamp(20px, 4vw, 56px);
  --pad-section: clamp(72px, 10vw, 160px);

  --serif: 'Instrument Serif', 'Playfair Display', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --size-h1: clamp(2.6rem, 1.5rem + 5.2vw, 6rem);
  --size-h2: clamp(2rem, 1.3rem + 2.6vw, 3.5rem);
  --size-h3: clamp(1.15rem, 1rem + 0.5vw, 1.4rem);
  --size-body: clamp(1rem, 0.95rem + 0.2vw, 1.05rem);
}

*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--size-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

h1,h2,h3,h4 { letter-spacing: -0.02em; line-height: 1.08; margin: 0; font-weight: 600; color: var(--text); text-wrap: balance; }
h1 { font-size: var(--size-h1); }
h2 { font-size: var(--size-h2); }
h3 { font-size: var(--size-h3); letter-spacing: -0.01em; line-height: 1.25; }

p { margin: 0 0 1em; color: var(--text-muted); }
a { color: inherit; text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--accent); }

.serif-it {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0;
}

/* ───── background atmosphere ───── */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.orb {
  position: fixed; pointer-events: none; z-index: 0;
  width: 720px; height: 720px; border-radius: 50%;
  filter: blur(120px); opacity: 0.45;
}
.orb-a { top: -280px; right: -200px; background: radial-gradient(circle, var(--accent) 0%, transparent 65%); }
.orb-b { bottom: -360px; left: -240px; background: radial-gradient(circle, var(--accent-3) 0%, transparent 65%); opacity: 0.3; }

/* ───── header ───── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 32px;
  padding: 18px var(--pad-x);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; letter-spacing: -0.01em; font-size: 1.05rem; }
.brand:hover { color: var(--accent); }
.brand-mark { display: block; width: 32px; height: 32px; flex: none; }
.site-nav { display: flex; gap: 28px; justify-content: center; }
.site-nav a { color: var(--text-muted); font-size: 0.94rem; position: relative; padding: 4px 0; }
.site-nav a:hover { color: var(--text); }
.site-nav a::after { content: ''; position: absolute; left: 50%; bottom: -2px; width: 0; height: 1px; background: var(--accent); transition: width 0.3s var(--ease), left 0.3s var(--ease); }
.site-nav a:hover::after { width: 100%; left: 0; }
.header-cta { display: flex; gap: 10px; align-items: center; }

.menu-toggle {
  display: none;
  background: transparent; border: 1px solid var(--line);
  width: 40px; height: 40px; border-radius: 10px;
  padding: 0; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 4px;
}
.menu-toggle span { width: 16px; height: 1.5px; background: var(--text); transition: transform 0.3s var(--ease); }

/* ───── buttons ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  font-size: 0.92rem; font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer; transition: all 0.25s var(--ease);
  white-space: nowrap;
}
.btn-solid {
  background: var(--text); color: var(--bg);
  box-shadow: 0 10px 30px -10px color-mix(in oklab, var(--text) 40%, transparent);
}
.btn-solid:hover { background: var(--accent); color: var(--bg); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--text); color: var(--text); background: color-mix(in oklab, #ffffff 3%, transparent); }
.btn-lg { padding: 14px 26px; font-size: 1rem; border-radius: 999px; }

/* ───── hero ───── */
.hero {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
  padding: clamp(56px, 8vw, 120px) var(--pad-x) clamp(72px, 9vw, 140px);
  max-width: var(--container); margin: 0 auto;
}
.hero-inner { max-width: 640px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: var(--text-muted); font-weight: 500;
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: color-mix(in oklab, #ffffff 3%, transparent);
  margin: 0 0 24px;
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 50%, transparent); } 70% { box-shadow: 0 0 0 10px color-mix(in oklab, var(--accent) 0%, transparent); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

.hero-title { font-weight: 600; letter-spacing: -0.035em; font-size: clamp(2.3rem, 1.3rem + 3.4vw, 3.6rem); }
.hero-sub { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); max-width: 540px; margin: 24px 0 32px; color: var(--text-muted); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-proof { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; border-top: 1px solid var(--line-soft); padding-top: 28px; }
.hero-proof li { display: flex; flex-direction: column; gap: 2px; }
.hero-proof strong { font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem); color: var(--text); font-weight: 600; letter-spacing: -0.02em; }
.hero-proof span { font-size: 0.82rem; color: var(--text-dim); }

.hero-visual {
  position: relative;
  aspect-ratio: 4/3;
}
.hero-shot {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: var(--radius-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.hero-card {
  position: absolute;
  top: 4%; left: -24px;
  width: min(88%, 320px);
  background: color-mix(in oklab, var(--bg-card) 92%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-family: 'SFMono-Regular', 'Menlo', monospace;
  font-size: 0.78rem;
  box-shadow: 0 24px 50px -20px rgba(0,0,0,0.7);
}
.hero-card-row { display: flex; align-items: center; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 10px; }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-r { background: var(--err); } .dot-a { background: var(--warn); } .dot-g { background: var(--ok); }
.hero-card-title { margin-left: 10px; color: var(--text-dim); font-size: 0.72rem; }
.hero-card-body p { margin: 4px 0; color: var(--text-muted); font-size: 0.76rem; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.tag-ok { background: color-mix(in oklab, var(--ok) 18%, transparent); color: var(--ok); }
.tag-warn { background: color-mix(in oklab, var(--warn) 18%, transparent); color: var(--warn); }
.tag-sun { background: color-mix(in oklab, var(--accent) 18%, transparent); color: var(--accent); margin-right: 6px; }
.hero-card-output { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-soft); color: var(--text); font-family: var(--sans); font-style: italic; font-size: 0.82rem; }

/* ───── logo strip ───── */
.logos {
  position: relative; z-index: 2;
  max-width: var(--container); margin: 0 auto;
  padding: 40px var(--pad-x);
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  text-align: center;
}
.logos-label { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 20px; }
.logos ul { list-style: none; padding: 0; margin: 0; display: flex; gap: clamp(24px, 5vw, 56px); justify-content: center; flex-wrap: wrap; }
.logos li { font-family: var(--serif); font-size: clamp(1.3rem, 1.1rem + 0.5vw, 1.6rem); color: var(--text-muted); letter-spacing: -0.01em; transition: color 0.25s var(--ease); }
.logos li:hover { color: var(--text); }

/* ───── shared section ───── */
section[id] { scroll-margin-top: 72px; }

/* scroll-reveal (toggled by main.js; removed again once shown so hover states work) */
.js-reveal.js-reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease) var(--d, 0s), transform 0.6s var(--ease) var(--d, 0s), border-color 0.3s var(--ease); }
.js-reveal.js-reveal.in { opacity: 1; transform: none; }

.section-head { max-width: 720px; margin: 0 auto clamp(40px, 6vw, 72px); text-align: center; }
.section-head .eyebrow { margin-bottom: 20px; }
.section-head h2 { margin-bottom: 16px; }
.section-lede { font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem); color: var(--text-muted); }

/* ───── features / bento ───── */
.features {
  position: relative; z-index: 2;
  max-width: var(--container); margin: 0 auto;
  padding: var(--pad-section) var(--pad-x);
}
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(220px, auto);
  gap: 16px;
}
.bento-cell {
  grid-column: span 3;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
  position: relative; overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
  display: flex; flex-direction: column; gap: 8px;
}
.bento-cell:hover { border-color: color-mix(in oklab, var(--accent) 40%, var(--line)); transform: translateY(-2px); }
.bento-cell::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(400px at var(--mx,50%) var(--my,0%), color-mix(in oklab, var(--accent) 10%, transparent), transparent 60%);
  opacity: 0; transition: opacity 0.4s var(--ease); pointer-events: none;
}
.bento-cell:hover::before { opacity: 1; }
.cell-wide { grid-column: span 4; }
.cell-full { grid-column: span 6; }
.cell-third { grid-column: span 2; }
.cell-tall { grid-column: span 2; grid-row: span 2; }
.cell-kicker { font-size: 0.78rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; margin: 0 0 4px; }
.bento-cell h3 { margin-bottom: 4px; }
.bento-cell p { color: var(--text-muted); font-size: 0.96rem; margin-bottom: 0; }

.stream { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.stream span {
  font-family: 'SFMono-Regular', 'Menlo', monospace; font-size: 0.78rem;
  background: var(--bg); border: 1px solid var(--line); padding: 6px 12px;
  border-radius: 999px; color: var(--text-muted);
}
.cell-shot {
  margin-top: auto; border-radius: var(--radius); border: 1px solid var(--line);
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
}
.trace { margin-top: 20px; display: flex; flex-direction: column; gap: 6px; }
.trace-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  font-family: 'SFMono-Regular', 'Menlo', monospace; font-size: 0.78rem;
  padding: 8px 12px; background: var(--bg); border: 1px solid var(--line-soft);
  border-radius: 10px; color: var(--text-muted);
}
.trace-row span { color: var(--text-dim); }
.trace-row em { color: var(--accent); font-style: normal; font-size: 0.72rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.cell-belief { background: radial-gradient(520px at 100% 120%, color-mix(in oklab, var(--accent) 20%, transparent), transparent 62%), var(--bg-card); }
.cell-belief h3 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.3rem); letter-spacing: -0.02em; max-width: 22ch; }
.cell-belief p { max-width: 62ch; }
.cell-third .trace { margin-top: auto; padding-top: 20px; }
.cell-third .trace-row { grid-template-columns: auto 1fr; }
.chip { padding: 6px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 0.82rem; color: var(--text-muted); transition: all 0.2s var(--ease); }
.chip:hover { color: var(--text); border-color: var(--text-dim); }

/* ───── workflow ───── */
.workflow {
  position: relative; z-index: 2;
  max-width: var(--container); margin: 0 auto;
  padding: var(--pad-section) var(--pad-x);
}
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.steps li {
  padding: 32px; border-radius: var(--radius-lg);
  background: var(--bg-card); border: 1px solid var(--line);
  position: relative; display: flex; flex-direction: column; gap: 8px;
}
.step-num {
  font-family: var(--serif); font-style: italic; font-size: 2.4rem;
  color: var(--accent); line-height: 1; margin-bottom: 12px;
}
.steps li h3 { margin-bottom: 4px; }
.steps li p { margin: 0; }

/* ───── selected work ───── */
.work {
  position: relative; z-index: 2;
  max-width: var(--container); margin: 0 auto;
  padding: var(--pad-section) var(--pad-x);
}
.cases { display: flex; flex-direction: column; gap: 16px; }
.case {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(28px, 3.5vw, 44px);
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.case:hover { border-color: color-mix(in oklab, var(--accent) 40%, var(--line)); transform: translateY(-2px); }
.case-head { padding-top: 15px; }
.case-head .cell-kicker { margin-bottom: 10px; }
.case-head h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); letter-spacing: -0.02em; line-height: 1.15; }
.case-facts { margin: 0; display: grid; gap: 22px; align-content: start; }
.case-facts > div { min-width: 0; }
.case-facts dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; color: var(--text); padding-top: 14px; border-top: 1px solid var(--line); margin-bottom: 8px; }
.case-facts dd { margin: 0; color: var(--text-muted); font-size: 0.98rem; line-height: 1.6; }

/* ───── team ───── */
.team {
  position: relative; z-index: 2;
  max-width: var(--container); margin: 0 auto;
  padding: var(--pad-section) var(--pad-x);
}
.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.person {
  padding: 32px; border-radius: var(--radius-lg);
  background: var(--bg-card); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px; min-height: 230px;
}
.person-mark {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  margin-bottom: 18px;
  font-family: var(--serif); font-style: italic; font-size: 1.7rem; line-height: 1;
  color: var(--bg);
  background: linear-gradient(140deg, #ffd27a, var(--accent) 55%, var(--accent-2));
}
.person h3 { font-size: 1.7rem; letter-spacing: -0.02em; }
.person-loc { margin: 0; color: var(--text-dim); font-size: 0.9rem; }
.person-link { margin-top: auto; padding-top: 14px; margin-bottom: 0; font-size: 0.92rem; color: var(--text); border-bottom: 1px solid var(--line); align-self: flex-start; padding-bottom: 2px; }
.person-link:hover { border-color: var(--accent); }

/* ───── CTA ───── */
.cta {
  position: relative; z-index: 2;
  max-width: var(--container); margin: 0 auto;
  padding: 0 var(--pad-x) var(--pad-section);
}
.cta-inner {
  padding: clamp(48px, 7vw, 96px) clamp(32px, 5vw, 72px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(800px at 20% 0%, color-mix(in oklab, var(--accent) 18%, transparent), transparent 60%),
    radial-gradient(600px at 100% 100%, color-mix(in oklab, var(--accent-3) 20%, transparent), transparent 55%),
    var(--bg-card);
  border: 1px solid var(--line);
  text-align: center;
  overflow: hidden;
}
.cta h2 { margin-bottom: 28px; }
.cta-actions { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.cta-loc { margin: 24px 0 0; font-size: 0.9rem; color: var(--text-dim); }

/* ───── footer ───── */
.site-footer {
  position: relative; z-index: 2;
  max-width: var(--container); margin: 0 auto;
  padding: 56px var(--pad-x) 32px;
  border-top: 1px solid var(--line-soft);
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: clamp(24px, 4vw, 48px);
  margin-bottom: 48px;
}
.footer-note { margin-top: 16px; font-size: 0.9rem; color: var(--text-dim); max-width: 280px; }
.footer-heading { font-size: 0.82rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.12em; margin: 0 0 16px; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer ul li { font-size: 0.92rem; color: var(--text-muted); }
.site-footer ul a { font-size: 0.92rem; color: var(--text-muted); }
.site-footer ul a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-top: 24px; border-top: 1px solid var(--line-soft);
  font-size: 0.84rem; color: var(--text-dim);
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--text); }

/* ───── responsive ───── */
@media (max-width: 960px) {
  .site-nav, .header-cta { display: none; }
  .menu-toggle { display: inline-flex; }
  .site-header { grid-template-columns: auto 1fr; }
  .site-header.menu-open + .site-mobile-nav { display: flex; }

  .hero { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 24px; }
  .hero-proof { grid-template-columns: 1fr 1fr; gap: 16px; }

  .bento { grid-template-columns: 1fr 1fr; }
  .bento-cell, .cell-wide, .cell-tall, .cell-third { grid-column: auto; grid-row: auto; }
  .cell-full { grid-column: 1 / -1; }
  .case { grid-template-columns: 1fr; }

  .steps { grid-template-columns: 1fr; }
  .people { gap: 14px; }
  .person { padding: 24px; min-height: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .people { grid-template-columns: 1fr; }
  .person {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center;
    column-gap: 16px; row-gap: 2px; padding: 20px;
  }
  .person-mark { grid-row: 1 / span 2; margin: 0; width: 48px; height: 48px; font-size: 1.45rem; }
  .person h3 { font-size: 1.35rem; grid-column: 2; grid-row: 1; align-self: end; }
  .person-loc { grid-column: 2; grid-row: 2; align-self: start; }
  .person-link { grid-column: 3; grid-row: 1 / span 2; margin: 0; padding: 0 0 2px; align-self: center; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .cell-full { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-proof { grid-template-columns: 1fr; border-top: none; padding-top: 0; }
  .hero-card { position: static; width: 100%; margin-top: 16px; }
  .hero-visual { aspect-ratio: auto; }
  .hero-shot { aspect-ratio: 4/3; }
}

/* mobile nav sheet */
.site-mobile-nav {
  display: none;
  position: fixed; inset: 68px 0 0; z-index: 40;
  background: color-mix(in oklab, var(--bg) 95%, transparent);
  backdrop-filter: blur(24px);
  padding: 32px var(--pad-x);
  flex-direction: column; gap: 20px;
  border-top: 1px solid var(--line);
}
.site-mobile-nav a { font-size: 1.3rem; color: var(--text); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0s !important; transition: none !important; }
}
