/* ================================================================
   CoPlan · Promo Site
   Dark-blue · Square frames · Information-rich · Bilingual
   ================================================================ */

/* ---- Theme variables ---- */
:root {
  /* Dark theme (default) */
  --bg-base: rgba(5, 10, 26, 0.78);
  --bg-elev: rgba(10, 18, 48, 0.6);
  --bg-card: rgba(255, 255, 255, 0.018);
  --bg-card-strong: rgba(255, 255, 255, 0.035);
  --bg-card-hover: rgba(255, 255, 255, 0.055);
  --bg-border: rgba(255, 255, 255, 0.08);
  --bg-border-strong: rgba(255, 255, 255, 0.16);

  --text-primary: #e8eefb;
  --text-secondary: rgba(232, 238, 251, 0.72);
  --text-tertiary: rgba(232, 238, 251, 0.45);
  --text-faint: rgba(232, 238, 251, 0.25);

  --blue: #0052FF;
  --blue-deep: #0030a8;
  --blue-cyan: #00C2FF;
  --blue-purple: #6e7bff;
  --blue-soft: rgba(0, 82, 255, 0.15);

  --red: #FF99A4;
  --yellow: #FCE100;
  --green: #6CCB5F;

  --code-bg: rgba(0, 0, 0, 0.4);
  --code-text: #c3d4f7;

  --shadow-blue: 0 0 60px rgba(0, 82, 255, 0.35);
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.4);

  --font-sans: 'Prompt', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  --font-mono: 'Prompt', 'SF Mono', Consolas, monospace;

  /* Square frames everywhere — explicit override */
  --radius: 0px;
  --radius-tag: 0px;
}

:root[data-theme="light"] {
  --bg-base: #f4f6fc;
  --bg-elev: #ffffff;
  --bg-card: rgba(0, 30, 100, 0.025);
  --bg-card-strong: rgba(0, 30, 100, 0.045);
  --bg-card-hover: rgba(0, 30, 100, 0.075);
  --bg-border: rgba(0, 30, 100, 0.1);
  --bg-border-strong: rgba(0, 30, 100, 0.18);

  --text-primary: #0a1430;
  --text-secondary: rgba(10, 20, 48, 0.7);
  --text-tertiary: rgba(10, 20, 48, 0.45);
  --text-faint: rgba(10, 20, 48, 0.25);

  --blue: #0040d6;
  --blue-deep: #002a8c;
  --blue-cyan: #0090d6;
  --blue-purple: #5a6ce0;
  --blue-soft: rgba(0, 64, 214, 0.1);

  --code-bg: rgba(0, 30, 100, 0.06);
  --code-text: #002a8c;

  --shadow-blue: 0 0 60px rgba(0, 64, 214, 0.2);
  --shadow-card: 0 8px 30px rgba(0, 30, 100, 0.08);
}

/* ---- Reset / base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: var(--radius);
}

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

html { background: #050a1a; }
:root[data-theme="light"] html { background: #f4f6fc; }
body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  backdrop-filter: blur(0); /* enable stacking for child backdrops */
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }
code, pre {
  font-family: var(--font-mono);
  font-size: 0.85em;
}
code {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 1px 6px;
  border: 1px solid var(--bg-border);
}

::selection { background: var(--blue); color: white; }

/* ================================================================
   Background atmosphere
   ================================================================ */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--bg-border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--bg-border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 80%);
}

.bg-orb {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  filter: blur(120px);
  opacity: 0.4;
  will-change: transform;
}
.bg-orb-1 {
  top: -200px; left: -100px;
  width: 600px; height: 600px;
  background: var(--blue);
}
.bg-orb-2 {
  top: 30%; right: -200px;
  width: 500px; height: 500px;
  background: var(--blue-cyan);
  opacity: 0.25;
}
.bg-orb-3 {
  bottom: -100px; left: 30%;
  width: 700px; height: 700px;
  background: var(--blue-purple);
  opacity: 0.2;
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.5'/></svg>");
}

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

