/* ==========================================================================
   gamifi.me — shared stylesheet
   Loaded by every page. Page-specific additions live in their own file
   (e.g. integration-adapters.css) and are loaded after this one.

   Body class contract:
     (none)  → landing page (index.html)
     .doc    → interior documentation page (narrower measure, smaller headings)

   Motion contract: site.js adds .js-reveal to <html> only when
   IntersectionObserver exists. Without it, nothing is ever hidden.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Inter (self-hosted variable, Latin subsets)
   Two subsets split on unicode-range: the 47KB latin file covers this site's
   content, and latin-ext is only fetched if a page actually uses those marks.
   font-display: swap renders in the fallback immediately, then swaps.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-var-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-var-latin-ext.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces */
  --bg: #081120;
  --panel: rgba(11, 23, 43, 0.85);
  --panel-2: rgba(15, 33, 61, 0.78);
  --surface: rgba(12, 26, 49, 0.75);
  --surface-deep: rgba(7, 18, 34, 0.70);

  /* Text */
  --text: #ecf3ff;
  --muted: #b4c4df;
  --dim: #92a7c9;

  /* Accents */
  --accent: #5ee0ff;
  --accent-soft: #98f2ff;
  --accent-2: #7c5cff;
  --brand-gold: #f5c542;
  --success: #60d394;
  --warning: #ffcc66;
  --danger: #ff8f9b;

  /* Lines */
  --border: rgba(255, 255, 255, 0.12);
  --border-soft: rgba(255, 255, 255, 0.08);
  --border-lift: rgba(255, 255, 255, 0.22);
  --border-bright: rgba(94, 224, 255, 0.38);

  /* Elevation — three tiers only, so hierarchy stays readable.
     1: resting surfaces · 2: raised / hovered · 3: the hero console */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.18), 0 8px 22px rgba(0, 0, 0, 0.20);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.24), 0 18px 42px rgba(0, 0, 0, 0.36);
  --shadow-3: 0 30px 70px rgba(0, 0, 0, 0.50);

  /* Shape — a three-step scale plus a pill */
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.2s;
  --dur-slow: 0.55s;

  /* Metrics */
  --max: 1200px;
  --nav-h: 72px;

  /* Type */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Interior pages run a narrower measure and slightly looser body copy. */
.doc {
  --max: 1050px;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  line-height: 1.5;
  /* Light text on a dark ground renders too heavy without this on macOS. */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(circle at 20% 15%, rgba(124, 92, 255, 0.18), transparent 30%),
    radial-gradient(circle at 85% 5%, rgba(94, 224, 255, 0.16), transparent 29%),
    linear-gradient(180deg, #07101d 0%, #0a1730 52%, #07101d 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

/* The sticky nav would otherwise cover whatever an in-page link jumps to. */
[id] {
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

:where(a, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  letter-spacing: -0.03em;
}

h2 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  letter-spacing: -0.03em;
}

.doc h2 {
  margin: 0 0 10px;
  font-size: 1.5rem;
  letter-spacing: normal;
}

.lead {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 75ch;
}

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

/* Vertical rhythm belongs to the landing page's own sections. Never style the
   bare `section` type here: interior pages use <section class="card">, and a
   `.doc section` reset would out-specify .card and flatten its padding. */
body:not(.doc) main > section {
  padding: 34px 0;
}

.doc header {
  padding: 14px 0 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 22px;
}

.section-copy {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

/* --------------------------------------------------------------------------
   4. Scroll reveal
   Gated on .js-reveal so content is never hidden without working JS.
   -------------------------------------------------------------------------- */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
}

.js-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--dur-slow) var(--ease),
    transform var(--dur-slow) var(--ease);
}

