/* Axiom — landing page styles.

   Dark only: one palette, no theme switch.
   Colours, type, spacing and radii follow the Axiom DS dark semantic roles
   (rgomids/axiom-ds, packages/tokens, commit ded417f). Values that are
   landing-specific, not DS primitives, are marked "landing" below.

   Mobile first: the base rules target small screens; wider layouts are added
   in the min-width media queries at the end of each block. */

/* --- Tokens: change colours, spacing and radii for the whole page here --- */
:root {
  --bg:            #0d1117;  /* landing: page canvas, deeper than DS surface.canvas */
  --bg-raised:     #12171e;  /* landing: alternate section band */
  --surface:       #161b22;
  --surface-hover: #1c232c;
  --border:        #262e38;
  --border-strong: #3a4552;

  --text:          #fafafa;  /* DS semantic.text.primary */
  --text-muted:    #d0d5dd;  /* DS semantic.text.secondary */
  --text-faint:    #b2bac2;  /* DS semantic.text.muted */

  --accent:        #91bcff;  /* DS semantic.action.primary and focus.ring */
  --accent-ink:    #101828;  /* DS semantic.action.onPrimary */
  --gold-strong:   #f5cf8b;  /* landing: lighter gold for gradients and hover */
  --gold:          #edb351;  /* DS color.brand-gold; also the landing highlight: links, checks, eyebrows, gradient start */

  --glow-blue:     rgba(145, 188, 255, 0.16);
  --glow-deep:     rgba(77, 142, 255, 0.12);
  /* Faint 120px grid, used only by the hero (Getting started has a perspective grid) */
  --grid:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 120px 120px,
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 120px 120px;
  --gradient:      linear-gradient(100deg, var(--gold) 0%, var(--gold-strong) 100%);

  /* DS: Inter with system fallback; mono is landing-only (eyebrows, code) */
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", "JetBrains Mono", Menlo,
               Consolas, "Liberation Mono", monospace;

  /* DS type scale */
  --fs-12: 12px;
  --fs-14: 14px;
  --fs-16: 16px;
  --fs-20: 20px;

  /* DS spacing scale */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-64: 64px;

  /* DS radii: 6px controls, 8px cards; large panels and pills are landing */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --motion-fast: 160ms;  /* DS motion.fast */
  --shell: 1200px;

  color-scheme: dark;
}

/* --- Base --- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

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

/* Titles use the monospace stack, like the nav and the eyebrows */
h1, h2, h3 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-mono);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

p { margin: 0; }

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-strong); }

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
}

/* DS focus pattern: visible ring in semantic.focus.ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: var(--space-16);
  top: -100px;
  z-index: 100;
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.skip-link:focus { top: var(--space-16); }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--space-20);
}

/* Highlighted words share the button's green gradient */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  color: var(--gold);
  font-size: var(--fs-12);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: rgba(13, 17, 23, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }

.brand-mark { width: 32px; height: 32px; }

.brand-name {
  font-size: var(--fs-16);
  font-weight: 600;
  letter-spacing: 0.12em;
}

@media (min-width: 480px) {
  .brand-mark { width: 36px; height: 36px; }
  .brand-name { font-size: var(--fs-20); letter-spacing: 0.16em; }
}

/* Brand signature: the gold diamond echoes the one in the logo */
.brand-spark {
  width: 7px;
  height: 7px;
  margin-top: -14px;
  margin-left: -4px;
  background: var(--gold);
  transform: rotate(45deg);
  border-radius: 1px;
  box-shadow: 0 0 10px rgba(237, 179, 81, 0.6);
}

.header-nav {
  display: flex;
  align-items: center;
}

/* Nav items: monospace, with a thin separator between neighbours */
.nav-link {
  position: relative;
  padding: var(--space-8) 6px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font: var(--fs-12)/1.4 var(--font-mono);
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color var(--motion-fast) ease;
}
.nav-link:hover { color: var(--text); }

