/* =========================================================
   Self-hosted fonts
   ========================================================= */

/* Brand wordmark — Roboto Mono */
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/roboto-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/roboto-mono-700.woff2') format('woff2');
}

/* Display + body — Geist Sans */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/geist-sans-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/geist-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/geist-sans-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/geist-sans-700.woff2') format('woff2');
}

/* Eyebrows, labels, data — Geist Mono */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/geist-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/geist-mono-500.woff2') format('woff2');
}

/* =========================================================
   Predictive Labs — dark terminal palette
   ========================================================= */

:root {
  --bg: #0A1420;
  --bg-elevated: #101E2E;
  --surface: #162438;
  --surface-2: #1A2D46;
  --rule: #1F2E44;
  --rule-strong: #2A3D58;
  --ink: #E6EEF5;
  --ink-soft: #C8D3E0;
  --muted: #8293A8;
  --muted-2: #4E5E75;
  --accent: #00F0FF;
  --accent-hover: #66F5FF;
  --accent-soft: rgba(0, 240, 255, 0.12);
  --positive: #00F0A8;
  --negative: #FF6B7A;

  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  --wordmark: 'Roboto Mono', ui-monospace, Menlo, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.875rem;
  --fs-2xl: 2.5rem;
  --fs-3xl: 3.25rem;
  --fs-4xl: 4.5rem;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;
  --space-8: 8rem;

  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.5s;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
}
body {
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--bg);
  overflow-x: hidden;
  min-height: 100vh;
  font-feature-settings: 'ss01', 'ss03', 'cv11';
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0, 240, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 240, 255, 0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

main, footer { position: relative; z-index: 1; }

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }

::selection { background: var(--accent); color: var(--bg); }

/* =========================================================
   Typography
   ========================================================= */
.mono { font-family: var(--mono); }

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
}

h1 { font-size: clamp(2.25rem, 6vw, var(--fs-4xl)); font-weight: 400; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.875rem, 4vw, var(--fs-3xl)); font-weight: 400; letter-spacing: -0.03em; }
h3 { font-size: clamp(1.375rem, 2.2vw, var(--fs-xl)); font-weight: 500; letter-spacing: -0.02em; }
h4 { font-size: var(--fs-lg); line-height: 1.3; font-weight: 500; letter-spacing: -0.015em; }

.italic-accent {
  color: var(--accent);
  font-weight: 500;
  font-style: normal;
}

p { max-width: 62ch; }
p + p { margin-top: 1em; }

.lede {
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  line-height: 1.5;
  font-weight: 300;
  color: var(--ink-soft);
  max-width: 40ch;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* =========================================================
   Layout
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--space-7);
  border-top: 1px solid var(--rule);
}

.section:first-of-type { border-top: none; }

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

@media (min-width: 900px) {
  .section-head {
    grid-template-columns: 1fr 2fr;
    gap: var(--space-5);
  }
}

.section-head .eyebrow { padding-top: 0.4em; }

