/* =============================================================
   FRACTADYNE — MASTER STYLESHEET
   =============================================================
   Table of contents:
     01. Design tokens
     02. Reset & base
     03. Typography utilities
     04. Layout utilities
     05. Accessibility helpers
     06. Navigation
     07. Buttons
     08. Glass panel component (base for all card types)
     09. Status pills / badges
     10. Boot / intro sequence
     11. Hero (shared + home + product-page variants)
     12. Particles & ambient fx
     13. Scroll reveal
     14. Ecosystem diagram (homepage signature element)
     15. Technology / feature grid
     16. Projects / status cards
     17. Vision section
     18. Roadmap / timeline
     19. Downloads / release cards
     20. Contact
     21. Footer
     22. Code window component + syntax highlighting
     23. Terminal output component
     24. OS desktop preview (FractalOS signature element)
     25. Architecture flow diagram
     26. Technical foundations grid
     27. Docs layout (sidebar + content)
     28. Responsive overrides
   ============================================================= */


/* =============================================================
   01. DESIGN TOKENS
   ============================================================= */

:root {

  /* --- Backgrounds --- */
  --bg-void: #050308;
  --bg-nebula: #1a0b2e;
  --bg-surface: rgba(255, 255, 255, 0.045);
  --bg-surface-strong: rgba(255, 255, 255, 0.08);
  --bg-surface-soft: rgba(255, 255, 255, 0.025);

  /* --- Brand constants (never theme-swapped) --- */
  --brand-purple: #b65cff;
  --brand-purple-bright: #d6aeff;
  --brand-glow: rgba(182, 92, 255, 0.45);

  /* --- Palette: purple (FractalOS) --- */
  --purple: #b65cff;
  --purple-bright: #d6aeff;
  --purple-dim: #7c3fc4;
  --border-purple: rgba(182, 92, 255, 0.35);
  --glow-purple: rgba(182, 92, 255, 0.45);

  /* --- Palette: cyan (Fractyne) --- */
  --cyan: #2de2ff;
  --cyan-bright: #9df6ff;
  --cyan-dim: #159cb8;
  --border-cyan: rgba(45, 226, 255, 0.35);
  --glow-cyan: rgba(45, 226, 255, 0.45);

  /* --- Contextual accent: swapped per page via body class ---
     Default = purple. .theme-fractyne overrides these. */
  --accent: var(--purple);
  --accent-bright: var(--purple-bright);
  --accent-dim: var(--purple-dim);
  --border-accent: var(--border-purple);
  --glow-accent: var(--glow-purple);

  /* --- Text --- */
  --text-1: #f7f5fb;
  --text-2: #c7c1d9;
  --text-3: #8d87a3;

  /* --- Semantic status colors --- */
  --status-live: #6bf0a8;
  --status-progress: var(--accent);
  --status-planned: #8d87a3;

  /* --- Type families --- */
  --font-display: "Space Grotesk", "IBM Plex Sans", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", "Courier New", monospace;

  /* --- Fluid type scale --- */
  --fs-hero: clamp(2.5rem, 5.4vw + 1rem, 4.75rem);
  --fs-h1: clamp(2.2rem, 4vw + 1rem, 3.6rem);
  --fs-h2: clamp(1.9rem, 2.2vw + 1.2rem, 2.75rem);
  --fs-h3: clamp(1.2rem, 0.8vw + 1rem, 1.5rem);
  --fs-lead: clamp(1.05rem, 0.6vw + 0.9rem, 1.3rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-mono-label: 0.8rem;

  /* --- Spacing scale --- */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 100px;

  /* --- Section padding (fluid) --- */
  --section-pad-y: clamp(72px, 11vw, 130px);
  --section-pad-x: clamp(24px, 6vw, 80px);

  /* --- Layout --- */
  --content-max: 1240px;
  --content-narrow: 760px;

  /* --- Radius --- */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* --- Motion --- */
  --ease: cubic-bezier(0.22, 0.9, 0.32, 1);
  --fast: 0.25s;
  --med: 0.45s;
  --slow: 0.85s;

  /* --- Elevation --- */
  --shadow-sm: 0 8px 30px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Fractyne product-page theme: swap contextual accent to cyan */
.theme-fractyne {
  --accent: var(--cyan);
  --accent-bright: var(--cyan-bright);
  --accent-dim: var(--cyan-dim);
  --border-accent: var(--border-cyan);
  --glow-accent: var(--glow-cyan);
}

/* FractalOS product-page theme: explicit purple (matches default,
   stated for clarity and so future edits to the default can't
   silently detheme this page) */
.theme-fractalos {
  --accent: var(--purple);
  --accent-bright: var(--purple-bright);
  --accent-dim: var(--purple-dim);
  --border-accent: var(--border-purple);
  --glow-accent: var(--glow-purple);
}


/* =============================================================
   02. RESET & BASE
   ============================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: radial-gradient(circle at 50% 0%, var(--bg-nebula), var(--bg-void) 62%);
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

ul {
  list-style: none;
}

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

::selection {
  background: var(--glow-accent);
  color: var(--text-1);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-void);
}

::-webkit-scrollbar-thumb {
  background: var(--purple-dim);
  border-radius: var(--radius-pill);
}


/* =============================================================
   03. TYPOGRAPHY UTILITIES
   ============================================================= */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-1);
  font-weight: 700;
  line-height: 1.15;
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
}