/* ================================================================
   Navigation
   ================================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(5, 10, 26, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--bg-border);
  transition: background 0.3s;
}
:root[data-theme="light"] .nav {
  background: rgba(244, 246, 252, 0.8);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo { width: 32px; height: 32px; }
.nav-brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.nav-brand-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-tertiary);
  border: 1px solid var(--bg-border);
  padding: 2px 8px;
}

.nav-links {
  display: flex;
  gap: 4px;
}
.nav-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 8px 14px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-actions { display: flex; gap: 8px; align-items: center; }

.theme-toggle {
  width: 36px; height: 36px;
  border: 1px solid var(--bg-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.theme-toggle:hover { color: var(--blue-cyan); border-color: var(--blue-cyan); }
.theme-icon-dark { display: none; }
.theme-icon-light { display: block; }
:root[data-theme="dark"] .theme-icon-dark { display: block; }
:root[data-theme="dark"] .theme-icon-light { display: none; }

.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--bg-border);
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.2s;
}
.nav-github:hover {
  border-color: var(--blue-cyan);
  color: var(--blue-cyan);
}

.nav-burger { display: none; }
.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 16px 32px;
  border-top: 1px solid var(--bg-border);
}
.nav-mobile a {
  padding: 10px 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--bg-border);
}
.nav-mobile.open { display: flex; }

/* ================================================================
   Layout helpers
   ================================================================ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
}

.section-head {
  margin-bottom: 64px;
  max-width: 900px;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--blue-cyan);
  letter-spacing: 0.12em;
  margin-bottom: 20px;
}
.kicker-num {
  color: var(--text-tertiary);
}
.kicker::before {
  content: "";
  display: block;
  width: 32px;
  height: 1px;
  background: var(--blue-cyan);
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.section-title-en {
  display: block;
  margin-top: 8px;
  font-size: 0.45em;
  font-weight: 400;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}
.section-lead {
  margin-top: 18px;
  font-size: 1.02rem;
  color: var(--text-secondary);
  max-width: 720px;
  line-height: 1.7;
}

/* ================================================================
   Hero
   ================================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 140px 32px 80px;
  overflow: hidden;
}
.hero-layer-back {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--blue-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--blue-soft) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--bg-border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  margin-bottom: 28px;
  background: var(--bg-card);
}
.hero-eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--blue-cyan);
  box-shadow: 0 0 8px var(--blue-cyan);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero-title {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: clamp(3rem, 9vw, 6.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
}
.hero-title-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  filter: drop-shadow(0 0 18px rgba(0, 194, 255, 0.55));
}
.hero-title-logo svg {
  width: 56px;
  height: 56px;
}
.hero-title-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero-title-line {
  display: block;
  /* No background-clip / fill-color here — child spans own the gradient.
     This avoids the double-stacked-letter artifact caused by the parent
     gradient bleeding through each child's transparent text. */
}
.hero-title-line .hero-letter {
  display: inline-block;
  background: linear-gradient(135deg, var(--blue-cyan) 0%, var(--blue) 60%, var(--blue-purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  /* Tight, slightly-tracked spacing so letters don't visually merge. */
  padding: 0 1px;
}
.hero-title-sub {
  display: block;
  margin-top: 12px;
  font-size: 0.32em;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.hero-tagline {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 780px;
  margin-bottom: 32px;
}
.hero-tagline-en {
  display: inline-block;
  margin-top: 4px;
  color: var(--text-tertiary);
  font-size: 0.85em;
}
.hl { color: var(--blue-cyan); font-weight: 600; }
.hl-cyan { color: var(--blue-cyan); font-weight: 600; }

.hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0;
  border: 1px solid var(--bg-border);
  margin-bottom: 36px;
  max-width: 900px;
}
.meta-item {
  padding: 14px 18px;
  border-right: 1px solid var(--bg-border);
  display: flex; flex-direction: column; gap: 4px;
}
.meta-item:last-child { border-right: none; }
.meta-key {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.meta-val {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 60px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-arrow {
  transition: transform 0.2s;
}
.btn:hover .btn-arrow { transform: translateX(4px); }

.btn-primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue), 0 0 24px rgba(0, 82, 255, 0.5);
}
.btn-primary:hover {
  background: var(--blue-cyan);
  border-color: var(--blue-cyan);
  box-shadow: 0 0 0 1px var(--blue-cyan), 0 0 32px rgba(0, 194, 255, 0.6);
}

.btn-ghost {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--bg-border-strong);
}
.btn-ghost:hover { background: var(--bg-card-hover); border-color: var(--blue-cyan); }

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--bg-border);
}
.btn-outline:hover { color: var(--text-primary); border-color: var(--text-secondary); }