/* =========================================================
   Navigation
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 20, 32, 0.85);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  transition: opacity 0.2s var(--ease);
}

.brand:hover { opacity: 0.85; }

.brand-logo {
  width: 34px;
  height: 34px;
  display: block;
  flex-shrink: 0;
}

.brand-wordmark {
  font-family: var(--wordmark);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
}

.brand-wordmark .wm-bold { font-weight: 700; }
.brand-wordmark .wm-regular { font-weight: 400; margin-left: 0.35em; }

@media (max-width: 380px) {
  .brand-wordmark { display: none; }
}

.nav-links {
  display: none;
  list-style: none;
  gap: var(--space-4);
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (min-width: 800px) {
  .nav-links { display: flex; }
}

.nav-links a {
  position: relative;
  color: var(--muted);
  padding-block: 0.3em;
  transition: color 0.25s var(--ease);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current='page'] { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a[aria-current='page']::after { width: 100%; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  margin-right: -8px;
}

@media (min-width: 800px) { .nav-toggle { display: none; } }

.nav-toggle span {
  width: 22px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.mobile-menu {
  display: none;
  padding: var(--space-3) 0 var(--space-4);
  border-top: 1px solid var(--rule);
}

.mobile-menu.is-open { display: block; }

.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--fs-lg);
  font-weight: 500;
}

.mobile-menu a { color: var(--ink); }
.mobile-menu a[aria-current='page'] { color: var(--accent); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  padding-block: clamp(3rem, 10vw, 7rem) 0;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 140%;
  background: radial-gradient(ellipse at center, rgba(0, 240, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  padding-bottom: clamp(2rem, 6vw, 4rem);
}

@media (min-width: 1000px) {
  .hero-inner {
    grid-template-columns: 1.3fr 1fr;
    align-items: end;
    gap: var(--space-6);
  }
}

.hero h1 {
  font-size: clamp(2.25rem, 6vw, var(--fs-4xl));
  font-weight: 300;
  max-width: 18ch;
  color: var(--ink);
  letter-spacing: -0.035em;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
  font-weight: 500;
}

.hero-meta {
  padding-top: var(--space-3);
  border-top: 1px solid var(--rule);
}

@media (min-width: 1000px) {
  .hero-meta {
    padding-top: 0;
    border-top: none;
    align-self: end;
    max-width: 42ch;
  }
}

/* =========================================================
   Ticker — live prediction market feed
   ========================================================= */
.ticker-wrap {
  position: relative;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(to bottom, rgba(0, 240, 255, 0.02), transparent);
  overflow: hidden;
  z-index: 2;
}

.ticker-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 80px;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(to left, var(--bg), transparent);
}

.ticker-label {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--bg);
  padding: 0.55em 0.9em;
  border-right: 1px solid var(--rule-strong);
  z-index: 3;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5em;
  height: 100%;
}

.ticker-label::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--accent);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.ticker {
  display: flex;
  overflow: hidden;
  padding-block: var(--space-2);
  padding-left: 110px;
}

.ticker-track {
  display: flex;
  gap: var(--space-4);
  animation: ticker-scroll 90s linear infinite;
  flex-shrink: 0;
  padding-right: var(--space-4);
}

.ticker-wrap:hover .ticker-track { animation-play-state: paused; }

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 0.8em;
  font-family: var(--mono);
  font-size: var(--fs-sm);
  white-space: nowrap;
  padding-right: var(--space-4);
  border-right: 1px solid var(--rule);
}

