/* ==========================================================================
   RudCorp — technology consulting
   Design language inspired by editorial consulting sites: bold display type,
   a deep-navy + electric-blue + warm-gold palette, a concentric-arc motif,
   and an alternating light / dark section rhythm. Fully self-hosted (no
   external fonts/scripts/images) to satisfy a strict CSP.
   ========================================================================== */

/* ----- Self-hosted fonts (OFL) ------------------------------------------- */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-500.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-700.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/inter-700.woff2") format("woff2");
}

/* ----- Tokens ------------------------------------------------------------
   Semantic, theme-aware tokens. Light values live in :root; the
   [data-theme="dark"] block overrides them. "Band" sections (statement, CTA,
   footer) stay dark in both themes by design. */
:root {
  --paper: #ffffff;
  --paper-2: #f3f5fb;
  --surface: #ffffff;
  --ink: #0a1430;
  --ink-soft: #515c75;
  --navy: #081333; /* dark-band background (statement / CTA) */
  --navy-2: #0d1f52;
  --blue: #2347ff;
  --blue-600: #1a36d8;
  --gold: #ffc24b;
  --coral: #ff6a5a;
  --line: rgba(10, 20, 48, 0.12);
  --line-soft: rgba(10, 20, 48, 0.07);
  --line-dark: rgba(255, 255, 255, 0.16);
  --header-bg: rgba(255, 255, 255, 0.82);
  --footer-bg: #060a16;
  --shadow: rgba(10, 20, 48, 0.4);
  --ring: #e4e8f5; /* decorative arc rings */
  --logo-ink: #000000; /* the logo's black beam — flips light on dark surfaces */

  --display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --container: 1180px;
  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --paper: #070b18;
  --paper-2: #0e1730;
  --surface: #0f1830;
  --ink: #e8ecf7;
  --ink-soft: #9aa6c2;
  --navy: #0b1430; /* bands sit just above the page in dark mode */
  --navy-2: #131f49;
  --blue: #5878ff; /* brightened for contrast on dark */
  --blue-600: #6f8aff;
  --gold: #ffce67;
  --line: rgba(255, 255, 255, 0.13);
  --line-soft: rgba(255, 255, 255, 0.07);
  --line-dark: rgba(255, 255, 255, 0.16);
  --header-bg: rgba(7, 11, 24, 0.82);
  --footer-bg: #04070f;
  --shadow: rgba(0, 0, 0, 0.6);
  --ring: rgba(255, 255, 255, 0.1);
  --logo-ink: #e8ecf7;
}

/* Smooth the light/dark transition (skipped under reduced-motion below). */
body,
.site-header,
.svc,
.post,
.platforms li {
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

/* ----- Reset / base ------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  overflow-x: hidden; /* mobile safety net */
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  overflow-wrap: break-word;
}
p {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
img,
svg {
  display: block;
  max-width: 100%;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 10px 0;
  z-index: 200;
}
.skip-link:focus {
  left: 0;
}

/* ----- Layout helpers ---------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.2rem, 4vw, 2.5rem);
}
.section {
  padding-block: clamp(4.5rem, 9vw, 8rem);
}
.section--tight {
  padding-block: clamp(3.5rem, 6vw, 5.5rem);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1.4rem;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 22px;
  flex: none;
  background:
    radial-gradient(circle, var(--gold) 0 2.5px, transparent 3px),
    radial-gradient(circle, transparent 0 5px, var(--blue) 5.5px 7px, transparent 7.5px),
    radial-gradient(circle, transparent 0 8.5px, var(--gold) 9px 10px, transparent 10.5px);
}
.section--dark .eyebrow {
  color: var(--gold);
}
.lead {
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 60ch;
}
.section--dark .lead {
  color: rgba(255, 255, 255, 0.72);
}

/* ----- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn--primary {
  background: var(--blue);
  color: #fff;
}
.btn--primary:hover {
  background: var(--blue-600);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover {
  border-color: var(--ink);
}
.section--dark .btn--ghost {
  color: #fff;
  border-color: var(--line-dark);
}
.section--dark .btn--ghost:hover {
  border-color: #fff;
}
.btn--light {
  background: #fff;
  color: #0a1430; /* sits on the always-dark CTA band */
}
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--blue);
  transition: gap 0.25s var(--ease);
}
.arrow-link:hover {
  gap: 0.85rem;
}
.section--dark .arrow-link {
  color: var(--gold);
}