/* Hero showcase */
.hero-showcase {
  position: relative;
  margin-top: 40px;
}
.window-frame {
  border: 1px solid var(--bg-border-strong);
  background: var(--bg-elev);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: var(--shadow-card), 0 0 80px var(--blue-soft);
  overflow: hidden;
  position: relative;
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--bg-border);
  background: var(--bg-card);
}
.win-dot {
  width: 12px; height: 12px;
  background: var(--bg-border-strong);
  display: block;
}
.win-red { background: #ff5f57; }
.win-yellow { background: #febc2e; }
.win-green { background: #28c840; }
.window-title {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
}
.window-body {
  background: rgba(14, 21, 48, 0.88);
  position: relative;
}
:root[data-theme="light"] .window-body {
  background: rgba(248, 250, 253, 0.92);
}
.window-body img {
  width: 100%;
  height: auto;
  display: block;
}

/* Floating mini-cards */
.float-card {
  position: absolute;
  background: rgba(10, 18, 48, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid var(--bg-border-strong);
  padding: 14px 16px;
  font-size: 0.78rem;
  box-shadow: var(--shadow-card);
  min-width: 200px;
  z-index: 3;
}
:root[data-theme="light"] .float-card {
  background: rgba(255, 255, 255, 0.95);
}
.float-timer {
  top: -30px;
  right: 40px;
}
.float-ai {
  bottom: 60px;
  left: -50px;
  min-width: 240px;
}
.float-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--blue-cyan);
  margin-bottom: 8px;
}
.float-value {
  font-size: 2.4rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--blue-cyan);
  line-height: 1;
  margin-bottom: 8px;
  text-shadow: 0 0 20px var(--blue-soft);
}
.float-bar {
  height: 3px;
  background: var(--bg-border-strong);
  overflow: hidden;
}
.float-bar-fill {
  height: 100%;
  width: 65%;
  background: var(--blue-cyan);
  box-shadow: 0 0 8px var(--blue-cyan);
}
.float-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0;
  font-size: 0.72rem;
}
.float-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 1px 6px;
  background: var(--red);
  color: #2a0a14;
  font-weight: 700;
}
.float-tag.q2 { background: var(--yellow); color: #2a2200; }
.float-tag.q3 { background: var(--blue-cyan); color: #001a26; }
.float-text { color: var(--text-secondary); }

.hero-scroll-cue {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--text-tertiary);
}
.hero-scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--blue-cyan), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.5); opacity: 0.3; }
}

/* ================================================================
   Stats bar
   ================================================================ */
.stats {
  border-top: 1px solid var(--bg-border);
  border-bottom: 1px solid var(--bg-border);
  background: rgba(10, 18, 48, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  position: relative;
  z-index: 2;
}
:root[data-theme="light"] .stats {
  background: rgba(255, 255, 255, 0.6);
}
.stats-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
.stat {
  padding: 32px 24px;
  border-right: 1px solid var(--bg-border);
  position: relative;
}
.stat:last-child { border-right: none; }
.stat-num {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--blue-cyan);
  font-family: var(--font-mono);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-num span { font-size: 0.6em; }
.stat-label {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 500;
}
.stat-label span {
  display: block;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-top: 2px;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

/* ================================================================
   Intro section
   ================================================================ */
.intro, .modules, .ai, .tech, .install, .final {
  padding: 120px 0;
  position: relative;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
}
.intro-text p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
  line-height: 1.75;
}
.intro-text strong { color: var(--text-primary); font-weight: 600; }
.intro-quote {
  margin-top: 36px;
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--text-primary);
  font-weight: 400;
}