.ticker-item .t-title {
  color: var(--ink-soft);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.ticker-item .t-venue {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.ticker-item .t-value {
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.ticker-item .t-delta {
  font-variant-numeric: tabular-nums;
  font-size: 0.7rem;
  padding: 2px 6px;
  font-weight: 500;
}

.ticker-item .t-delta.up { color: var(--positive); background: rgba(0, 240, 168, 0.1); }
.ticker-item .t-delta.down { color: var(--negative); background: rgba(255, 107, 122, 0.1); }
.ticker-item .t-delta.flat { color: var(--muted); background: rgba(130, 147, 168, 0.1); }

.ticker-item .t-volume {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   Feature rows with SVG diagrams
   ========================================================= */
.rows { display: flex; flex-direction: column; }

.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  padding-block: var(--space-5);
  border-top: 1px solid var(--rule);
  position: relative;
  transition: background 0.3s var(--ease);
}

.row:hover {
  background: linear-gradient(90deg, var(--accent-soft) 0%, transparent 40%);
}

.row:last-child { border-bottom: 1px solid var(--rule); }

@media (min-width: 900px) {
  .row {
    grid-template-columns: 80px 200px 1fr;
    gap: var(--space-4);
    align-items: center;
    padding-inline: var(--space-3);
    margin-inline: calc(var(--space-3) * -1);
  }
}

.row-num {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  color: var(--accent);
  align-self: start;
  padding-top: 0.4em;
}

.row-viz { display: none; }

@media (min-width: 900px) {
  .row-viz {
    display: block;
    width: 100%;
    max-width: 200px;
    opacity: 0.92;
    transition: opacity 0.3s var(--ease);
  }
  .row:hover .row-viz { opacity: 1; }
}

.row-content h3 {
  font-size: var(--fs-lg);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.4em;
}

.row-content p {
  font-size: var(--fs-base);
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 60ch;
}

/* =========================================================
   Terminal preview
   ========================================================= */
.terminal-section {
  padding-block: clamp(3rem, 8vw, 6rem);
  border-top: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}

.terminal-section::before {
  content: '';
  position: absolute;
  top: 30%;
  left: -20%;
  width: 80%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(0, 240, 255, 0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.terminal-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  max-width: 65ch;
  position: relative;
  z-index: 1;
}

.terminal-head h2 {
  font-size: clamp(1.875rem, 4vw, var(--fs-3xl));
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.terminal-head h2 em {
  font-style: normal;
  color: var(--accent);
  font-weight: 500;
}

.terminal-head p {
  font-size: var(--fs-md);
  color: var(--ink-soft);
  max-width: 60ch;
  margin-top: var(--space-1);
  line-height: 1.6;
}

.terminal-frame {
  position: relative;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-elevated);
  box-shadow:
    0 24px 80px -20px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(0, 240, 255, 0.04),
    0 0 60px -10px rgba(0, 240, 255, 0.12);
  z-index: 1;
}

.terminal-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.04), transparent 40%);
  pointer-events: none;
  z-index: 2;
}

.terminal-frame img {
  display: block;
  width: 100%;
  height: auto;
  /* Blur scales with viewport: ~1.2px on phones, up to 2.8px on desktop */
  filter: blur(clamp(1.2px, 0.2vw, 2.8px));
  transform: scale(1.015);
  transform-origin: center;
  user-select: none;
  -webkit-user-select: none;
}

.preview-badge {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  z-index: 3;
  background: rgba(10, 20, 32, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(0, 240, 255, 0.45);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.5em 0.85em;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  line-height: 1;
}

.preview-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 6px var(--accent);
}

.terminal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-3);
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.terminal-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

.terminal-meta span::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
}

/* =========================================================
   Team
   ========================================================= */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 800px) {
  .team-grid { grid-template-columns: 1fr 1fr; gap: var(--space-6) var(--space-5); }
}

.profile { display: flex; flex-direction: column; gap: var(--space-2); }

.profile-frame {
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.profile-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.02);
}

.profile-frame::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(0, 240, 255, 0.15);
  pointer-events: none;
  z-index: 2;
}

.profile h3 {
  font-size: var(--fs-lg);
  font-weight: 500;
  margin-top: var(--space-2);
  color: var(--ink);
  letter-spacing: -0.02em;
}

.profile .role {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.profile p {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 55ch;
}

.profile p + p { margin-top: 0.75em; }

/* Founder profile — photo smaller (220px vs the old 320px) */
.profile-founder {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  align-items: start;
}

@media (min-width: 900px) {
  .profile-founder {
    grid-template-columns: 220px 1fr;
    gap: var(--space-6);
  }
}

.profile-founder .founder-photo { max-width: 220px; }
.profile-founder .founder-bio { max-width: 65ch; display: grid; gap: var(--space-3); }

.profile-founder .founder-bio .bio-sections {
  display: grid;
  gap: var(--space-3);
}

.profile-founder .founder-bio .bio-sections h4 {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.4em;
}

/* Generalized bio-sections for non-founder profile cards (Walid, Romain) */
.profile .bio-sections {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.profile .bio-sections h4 {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.4em;
}

.profile .bio-sections p {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 55ch;
}

.profile-founder .bio-lead {
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--ink);
  font-weight: 400;
}

.profile-links {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-2);
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-links a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 2px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.profile-links a:hover { color: var(--accent); border-color: var(--accent); }

/* =========================================================
   Contact
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 640px) {
  .contact-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
}
@media (min-width: 1080px) {
  .contact-grid { grid-template-columns: repeat(4, 1fr); }
}

.contact-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--accent);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.contact-block:hover {
  border-top-color: var(--accent-hover);
  transform: translateY(-2px);
}
.contact-block h4 {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-1);
}
.contact-block p { color: var(--ink); font-size: var(--fs-md); }
.contact-block a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 2px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
  word-break: break-word;
}
.contact-block a:hover { color: var(--accent); border-color: var(--accent); }

/* Office block — sits inside the same section as the contact grid,
   separated by a thin rule rather than a full section break */
.contact-office {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--rule);
}
@media (min-width: 760px) {
  .contact-office {
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-6);
    align-items: start;
  }
}
.contact-office-heading {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
  margin-top: var(--space-2);
}
.contact-office-uen {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: var(--space-3);
}
.contact-office-address {
  font-style: normal;
  font-family: var(--sans);
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--ink);
}