/* ----- Header ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 74px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.brand .mark {
  height: 30px;
  width: auto;
  flex: none;
}
.nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.nav a {
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.97rem;
  color: var(--ink);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav a:hover {
  background: var(--paper-2);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 12px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  position: relative;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: background 0.2s;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease);
}
.nav-toggle span::before {
  top: -6px;
}
.nav-toggle span::after {
  top: 6px;
}
.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}
.nav-toggle[aria-expanded="true"] span::before {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* ----- Hero -------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 80% at 88% 0%, rgba(35, 71, 255, 0.07), transparent 60%),
    var(--paper);
  padding-block: clamp(4rem, 8vw, 7.5rem) clamp(4rem, 8vw, 7rem);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.7rem, 6.2vw, 5rem);
}
.hero h1 .accent {
  color: var(--blue);
}
.hero .lead {
  margin-top: 1.6rem;
  font-size: clamp(1.1rem, 1.9vw, 1.4rem);
}
.hero-cta {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}
.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}
.hero-art svg {
  width: 100%;
  height: auto;
}
.hero-stats {
  margin-top: clamp(3rem, 5vw, 4.5rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
.stat .num {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat .num .unit {
  color: var(--gold);
}
.stat .label {
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 26ch;
}

/* ----- Section heads ----------------------------------------------------- */
.section-head {
  max-width: 760px;
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}
.section-head h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
}
.section-head .lead {
  margin-top: 1.1rem;
}
.head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

/* ----- Brand statement (dark band) -------------------------------------- */
.section--dark {
  background: var(--navy);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.statement p {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.6vw, 2.9rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  max-width: 20ch;
}
.statement .hl {
  color: var(--gold);
}
.statement .sub {
  font-family: var(--body);
  font-weight: 400;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  max-width: 52ch;
  margin-top: 1.8rem;
  letter-spacing: 0;
}
.statement-deco {
  position: absolute;
  right: -120px;
  top: 50%;
  transform: translateY(-50%);
  width: 480px;
  opacity: 0.5;
  pointer-events: none;
}

/* ----- Services grid ----------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}
.svc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.7rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
.svc:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 18px 40px -22px var(--shadow);
}
.svc .ic {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(35, 71, 255, 0.08);
  color: var(--blue);
  margin-bottom: 1.1rem;
}
.svc .ic svg {
  width: 21px;
  height: 21px;
}
.svc h3 {
  font-size: 1.12rem;
  font-family: var(--body);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.svc p {
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ----- Experience (3 col) ------------------------------------------------ */
.exp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
}
.exp .n {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--blue);
}
.section--dark .exp .n {
  color: var(--gold);
}
.exp h3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  margin-top: 0.9rem;
}
.exp p {
  margin-top: 0.8rem;
  color: var(--ink-soft);
  font-size: 1rem;
}
.section--dark .exp p {
  color: rgba(255, 255, 255, 0.68);
}

/* ----- Industries -------------------------------------------------------- */
.ind-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.ind-list li {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.ind-list li:nth-child(3n) {
  border-right: none;
}
.ind-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.2rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  letter-spacing: -0.01em;
  transition: background 0.2s var(--ease), padding 0.25s var(--ease);
}
.ind-list a .pl {
  color: var(--blue);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.ind-list a:hover {
  background: var(--paper-2);
  padding-left: 1.6rem;
}
.ind-list a:hover .pl {
  opacity: 1;
  transform: translateX(0);
}

/* ----- Platforms --------------------------------------------------------- */
.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.platforms li {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.6rem 1.15rem;
  background: var(--surface);
}

/* ----- Insights ---------------------------------------------------------- */
.posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.post {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.post:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -22px var(--shadow);
}
.post .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.post:hover .thumb img {
  transform: scale(1.04);
}
.post .thumb {
  aspect-ratio: 16 / 10;
  background: var(--navy);
  position: relative;
  overflow: hidden;
}
.post .thumb svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.post .body {
  padding: 1.3rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}
.post .tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}
.post h3 {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.post .arrow-link {
  margin-top: auto;
  font-size: 0.92rem;
}

/* ----- CTA band ---------------------------------------------------------- */
.cta {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta h2 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  position: relative;
}
.cta .lead {
  margin: 1.2rem auto 0;
  text-align: center;
}
.cta-actions {
  margin-top: 2.2rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  position: relative;
}
.cta-deco {
  position: absolute;
  width: 540px;
  opacity: 0.28;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* ----- Footer ------------------------------------------------------------ */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255, 255, 255, 0.72);
  --logo-ink: #e8ecf7; /* footer is always dark → keep the logo's black beam light */
  padding-block: clamp(3rem, 5vw, 4.5rem) 2rem;
  font-size: 0.95rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line-dark);
}
.footer-brand .brand {
  color: #fff;
}
.footer-brand p {
  margin-top: 1rem;
  max-width: 30ch;
}
.fcol h4 {
  font-family: var(--body);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 1rem;
}
.fcol a {
  display: block;
  padding: 0.32rem 0;
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.2s;
}
.fcol a:hover {
  color: var(--gold);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.8rem;
}
.footer-bottom .legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
}
.footer-bottom a:hover {
  color: var(--gold);
}