.intro-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.intro-card {
  padding: 22px;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
}
.intro-card-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bg-border);
}
.intro-card-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--blue-cyan);
  letter-spacing: 0.1em;
}
.intro-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}
.intro-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.intro-list li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding-left: 18px;
  position: relative;
}
.intro-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--blue-cyan);
  font-family: var(--font-mono);
}

/* ================================================================
   Modules (feature blocks)
   ================================================================ */
.module {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 120px;
  padding-bottom: 120px;
  border-bottom: 1px solid var(--bg-border);
}
.module:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.module-reverse .module-info { order: 2; }
.module-reverse .module-shot { order: 1; }

.module-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--blue-cyan);
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}
.module-title {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 8px;
}
.module-sub {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}
.module-desc {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 22px;
}
.module-desc strong { color: var(--text-primary); font-weight: 600; }

.module-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}
.module-tags span {
  font-size: 0.75rem;
  padding: 5px 10px;
  background: var(--bg-card-strong);
  border: 1px solid var(--bg-border);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.module-detail {
  border-top: 1px solid var(--bg-border);
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.detail-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: baseline;
  font-size: 0.85rem;
}
.detail-k {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--blue-cyan);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.detail-v {
  color: var(--text-secondary);
}

.module-shot .window-frame {
  transform: perspective(2000px) rotateY(-3deg) rotateX(1deg);
  transition: transform 0.4s ease;
}
.module-reverse .module-shot .window-frame {
  transform: perspective(2000px) rotateY(3deg) rotateX(1deg);
}
.module:hover .module-shot .window-frame {
  transform: perspective(2000px) rotateY(0deg) rotateX(0deg);
}

/* ================================================================
   AI deep dive
   ================================================================ */
.ai-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--bg-border);
}
.ai-card {
  padding: 32px 28px;
  border-right: 1px solid var(--bg-border);
  border-bottom: 1px solid var(--bg-border);
  background: var(--bg-card);
  transition: background 0.3s;
}
.ai-card:nth-child(3n) { border-right: none; }
.ai-card:nth-last-child(-n+2) { border-bottom: none; }
.ai-card:hover { background: var(--bg-card-hover); }

.ai-card-head { margin-bottom: 14px; }
.ai-card-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--blue-cyan);
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 6px;
}
.ai-card h4 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}
.ai-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 14px;
}
.ai-card-foot {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-tertiary);
  padding-top: 12px;
  border-top: 1px solid var(--bg-border);
}

.ai-card-wide {
  grid-column: 1 / -1;
  border-right: none;
  border-bottom: none;
}
.ai-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 8px;
}
.ai-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.ai-step-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--bg-base);
  background: var(--blue-cyan);
  padding: 4px 8px;
  font-weight: 700;
  flex-shrink: 0;
}
:root[data-theme="light"] .ai-step-num {
  color: white;
}
.ai-step-body strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.ai-step-body p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ================================================================
   Tech stack
   ================================================================ */
.tech-table {
  border: 1px solid var(--bg-border);
  margin-bottom: 40px;
}
.tech-row {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr 2.3fr;
  gap: 24px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--bg-border);
  align-items: baseline;
  font-size: 0.92rem;
  transition: background 0.2s;
}
.tech-row:last-child { border-bottom: none; }
.tech-row:not(.tech-head):hover { background: var(--bg-card); }
.tech-head {
  background: var(--bg-card-strong);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--blue-cyan);
  text-transform: uppercase;
}
.tech-row strong { color: var(--text-primary); font-weight: 600; }
.tech-row code { font-size: 0.8rem; }

.project-tree {
  border: 1px solid var(--bg-border);
  background: var(--bg-elev);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.tree-title {
  padding: 12px 24px;
  border-bottom: 1px solid var(--bg-border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--blue-cyan);
}
.tree-body {
  padding: 20px 24px;
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text-secondary);
  overflow-x: auto;
  white-space: pre;
  margin: 0;
}
.t-dir { color: var(--blue-cyan); font-weight: 600; }
.t-file { color: var(--text-primary); }
.t-cmt { color: var(--text-tertiary); font-style: italic; }

/* ================================================================
   Install
   ================================================================ */