/* =========================================================
   Partner logos
   ========================================================= */
.partner-lockup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}

.partner-lockup .partner-label {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.partner-lockup a {
  display: inline-block;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  padding: var(--space-2) 0;
}

.partner-lockup a:hover { opacity: 0.85; transform: translateY(-1px); }

.partner-lockup img { display: block; height: auto; max-width: 180px; }

.partner-meta {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: var(--space-1);
}

/* =========================================================
   CTA
   ========================================================= */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--mono);
  font-size: var(--fs-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
  transition: color 0.25s var(--ease);
  font-weight: 500;
}

.cta:hover { color: var(--accent); }
.cta .arrow { transition: transform 0.25s var(--ease); display: inline-block; }
.cta:hover .arrow { transform: translateX(4px); }

.cta-block { margin-top: var(--space-4); }

/* =========================================================
   Footer
   ========================================================= */
.footer {
  margin-top: var(--space-7);
  padding-block: var(--space-5) var(--space-4);
  border-top: 1px solid var(--accent);
  background: var(--bg-elevated);
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 800px) {
  .footer-top {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-4);
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: var(--space-1);
}

.footer-brand-lockup img {
  width: 44px;
  height: 44px;
  display: block;
  flex-shrink: 0;
}

.footer-brand-lockup .brand-wordmark { font-size: 1.3rem; }

.footer-brand h4 {
  font-size: var(--fs-xl);
  font-weight: 300;
  max-width: 14ch;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.footer-col h5 {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-2);
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.5em; }
.footer-col a {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  transition: color 0.2s var(--ease);
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-3);
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  color: var(--muted);
}

@media (min-width: 700px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* =========================================================
   Motion
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .ticker-track { animation: none; }
}

.hero h1, .hero .eyebrow, .hero-meta, .hero .lede {
  opacity: 0;
  transform: translateY(14px);
  animation: enter 0.9s var(--ease) forwards;
}

.hero .eyebrow { animation-delay: 0.05s; }
.hero h1 { animation-delay: 0.15s; }
.hero .lede { animation-delay: 0.3s; }
.hero-meta { animation-delay: 0.45s; }