/* --------------------------------------------------------------------------
   5. Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(6, 14, 27, 0.72);
  border-bottom: 1px solid var(--border-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--nav-h);
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.brand-text {
  white-space: nowrap;
  font-size: 1.3rem;
}

.doc .brand-text {
  font-size: 1.1rem;
}

.brand-name {
  color: var(--brand-gold);
}

.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: url('gamifi-rocket-icon.png') center / cover no-repeat, #0a1730;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.doc .nav-links {
  gap: 18px;
  font-size: 13.5px;
}

.nav-links a {
  transition: color var(--dur) var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

/* Mobile menu button — revealed at the same width the link row collapses. */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.nav-toggle:hover {
  border-color: var(--border-bright);
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

/* --------------------------------------------------------------------------
   6. Buttons, pills, eyebrows
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 14px 20px;
  border-radius: var(--r-md);
  font-weight: 800;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  transition:
    transform var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    background var(--dur) var(--ease),
    filter var(--dur) var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--border-bright);
  background: rgba(255, 255, 255, 0.07);
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #04101f;
  border: none;
}

.btn.primary:hover {
  filter: brightness(1.07);
}

/* Interior pages use a lighter, pill-shaped button. */
.doc .btn {
  padding: 10px 14px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(94, 224, 255, 0.22);
  background: none;
  color: var(--accent);
  font-weight: 700;
}

.doc .btn:hover {
  background: rgba(94, 224, 255, 0.1);
}

.cta {
  display: inline-block;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #04101f;
  font-weight: 800;
  box-shadow: var(--shadow-1);
  transition: transform var(--dur) var(--ease), filter var(--dur) var(--ease);
}

.cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
}

.cta-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cta-dark {
  background: linear-gradient(135deg, #122949, #0a1a33);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: rgba(94, 224, 255, 0.12);
  border: 1px solid rgba(94, 224, 255, 0.18);
  color: #d4f8ff;
  font-size: 13px;
}

.badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(94, 224, 255, 0.22);
  background: rgba(94, 224, 255, 0.1);
  color: #d4f8ff;
  font-size: 13px;
}

.pill-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.pill {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-pill);
  padding: 7px 11px;
  background: var(--surface);
  color: #d9e7ff;
  font-size: 0.9rem;
}

.footer-nav {
  margin: 32px 0 48px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   7. Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-1);
  transition:
    transform var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.card:hover {
  border-color: var(--border-lift);
}

/* Only cards that actually lead somewhere lift on hover. */
.card:has(.feature-link):hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.doc .card h2 {
  font-size: 1.15rem;
}

.card p,
.card li {
  color: var(--muted);
}

.card p {
  margin: 0 0 10px;
}

.card p:last-child {
  margin-bottom: 0;
}

.card ul {
  margin: 0;
  padding-left: 18px;
}

.icon {
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(94, 224, 255, 0.16), rgba(124, 92, 255, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--accent);
}

.icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 700;
  color: var(--accent);
  transition: transform var(--dur) var(--ease), filter var(--dur) var(--ease);
}

.card:hover .feature-link {
  transform: translateX(3px);
  filter: brightness(1.12);
}

/* --------------------------------------------------------------------------
   8. Landing page — hero
   -------------------------------------------------------------------------- */
.hero {
  padding: 10px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.gradient {
  background: linear-gradient(135deg, #ffffff 0%, #a8f1ff 40%, #96a7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero .lead {
  font-size: 1.08rem;
  max-width: 62ch;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.metric {
  padding: 18px;
  border-radius: var(--r-md);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  transition: border-color var(--dur) var(--ease);
}

.metric:hover {
  border-color: var(--border-lift);
}

.metric strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.35rem;
}

.metric span {
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-visual {
  position: relative;
  margin: 0;
}

/* --------------------------------------------------------------------------
   9. Product console
   An illustrative live-tournament view. Built in markup rather than as an
   image so it stays crisp at any density, weighs nothing, and can animate.
   The figures in it are sample data — see the caption in the markup.
   -------------------------------------------------------------------------- */
.console {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(19, 36, 64, 0.92), rgba(10, 22, 42, 0.94));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-3);
}

.console-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid var(--border-soft);
}

.console-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 0.95rem;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--success);
  animation: live-pulse 2.6s var(--ease) infinite;
}

@keyframes live-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(96, 211, 148, 0.24);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(96, 211, 148, 0);
  }
}