/* AI setup card sits ABOVE the install grid (moved here in v2) */
.install-ai-setup {
  border: 1px solid var(--bg-border);
  background: var(--bg-card);
  padding: 32px;
  margin-bottom: 0;
  border-bottom: none;
}
.install-ai-setup-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 22px;
  border-bottom: 1px dashed var(--bg-border);
  margin-bottom: 22px;
}
.install-ai-setup-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
  padding: 3px 8px;
  border: 1px solid var(--bg-border-strong);
  align-self: flex-start;
}
.install-ai-setup h3 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.install-ai-setup-head p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 760px;
}
.install-ai-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.install-ai-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.install-ai-step-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--bg-base);
  background: var(--blue-cyan);
  padding: 4px 8px;
  font-weight: 700;
  flex-shrink: 0;
}
:root[data-theme="light"] .install-ai-step-num { color: white; }
.install-ai-step-body strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.92rem;
  margin-bottom: 4px;
}
.install-ai-step-body p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}
.install-ai-step-body code {
  font-size: 0.75rem;
}

.install-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0;
  border: 1px solid var(--bg-border);
  border-top: none;
}
.install-card {
  padding: 36px;
  background: var(--bg-card);
}
.install-card:nth-child(2) { background: var(--bg-elev); }
.install-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--blue-cyan);
  padding: 4px 10px;
  background: var(--blue-soft);
  border: 1px solid var(--blue);
  margin-bottom: 16px;
}
.install-tag-ghost {
  color: var(--text-tertiary);
  background: transparent;
  border-color: var(--bg-border-strong);
}
.install-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.install-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
}
.install-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.install-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 8px 12px;
  background: var(--bg-card-strong);
  border-left: 2px solid var(--blue-cyan);
}
.install-list strong { color: var(--text-primary); font-weight: 600; }

.install-btn { width: 100%; justify-content: center; }
.install-platform-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 12px;
  letter-spacing: 0.04em;
  min-height: 1em;
}
.install-platform-hint strong { color: var(--blue-cyan); font-weight: 600; }

.code-block {
  background: var(--bg-base);
  border: 1px solid var(--bg-border);
  padding: 18px 20px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  overflow-x: auto;
}
.code-line {
  padding: 2px 0;
  color: var(--text-secondary);
  white-space: pre;
}
.code-prompt {
  color: var(--blue-cyan);
  margin-right: 8px;
  user-select: none;
}
.code-cmt {
  color: var(--text-tertiary);
  font-style: italic;
}
.code-block-extra {
  margin-top: 12px;
  border: 1px solid var(--bg-border);
}
.code-block-extra summary {
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  background: var(--bg-card-strong);
  list-style: none;
}
.code-block-extra summary::before {
  content: "+ ";
  color: var(--blue-cyan);
}
.code-block-extra[open] summary::before { content: "− "; }
.code-block-extra .code-block {
  margin: 0;
  border: none;
  border-top: 1px solid var(--bg-border);
}
.code-note {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  padding: 12px 16px;
  background: var(--bg-card);
  margin: 0;
  border-top: 1px solid var(--bg-border);
}

/* ================================================================
   Final CTA
   ================================================================ */
.final {
  padding: 100px 0;
}
.final-inner {
  position: relative;
  text-align: center;
  padding: 80px 40px;
  border: 1px solid var(--bg-border-strong);
  background: var(--bg-card);
  overflow: hidden;
}
.final-glow {
  position: absolute;
  top: -50%; left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--blue) 0%, transparent 60%);
  opacity: 0.25;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}
.final-title {
  position: relative;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.final-lead {
  position: relative;
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}
.final-cta {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ================================================================
   Footer
   ================================================================ */
.foot {
  border-top: 1px solid var(--bg-border);
  background: rgba(10, 18, 48, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 60px 0 40px;
}
:root[data-theme="light"] .foot {
  background: rgba(255, 255, 255, 0.7);
}
.foot-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
.foot-brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 14px;
}
.foot-logo { width: 32px; height: 32px; flex-shrink: 0; }
.foot-brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.foot-brand-slogan {
  font-size: 0.85rem !important;
  font-weight: 400 !important;
  color: var(--text-tertiary);
  letter-spacing: 0;
  flex: 1 1 100%;
  margin-left: 42px;
  margin-top: -4px;
}
.foot-desc {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  line-height: 1.6;
}
.foot-col h5 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--blue-cyan);
  letter-spacing: 0.12em;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.foot-col a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 4px 0;
  transition: color 0.2s;
}
.foot-col a:hover { color: var(--blue-cyan); }
.foot-meta {
  display: block;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  padding: 4px 0;
  font-family: var(--font-mono);
}