.nav-link + .nav-link { margin-left: 13px; }
.nav-link + .nav-link::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -7px;
  width: 1px;
  height: 12px;
  background: var(--border-strong);
  transform: translateY(-50%);
}

/* Below 1000px the section links are hidden: no separator before GitHub */
@media (max-width: 999px) {
  .nav-section + .nav-link:not(.nav-section) { margin-left: 0; }
  .nav-section + .nav-link:not(.nav-section)::before { display: none; }
}

.nav-section { display: none; }

/* Language menu: globe button + flag list (lang.js) */
.lang-menu { position: relative; margin-left: var(--space-12); }

.lang-toggle {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--motion-fast) ease, background var(--motion-fast) ease;
}
.lang-toggle:hover,
.lang-toggle[aria-expanded="true"] { border-color: var(--accent); background: var(--surface); }

/* Spinning globe: the two meridians sweep across the face */
.globe {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.globe-meridian {
  transform-box: fill-box;
  transform-origin: center;
  animation: globe-spin 4s linear infinite;
}
.globe-meridian-two { animation-delay: -2s; }

@keyframes globe-spin {
  0%   { transform: translateX(-6px) scaleX(0.15); opacity: 0; }
  15%  { opacity: 1; }
  50%  { transform: translateX(0) scaleX(1); }
  85%  { opacity: 1; }
  100% { transform: translateX(6px) scaleX(0.15); opacity: 0; }
}

.lang-list {
  position: absolute;
  top: calc(100% + var(--space-8));
  right: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: 0;
  padding: var(--space-4);
  list-style: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.lang-list[hidden] { display: none; }

/* Flag-only options; the language name is the button's accessible label */
.lang-option {
  display: grid;
  place-items: center;
  padding: var(--space-8) var(--space-12);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: var(--fs-14);
  text-align: left;
  cursor: pointer;
}
.lang-option:hover,
.lang-option:focus-visible { background: var(--surface-hover); color: var(--text); }
.lang-option[aria-checked="true"] { background: rgba(237, 179, 81, 0.1); box-shadow: inset 2px 0 0 var(--gold); }

.flag {
  flex: none;
  width: 30px;
  height: 20px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

@media (min-width: 1000px) {
  .nav-section { display: inline-block; }
}

/* --- Hero --- */
.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-64) 0 0;
  /* Static depth: a top haze, a glow behind the preview and a faint grid */
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, var(--glow-blue), transparent 70%),
    radial-gradient(ellipse 55% 35% at 50% 88%, var(--glow-deep), transparent 70%),
    var(--grid),
    var(--bg);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Hero logo: the white mark keeps its gold detail; the glow is CSS only */
.hero-logo {
  width: 240px;
  height: auto;
  margin-bottom: var(--space-24);
  filter: drop-shadow(0 0 28px rgba(145, 188, 255, 0.28));
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-4) var(--space-16);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: rgba(22, 27, 34, 0.7);
  color: var(--text-muted);
  font: var(--fs-12)/1.8 var(--font-mono);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.hero-title {
  max-width: 22ch;
  margin-top: var(--space-24);
  font-size: clamp(1.9rem, 4.6vw, 3rem);  /* landing: display size above the DS scale */
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-copy {
  max-width: 62ch;
  margin-top: var(--space-24);
  color: var(--text-muted);
  font-size: var(--fs-16);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-12);
  margin-top: var(--space-32);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  min-height: 48px;
  padding: 0 var(--space-24);
  border-radius: var(--radius-pill);
  font-size: var(--fs-16);
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease,
              border-color var(--motion-fast) ease, background var(--motion-fast) ease;
}

/* Bright, saturated yellow so the main call to action stands out */
.btn-primary {
  background: linear-gradient(100deg, #ffc93c 0%, #ffe07a 100%);
  color: var(--accent-ink);
  box-shadow: 0 8px 28px rgba(255, 201, 60, 0.3);
}
.btn-primary:hover {
  color: var(--accent-ink);
  transform: translateY(-1px);
  box-shadow: 0 10px 34px rgba(255, 201, 60, 0.42);
}

.btn-ghost {
  border: 1px solid var(--border-strong);
  background: rgba(13, 17, 23, 0.6);
  color: var(--text);
}
.btn-ghost:hover { color: var(--text); border-color: var(--accent); background: var(--surface); }

.guarantees {
  display: flex;
  flex-direction: column;
  margin: var(--space-48) 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(22, 27, 34, 0.75);
}

.guarantees li {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-12) var(--space-20);
  color: var(--text);
  font-size: var(--fs-14);
  font-weight: 500;
}
.guarantees li + li { border-top: 1px solid var(--border); }

.check {
  flex: none;
  width: 10px;
  height: 6px;
  margin-top: -3px;
  border-left: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(-45deg);
}

@media (min-width: 760px) {
  .hero { padding-top: 72px; }
  .hero-logo { width: 340px; }
  .hero-copy { font-size: 1.1rem; }
  .guarantees { flex-direction: row; }
  .guarantees li + li { border-top: 0; border-left: 1px solid var(--border); }
}

/* --- Skills window (Getting started) --- */
.preview {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.window {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--surface);
  text-align: left;
  box-shadow: 0 -10px 90px var(--glow-blue), 0 0 0 6px rgba(255, 255, 255, 0.02);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: var(--space-16);
  padding: var(--space-12) var(--space-16);
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}

.window-dots { display: inline-flex; gap: 6px; }
.window-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.window-title {
  color: var(--text-faint);
  font: var(--fs-12)/1 var(--font-mono);
}

.window-body { display: grid; grid-template-columns: 1fr; }

/* Side list of skills: wraps as chips on small screens, a column from 900px */
.window-side {
  padding: var(--space-16);
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}

.side-label {
  margin-bottom: var(--space-12);
  color: var(--text-faint);
  font-size: var(--fs-12);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skill-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-tab {
  width: 100%;
  padding: 6px var(--space-8);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-faint);
  font: var(--fs-12)/1.5 var(--font-mono);
  text-align: left;
  cursor: pointer;
  transition: color var(--motion-fast) ease, background var(--motion-fast) ease;
}
.skill-tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }

@media (max-width: 899px) {
  .skill-tab { width: auto; border: 1px solid var(--border); }
}

.skill-tab[aria-selected="true"] {
  background: rgba(237, 179, 81, 0.1);
  box-shadow: inset 2px 0 0 var(--gold);
  color: var(--text);
}

/* Skill panel: replaces the old command listing inside the window */
.window-main {
  min-width: 0;
  padding: var(--space-24) var(--space-20) var(--space-32);
}

.skill-name {
  color: var(--gold);
  font: 600 var(--fs-14)/1.4 var(--font-mono);
  overflow-wrap: anywhere;
}

.skill-desc {
  margin-top: var(--space-8);
  color: var(--text);
  font-size: var(--fs-16);
  font-weight: 500;
}

.skill-note,
.skill-invoke {
  margin-top: var(--space-8);
  color: var(--text-muted);
  font-size: var(--fs-14);
}
.skill-invoke { margin-top: var(--space-16); }

/* Example with its Copy button */
.copy-block {
  display: flex;
  align-items: flex-start;
  gap: var(--space-12);
  margin-top: var(--space-8);
  padding: var(--space-12) var(--space-12) var(--space-12) var(--space-16);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.copy-block pre {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding-top: 4px;
  color: var(--text);
  font: 13px/1.6 var(--font-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.copy-block code { padding: 0; border: 0; background: none; font-size: inherit; }

/* Copy buttons: icon only (Lucide "copy"); the label is for screen readers */
.copy-btn {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color var(--motion-fast) ease, color var(--motion-fast) ease;
}
.copy-btn:hover { border-color: var(--accent); color: var(--text); }

.copy-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.copy-btn .icon-done { display: none; }
.copy-btn.is-copied { border-color: var(--gold); color: var(--gold); }
.copy-btn.is-copied .icon-copy { display: none; }
.copy-btn.is-copied .icon-done { display: block; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.preview-caption {
  padding: var(--space-12) var(--space-16);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: var(--bg-raised);
  color: var(--text-faint);
  font-size: var(--fs-12);
  text-align: center;
}

@media (min-width: 900px) {
  .window-body { grid-template-columns: 240px 1fr; }
  .window-side { border-bottom: 0; border-right: 1px solid var(--border); padding: var(--space-20) var(--space-16); }
  .skill-tabs { flex-direction: column; flex-wrap: nowrap; }
  .window-main { padding: var(--space-32); }
}

/* --- Sections --- */
.section { padding: var(--space-64) 0; }

.section-alt {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 50% 40% at 85% 0%, var(--glow-blue), transparent 70%),
    var(--bg-raised);
}

/* Getting started: perspective floor grid (synthwave style), drawn as SVG in
   index.html with its horizon at the top of the section. Static. Raise the
   stroke alpha below to make it stronger. */
.section-alt.section-grid {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 60% 35% at 50% 0%, rgba(145, 188, 255, 0.18), transparent 70%),
    var(--bg-raised);
}

.persp-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  stroke: rgba(145, 188, 255, 0.22);
  stroke-width: 1;
  pointer-events: none;
}
.persp-grid line { vector-effect: non-scaling-stroke; }

.section-head {
  max-width: 720px;
  margin: 0 auto var(--space-40);
  text-align: center;
}

.section-head h2 {
  margin-top: var(--space-12);
  font-size: clamp(1.9rem, 4.6vw, 3rem);  /* landing: section display size */
  font-weight: 700;
}

.section-lede {
  margin-top: var(--space-16);
  color: var(--text-muted);
}

.callout {
  max-width: 720px;
  margin: var(--space-40) auto 0;
  color: var(--text-muted);
  font-size: var(--fs-14);
  text-align: center;
}
.callout strong { color: var(--text); }

@media (min-width: 760px) {
  .section { padding: 112px 0; }
}

/* --- How it works: blurred data-center photo behind the whole section ---
   The photo is docs/assets/generic-server.jpeg, loaded from its raw URL.
   Change the blur, the opacity or the overlay below to adjust it. */
.section-photo {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.section-photo-img {
  position: absolute;
  inset: -24px;
  z-index: -2;
  width: calc(100% + 48px);
  max-width: none;
  height: calc(100% + 48px);
  object-fit: cover;
  filter: blur(6px) saturate(0.9);
  opacity: 0.55;
  pointer-events: none;
}

/* Dark overlay keeps every text token at its tested contrast */
.section-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 50% 40% at 85% 0%, var(--glow-blue), transparent 70%),
    linear-gradient(180deg, rgba(13, 17, 23, 0.82) 0%, rgba(13, 17, 23, 0.7) 50%, rgba(13, 17, 23, 0.88) 100%);
}