p {
  color: var(--text-2);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono-label);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--glow-accent);
}

.section-head {
  text-align: center;
  max-width: var(--content-narrow);
  margin: 0 auto var(--space-5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.section-head h2 {
  text-shadow: 0 0 30px var(--glow-accent);
}

.section-head p {
  font-size: var(--fs-lead);
  color: var(--text-2);
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-label);
  color: var(--text-3);
  letter-spacing: 1px;
}


/* =============================================================
   04. LAYOUT UTILITIES
   ============================================================= */

section {
  position: relative;
  padding: var(--section-pad-y) var(--section-pad-x);
}


/* =============================================================
   05. ACCESSIBILITY HELPERS
   ============================================================= */

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 10000;
  background: var(--bg-void);
  color: var(--text-1);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-accent);
  transition: top var(--fast) var(--ease);
}

.skip-link:focus {
  top: 16px;
}

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


/* =============================================================
   06. NAVIGATION
   ============================================================= */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(6, 5, 12, 0.35);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(182, 92, 255, 0.14);
  transition: background var(--med) var(--ease), border-color var(--med) var(--ease);
}

header.is-scrolled {
  background: rgba(6, 5, 12, 0.78);
  border-bottom-color: rgba(182, 92, 255, 0.24);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 20px var(--section-pad-x);
}

/* Brand lockup: mark + wordmark. Intentionally isolated from the
   hero logo (.hero-logo) — different class, different rules, no
   shared animation — so future edits to one can never bleed into
   the other the way the old .logo-image conflict did. */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: auto;
  filter: drop-shadow(0 0 10px var(--brand-glow));
}

.brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-1);
  white-space: nowrap;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-links a {
  position: relative;
  color: var(--text-2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 6px 2px;
  transition: color var(--fast);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--fast) var(--ease);
  box-shadow: 0 0 8px var(--glow-accent);
}

.nav-links a:hover {
  color: var(--text-1);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

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

.nav-links a.active::after {
  transform: scaleX(1);
}

/* Animated hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(182, 92, 255, 0.3);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  margin: 0;
  transition: border-color var(--fast), box-shadow var(--fast);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-1);
  border-radius: 2px;
  transition: transform var(--fast) var(--ease), opacity var(--fast) var(--ease);
}

.menu-toggle:hover {
  box-shadow: 0 0 16px var(--glow-accent);
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* =============================================================
   07. BUTTONS
   ============================================================= */

.btn {
  --btn-bg: var(--accent);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 34px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: #100615;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: translateX(-120%);
  transition: transform var(--slow) var(--ease);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px var(--glow-accent);
}

.btn:hover::before {
  transform: translateX(120%);
}

.btn:active {
  transform: translateY(-1px);
}

.btn-ghost {
  --btn-bg: transparent;
  color: var(--text-1);
  border: 1px solid var(--border-accent);
  background: transparent;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 24px var(--glow-accent);
}

.btn-sm {
  padding: 11px 24px;
  font-size: 14px;
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.btn[disabled]:hover,
.btn.is-disabled:hover {
  transform: none;
  box-shadow: none;
}

.btn[disabled]::before,
.btn.is-disabled::before {
  display: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}


/* =============================================================
   08. GLASS PANEL COMPONENT
   -------------------------------------------------------------
   Single reusable "glass card" used by Technology, Projects,
   Downloads, Contact and Roadmap content blocks. Replaces what
   were previously four near-duplicate card rules with one
   component + modifiers.
   ============================================================= */

.panel-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.panel {
  position: relative;
  flex: 1 1 300px;
  max-width: 380px;
  padding: 38px;
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform var(--med) var(--ease), box-shadow var(--med) var(--ease),
    border-color var(--med) var(--ease);
}

.panel > * + * {
  margin-top: var(--space-2);
}

.panel:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 40px var(--glow-accent);
  border-color: var(--accent);
}

.panel h3 {
  font-size: var(--fs-h3);
  color: var(--accent-bright);
}

.panel p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-2);
}

.panel .btn {
  margin-top: var(--space-3);
}

/* Larger variant for cards carrying more content (status pill +
   description + CTA): Projects, Downloads */
.panel--feature {
  max-width: 420px;
  padding: 44px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
}

