/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
html { -webkit-text-size-adjust: 100%; }

/* ---------- Tokens ---------- */
:root {
  --blue: #0066FF;
  --blue-dark: #0047B3;
  --blue-soft: #8FB4FF;
  --navy: #0A0A1A;
  --white: #FFFFFF;

  /* Restrained gold accent: hairlines and the quasar flash only. */
  --gold: #C9A24F;
  --gold-soft: rgba(201, 162, 79, 0.55);

  --bg: var(--white);
  --bg-alt: #F4F7FC;
  --text: var(--navy);
  --text-muted: #565B72;
  --border: rgba(10, 10, 26, 0.1);
  --card-bg: var(--white);
  --card-shadow: 0 20px 40px -28px rgba(10, 10, 26, 0.25);
  --focus-ring: 0 0 0 3px rgba(0, 102, 255, 0.35);

  /* Frosted glass */
  --glass-bg: rgba(255, 255, 255, 0.58);
  --glass-border: rgba(10, 10, 26, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.9);
  --glass-shadow: 0 28px 56px -36px rgba(10, 10, 26, 0.35);
  --header-bg: rgba(255, 255, 255, 0.74);
  --ambient: rgba(0, 102, 255, 0.11);

  --quasar-core: var(--navy);
  --quasar-flash: var(--gold);

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "Space Mono", "SFMono-Regular", monospace;

  --container: 1120px;
  --radius-pill: 999px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --header-h: 76px;
  --hero-pad-top: 96px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: var(--navy);
  --bg-alt: #101122;
  --text: #F2F4FA;
  --text-muted: #A9AFC7;
  --border: rgba(255, 255, 255, 0.1);
  --card-bg: #14152A;
  --card-shadow: 0 20px 40px -28px rgba(0, 0, 0, 0.6);

  --gold: #E3BF6E;
  --gold-soft: rgba(227, 191, 110, 0.5);

  --glass-bg: rgba(20, 21, 42, 0.52);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-highlight: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 28px 56px -36px rgba(0, 0, 0, 0.7);
  --header-bg: rgba(10, 10, 26, 0.72);
  --ambient: rgba(0, 102, 255, 0.18);

  --quasar-core: var(--white);
  --quasar-flash: #FFC978;

  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Base ---------- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 16px;
  transition: background 0.35s ease, color 0.35s ease;
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 18px;
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.main-nav a:not(.btn):focus-visible,
.wordmark:focus-visible,
.contact-email a:focus-visible { border-radius: 8px; }

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* Scroll reveal (only when JS is present; content is always visible without it) */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js .card-grid > [data-reveal]:nth-child(2),
.js .numbers-grid > [data-reveal]:nth-child(2),
.js .video-grid > [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
.js .numbers-grid > [data-reveal]:nth-child(3),
.js .video-grid > [data-reveal]:nth-child(3) { transition-delay: 0.16s; }
.js .video-grid > [data-reveal]:nth-child(4) { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 14px 28px -14px rgba(0, 102, 255, 0.65);
}
.btn-primary:hover {
  background: var(--blue-dark);
  box-shadow: 0 18px 34px -12px rgba(0, 102, 255, 0.8);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: 0 14px 26px -16px rgba(0, 102, 255, 0.4);
}
.btn-on-dark {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-on-dark:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 14px 30px -14px rgba(255, 255, 255, 0.3);
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover { transform: none; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.35s ease;
}
/* Blur lives on a pseudo-element so the header itself never becomes the
   containing block for the fixed-position mobile menu. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
  flex: none;
}

/* Quasar logo icon */
.quasar-icon {
  flex: none;
  overflow: visible;
}
.quasar-icon .quasar-glow {
  filter: blur(3px);
}
.quasar-icon .quasar-ring {
  transform-box: view-box;
  transform-origin: 16px 16px;
  animation: quasar-spin 14s linear infinite;
}
.quasar-icon .quasar-core {
  fill: var(--quasar-core);
  transform-box: view-box;
  transform-origin: 16px 16px;
  animation: quasar-pulse 8s ease-in-out infinite;
}
@keyframes quasar-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes quasar-pulse {
  0%, 84%, 100% {
    fill: var(--quasar-core);
    filter: drop-shadow(0 0 2px rgba(0, 102, 255, 0.9));
  }
  90% {
    fill: var(--quasar-flash);
    filter: drop-shadow(0 0 5px rgba(255, 176, 59, 0.9));
  }
  96% {
    fill: var(--quasar-core);
    filter: drop-shadow(0 0 2px rgba(0, 102, 255, 0.9));
  }
}

.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a:not(.btn) {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.main-nav a:not(.btn):hover { color: var(--text); background: var(--bg-alt); }
.main-nav a:not(.btn)[aria-current="page"] { color: var(--blue); background: var(--bg-alt); }

.header-actions { display: flex; align-items: center; gap: 12px; flex: none; }

.theme-toggle,
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  cursor: pointer;
  flex: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.theme-toggle:hover,
.menu-toggle:hover { border-color: var(--blue); color: var(--blue); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.menu-toggle { display: none; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle span::before { position: absolute; top: -6px; }
.menu-toggle span::after { position: absolute; top: 6px; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* Between 861px and 1000px the full nav plus CTA no longer fits; the
   Newsletter link already covers the CTA, so drop it and tighten spacing. */
@media (max-width: 1000px) {
  .header-actions .nav-cta { display: none; }
  .main-nav { gap: 2px; }
  .main-nav a:not(.btn) { padding: 10px 12px; }
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--header-bg);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    flex-direction: column;
    align-items: stretch;
    padding: 24px 24px 48px;
    gap: 4px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
  }
  .main-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
  }
  .main-nav a { padding: 14px 18px; font-size: 1.05rem; }
  .main-nav .nav-cta-mobile { display: flex; margin-top: 10px; }
  .menu-toggle { display: inline-flex; }
}
@media (min-width: 861px) {
  .nav-cta-mobile { display: none; }
}
@media (max-width: 400px) {
  .wordmark { font-size: 0.98rem; gap: 8px; }
}

/* ---------- Hero (fixed dark space theme, independent of light/dark toggle) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #0d1b4c 0%, #060814 55%, #020208 100%);
  color: var(--white);
  padding: var(--hero-pad-top) 0 120px;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  width: 900px;
  height: 900px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(0, 102, 255, 0.35) 0%, rgba(0, 102, 255, 0) 65%);
  z-index: 0;
  pointer-events: none;
}

/* Faint grain texture on fixed-dark panels */
.hero::after,
.newsletter-band::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
.hero::after { z-index: 0; }
.newsletter-band::after { z-index: -1; }

.hero-spiral {
  position: absolute;
  top: calc(var(--hero-pad-top) + 64px);
  left: 50%;
  width: 460px;
  height: 460px;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}
.hero-spiral svg { width: 100%; height: 100%; display: block; }
.hero-spiral path {
  fill: none;
  stroke: rgba(160, 190, 255, 0.16);
  stroke-width: 1.1;
}

.hero .wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.headshot-frame {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.9), rgba(0, 102, 255, 0.1));
  margin-bottom: 32px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 20px 50px -20px rgba(0, 102, 255, 0.6);
}
.headshot-frame .headshot-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #060814;
}
.headshot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  transform: scale(1.5);
}