/* --- How it works: flow diagram (based on axiom-diagrama/) ---
   Wires and signals are drawn by diagram.js; the rings pulse here.
   Both stop under prefers-reduced-motion. */
.flow {
  margin: 0;
  padding: var(--space-24) var(--space-20);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 40% 60% at 50% 50%, rgba(77, 142, 255, 0.07), transparent 70%),
    rgba(18, 23, 30, 0.55);  /* translucent: the section photo shows through */
}

.flow-top,
.flow-stage,
.flow-process { position: relative; z-index: 1; }

.flow-top { text-align: center; }

.flow-label {
  color: var(--text-faint);
  font: var(--fs-12)/1.6 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flow-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: var(--space-48);
  padding: var(--space-32) 0;
}

.flow-wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.flow-wire { fill: none; stroke: var(--border-strong); stroke-width: 1.5; }

.flow-dot {
  fill: var(--gold);
  filter: drop-shadow(0 0 5px var(--gold));
  transition: opacity var(--motion-fast) ease;
}

.flow-side {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-20);
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-node {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  width: 240px;
  padding: var(--space-8) var(--space-12);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-raised);
}

.flow-node > svg {
  flex: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--text);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flow-node strong { display: block; color: var(--text); font-size: var(--fs-14); font-weight: 600; }