.console-meta {
  color: var(--dim);
  font-size: 0.78rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.console-body {
  padding: 14px 16px 16px;
}

/* Leaderboard ---------------------------------------------------------- */
.board-head,
.board-row {
  display: grid;
  grid-template-columns: 26px 1fr auto 50px;
  align-items: center;
  gap: 10px;
}

.board-head {
  padding: 0 4px 8px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--dim);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.board-head .col-score,
.board-head .col-delta {
  text-align: right;
}

.board {
  list-style: none;
  margin: 0;
  padding: 0;
}

.board-row {
  padding: 9px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.86rem;
}

.board-row:last-child {
  border-bottom: none;
}

.rank {
  color: var(--dim);
  font-weight: 700;
  font-size: 0.8rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.board-row.medal-1 .rank {
  color: var(--brand-gold);
}

.board-row.medal-2 .rank {
  color: #cfdcec;
}

.board-row.medal-3 .rank {
  color: #e0a06a;
}

.who {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04101f;
  font-size: 0.62rem;
  font-weight: 800;
}

.who-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score {
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.delta {
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.delta.up {
  color: var(--success);
}

.delta.down {
  color: var(--danger);
}

.delta.flat {
  color: var(--dim);
}

/* Reward pipeline ------------------------------------------------------ */
.pipeline {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.pipeline-label {
  margin-bottom: 10px;
  color: var(--dim);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.pipeline-track {
  display: flex;
  gap: 8px;
}

.stage {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.stage-name {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-count {
  font-weight: 800;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.stage.done {
  border-color: rgba(96, 211, 148, 0.35);
  background: rgba(96, 211, 148, 0.08);
}

.stage.done .stage-count {
  color: var(--success);
}

.stage.active {
  border-color: rgba(94, 224, 255, 0.4);
  background: rgba(94, 224, 255, 0.1);
}

.stage.active .stage-count {
  color: var(--accent);
}

.console-caption {
  margin-top: 12px;
  color: var(--dim);
  font-size: 0.72rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   10. Landing page — sections
   -------------------------------------------------------------------------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.workflow .step {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-1);
  transition: border-color var(--dur) var(--ease);
}

.workflow .step:hover {
  border-color: var(--border-lift);
}

.workflow .step .num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #04101f;
  font-weight: 900;
}

.workflow .step h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.workflow .step p {
  margin: 0;
  color: var(--muted);
}

.audience {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.checklist li {
  padding: 14px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.checklist li:hover {
  border-color: var(--border-lift);
  background: rgba(255, 255, 255, 0.05);
}

.checklist li strong {
  color: var(--text);
}

.final-cta {
  margin: 36px 0 58px;
  padding: 28px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(circle at top right, rgba(124, 92, 255, 0.2), transparent 30%),
    radial-gradient(circle at left center, rgba(94, 224, 255, 0.16), transparent 35%),
    var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.final-cta h2 {
  margin-bottom: 8px;
}

.final-cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.portfolio {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: 24px;
}

.portfolio-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.portfolio-btn {
  display: inline-block;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, #122949, #0a1a33);
  color: var(--text);
  font-weight: 800;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.portfolio-btn:hover {
  transform: translateY(-2px);
  border-color: var(--border-bright);
}

.footer {
  padding: 12px 0 34px;
  color: var(--muted);
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   11. Interior pages — grids, timelines, tables
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 22px;
}

.doc .section {
  margin: 24px 0;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.timeline .step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  transition: border-color var(--dur) var(--ease);
}

.timeline .step:hover {
  border-color: var(--border-lift);
}

.timeline .step strong {
  display: block;
  margin-bottom: 8px;
}

.timeline .step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 660px;
}

.table-wrap thead {
  background: rgba(94, 224, 255, 0.08);
}

.table-wrap th,
.table-wrap td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table-wrap th {
  color: #d7f7ff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.table-wrap td {
  color: var(--muted);
  font-size: 0.95rem;
}

.table-wrap tbody tr {
  transition: background var(--dur) var(--ease);
}

.table-wrap tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.table-wrap tbody tr:last-child td {
  border-bottom: none;
}

.table-wrap tbody td:first-child {
  color: #e9f2ff;
  font-weight: 600;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   12. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .hero-grid,
  .grid-3,
  .workflow,
  .audience,
  .hero-metrics {
    grid-template-columns: 1fr;
  }

  /* The link row folds into a toggle-driven panel below the bar. */
  .nav-inner {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
    order: 3;
  }

  .cta-group {
    order: 2;
    margin-left: auto;
  }

  .nav-links {
    display: none;
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 0 8px;
    font-size: 15px;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 11px 2px;
    border-bottom: 1px solid var(--border-soft);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }
}

@media (max-width: 900px) {
  .grid,
  .timeline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand-text,
  .doc .brand-text {
    font-size: 1.05rem;
  }

  .brand-badge {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .cta {
    padding: 10px 14px;
    font-size: 0.86rem;
  }

  .console-bar {
    flex-wrap: wrap;
    gap: 4px;
  }

  .portfolio-actions {
    flex-direction: column;
  }

  .portfolio-btn {
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   13. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* Never leave revealed content stranded when the animation is suppressed. */
  .js-reveal [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