/* Hero eyebrow: readable blue with a pair of gold hairlines. */
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--blue-soft);
}
.hero .eyebrow::before,
.hero .eyebrow::after {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft));
  flex: none;
}
.hero .eyebrow::after { background: linear-gradient(90deg, var(--gold-soft), transparent); }

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  max-width: 16ch;
  margin-bottom: 20px;
}
.hero p {
  color: rgba(255, 255, 255, 0.78);
  max-width: 52ch;
  font-size: 1.08rem;
  margin-bottom: 36px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
@media (max-width: 640px) {
  :root { --hero-pad-top: 72px; }
  .hero { padding-bottom: 88px; }
  .hero .eyebrow { font-size: 0.72rem; gap: 10px; }
  .hero .eyebrow::before, .hero .eyebrow::after { width: 16px; }
}

/* ---------- Glass surfaces ---------- */
.glass {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
}

/* Soft ambient light behind glass so the blur has something to catch. */
.section-ambient {
  position: relative;
  overflow: hidden;
}
.section-ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(520px 320px at 18% 30%, var(--ambient), transparent 70%),
    radial-gradient(420px 280px at 84% 75%, var(--ambient), transparent 70%);
}
.section-ambient > .wrap { position: relative; z-index: 1; }

/* ---------- Numbers band ---------- */
.numbers-band {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: var(--radius-lg);
  text-align: center;
  overflow: hidden;
}
.numbers-grid .stat { padding: 32px 20px; }
.numbers-grid .stat + .stat { border-left: 1px solid var(--glass-border); }
.numbers-grid .stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  color: var(--blue);
  letter-spacing: -0.02em;
}
.numbers-grid .stat-label {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.updated-line {
  margin-top: 28px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
@media (max-width: 640px) {
  .numbers-grid { grid-template-columns: 1fr; }
  .numbers-grid .stat { padding: 26px 20px; }
  .numbers-grid .stat + .stat { border-left: 0; border-top: 1px solid var(--glass-border); }
}

/* ---------- Sections / cards ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 60ch; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 14px; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center p { margin: 0 auto; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.card {
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); }
.card h3 { font-size: 1.3rem; margin-bottom: 14px; }
.card p { color: var(--text-muted); margin-bottom: 28px; flex: 1; }
.card .btn { align-self: flex-start; }
@media (max-width: 760px) {
  .card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .card { padding: 28px; }
}

/* ---------- Newsletter teaser band ---------- */
.newsletter-band {
  position: relative;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(0, 102, 255, 0.28), transparent 60%),
    var(--navy);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  text-align: center;
  width: calc(100% - 48px);
  max-width: var(--container);
  margin: 0 auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 60px -40px rgba(0, 0, 0, 0.6);
}
.newsletter-band::before {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  margin: 0 auto 22px;
  background: var(--gold-soft);
}
.newsletter-band h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 12px; }
.newsletter-band p { color: rgba(255, 255, 255, 0.75); max-width: 48ch; margin: 0 auto 28px; }
@media (max-width: 640px) {
  .newsletter-band { padding: 44px 24px; }
}