/* Left-aligned variant for prose blocks inside the timeline */
.panel--left {
  text-align: left;
  max-width: none;
}

/* Compact variant: Contact cards */
.panel--compact {
  max-width: 300px;
  padding: 30px;
}

.panel-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-strong);
  border: 1px solid var(--border-accent);
  color: var(--accent-bright);
  margin: 0 auto var(--space-1);
}

.panel-icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
}

.panel-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-mono-label);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-3);
}

.panel-spacer {
  flex: 1;
}


/* =============================================================
   09. STATUS PILLS / BADGES
   ============================================================= */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-accent);
  color: var(--text-1);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pill-dot, var(--accent));
  box-shadow: 0 0 8px var(--pill-dot, var(--glow-accent));
}

.pill-live {
  --pill-dot: var(--status-live);
  border-color: rgba(107, 240, 168, 0.35);
}

.pill-progress {
  --pill-dot: var(--accent);
}

.pill-planned {
  --pill-dot: var(--status-planned);
  color: var(--text-3);
  border-color: rgba(141, 135, 163, 0.3);
}

.pill-live::before {
  animation: pillPulse 2s ease-in-out infinite;
}

@keyframes pillPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}


/* =============================================================
   10. BOOT / INTRO SEQUENCE
   -------------------------------------------------------------
   A short, skippable "booting the ecosystem" moment shown once
   per session on first load. Session-gated and instant-skipped
   under prefers-reduced-motion via JS + the .boot--skip class.
   ============================================================= */

.boot {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: #04030a;
  cursor: pointer;
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}

.boot-glow {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--brand-glow), transparent 70%);
  filter: blur(50px);
  animation: bootPulse 2.4s ease-in-out infinite;
}

.boot-mark {
  width: 88px;
  position: relative;
  filter: drop-shadow(0 0 20px var(--brand-glow));
  opacity: 0;
  animation: bootReveal 0.7s var(--ease) forwards 0.15s;
}

.boot-line {
  position: relative;
  opacity: 0;
  animation: bootReveal 0.6s var(--ease) forwards 0.5s;
}

.boot-bar {
  position: relative;
  width: 200px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  opacity: 0;
  animation: bootReveal 0.4s var(--ease) forwards 0.7s;
}

.boot-bar span {
  position: absolute;
  inset: 0;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  animation: bootFill 1.1s var(--ease) forwards 0.8s;
}

.boot.is-leaving {
  opacity: 0;
  visibility: hidden;
}

@keyframes bootPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.55; }
  50% { transform: scale(1.08); opacity: 0.95; }
}

@keyframes bootReveal {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bootFill {
  to { transform: scaleX(1); }
}


/* =============================================================
   11. HERO
   -------------------------------------------------------------
   .hero-logo is used ONLY inside hero sections and must never be
   reused for the navbar brand mark (see .brand-mark, section 06).
   Keeping these fully separate — different class, no shared
   rules, no shared animation — is deliberate: it's what the old
   header/.logo-image conflict was missing.
   ============================================================= */

.hero {
  position: relative;
  min-height: 100vh;
  padding-top: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero--product {
  min-height: 82vh;
}

.hero-glow {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-accent), transparent 70%);
  filter: blur(46px);
  animation: heroPulse 5s ease-in-out infinite, heroRotate 24s linear infinite;
  z-index: 0;
}

/* Homepage only: a second, offset cyan glow blended behind the
   purple one, so the parent brand visibly carries both colors
   of the ecosystem it introduces. */
.hero-glow--dual::after {
  content: "";
  position: absolute;
  inset: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-cyan), transparent 70%);
  filter: blur(50px);
  animation: heroRotate 30s linear infinite reverse;
}

@keyframes heroPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.65; }
  50% { transform: scale(1.1); opacity: 1; }
}

@keyframes heroRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-logo {
  position: relative;
  z-index: 1;
  width: min(400px, 70vw);
  opacity: 0;
  filter: drop-shadow(0 0 22px var(--brand-glow));
  animation: heroLogoIn 1.3s var(--ease) forwards, heroFloat 4.5s ease-in-out infinite 1.3s;
  transition: transform 0.5s var(--ease), filter 0.5s var(--ease);
}

.hero-logo:hover {
  transform: scale(1.06) translateY(-8px);
  filter: drop-shadow(0 0 42px var(--brand-glow));
}