.flow-node small { display: block; color: var(--text-faint); font-size: var(--fs-12); }

.flow-core {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-12);
  padding: 22px 0 0;
}

.flow-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  border: 1.5px solid var(--gold);
  border-radius: 30px;
  background: var(--bg);
  box-shadow: 0 0 40px rgba(237, 179, 81, 0.2);
}

.flow-logo { width: 104px; height: 104px; object-fit: contain; }

/* Pulsing rings: same size as the frame, scaled outwards */
.flow-ring {
  position: absolute;
  top: 22px;
  left: 50%;
  width: 128px;
  height: 128px;
  margin-left: -64px;
  border: 1px solid var(--gold);
  border-radius: 30px;
  opacity: 0;
  box-shadow: 0 0 8px rgba(237, 179, 81, 0.5);
  animation: flow-radiate 4.8s infinite;
  pointer-events: none;
}
.flow-ring-two { animation-delay: 0.5s; }

@keyframes flow-radiate {
  0%, 35% { transform: scale(1); opacity: 0; }
  45% { opacity: 0.8; }
  75%, 100% { transform: scale(1.28); opacity: 0; }
}

.flow-role {
  color: var(--text-muted);
  font-size: var(--fs-12);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.flow-process {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-8);
  padding-top: var(--space-8);
  color: var(--text-faint);
  font-size: var(--fs-14);
}
.flow-process span { color: var(--gold); }

@media (min-width: 760px) {
  .flow { padding: var(--space-32); }
  .flow-stage {
    grid-template-columns: 1fr 200px 1fr;
    align-items: center;
    gap: var(--space-32);
    min-height: 360px;
  }
  .flow-side { gap: var(--space-48); }
  .flow-inputs { justify-self: start; align-items: flex-start; }
  .flow-outputs { justify-self: end; align-items: flex-end; }
  .flow-node { width: auto; min-width: 200px; }
}

/* --- What it is: joined cards --- */
.joined {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-raised) 100%);
}

.joined-item {
  position: relative;
  padding: var(--space-32) var(--space-24);
}
.joined-item + .joined-item { border-top: 1px solid var(--border); }

.num {
  position: absolute;
  top: var(--space-32);
  right: var(--space-24);
  color: var(--gold);
  font: var(--fs-12)/1 var(--font-mono);
}

.problem {
  color: var(--gold);
  font: var(--fs-12)/1.6 var(--font-mono);
  text-decoration: line-through;
  text-decoration-color: rgba(237, 179, 81, 0.6);
}

.joined-item h3 {
  margin: var(--space-12) 0 var(--space-8);
  font-size: var(--fs-20);
  font-weight: 600;
}

.joined-item p:last-child { color: var(--text-muted); font-size: var(--fs-14); }

@media (min-width: 640px) {
  .joined { grid-template-columns: repeat(2, 1fr); }
  .joined-item + .joined-item { border-top: 0; }
  .joined-item:nth-child(even) { border-left: 1px solid var(--border); }
  .joined-item:nth-child(n + 3) { border-top: 1px solid var(--border); }
}

@media (min-width: 1040px) {
  .joined { grid-template-columns: repeat(4, 1fr); }
  .joined-item:nth-child(n + 3) { border-top: 0; }
  .joined-item + .joined-item { border-left: 1px solid var(--border); }
}

/* --- Step cards: How it works phases and Getting started steps --- */
.step-n { color: var(--gold); font: var(--fs-12)/1 var(--font-mono); }