/* ---------- About page ---------- */
.about-hero {
  padding: 88px 0 48px;
  text-align: center;
}
.about-hero h1 { font-size: clamp(2rem, 4.4vw, 2.8rem); margin-bottom: 14px; }
.about-hero p { color: var(--text-muted); max-width: 52ch; margin: 0 auto; font-size: 1.08rem; }

.story {
  max-width: 68ch;
  margin: 0 auto;
  padding: 40px 24px 88px;
  font-size: 1.08rem;
}
.story p { margin-bottom: 24px; }
.story p:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .about-hero { padding: 64px 0 24px; }
  .story { padding: 24px 24px 64px; font-size: 1.02rem; }
}

/* ---------- Work page ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.video-card {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  transition: transform 0.25s ease;
}
.video-card:hover { transform: translateY(-4px); }
.video-card:focus-visible { box-shadow: var(--focus-ring), var(--card-shadow); }
.video-thumb {
  position: relative;
  aspect-ratio: 9 / 16;
  background: var(--navy);
  overflow: hidden;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-play span {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(10, 10, 26, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform 0.2s ease, background 0.2s ease;
}
.video-card:hover .video-play span { transform: scale(1.06); background: rgba(0, 102, 255, 0.7); }
.video-play svg { width: 18px; height: 18px; margin-left: 2px; fill: #fff; }
.video-caption {
  padding: 14px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
}
/* 9:16 thumbnails get very tall in two columns on tablets, so step down
   through three columns before dropping to two on phones. */