.hero--product .hero-logo {
  width: min(220px, 45vw);
  margin-bottom: 8px;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@keyframes heroLogoIn {
  from { opacity: 0; transform: scale(0.82); }
  to { opacity: 1; transform: scale(1); }
}

.hero-copy {
  position: relative;
  z-index: 1;
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 760px;
  padding: 0 var(--space-2);
}

.hero-copy .eyebrow {
  opacity: 0;
  animation: heroTextIn 0.9s var(--ease) forwards 0.5s;
}

.hero-title {
  font-size: var(--fs-hero);
  font-family: var(--font-display);
  color: var(--text-1);
  opacity: 0;
  animation: heroTextIn 0.9s var(--ease) forwards 0.7s;
}

.hero--product .hero-title {
  font-size: var(--fs-h1);
  text-shadow: 0 0 30px var(--glow-accent);
}

.hero-lead {
  font-size: var(--fs-lead);
  color: var(--text-2);
  max-width: 620px;
  line-height: 1.7;
  opacity: 0;
  animation: heroTextIn 0.9s var(--ease) forwards 0.95s;
}

.hero-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  opacity: 0;
  animation: heroTextIn 0.9s var(--ease) forwards 1.2s;
}

@keyframes heroTextIn {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0;
  animation: heroTextIn 0.9s var(--ease) forwards 1.5s;
}

.hero-scroll-cue svg {
  width: 16px;
  height: 16px;
  animation: cueBounce 1.8s ease-in-out infinite;
}

@keyframes cueBounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 1; }
}


/* =============================================================
   12. PARTICLES & AMBIENT FX
   ============================================================= */

.particles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--brand-purple);
  opacity: 0.55;
  box-shadow: 0 0 12px var(--brand-glow);
  animation: drift linear infinite;
}

@keyframes drift {
  from { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  to { transform: translate(var(--drift-x, 40px), -120vh); opacity: 0; }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}


/* =============================================================
   13. SCROLL REVEAL
   ============================================================= */

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.show .reveal-item {
  opacity: 1;
  transform: translateY(0);
}

.reveal-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal-stagger.show .reveal-item:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.show .reveal-item:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.show .reveal-item:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.show .reveal-item:nth-child(4) { transition-delay: 0.35s; }
.reveal-stagger.show .reveal-item:nth-child(5) { transition-delay: 0.45s; }


/* =============================================================
   14. ECOSYSTEM DIAGRAM (homepage signature element)
   -------------------------------------------------------------
   Fractadyne -> FractalOS -> Fractyne, shown as three connected
   nodes with a glowing pulse travelling down each connector.
   Purple = FractalOS, cyan = Fractyne, blended = Fractadyne.
   ============================================================= */

.ecosystem {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: var(--space-6);
}

.eco-node {
  position: relative;
  width: min(340px, 90vw);
  padding: 34px;
  text-align: center;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform var(--med) var(--ease), box-shadow var(--med) var(--ease);
}

.eco-node:hover {
  transform: translateY(-8px);
}

.eco-node p {
  margin-top: 10px;
}

.eco-node--root {
  border: 1px solid rgba(182, 92, 255, 0.4);
  box-shadow: 0 0 60px rgba(182, 92, 255, 0.16), 0 0 90px rgba(45, 226, 255, 0.1);
  background: linear-gradient(160deg, rgba(182, 92, 255, 0.09), rgba(45, 226, 255, 0.05));
}

.eco-node--os {
  border: 1px solid var(--border-purple);
}

.eco-node--os:hover {
  box-shadow: 0 0 40px var(--glow-purple);
}

.eco-node--lang {
  border: 1px solid var(--border-cyan);
}

.eco-node--lang:hover {
  box-shadow: 0 0 40px var(--glow-cyan);
}

.eco-node-mark img {
  width: 52px;
  margin: 0 auto 16px;
  filter: drop-shadow(0 0 14px var(--brand-glow));
}

.eco-node-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-strong);
}

.eco-node-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
}

.eco-node--os .eco-node-icon {
  color: var(--purple-bright);
  border: 1px solid var(--border-purple);
}

.eco-node--lang .eco-node-icon {
  color: var(--cyan-bright);
  border: 1px solid var(--border-cyan);
}