.step-cards {
  display: grid;
  gap: var(--space-12);
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-cards li {
  display: flex;
  gap: var(--space-16);
  padding: var(--space-16) var(--space-20);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.step-cards .step-n { padding-top: 5px; }
.step-cards h3 { font-size: var(--fs-16); font-weight: 600; }
.step-cards p { margin-top: var(--space-4); color: var(--text-muted); font-size: var(--fs-14); }

.how-steps { margin-top: var(--space-20); }

/* Getting started steps light up in gold on hover */
.start-steps li {
  transition: border-color var(--motion-fast) ease, background var(--motion-fast) ease,
              box-shadow var(--motion-fast) ease;
}
.start-steps li:hover {
  border-color: var(--gold);
  background: rgba(237, 179, 81, 0.1);
  box-shadow: 0 0 24px rgba(237, 179, 81, 0.12);
}
.start-steps li:hover h3 { color: var(--gold); }
.start-steps li:hover p { color: var(--text); }

@media (min-width: 640px) {
  .step-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1100px) {
  .start-steps { grid-template-columns: repeat(5, 1fr); }
  .how-steps { grid-template-columns: repeat(4, 1fr); }
  .step-cards li { flex-direction: column; gap: var(--space-8); }
}

/* --- Getting started --- */
/* Corner light, like the other sections */
.section-glow {
  background:
    radial-gradient(ellipse 50% 40% at 15% 0%, var(--glow-blue), transparent 70%),
    var(--bg);
}

.start-grid {
  display: grid;
  gap: var(--space-24);
}

/* Installer: one row per command, each with its own Copy button.
   Commands wrap instead of scrolling, so they always fit the screen. */
.installer {
  display: grid;
  gap: var(--space-20);
  padding: var(--space-20);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
}

.installer-group { display: grid; gap: var(--space-4); }

.installer-comment {
  color: var(--text-faint);
  font: var(--fs-12)/1.6 var(--font-mono);
}

/* Lines read as one terminal; the row lights up on hover */
.installer-line {
  display: flex;
  align-items: flex-start;
  gap: var(--space-12);
  margin: 0 calc(-1 * var(--space-8));
  padding: 2px var(--space-8);
  border-radius: var(--radius-sm);
  transition: background var(--motion-fast) ease;
}
.installer-line:hover { background: rgba(255, 255, 255, 0.03); }

.installer-line .copy-btn {
  width: 26px;
  height: 26px;
  border-color: var(--border);
  background: transparent;
  color: var(--text-faint);
}
.installer-line .copy-btn:hover { border-color: var(--accent); color: var(--text); }

/* The command takes only its own width, so the button sits right after it */
.installer-line code {
  flex: 0 1 auto;
  min-width: 0;
  padding: 3px 0 0;
  border: 0;
  background: none;
  color: var(--text);
  font: var(--fs-12)/1.7 var(--font-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.installer-line .p { color: var(--gold); }

@media (min-width: 900px) {
  .installer { padding: var(--space-24) var(--space-32); }
  .installer-line code { font-size: 13px; }
}

/* --- Foundation & discovery ---
   Typographic tracks instead of cards: a label column on the left and a
   list on the right. Foundation is blue with solid rules; the MVP in delivery is
   amber with solid rules; discovery is lighter, dashed and amber. Short rules
   bridge the tracks. */
.track {
  display: grid;
  gap: var(--space-24);
}

.track-label { max-width: 32ch; }

.track-name {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  font: 600 var(--fs-12)/1.4 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.track-name::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.track-note {
  margin-top: var(--space-8);
  color: var(--text-faint);
  font-size: var(--fs-14);
}

.track-list {
  display: grid;
  gap: 0 var(--space-40);
  margin: 0;
  padding: 0;
  list-style: none;
}

.track-list li { padding: var(--space-20) 0; }

.track-list h3 {
  margin: 0;
  font: 600 var(--fs-16)/1.35 var(--font-mono);
  letter-spacing: -0.01em;
}

.track-list p {
  margin-top: var(--space-8);
  font-size: var(--fs-14);
  line-height: 1.6;
}

/* Foundation: solid, present */
.track-foundation .track-name { color: var(--accent); }
.track-foundation .track-name::before { background: var(--accent); }
.track-foundation .track-list li { border-top: 1px solid var(--border-strong); }
.track-foundation .track-list h3 { color: var(--text); }
.track-foundation .track-list p { color: var(--text-muted); }

/* MVP in delivery: committed scope, not yet available */
.track-mvp .track-name { color: var(--gold); }
.track-mvp .track-name::before { background: var(--gold); }
.track-mvp .track-list li { border-top: 1px solid rgba(237, 179, 81, 0.5); }
.track-mvp .track-list h3 { color: var(--text); }
.track-mvp .track-list p { color: var(--text-muted); }

/* Discovery: open, tentative */
.track-discovery .track-name { color: var(--gold); }
.track-discovery .track-name::before { background: var(--gold); border-radius: 50%; }
.track-discovery .track-list li { border-top: 1px dashed rgba(237, 179, 81, 0.35); }
.track-discovery .track-list h3 { color: var(--text-muted); font-weight: 500; }
.track-discovery .track-list p { color: var(--text-faint); }

.track-bridge {
  width: 120px;
  height: 1px;
  margin: var(--space-48) 0;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.track-disclaimer {
  max-width: 68ch;
  margin-top: var(--space-40);
  padding-left: var(--space-16);
  border-left: 2px solid rgba(237, 179, 81, 0.5);
  color: var(--text-faint);
  font-size: var(--fs-14);
}
.track-disclaimer strong { color: var(--text-muted); font-weight: 600; }

@media (min-width: 720px) {
  .track-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .track { grid-template-columns: 260px minmax(0, 1fr); gap: var(--space-48); }
  .track-label { padding-top: var(--space-20); }
  .track-bridge { margin-left: calc(260px + var(--space-48)); }
  .track-disclaimer { margin-left: calc(260px + var(--space-48)); }
  .track-discovery .track-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --- Closing: golden band with dark text; buttons are inverted to stay visible --- */
.closing {
  padding: var(--space-64) 0;
  border-top: 1px solid var(--border);
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(255, 255, 255, 0.28), transparent 70%),
    linear-gradient(135deg, var(--gold) 0%, var(--gold-strong) 100%);
  color: var(--accent-ink);
}

.closing-inner { text-align: center; }

.closing h2 {
  color: var(--accent-ink);
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  font-weight: 700;
}

.closing p {
  max-width: 56ch;
  margin: var(--space-16) auto 0;
  color: rgba(16, 24, 40, 0.82);
}

.closing .btn-primary {
  background: var(--accent-ink);
  color: var(--gold-strong);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.3);
}
.closing .btn-primary:hover { color: #ffe07a; box-shadow: 0 10px 30px rgba(16, 24, 40, 0.4); }

.closing .btn-ghost {
  border-color: rgba(16, 24, 40, 0.55);
  background: transparent;
  color: var(--accent-ink);
}
.closing .btn-ghost:hover { border-color: var(--accent-ink); background: rgba(16, 24, 40, 0.08); color: var(--accent-ink); }

/* Focus ring in dark ink: the default light-blue ring would vanish on gold */
.closing :focus-visible { outline-color: var(--accent-ink); }

@media (min-width: 760px) {
  .closing { padding: 112px 0; }
}

/* --- Footer --- */
.site-footer {
  padding: var(--space-32) 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

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

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  color: var(--text-faint);
  font-size: var(--fs-14);
}
.footer-brand strong { color: var(--text); }

.footer-nav { display: flex; flex-wrap: wrap; gap: var(--space-20); }

.footer-nav a {
  color: var(--text-muted);
  font-size: var(--fs-14);
  text-decoration: none;
}
.footer-nav a:hover { color: var(--text); }

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

/* --- Reduced motion: no smooth scroll, no hover movement, no pulsing rings --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flow-ring { animation: none; }
  .globe-meridian { animation: none; opacity: 1; transform: none; }
  .globe-meridian-two { display: none; }
  *,
  *::before,
  *::after { transition: none !important; }
  .btn-primary:hover { transform: none; }
}