/* ================================================================
   Scroll-reveal animations
   ================================================================ */
html.has-reveal .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
html.has-reveal .reveal.in {
  opacity: 1;
  transform: translateY(0);
}
/* No-js / no-IO: always visible (no animation needed) */

/* ================================================================
   Enhanced animation system
   ================================================================ */

/* ---- Smooth theme switch (BG transition, not jump) ---- */
:root,
body,
.bg-grid,
.bg-orb,
.nav,
.foot,
.final-inner,
.intro-card,
.module-shot .window-frame,
.ai-card,
.install-card,
.code-block,
.tree-body {
  transition:
    background-color 0.45s ease,
    background 0.45s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* ---- Top scroll progress indicator (2px blue) ---- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 200;
  background: transparent;
  pointer-events: none;
}
.scroll-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-cyan) 100%);
  box-shadow: 0 0 8px var(--blue-cyan);
  transform-origin: left;
  will-change: width;
}

/* ---- Multi-layer hero parallax: 5+ layers ---- */
.hero-layer { will-change: transform; }

/* Existing bg-grid gets layer 0 (slowest, almost static) */
.bg-grid { z-index: 0; will-change: transform; }

/* New: hero halo behind title */
.hero-halo {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1100px;
  height: 600px;
  background: radial-gradient(ellipse at center,
    rgba(0, 194, 255, 0.18) 0%,
    rgba(0, 82, 255, 0.1) 35%,
    transparent 70%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
}

/* ---- Hero letter-by-letter loading reveal ---- (lightweight, GPU-friendly) */
.hero-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.18em);
  will-change: opacity, transform;
  transition:
    opacity 0.32s ease-out,
    transform 0.32s ease-out;
  transition-delay: calc(40ms + var(--i, 0) * 45ms);
}
.no-js .hero-letter,
html.has-loaded .hero-letter {
  opacity: 1;
  transform: none;
}

/* ---- Hero timeline ribbon (horizontal with ticks) ---- */
.hero-timeline {
  margin-top: 32px;
  padding: 18px 0 4px;
  position: relative;
}
.hero-timeline-bar {
  height: 2px;
  background: var(--bg-border);
  position: relative;
  overflow: hidden;
}
.hero-timeline-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-cyan) 100%);
  box-shadow: 0 0 6px var(--blue-cyan);
  will-change: width;
}
.hero-timeline-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}
.hero-timeline-ticks span {
  display: block;
  width: 1px;
  height: 8px;
  background: var(--bg-border-strong);
  transition: background 0.3s;
}
.hero-timeline-ticks span.lit {
  background: var(--blue-cyan);
  box-shadow: 0 0 6px var(--blue-cyan);
}

/* ---- Breathing animation for floating cards ---- */
@keyframes breathe-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -10px, 0); }
}
@keyframes breathe-float-strong {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -14px, 0); }
}
.float-timer {
  animation: breathe-float 4s ease-in-out infinite;
}
.float-ai {
  animation: breathe-float-strong 5.2s ease-in-out infinite;
}
/* Keep parallax transform override when scrolled — JS clears, animation re-applies */
.float-timer.pos-floating { animation: breathe-float 4s ease-in-out infinite; }
.float-ai.pos-floating { animation: breathe-float-strong 5.2s ease-in-out infinite; }