.eco-node--root h3 {
  font-size: 1.6rem;
  background: linear-gradient(120deg, var(--purple-bright), var(--cyan-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eco-node--os h3 {
  color: var(--purple-bright);
}

.eco-node--lang h3 {
  color: var(--cyan-bright);
}

.eco-line {
  position: relative;
  width: 3px;
  height: 76px;
  margin: 4px auto;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, rgba(182, 92, 255, 0.15), rgba(182, 92, 255, 0.35));
}

.eco-line--to-cyan {
  background: linear-gradient(180deg, rgba(182, 92, 255, 0.3), rgba(45, 226, 255, 0.35));
}

.eco-line span {
  position: absolute;
  left: 50%;
  top: -6px;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 12px var(--purple), 0 0 22px var(--purple);
  animation: ecoFlow 2.3s linear infinite;
}

.eco-line--to-cyan span {
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan), 0 0 22px var(--cyan);
  animation-delay: 0.4s;
}

@keyframes ecoFlow {
  0% { top: -4%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}


/* =============================================================
   15. TECHNOLOGY / FEATURE GRID
   ============================================================= */

.technology {
  text-align: center;
}


/* =============================================================
   16. PROJECTS / STATUS CARDS
   ============================================================= */

.projects {
  text-align: center;
}

.panel--feature .panel-status-row {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}


/* =============================================================
   17. VISION SECTION
   ============================================================= */

.vision {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.vision h2 {
  text-shadow: 0 0 25px var(--glow-accent);
  margin-bottom: var(--space-3);
}

.vision p {
  max-width: 780px;
  font-size: clamp(1.05rem, 1.6vw, 1.4rem);
  line-height: 1.8;
  margin-bottom: var(--space-2);
}


/* =============================================================
   18. ROADMAP / TIMELINE
   ============================================================= */

.roadmap {
  text-align: center;
}

.timeline {
  max-width: 860px;
  margin: var(--space-5) auto 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 92px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0.4;
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.year {
  position: relative;
  flex: 0 0 auto;
  width: 92px;
  padding-top: 6px;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent-bright);
  text-align: left;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 87px;
  top: 12px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg-void);
  border: 2px solid var(--accent);
  box-shadow: 0 0 10px var(--glow-accent);
}

.timeline-item.is-current::before {
  background: var(--accent);
}

.timeline .panel {
  flex: 1;
}


/* =============================================================
   19. DOWNLOADS / RELEASE CARDS
   ============================================================= */

.downloads {
  text-align: center;
}

.release-list {
  max-width: 820px;
  margin: var(--space-5) auto 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: left;
}

.release-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 24px 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
}

.release-version {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent-bright);
  min-width: 70px;
}

.release-body {
  flex: 1;
}

.release-body h4 {
  font-family: var(--font-body);
  color: var(--text-1);
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.release-body p {
  font-size: 0.92rem;
  color: var(--text-3);
}

.release-notes {
  max-width: 820px;
  margin: var(--space-3) auto 0;
  text-align: left;
  padding: 26px 28px;
  background: var(--bg-surface-soft);
  border: 1px dashed var(--border-accent);
  border-radius: var(--radius-md);
}

.release-notes h4 {
  color: var(--text-1);
  font-size: 1rem;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.release-notes ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.release-notes li {
  position: relative;
  padding-left: 18px;
  color: var(--text-2);
  font-size: 0.95rem;
}

.release-notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}


/* =============================================================
   20. CONTACT
   ============================================================= */

.contact {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.contact > p {
  max-width: 600px;
  font-size: var(--fs-lead);
}

.contact-item a {
  color: var(--text-1);
  text-decoration: none;
  font-size: 1.05rem;
  transition: color var(--fast);
}

.contact-item a:hover {
  color: var(--accent-bright);
}


/* =============================================================
   21. FOOTER
   ============================================================= */

footer {
  padding: var(--space-4) var(--section-pad-x) var(--space-3);
  border-top: 1px solid rgba(182, 92, 255, 0.16);
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-3);
  font-size: 0.9rem;
}

.footer-brand strong {
  color: var(--text-2);
  font-family: var(--font-display);
  letter-spacing: 1px;
}

.footer-links {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-3);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--fast);
}

.footer-links a:hover {
  color: var(--accent-bright);
}

.footer-copy {
  width: 100%;
  text-align: center;
  color: var(--text-3);
  font-size: 0.82rem;
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}


/* =============================================================
   22. CODE WINDOW COMPONENT + SYNTAX HIGHLIGHTING
   -------------------------------------------------------------
   Real, styled replacement for the previous .code-header/.dots/
   .keyword/.command/.string classes, which had no CSS backing
   them at all.
   ============================================================= */

.code-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.code-tab {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-accent);
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition: background var(--fast), color var(--fast), border-color var(--fast);
}

.code-tab:hover {
  color: var(--text-1);
  border-color: var(--accent);
}

.code-tab.active {
  background: var(--accent);
  color: #100615;
  border-color: var(--accent);
  font-weight: 600;
}

.code-window,
.terminal {
  background: rgba(8, 7, 16, 0.88);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg), 0 0 40px var(--glow-accent);
  text-align: left;
}

.code-window[hidden] {
  display: none;
}

.code-window-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 20px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.code-dots {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}

.code-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }

.code-filename {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-3);
  flex: 1;
}

.code-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  cursor: pointer;
  transition: color var(--fast), border-color var(--fast), background var(--fast);
}

.code-copy:hover {
  color: var(--text-1);
  border-color: var(--border-accent);
}

.code-copy.is-copied {
  color: var(--status-live);
  border-color: rgba(107, 240, 168, 0.4);
  background: rgba(107, 240, 168, 0.08);
}

.code-body,
.terminal-body {
  margin: 0;
  padding: 26px 28px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-2);
  counter-reset: line;
}