@keyframes enter {
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   Page header
   ========================================================= */
.page-header {
  padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(0, 240, 255, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.page-header > * { position: relative; z-index: 1; }

.page-header .eyebrow { margin-bottom: var(--space-2); }

.page-header h1 {
  font-size: clamp(2.25rem, 5vw, var(--fs-4xl));
  font-weight: 300;
  max-width: 18ch;
  margin-bottom: var(--space-3);
  color: var(--ink);
  letter-spacing: -0.035em;
}

.page-header h1 em {
  font-style: normal;
  color: var(--accent);
  font-weight: 500;
}

.page-header .lede { max-width: 55ch; }

/* =========================================================
   Statement section (large pull-quote between sections)
   ========================================================= */
.statement {
  padding-block: clamp(4rem, 10vw, 8rem);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.statement::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0, 240, 255, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

.statement > * { position: relative; z-index: 1; }

.statement-eyebrow {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.statement-heading {
  font-size: clamp(2rem, 5.5vw, var(--fs-3xl));
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.1;
  max-width: 22ch;
  color: var(--ink);
}

.statement-support {
  margin-top: var(--space-4);
  font-size: var(--fs-md);
  color: var(--ink-soft);
  max-width: 60ch;
  line-height: 1.5;
}

/* =========================================================
   Audience cards (Who we serve)
   ========================================================= */
.audience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

@media (min-width: 760px) {
  .audience-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.audience-card {
  position: relative;
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--rule);
  transition: border-color 220ms var(--ease), background 220ms var(--ease), transform 220ms var(--ease);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.audience-card:hover {
  border-color: rgba(0, 240, 255, 0.45);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.audience-card::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 24px;
  height: 1px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 220ms var(--ease);
}

.audience-card:hover::after { opacity: 1; }

.audience-icon {
  color: var(--accent);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-1);
}

.audience-icon svg { width: 100%; height: 100%; }

.audience-label {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.audience-lede {
  font-family: var(--sans);
  font-size: var(--fs-lg);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
  margin: 0;
}

.audience-card p.audience-body {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
}

/* =========================================================
   Prose
   ========================================================= */
.prose {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  max-width: 65ch;
}

.prose p { font-size: var(--fs-md); line-height: 1.7; color: var(--ink-soft); max-width: none; }
.prose em { color: var(--accent); font-style: normal; font-weight: 500; }
.prose a { color: var(--ink); border-bottom: 1px solid var(--accent); padding-bottom: 2px; transition: color 0.2s var(--ease); }
.prose a:hover { color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 500; }

/* Legal prose — privacy, terms, cookies pages */
.legal-prose { max-width: 72ch; }

.legal-prose h2 {
  font-size: var(--fs-lg);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
}

.legal-prose h2:first-child { margin-top: 0; }

.legal-prose p {
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--ink-soft);
}

.legal-prose ul {
  list-style: none;
  padding: 0;
  margin: var(--space-2) 0;
  display: grid;
  gap: var(--space-2);
}

.legal-prose ul li {
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--ink-soft);
  padding-left: 1.25rem;
  position: relative;
}

.legal-prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 6px;
  height: 1px;
  background: var(--accent);
}

.legal-prose code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  color: var(--ink);
}

.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;
}

/* =========================================================
   Research hub (/research/)
   ========================================================= */
.research-hub {
  padding-block: clamp(3rem, 8vw, 6rem);
}

.research-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule);
}

.research-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--rule);
  transition: background 0.3s var(--ease);
  position: relative;
}

.research-card:hover {
  background: linear-gradient(90deg, var(--accent-soft) 0%, transparent 50%);
}

@media (min-width: 900px) {
  .research-card {
    grid-template-columns: 200px 1fr auto;
    gap: var(--space-4);
    align-items: start;
    padding-inline: var(--space-3);
    margin-inline: calc(var(--space-3) * -1);
  }
}

.research-card .r-type {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 0.3em;
}

.research-card .r-body h3 {
  font-size: var(--fs-xl);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.3em;
}

.research-card .r-body h3 a {
  color: inherit;
  transition: color 0.2s var(--ease);
}

.research-card .r-body h3 a:hover { color: var(--accent); }

.research-card .r-body .r-subtitle {
  font-size: var(--fs-base);
  color: var(--muted);
  font-style: italic;
  margin-bottom: var(--space-2);
  max-width: 60ch;
}

.research-card .r-body p {
  font-size: var(--fs-base);
  color: var(--ink-soft);
  max-width: 60ch;
  line-height: 1.6;
}

.research-card .r-meta {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 0.3em;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .research-card .r-type,
  .research-card .r-meta {
    font-size: 0.7rem;
  }
}

/* =========================================================
   Research article (/research/framework.html)
   ========================================================= */
.research-article {
  padding-block: clamp(2rem, 6vw, 4rem) clamp(3rem, 8vw, 6rem);
}

.article-header {
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--space-6);
  max-width: 740px;
}

.article-header .eyebrow {
  margin-bottom: var(--space-3);
}

.article-header h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
  max-width: 22ch;
  margin-bottom: var(--space-2);
}