/* ---- Section top line (0 -> 100% width expand on enter) ---- */
.section-top-line {
  position: absolute;
  top: 0;
  left: 0;
  height: 1px;
  width: 0%;
  background: linear-gradient(90deg, transparent 0%, var(--blue-cyan) 40%, var(--blue) 60%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}
html.has-reveal .section-top-line {
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.section-top-line.in {
  width: 100%;
}

/* ---- Sequential relay reveal (children inside each container) ---- */
html.has-reveal .relay > * {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.65s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
html.has-reveal .relay.in > * {
  opacity: 1;
  transform: none;
}
html.has-reveal .relay.in > *:nth-child(1) { transition-delay: 0ms; }
html.has-reveal .relay.in > *:nth-child(2) { transition-delay: 100ms; }
html.has-reveal .relay.in > *:nth-child(3) { transition-delay: 200ms; }
html.has-reveal .relay.in > *:nth-child(4) { transition-delay: 300ms; }
html.has-reveal .relay.in > *:nth-child(5) { transition-delay: 400ms; }
html.has-reveal .relay.in > *:nth-child(6) { transition-delay: 500ms; }
html.has-reveal .relay.in > *:nth-child(7) { transition-delay: 600ms; }
html.has-reveal .relay.in > *:nth-child(8) { transition-delay: 700ms; }
html.has-reveal .relay.in > *:nth-child(n+9) { transition-delay: 800ms; }

/* ---- Module shot 3D tilt (entrance + hover) ---- */
.module-shot {
  perspective: 1800px;
  will-change: transform;
}
.module-shot .window-frame {
  transform: rotateY(-6deg) rotateX(2deg) translateZ(0);
  transform-style: preserve-3d;
  transition:
    transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.3s ease;
  will-change: transform;
}
.module-reverse .module-shot .window-frame {
  transform: rotateY(6deg) rotateX(2deg) translateZ(0);
}
.module.in-view .module-shot .window-frame {
  transform: rotateY(0deg) rotateX(0deg) translateZ(0);
}
.module-shot.is-focused .window-frame {
  box-shadow:
    var(--shadow-card),
    0 0 0 1px var(--blue-cyan),
    0 0 60px rgba(0, 194, 255, 0.35);
}

/* ---- AI flow decoration (removed in v2) ---- */

/* ---- Stats scroll progress bar ---- (removed in v2) ---- */

/* ---- Interactive micro-animations ---- */
/* Buttons: scale + shadow grow */
.btn {
  transition:
    transform 0.2s ease,
    background 0.45s ease,
    color 0.3s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}
.btn:hover {
  transform: scale(1.02);
}

/* Module tag hover: transparent -> blue */
.module-tags span {
  transition:
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    transform 0.2s ease;
}
.module-tags span:hover {
  background: var(--blue-soft);
  color: var(--blue-cyan);
  border-color: var(--blue-cyan);
}

/* Nav link underline expanding from center outward */
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 1px;
  background: var(--blue-cyan);
  transition:
    width 0.25s ease,
    left 0.25s ease,
    background 0.45s ease;
  box-shadow: 0 0 4px var(--blue-cyan);
}
.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  width: calc(100% - 28px);
  left: 14px;
}

/* Theme toggle: icon rotates 180 deg */
.theme-toggle {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, color 0.3s, border-color 0.3s;
}
.theme-toggle:hover {
  transform: rotate(15deg);
}
.theme-icon-dark,
.theme-icon-light {
  display: inline-flex;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
:root[data-theme="dark"] .theme-icon-light {
  transform: rotate(180deg);
}
:root[data-theme="light"] .theme-icon-dark {
  transform: rotate(180deg);
}

/* Install list item hover micro-shift */
.install-list li {
  transition: background 0.3s ease, transform 0.2s ease;
}
.install-list li:hover {
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

/* AI card hover lift */
.ai-card {
  transition:
    background 0.3s ease,
    transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  position: relative;
}
.ai-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}
:root[data-theme="light"] .ai-card:hover {
  box-shadow: 0 12px 32px rgba(0, 30, 100, 0.12);
}

/* Intro card hover */
.intro-card {
  transition:
    background 0.3s ease,
    transform 0.3s ease,
    border-color 0.3s ease;
}
.intro-card:hover {
  transform: translateY(-2px);
  border-color: var(--blue-cyan);
}

/* Tech row hover left bar */
.tech-row {
  position: relative;
}
.tech-row::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--blue-cyan);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.25s ease;
}
.tech-row:not(.tech-head):hover::before {
  transform: scaleY(1);
}