.code-body .line {
  counter-increment: line;
  display: block;
  padding-left: 2.4em;
  position: relative;
  white-space: pre;
}

.code-body .line::before {
  content: counter(line);
  position: absolute;
  left: 0;
  width: 1.8em;
  text-align: right;
  color: var(--text-3);
  opacity: 0.45;
  font-size: 0.85em;
}

.terminal-body {
  color: var(--text-2);
  white-space: pre-wrap;
}

.terminal-prompt {
  color: var(--accent-bright);
}

.cursor {
  display: inline-block;
  width: 0.5em;
  height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: cursorBlink 1s step-end infinite;
}

@keyframes cursorBlink {
  50% { opacity: 0; }
}

/* Syntax token colors */
.tok-keyword { color: var(--cyan-bright); font-weight: 600; }
.tok-string { color: #ffd58a; }
.tok-comment { color: var(--text-3); font-style: italic; }
.tok-function { color: var(--purple-bright); }
.tok-number { color: #ff9f7a; }
.tok-property { color: var(--cyan); }

.theme-fractalos .tok-keyword { color: var(--purple-bright); }
.theme-fractalos .tok-function { color: var(--cyan); }


/* =============================================================
   23. TERMINAL OUTPUT COMPONENT
   -------------------------------------------------------------
   Shares .terminal / .terminal-body / .code-window-bar with the
   code window component above (section 22) — kept as one system
   rather than a second parallel one.
   ============================================================= */

.terminal {
  margin-top: var(--space-3);
}

.terminal-body p {
  margin-bottom: 6px;
}

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


/* =============================================================
   24. OS DESKTOP PREVIEW (FractalOS signature element)
   -------------------------------------------------------------
   Scales as one unit via an em-based font-size on .os-frame —
   every measurement inside is in em so the whole "screen" stays
   proportional from desktop down to small mobile.
   ============================================================= */

.os-preview {
  max-width: 940px;
  margin: var(--space-5) auto 0;
}

.os-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-purple);
  background:
    radial-gradient(circle at 28% 18%, rgba(182, 92, 255, 0.18), transparent 55%),
    radial-gradient(circle at 82% 88%, rgba(45, 226, 255, 0.12), transparent 50%),
    linear-gradient(160deg, #0d0a18, #050409);
  box-shadow: var(--shadow-lg), 0 0 70px rgba(182, 92, 255, 0.22);
  overflow: hidden;
  font-size: clamp(8.5px, 1.55vw, 15px);
}

.os-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(182, 92, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(182, 92, 255, 0.06) 1px, transparent 1px);
  background-size: 3em 3em;
  mask-image: radial-gradient(circle at 50% 38%, black, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 38%, black, transparent 72%);
  pointer-events: none;
}

.os-desktop {
  position: absolute;
  inset: 0;
  bottom: 2.9em;
}

.os-desktop-icons {
  position: absolute;
  top: 1.3em;
  left: 1.3em;
  display: flex;
  flex-direction: column;
  gap: 1em;
  z-index: 1;
}

.os-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35em;
  width: 4.4em;
  background: none;
  border: none;
  color: var(--text-2);
  cursor: pointer;
  padding: 0.4em;
  border-radius: 0.6em;
  transition: background var(--fast);
}

.os-icon:hover,
.os-icon:focus-visible {
  background: rgba(255, 255, 255, 0.07);
}

.os-icon-glyph {
  width: 2.1em;
  height: 2.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.55em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-purple);
  color: var(--purple-bright);
}

.os-icon-glyph svg {
  width: 1.15em;
  height: 1.15em;
  stroke: currentColor;
  fill: none;
}