/* ----- Legal pages ------------------------------------------------------- */
.legal-page {
  max-width: 760px;
  margin-inline: auto;
}
.legal-page .note {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}
.legal-page h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
}
.legal-page .updated {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  margin-top: 1rem;
}
.legal-page h2 {
  font-size: 1.4rem;
  margin-top: 2.6rem;
}
.legal-page p {
  margin-top: 1rem;
  color: var(--ink);
  opacity: 0.85;
}
.legal-page ul.bullets {
  margin-top: 1rem;
  list-style: disc;
  padding-left: 1.3rem;
  color: var(--ink);
  opacity: 0.85;
}
.legal-page ul.bullets li {
  margin-top: 0.4rem;
}
.legal-page a {
  color: var(--blue);
  font-weight: 500;
}

/* ----- Theme toggle ------------------------------------------------------ */
.theme-toggle {
  width: 46px;
  height: 46px;
  flex: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 12px;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.theme-toggle:hover {
  border-color: var(--ink);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
}
.theme-toggle .i-moon {
  display: none;
}
.theme-toggle .i-sun {
  display: block;
}
[data-theme="dark"] .theme-toggle .i-sun {
  display: none;
}
[data-theme="dark"] .theme-toggle .i-moon {
  display: block;
}

/* ----- Media frames + imagery ------------------------------------------- */
.media-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--navy);
  box-shadow: 0 30px 60px -34px var(--shadow);
}
.media-frame::after {
  /* subtle brand wash so photos sit on-palette across themes */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(8, 19, 51, 0.28));
  pointer-events: none;
}
.media-frame img,
.media-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ratio-4x3 {
  aspect-ratio: 4 / 3;
}
.ratio-3x2 {
  aspect-ratio: 3 / 2;
}
.ratio-16x10 {
  aspect-ratio: 16 / 10;
}

/* Decorative concentric badge that overlaps a media frame */
.arc-badge {
  position: absolute;
  width: 96px;
  height: 96px;
  right: -22px;
  bottom: -22px;
  background: var(--surface);
  border-radius: 50%;
  padding: 14px;
  box-shadow: 0 18px 36px -18px var(--shadow);
  z-index: 2;
}

/* Hero media column */
.hero-media {
  position: relative;
}
.hero-media .media-frame {
  aspect-ratio: 4 / 3;
}

/* Two-column split (statement / about with imagery) */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split.split--reverse .split-media {
  order: -1;
}

/* Dark bands need a hairline in dark mode to separate from the page */
[data-theme="dark"] .section--dark,
[data-theme="dark"] .cta {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ----- Reveal animation (progressive enhancement) ------------------------
   Content is fully visible by default. Only when JS is present (html.js) do
   elements start hidden and animate in — so a JS failure never hides content. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ----- Mobile nav drawer ------------------------------------------------- */
@media (max-width: 940px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav {
    position: fixed;
    inset: 74px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 1rem clamp(1.2rem, 4vw, 2.5rem) 1.5rem;
    transform: translateY(-130%);
    transition: transform 0.35s var(--ease);
    box-shadow: 0 24px 40px -28px rgba(10, 20, 48, 0.5);
  }
  .nav.is-open {
    transform: translateY(0);
  }
  .nav a {
    padding: 0.85rem 0.6rem;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--line-soft);
  }
  .header-cta {
    display: none;
  }
}

/* ----- Responsive -------------------------------------------------------- */
@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-art {
    order: -1;
    max-width: 320px;
    margin-inline: auto;
  }
  .hero-media {
    order: -1;
    max-width: 560px;
    margin-inline: auto;
    width: 100%;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .split.split--reverse .split-media {
    order: -1;
  }
  .split-media {
    max-width: 560px;
  }
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .exp-grid {
    grid-template-columns: 1fr;
  }
  .ind-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .ind-list li:nth-child(3n) {
    border-right: 1px solid var(--line);
  }
  .ind-list li:nth-child(2n) {
    border-right: none;
  }
  .posts {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .ind-list {
    grid-template-columns: 1fr;
  }
  .ind-list li,
  .ind-list li:nth-child(3n) {
    border-right: none;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