/* Stat border-bottom fade-in when stats section enters */
.stat {
  position: relative;
  transition: background 0.3s ease;
}
.stat::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--blue-cyan);
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.stats.in-view .stat::before {
  width: 100%;
}
.stat:hover {
  background: var(--bg-card);
}

/* Footer hover */
.foot-col a {
  transition: color 0.2s ease, transform 0.2s ease;
}
.foot-col a:hover {
  transform: translateX(2px);
}

/* Code-block line caret blink on first line for terminal effect */
.code-block .code-line:first-child::before {
  content: "▌";
  color: var(--blue-cyan);
  margin-right: 6px;
  animation: caretBlink 1.2s steps(2) infinite;
}
@keyframes caretBlink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

/* Scroll-driven section background drift via JS-set CSS var */
body {
  --section-tint: 0;
}
/* Apply tint to major sections via [data-section-tint] attribute set by JS */

/* Scroll progress on nav border (also: tint nav at top of page) */
.nav.tint {
  background: rgba(5, 10, 26, 0.92);
}
:root[data-theme="light"] .nav.tint {
  background: rgba(244, 246, 252, 0.96);
}

/* Hide SVG path until in-view to prevent first-paint flash -- legacy (kept harmless) */
/* .ai-flow-path { opacity: 0; } -- removed with ai-flow */

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 1024px) {
  .intro-grid { grid-template-columns: 1fr; gap: 40px; }
  .module, .module-reverse { grid-template-columns: 1fr; gap: 40px; }
  .module-reverse .module-info { order: 1; }
  .module-reverse .module-shot { order: 2; }
  .ai-grid { grid-template-columns: repeat(2, 1fr); }
  .ai-card { border-right: 1px solid var(--bg-border); }
  .ai-card:nth-child(3n) { border-right: 1px solid var(--bg-border); }
  .ai-card:nth-child(2n) { border-right: none; }
  .install-grid { grid-template-columns: 1fr; }
  .install-ai-steps { grid-template-columns: 1fr; gap: 14px; }
  .install-ai-setup { padding: 24px; }
  .stats-inner { grid-template-columns: repeat(3, 1fr); }
  .stat { border-bottom: 1px solid var(--bg-border); }
  .foot-inner { grid-template-columns: 1fr 1fr; }
  .float-card { display: none; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-github { display: none; }
  .nav-burger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
  }
  .nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
  }
  .hero { padding: 120px 20px 60px; }
  .container { padding: 0 20px; }
  .section-head { margin-bottom: 40px; }
  .intro, .modules, .ai, .tech, .install, .final { padding: 80px 0; }
  .module { padding-bottom: 60px; margin-bottom: 60px; }
  .ai-grid { grid-template-columns: 1fr; }
  .ai-card { border-right: none !important; }
  .ai-steps { grid-template-columns: 1fr; }
  .tech-row { grid-template-columns: 1fr; gap: 4px; }
  .tech-row span { font-size: 0.82rem; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .meta-item { border-right: none; border-bottom: 1px solid var(--bg-border); }
  .meta-item:nth-child(2n) { border-right: none; }
  .foot-inner { grid-template-columns: 1fr; gap: 32px; }
  .final-inner { padding: 60px 24px; }
  .float-card { display: none; }
  .module-shot .window-frame { transform: none !important; }
  /* Enhanced — disable decorative motion on mobile */
  .ai-flow { display: none; }
  .hero-timeline { margin-top: 24px; }
  .ai-card:hover { transform: none; }
  .intro-card:hover { transform: none; }
  .foot-col a:hover { transform: none; }
}

/* ================================================================
   Reduced motion
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .hero-letter, .relay > * {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .section-top-line { width: 100% !important; }
  .ai-flow-path { display: none !important; }
  .module-shot .window-frame {
    transform: rotateY(0) rotateX(0) !important;
  }
  .float-timer, .float-ai { animation: none !important; }
  html.has-reveal .reveal, html.has-reveal .hero-letter,
  html.has-reveal .relay > * { transition: none !important; }
}