.os-icon-label {
  font-size: 0.66em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

.os-window {
  position: absolute;
  border-radius: 0.9em;
  border: 1px solid rgba(182, 92, 255, 0.32);
  background: rgba(12, 10, 21, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1.6em 3em rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: osWindowIn 0.7s var(--ease) both;
}

@keyframes osWindowIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.os-window--terminal {
  left: 6.4em;
  top: 1.9em;
  width: 21em;
  height: 12.6em;
  z-index: 2;
}

.os-window--monitor {
  right: 1.5em;
  bottom: 1.5em;
  width: 15.5em;
  height: 11.4em;
  z-index: 3;
  animation-delay: 0.15s;
}

.os-window-bar {
  display: flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.55em 0.9em;
  background: rgba(255, 255, 255, 0.045);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.os-window-bar .code-dots span {
  width: 0.55em;
  height: 0.55em;
}

.os-window-title {
  font-family: var(--font-mono);
  font-size: 0.68em;
  color: var(--text-3);
}

.os-window-body {
  padding: 0.85em 1em;
  font-family: var(--font-mono);
  font-size: 0.72em;
  line-height: 1.75;
  color: var(--text-2);
  overflow: hidden;
  flex: 1;
}

.os-terminal-body p {
  margin-bottom: 0.4em;
  white-space: pre-wrap;
}

.os-terminal-body p:last-child {
  margin-bottom: 0;
}

.os-gauge {
  margin-bottom: 0.85em;
}

.os-gauge:last-child {
  margin-bottom: 0;
}

.os-gauge-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.66em;
  margin-bottom: 0.4em;
  color: var(--text-3);
}

.os-gauge-track {
  height: 0.5em;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.os-gauge-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  transform: scaleX(0);
  transform-origin: left;
  animation: gaugeIn 1.2s var(--ease) forwards;
  animation-delay: 0.5s;
}

@keyframes gaugeIn {
  to { transform: scaleX(1); }
}

.os-taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.9em;
  display: flex;
  align-items: center;
  gap: 1em;
  padding: 0 1.1em;
  background: rgba(8, 6, 15, 0.78);
  border-top: 1px solid rgba(182, 92, 255, 0.24);
  backdrop-filter: blur(10px);
  z-index: 4;
}

.os-taskbar-launcher {
  width: 1.9em;
  height: 1.9em;
  border-radius: 0.5em;
  border: none;
  background: rgba(182, 92, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--fast);
}

.os-taskbar-launcher:hover {
  background: rgba(182, 92, 255, 0.32);
}

.os-taskbar-launcher img {
  width: 1.05em;
  filter: drop-shadow(0 0 6px var(--brand-glow));
}

.os-taskbar-apps {
  display: flex;
  gap: 0.6em;
  flex: 1;
}

.os-taskbar-app {
  width: 1.9em;
  height: 1.9em;
  border-radius: 0.5em;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--fast), border-color var(--fast), color var(--fast);
  flex-shrink: 0;
}

.os-taskbar-app svg {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  fill: none;
}

.os-taskbar-app:hover {
  background: rgba(255, 255, 255, 0.09);
}

.os-taskbar-app.is-active {
  border-color: var(--purple);
  color: var(--purple-bright);
  background: rgba(182, 92, 255, 0.14);
}

.os-taskbar-status {
  display: flex;
  align-items: center;
  gap: 0.8em;
  flex-shrink: 0;
}

.os-clock {
  font-family: var(--font-mono);
  font-size: 0.78em;
  color: var(--text-1);
  letter-spacing: 0.5px;
}

.os-preview-caption {
  text-align: center;
  margin-top: var(--space-2);
  color: var(--text-3);
}


/* =============================================================
   25. ARCHITECTURE FLOW DIAGRAM
   -------------------------------------------------------------
   Reuses the @keyframes ecoFlow pulse from the ecosystem diagram
   (section 14) so the "energy flowing downward" motif reads as
   one consistent idea across the site, not two unrelated effects.
   ============================================================= */

.arch-flow {
  max-width: 780px;
  margin: var(--space-5) auto 0;
  display: flex;
  flex-direction: column;
}

.arch-stage {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 26px 30px;
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  text-align: left;
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

.arch-stage:hover {
  transform: translateX(8px);
  box-shadow: 0 0 30px var(--glow-accent);
}

.arch-stage-index {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-3);
  flex-shrink: 0;
  width: 26px;
}

.arch-stage-icon {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-strong);
  border: 1px solid var(--border-accent);
  color: var(--accent-bright);
}

.arch-stage-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
}

.arch-stage-copy h4 {
  font-family: var(--font-body);
  color: var(--text-1);
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.arch-stage-copy p {
  font-size: 0.92rem;
  color: var(--text-3);
  line-height: 1.6;
}

.arch-connector {
  position: relative;
  align-self: center;
  width: 3px;
  height: 32px;
  margin: 2px 0;
  background: var(--border-accent);
  border-radius: var(--radius-pill);
}

.arch-connector span {
  position: absolute;
  left: 50%;
  top: -4px;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--glow-accent);
  animation: ecoFlow 2s linear infinite;
}

/* The final stage bridges into Fractyne, so it always carries a
   touch of cyan regardless of page theme. */
.arch-stage--bridge {
  border-color: var(--border-cyan);
}

.arch-stage--bridge .arch-stage-icon {
  color: var(--cyan-bright);
  border-color: var(--border-cyan);
}

.arch-stage--bridge:hover {
  box-shadow: 0 0 30px var(--glow-cyan);
}


/* =============================================================
   26. TECHNICAL FOUNDATIONS GRID
   -------------------------------------------------------------
   Intentionally reuses .panel-grid / .panel / .panel-icon as-is —
   five feature cards need no new component, just new content.
   ============================================================= */


/* =============================================================
   27. DOCS LAYOUT (sidebar + content)
   ============================================================= */

.docs-hero {
  padding: 150px var(--section-pad-x) 40px;
  text-align: center;
}