.article-header .subtitle {
  font-size: var(--fs-lg);
  font-weight: 300;
  font-style: italic;
  color: var(--accent);
  max-width: 50ch;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-4);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.article-meta .author {
  color: var(--ink);
}

.article-meta span {
  display: inline-flex;
  align-items: center;
}

.article-meta span + span::before {
  content: '·';
  margin-right: var(--space-3);
  margin-left: calc(var(--space-3) * -1);
  color: var(--muted-2);
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 1100px) {
  .article-layout {
    grid-template-columns: 220px minmax(0, 740px);
    gap: var(--space-6);
    align-items: start;
  }
}

.article-toc {
  display: none;
}

@media (min-width: 1100px) {
  .article-toc {
    display: block;
    position: sticky;
    top: calc(var(--space-4) + 60px);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: var(--space-2);
  }
}

.article-toc h4 {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-2);
}

.article-toc ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  padding-left: 0;
  counter-reset: toc;
}

.article-toc li {
  font-size: var(--fs-sm);
  line-height: 1.4;
}

.article-toc a {
  color: var(--muted);
  transition: color 0.2s var(--ease);
  display: block;
  padding: 0.15em 0;
  border-left: 2px solid transparent;
  padding-left: var(--space-1);
  margin-left: calc(var(--space-1) * -1);
}

.article-toc a:hover,
.article-toc a.is-active {
  color: var(--ink);
  border-left-color: var(--accent);
}

.article-body {
  max-width: 740px;
  font-size: var(--fs-md);
  line-height: 1.72;
  color: var(--ink-soft);
}

.article-body h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  scroll-margin-top: 100px;
}

.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
  font-size: var(--fs-lg);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
  scroll-margin-top: 100px;
}

.article-body p {
  margin-bottom: var(--space-2);
  max-width: none;
}

.article-body p + p { margin-top: var(--space-2); }

.article-body strong {
  color: var(--ink);
  font-weight: 500;
}

.article-body em {
  color: var(--ink);
  font-style: italic;
}

.article-body ul,
.article-body ol {
  margin: var(--space-2) 0 var(--space-3) var(--space-3);
  padding-left: 0;
}

.article-body li {
  margin-bottom: 0.5em;
  line-height: 1.7;
}

.article-body li strong {
  color: var(--accent);
}

.article-body code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--surface);
  padding: 0.12em 0.4em;
  border-radius: 3px;
  color: var(--ink);
  border: 1px solid var(--rule);
  letter-spacing: -0.01em;
}

.article-body hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: var(--space-5) 0;
}

.article-body a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 1px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.article-body a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Display equations in their own breathing block */
.article-body .katex-display {
  margin: var(--space-3) 0 !important;
  overflow-x: auto;
  overflow-y: hidden;
  padding: var(--space-3) var(--space-2);
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  border-radius: 4px;
}

/* Tune KaTeX colors to match the dark palette */
.article-body .katex {
  color: var(--ink);
  font-size: 1.05em;
}

/* References list (final section) */
.article-references ul {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: ref;
  font-size: var(--fs-sm);
}

.article-references li {
  padding-left: 2.5em;
  margin-bottom: var(--space-2);
  position: relative;
  line-height: 1.6;
  counter-increment: ref;
}

.article-references li::before {
  content: '[' counter(ref) ']';
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--muted);
  padding-top: 0.15em;
}

/* Back-to-research link at the end */
.article-footer {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.article-footer .cta {
  font-size: var(--fs-sm);
}

.article-footer .footnote-status {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Home-page 'from the research' strip */
.from-research {
  padding-block: var(--space-5);
  border-top: 1px solid var(--rule);
}

.from-research-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

@media (min-width: 800px) {
  .from-research-card {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: var(--space-4);
  }
}

.from-research-card:hover {
  transform: translateY(-2px);
  border-left-color: var(--accent-hover);
}

.from-research-card .fr-eyebrow {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4em;
}

.from-research-card h3 {
  font-size: var(--fs-lg);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.3em;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.from-research-card p {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  max-width: 60ch;
  line-height: 1.55;
}