@media (max-width: 960px) {
  .video-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (max-width: 640px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .video-grid { gap: 14px; }
  .video-caption { font-size: 0.82rem; padding: 10px 12px; }
}

.research-block {
  margin-top: 72px;
  padding: 48px;
  border-radius: var(--radius-lg);
}
.research-block h2 { font-size: 1.5rem; margin-bottom: 16px; }
.research-block p { color: var(--text-muted); max-width: 68ch; }
@media (max-width: 640px) {
  .research-block { margin-top: 48px; padding: 28px; }
}

/* ---------- Newsletter page ---------- */
.newsletter-hero {
  padding: 96px 0 64px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(0, 102, 255, 0.12), transparent 60%);
}
.newsletter-hero h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 16px; }
.newsletter-hero p { color: var(--text-muted); max-width: 54ch; margin: 0 auto 40px; font-size: 1.08rem; }

.signup-box {
  max-width: 480px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: left;
}
.substack-embed-wrap { width: 100%; }
.substack-embed-wrap iframe {
  display: block;
  width: 100%;
  height: 150px;
  border: 0;
  background: transparent;
  color-scheme: light;
  border-radius: 12px;
}

.fun-field { margin-top: 22px; padding-top: 22px; border-top: 1px dashed var(--border); }
.fun-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}
.fun-field input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  transition: border-color 0.2s ease;
}
.fun-field input:hover { border-color: rgba(0, 102, 255, 0.4); }
.fun-field .fun-caption {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.fun-field .fun-reply {
  margin-top: 10px;
  min-height: 1.4em;
  font-size: 0.85rem;
  color: var(--text);
  transition: opacity 0.3s ease;
}
.fun-field .fun-reply:empty { margin-top: 0; min-height: 0; }
/* Substack's embed wraps its legal text at narrow widths and its own logo
   then collides with it unless the frame is tall enough. */
@media (max-width: 640px) {
  .newsletter-hero { padding: 72px 0 56px; }
  .signup-box { padding: 20px; }
  .substack-embed-wrap iframe { height: 200px; }
}
@media (max-width: 420px) {
  .substack-embed-wrap iframe { height: 230px; }
}

.issue-list {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}
.issue-item {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--card-bg);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.issue-item:hover { border-color: rgba(0, 102, 255, 0.35); transform: translateY(-2px); }
.issue-item .issue-index {
  font-family: var(--font-mono);
  color: var(--blue);
  font-size: 0.85rem;
  flex: none;
  padding-top: 2px;
}
.issue-item h4 { font-size: 1rem; margin-bottom: 4px; }
.issue-item p { color: var(--text-muted); font-size: 0.94rem; }
@media (max-width: 640px) {
  .issue-item { padding: 16px 18px; gap: 12px; }
}

/* ---------- Contact page ---------- */
.contact-hero {
  padding: 120px 0;
  text-align: center;
}
.contact-hero h1 { font-size: clamp(2rem, 4.6vw, 2.8rem); margin-bottom: 14px; }
.contact-hero p { color: var(--text-muted); max-width: 48ch; margin: 0 auto 40px; font-size: 1.08rem; }
.contact-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2.4vw, 1.3rem);
  padding: 16px 28px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  margin-bottom: 44px;
  max-width: 100%;
  transition: border-color 0.2s ease;
}
.contact-email:hover { border-color: var(--blue); }
.contact-email a {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: center;
}
.contact-socials {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .contact-hero { padding: 80px 0; }
  .contact-email { padding: 14px 20px; border-radius: 20px; }
}

/* ---------- Social icons (shared) ---------- */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.social-icon:hover { color: var(--blue); border-color: var(--blue); transform: translateY(-2px); }
.social-icon:focus-visible { border-radius: 50%; }
.social-icon svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.easter-egg {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  opacity: 0.55;
  letter-spacing: 0.02em;
}

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