.docs-hero .eyebrow {
  justify-content: center;
}

.docs-hero h1 {
  font-size: var(--fs-h1);
  margin: var(--space-2) 0;
}

.docs-hero p {
  max-width: 640px;
  margin: 0 auto;
  font-size: var(--fs-lead);
}

.docs-shell {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-4) var(--section-pad-x) var(--space-6);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-5);
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 110px;
}

.docs-sidebar-label {
  display: block;
  margin-bottom: var(--space-2);
}

.docs-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.docs-nav-link {
  padding: 8px 18px;
  font-size: 0.9rem;
  color: var(--text-3);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color var(--fast), border-color var(--fast);
}

.docs-nav-link:hover {
  color: var(--text-1);
}

.docs-nav-link.active {
  color: var(--accent-bright);
  border-left-color: var(--accent);
}

.docs-content {
  min-width: 0;
}

.docs-section {
  padding-bottom: var(--space-5);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  scroll-margin-top: 110px;
}

.docs-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.docs-section h2 {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-2);
}

.docs-section h3 {
  margin: var(--space-3) 0 10px;
  color: var(--accent-bright);
  font-size: 1.2rem;
}

.docs-section p {
  margin-bottom: var(--space-2);
  line-height: 1.8;
  max-width: 720px;
}

.docs-section .code-window,
.docs-section .release-notes {
  margin: var(--space-2) 0 var(--space-3);
}

.docs-list {
  margin: var(--space-2) 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 720px;
}

.docs-list li {
  position: relative;
  padding-left: 20px;
  line-height: 1.7;
  color: var(--text-2);
}

.docs-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.docs-section .inline-code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.9em;
  color: var(--accent-bright);
}

.docs-callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-accent);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  margin: var(--space-2) 0 var(--space-3);
  font-size: 0.92rem;
  max-width: 720px;
}

.docs-callout svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent-bright);
  margin-top: 2px;
  stroke: currentColor;
  fill: none;
}

.docs-callout p {
  margin-bottom: 0;
}

.docs-crumbs {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-3);
  margin-bottom: var(--space-2);
}

.docs-crumbs a {
  color: var(--text-3);
  text-decoration: none;
}

.docs-crumbs a:hover {
  color: var(--accent-bright);
}


/* =============================================================
   28. RESPONSIVE OVERRIDES
   -------------------------------------------------------------
   Grouped by breakpoint (not by component) so the cascade reads
   top-to-bottom as the viewport shrinks. Most sizing already
   flexes fluidly via clamp()/min()/em — these are the structural
   changes that need a hard breakpoint instead.
   ============================================================= */

/* ---- <= 960px: navigation collapses, docs sidebar goes flat ---- */
@media (max-width: 960px) {

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 0 20px;
    background: rgba(6, 5, 12, 0.97);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(182, 92, 255, 0.25);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform var(--med) var(--ease), opacity var(--med) var(--ease), visibility var(--med);
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 14px var(--section-pad-x);
    width: 100%;
    font-size: 17px;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links a.active {
    background: rgba(255, 255, 255, 0.05);
  }

  .nav-cta {
    padding: 14px var(--section-pad-x) 4px;
  }

  .docs-shell {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    order: -1;
  }

  .docs-nav {
    flex-direction: row;
    flex-wrap: wrap;
    border-left: none;
    gap: 8px;
    padding-bottom: var(--space-2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .docs-nav-link {
    border-left: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-pill);
    margin-left: 0;
  }

  .docs-nav-link.active {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
  }
}

/* ---- <= 720px: timeline stacks, section rhythm tightens ---- */
@media (max-width: 720px) {

  .timeline::before {
    left: 9px;
  }

  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-left: 30px;
  }

  .timeline-item::before {
    left: 4px;
    top: 4px;
  }

  .year {
    width: auto;
    padding-top: 0;
  }

  .release-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .eco-line,
  .arch-connector {
    height: 46px;
  }
}

/* ---- <= 560px: OS preview simplifies, hero tightens further ---- */
@media (max-width: 560px) {

  .hero {
    padding-top: 130px;
  }

  .hero--product {
    min-height: auto;
    padding-bottom: 60px;
  }

  .os-desktop-icons {
    display: none;
  }

  .os-window--monitor {
    display: none;
  }

  .os-window--terminal {
    left: 50%;
    top: 1.6em;
    transform: translateX(-50%);
    width: 88%;
    height: calc(100% - 3.2em);
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

/* ---- <= 420px: smallest phones ---- */
@media (max-width: 420px) {

  .brand-name {
    font-size: 16px;
  }

  .hero-actions,
  .btn-row {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn,
  .btn-row .btn {
    width: 100%;
  }

  .eco-node,
  .panel {
    padding: 26px;
  }
}
