/* ============================================
   ForkIt Case Study — Design System v2
   Uses actual app brand tokens
   ============================================ */

:root {
  /* App brand colors */
  --accent: #FB923C;
  --accent-dark: #EA580C;
  --accent-light: #FDBA74;
  --pop: #2DD4BF;
  --bg-primary: #0D0D0D;
  --bg-warm: #1A1410;
  --bg-cool: #101620;

  /* Surfaces */
  --surface: rgba(255,255,255,0.03);
  --surface-hover: rgba(255,255,255,0.06);
  --surface-card: rgba(13,13,13,0.85);
  --border-subtle: rgba(255,255,255,0.10);
  --border-light: rgba(255,255,255,0.18);

  /* Text */
  --text-primary: rgba(255,255,255,0.92);
  --text-secondary: rgba(255,255,255,0.75);
  --text-muted: rgba(255,255,255,0.65);
  --text-faint: rgba(255,255,255,0.50);

  /* Accent overlays */
  --accent-bg: rgba(251,146,60,0.12);
  --accent-border: rgba(251,146,60,0.25);
  --pop-bg: rgba(45,212,191,0.06);
  --pop-border: rgba(45,212,191,0.20);

  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --font-mono: 'Fira Code', monospace;

  /* Layout */
  --max-width: 900px;
  --section-gap: 0;
}

/* === FORK ICON (inline SVG helper) === */
.fork-icon {
  display: inline-block; vertical-align: baseline; position: relative; top: 0.1em;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body { background: var(--bg-primary); overflow-x: hidden; }

a { color: var(--pop); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }
img { max-width: 100%; height: auto; display: block; }
strong { color: var(--pop); font-weight: 600; }
em { color: var(--accent); font-style: normal; font-weight: 600; }

code {
  font-family: var(--font-mono); background: var(--pop-bg);
  padding: 0.15em 0.4em; border-radius: 4px; font-size: 0.85em; color: var(--pop);
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
  font-family: var(--font-heading); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.2;
}
h1 { font-size: 3rem; color: var(--text-primary); }
h2 { font-size: 2rem; color: var(--pop); margin-bottom: 1rem; }
h3 { font-size: 1.2rem; color: var(--pop); margin-bottom: 0.5rem; }
h2.orange { color: var(--accent); }

p { margin-bottom: 1rem; color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }

/* === LAYOUT === */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; }
.container:has(.scrolly) { max-width: 1100px; }

section { padding: 6rem 0; position: relative; }

/* === SECTION NAV === */
.section-nav {
  position: fixed; left: 1.5rem; top: 50%; transform: translateY(-50%);
  z-index: 100; display: flex; flex-direction: column; gap: 0.6rem;
}
.section-nav a {
  display: block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-faint); transition: all 0.3s; position: relative;
}
.section-nav a.active { background: var(--pop); transform: scale(1.6); }
.section-nav a:hover { background: var(--text-muted); transform: scale(1.3); }
.section-nav a .nav-label {
  position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  font-size: 0.6rem; color: var(--text-muted); white-space: nowrap;
  font-family: var(--font-heading); letter-spacing: 0.05em;
  text-transform: uppercase; opacity: 0; transition: opacity 0.2s;
  pointer-events: none;
}
.section-nav a:hover .nav-label { opacity: 1; }

/* === PROGRESS BAR === */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--pop));
  z-index: 200; transition: width 0.1s linear;
}

/* === BACK LINK === */
.back-link {
  position: fixed; top: 1.2rem; left: 1.2rem; z-index: 150;
  font-size: 0.7rem; color: var(--text-faint); font-family: var(--font-heading);
  letter-spacing: 0.05em; text-transform: uppercase; transition: color 0.2s;
}
.back-link:hover { color: var(--pop); opacity: 1; }

/* === HERO === */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; overflow: hidden; padding: 4rem 0;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-warm) 50%, var(--bg-primary) 100%);
}
.hero-glow {
  position: absolute; border-radius: 50%; filter: blur(100px); pointer-events: none;
}
.hero-glow.orange {
  left: -200px; top: -150px; width: 500px; height: 500px;
  background: var(--accent); opacity: 0.06;
}
.hero-glow.teal {
  right: -150px; bottom: -100px; width: 400px; height: 400px;
  background: var(--pop); opacity: 0.04;
}
.hero-content { position: relative; z-index: 1; }
.hero-stats { display: flex; gap: 2.5rem; margin-top: 2.5rem; flex-wrap: wrap; }
.hero-stat .number {
  font-family: var(--font-heading); font-weight: 900;
  font-size: 2.2rem; color: var(--pop); line-height: 1;
}
.hero-stat .label {
  font-size: 0.65rem; color: var(--text-faint); margin-top: 0.2rem;
  text-transform: uppercase; letter-spacing: 0.08em;
}

.scroll-hint {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  animation: hintFade 3s ease-in-out infinite;
  z-index: 2;
}
.scroll-hint .hint-text {
  font-family: var(--font-heading); font-size: 0.6rem;
  color: var(--text-faint); letter-spacing: 0.15em; text-transform: uppercase;
}
.scroll-hint .hint-arrow {
  width: 20px; height: 20px; border-right: 2px solid var(--pop);
  border-bottom: 2px solid var(--pop); transform: rotate(45deg);
  animation: hintBounce 1.5s ease-in-out infinite;
}
@keyframes hintBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.4; }
  50% { transform: rotate(45deg) translateY(6px); opacity: 1; }
}
@keyframes hintFade {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* === SCROLLYTELLING CONTAINER === */
.scrolly {
  position: relative; display: flex; gap: 2rem;
}
.scrolly-sticky {
  position: sticky; top: 10vh; height: 80vh;
  flex: 0 0 50%; display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.scrolly-steps {
  flex: 0 0 45%; padding: 40vh 0;
}
.scrolly-step {
  padding: 2rem; margin-bottom: 50vh; min-height: 30vh;
  opacity: 0.25; transition: opacity 0.5s ease;
  display: flex; flex-direction: column; justify-content: center;
}
.scrolly-step.active { opacity: 1; }
.scrolly-step:first-child { margin-top: 20vh; }
.scrolly-step:last-child { margin-bottom: 40vh; }
.scrolly-step h3 { color: var(--accent); }
.scrolly-step p { color: var(--text-secondary); font-size: 0.95rem; }

/* === PHONE MOCKUP === */
.phone-frame {
  width: 280px; height: 560px;
  background: var(--bg-primary);
  border: 2px solid var(--border-light);
  border-radius: 32px; padding: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
  position: relative; overflow: hidden;
}
.phone-notch {
  width: 100px; height: 24px;
  background: var(--bg-primary); border-radius: 0 0 14px 14px;
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  z-index: 10;
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-warm) 50%, var(--bg-primary) 100%);
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 16px 16px; position: relative;
}

/* App UI elements inside phone */
/* === SCREENSHOT CROSSFADE === */
.screen-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 22px;
  opacity: 0; transition: opacity 0.5s ease;
}
.screen-img.active { opacity: 1; }

.app-header {
  text-align: center; margin-bottom: 16px; width: 100%;
}
.app-title {
  font-family: var(--font-heading); font-weight: 900; font-size: 1.4rem;
}
.app-title .fork { color: var(--pop); }
.app-title .it { color: var(--accent); }
.app-subtitle {
  font-size: 0.45rem; color: var(--text-faint);
  letter-spacing: 0.15em; text-transform: uppercase; margin-top: 2px;
}

.app-status {
  font-size: 0.7rem; color: var(--text-muted); text-align: center;
  margin-bottom: 12px;
}

.app-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border: none; border-radius: 14px; padding: 12px 20px; width: 100%;
  color: white; font-family: var(--font-heading); font-weight: 900;
  font-size: 0.85rem; text-align: center; cursor: default;
  box-shadow: 0 4px 15px rgba(251,146,60,0.3);
}

.app-filter-bar {
  width: 100%; margin-top: 12px;
  background: var(--surface); border: 1px solid var(--border-subtle);
  border-radius: 12px; padding: 8px 12px;
  font-size: 0.55rem; color: var(--text-muted);
  display: flex; justify-content: space-between; align-items: center;
}

.app-chip {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 0.5rem; font-family: var(--font-heading); font-weight: 700;
  border: 1px solid var(--border-subtle); color: var(--text-muted);
  margin: 2px;
}
.app-chip.active {
  background: rgba(251,146,60,0.9); border-color: var(--accent);
  color: white;
}

.app-result-card {
  width: 100%; margin-top: 12px;
  background: var(--surface-card); border: 1px solid var(--border-light);
  border-radius: 16px; padding: 14px;
  opacity: 0; transform: translateY(10px);
  transition: all 0.5s ease;
}
.app-result-card.visible {
  opacity: 1; transform: translateY(0);
}
.app-result-name {
  font-family: var(--font-heading); font-weight: 900; font-size: 0.8rem;
  color: var(--text-primary);
}
.app-result-detail {
  font-size: 0.5rem; color: var(--text-muted); margin-top: 4px;
}
.app-result-actions {
  display: flex; gap: 8px; margin-top: 10px;
}
.app-result-action {
  flex: 1; text-align: center; padding: 6px 0;
  background: var(--surface); border: 1px solid var(--border-subtle);
  border-radius: 8px; font-size: 0.45rem; color: var(--text-muted);
}

/* Group fork UI additions */
.app-group-banner {
  width: 100%; padding: 8px 12px;
  background: var(--pop-bg); border: 1px solid var(--pop-border);
  border-radius: 10px; margin-top: 8px;
  font-size: 0.55rem; color: var(--pop); text-align: center;
}
.app-participant {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 0; font-size: 0.5rem; color: var(--text-secondary);
}
.app-participant-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--pop);
}

/* Auth UI */
.app-auth-button {
  width: 100%; padding: 10px; margin-top: 6px;
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: 10px; font-size: 0.6rem; color: var(--text-primary);
  text-align: center; font-family: var(--font-heading);
}

/* === ARCHITECTURE DIAGRAM (HTML/CSS) === */
.arch-diagram {
  width: 100%; max-width: 480px; position: relative;
}
.arch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  width: 100%;
  max-width: 400px;
  align-content: center;
}
.arch-node {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: 10px; padding: 10px 14px;
  font-family: var(--font-heading); font-size: 0.65rem;
  color: var(--text-muted); text-align: center;
  opacity: 0; transform: scale(0.9); visibility: hidden;
  transition: all 0.5s ease;
  position: absolute;
}
.arch-node.grid {
  position: static;
  transform: none;
}
.arch-node.visible { opacity: 1; transform: scale(1); visibility: visible; }
.arch-node.highlight {
  border-color: var(--pop-border); color: var(--pop);
  box-shadow: 0 0 20px rgba(45,212,191,0.1);
}
.arch-node.alert {
  border-color: var(--accent-border); color: var(--accent);
  box-shadow: 0 0 20px rgba(251,146,60,0.15);
  animation: alertPulse 1.5s ease-in-out infinite;
}
@keyframes alertPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(251,146,60,0.1); }
  50% { box-shadow: 0 0 30px rgba(251,146,60,0.25); }
}
.arch-node .node-icon { font-size: 1.2rem; display: block; margin-bottom: 4px; }
.arch-node .node-label { font-weight: 700; font-size: 0.7rem; color: var(--text-primary); display: block; }
.arch-node .node-desc { font-size: 0.5rem; color: var(--text-faint); margin-top: 2px; display: block; }

.arch-line {
  position: absolute; background: var(--border-subtle); z-index: 0;
  opacity: 0; transition: opacity 0.5s;
}
.arch-line.visible { opacity: 1; }
.arch-line.highlight { background: var(--pop); opacity: 0.4; }

/* === GLASS CARD === */
.glass-card {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: 18px; padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}
.glass-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}
.glass-card.accent { border-color: var(--accent-border); }
.glass-card.pop { border-color: var(--pop-border); }
.glass-card.accent-bar { border-left: 3px solid var(--accent); }
.glass-card.pop-bar { border-left: 3px solid var(--pop); }

/* === STAT GRID === */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat {
  background: var(--surface); border-left: 3px solid var(--pop);
  padding: 1rem; border-radius: 0 10px 10px 0;
  transition: transform 0.3s;
}
.stat:hover { transform: translateY(-4px); }
.stat .number {
  font-family: var(--font-heading); font-weight: 900;
  font-size: 2.5rem; color: var(--pop); line-height: 1;
}
.stat .label { font-size: 0.65rem; color: var(--text-faint); margin-top: 0.3rem; }

/* === BLOCKQUOTE === */
blockquote {
  background: var(--pop-bg); border-left: 4px solid var(--pop);
  padding: 1.2rem 1.5rem; margin: 1.5rem 0; font-size: 1rem;
  border-radius: 0 10px 10px 0; color: var(--text-primary);
}
blockquote.orange { background: var(--accent-bg); border-left-color: var(--accent); }

/* === LISTS === */
ul { list-style: none; padding: 0; }
ul li { padding: 0.4em 0 0.4em 1.5em; position: relative; color: var(--text-secondary); }
ul li::before {
  content: ''; position: absolute; left: 0; top: 0.85em;
  width: 6px; height: 6px; background: var(--pop); border-radius: 50%;
}
ul.orange-bullets li::before { background: var(--accent); }

/* === TWO COLUMN === */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }

/* === WORKFLOW STEPS === */
.workflow-step { display: flex; align-items: flex-start; gap: 1rem; padding: 0.8rem 0; }
.step-label {
  background: var(--pop); color: var(--bg-primary);
  font-family: var(--font-heading); font-weight: 700; font-size: 0.7rem;
  padding: 0.3em 0.8em; border-radius: 20px; white-space: nowrap;
  min-width: 80px; text-align: center;
  box-shadow: 0 2px 10px rgba(45,212,191,0.25);
}
.step-label.orange { background: var(--accent); box-shadow: 0 2px 10px rgba(251,146,60,0.25); }
.step-desc { color: var(--text-secondary); font-size: 0.9rem; }

/* === WORKFLOW STEP HOVER/TAP EXAMPLE SWAP === */
.step-example {
  display: none; color: var(--pop); font-size: 0.9rem; font-style: italic;
}
.step-example.problem { color: var(--accent); }
.workflow-step:hover .step-desc,
.workflow-step.active-example .step-desc { display: none; }
.workflow-step:hover .step-example,
.workflow-step.active-example .step-example { display: inline; }
.workflow-step { cursor: default; transition: background 0.2s ease; border-radius: 8px; padding: 0.8rem 0.5rem; }
.workflow-step:hover,
.workflow-step.active-example { background: rgba(45,212,191,0.04); }
.workflow-step:has(.step-example.problem):hover,
.workflow-step:has(.step-example.problem).active-example { background: rgba(251,146,60,0.04); }

/* === PIPELINE EXAMPLE === */
.pipeline-example { max-width: 600px; }
.pipeline-step { display: flex; align-items: flex-start; gap: 1rem; }
.pipeline-step .step-label { flex-shrink: 0; margin-top: 0.8rem; }
.pipeline-card {
  flex: 1; background: var(--surface); border: 1px solid var(--border-subtle);
  border-radius: 12px; padding: 1rem 1.2rem;
}
.pipeline-card p { font-size: 0.9rem; margin-bottom: 0.5rem; }
.pipeline-card p:last-child { margin-bottom: 0; }
.pipeline-arrow {
  text-align: center; color: var(--text-faint); font-size: 1.2rem;
  padding: 0.3rem 0; margin-left: 44px;
}

/* === DEV CYCLE === */
.cycle-phase {
  background: var(--surface); border-radius: 10px;
  padding: 1rem 1.2rem; margin: 0.8rem 0;
  border-left: 4px solid var(--pop); transition: transform 0.3s;
}
.cycle-phase:hover { transform: translateX(8px); }
.cycle-phase.orange { border-left-color: var(--accent); }
.cycle-phase h3 { margin-bottom: 0.2rem; }
.cycle-phase p { margin: 0; font-size: 0.85rem; }
.cycle-ship {
  text-align: center; color: var(--pop); font-weight: 700;
  font-family: var(--font-heading); font-size: 1rem;
  margin-top: 1.5rem; padding: 0.8rem;
  border: 2px solid var(--pop-border); border-radius: 10px;
  background: var(--pop-bg);
}

/* === COMMIT COMPARE === */
.commit-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.commit-box {
  background: var(--surface); border-radius: 10px; padding: 1.2rem;
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono); font-size: 0.8rem;
}
.commit-box.old { border-left: 3px solid var(--accent); }
.commit-box.new { border-left: 3px solid var(--pop); }
.commit-box .date { color: var(--text-faint); font-size: 0.7rem; margin-bottom: 0.8rem; font-family: var(--font-heading); }

/* === COST TABLE === */
.cost-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.cost-table td { padding: 0.6rem 1rem; border-bottom: 1px solid var(--border-subtle); font-size: 0.9rem; }
.cost-table td:first-child { color: var(--text-muted); }
.cost-table td:last-child { text-align: right; color: var(--pop); font-family: var(--font-heading); font-weight: 700; }
.cost-table tr:last-child td { border-top: 2px solid var(--accent); font-size: 1.1rem; }
.cost-table tr:last-child td:last-child { color: var(--accent); }

/* === BIG QUOTE === */
.big-quote {
  font-size: 1.3rem; line-height: 1.7; color: var(--text-primary);
  padding-left: 1.5rem; border-left: 3px solid var(--pop); margin: 1.5rem 0;
}

/* === SCROLL REVEAL === */
.reveal-on-scroll {
  opacity: 0; transform: translateY(25px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* === SECTION DIVIDER === */
.section-divider {
  text-align: center; padding: 4rem 0; position: relative;
}
.section-divider .divider-line {
  width: 60px; height: 3px; margin: 0 auto;
  background: linear-gradient(90deg, var(--accent), var(--pop));
  border-radius: 2px;
}
.section-divider .divider-label {
  font-family: var(--font-heading); font-size: 0.65rem;
  color: var(--text-faint); letter-spacing: 0.15em;
  text-transform: uppercase; margin-top: 1rem;
}

/* === FOOTER === */
.case-study-footer {
  padding: 3rem 0; text-align: center; border-top: 1px solid var(--border-subtle);
}
.case-study-footer p { color: var(--text-faint); font-size: 0.8rem; }

/* === HORIZONTAL CAROUSEL === */
.carousel-wrapper { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }
.carousel {
  display: flex; gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 1rem 0.5rem;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel-slide {
  flex: 0 0 min(85vw, 400px); scroll-snap-align: center;
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: 18px; padding: 1.5rem; display: flex; flex-direction: column;
  overflow: hidden;
}
/* Pad first and last slides so they can center */
.carousel-slide:first-child { margin-left: calc((100% - min(85vw, 400px)) / 2); }
.carousel-slide:last-child { margin-right: calc((100% - min(85vw, 400px)) / 2); }
.carousel-slide h3 { color: var(--accent); margin-top: 1rem; }
.carousel-slide p { color: var(--text-secondary); font-size: 0.9rem; }
.carousel-phone {
  width: 180px; min-height: 360px; max-height: 360px; margin: 0 auto;
  background: var(--bg-primary); border: 2px solid var(--border-light);
  border-radius: 24px; padding: 8px; overflow: hidden; flex-shrink: 0;
}
.carousel-phone img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 18px;
}
.carousel-nav {
  display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1rem;
}
.carousel-btn {
  background: var(--surface); border: 1px solid var(--border-subtle);
  color: var(--text-muted); font-size: 1.2rem; width: 40px; height: 40px;
  border-radius: 50%; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
}
.carousel-btn:hover { background: var(--surface-hover); color: var(--pop); border-color: var(--pop-border); }
.carousel-dots { display: flex; gap: 6px; }
.carousel-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint);
  transition: all 0.3s; cursor: pointer; border: none; padding: 0;
}
.carousel-dot.active { background: var(--pop); transform: scale(1.4); }

/* Architecture chips (carousel version) */
.arch-grid-small { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 0.5rem; }
.arch-chip {
  padding: 0.3em 0.7em; border-radius: 8px; font-size: 0.7rem;
  font-family: var(--font-heading); font-weight: 600; border: 1px solid var(--border-subtle);
  background: var(--surface); color: var(--text-muted); transition: all 0.3s;
}
.arch-chip.on { border-color: var(--border-light); color: var(--text-primary); }
.arch-chip.new { border-color: var(--pop-border); color: var(--pop); background: var(--pop-bg); }
.arch-chip.alert { border-color: var(--accent-border); color: var(--accent); background: var(--accent-bg); }
.arch-slide { align-items: center; text-align: center; }

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal-on-scroll { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* === FOCUS INDICATORS === */
a:focus-visible { outline: 2px solid var(--pop); outline-offset: 3px; border-radius: 4px; }
.glass-card:focus-visible { outline: 2px solid var(--pop); outline-offset: 2px; }

/* === MOBILE SECTION NAV + SCROLL TO TOP === */
.mobile-nav-toggle {
  display: none; position: fixed; bottom: 1.5rem; right: 1.5rem;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-subtle);
  background: var(--surface); color: var(--text-muted); font-size: 1.2rem;
  align-items: center; justify-content: center; cursor: pointer;
  z-index: 200; box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  transition: opacity 0.3s;
}
.mobile-nav-toggle:hover { background: var(--surface-card); color: var(--pop); }
.scroll-top-btn {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-subtle);
  background: var(--surface); color: var(--text-muted); font-size: 1.2rem;
  display: none; align-items: center; justify-content: center; cursor: pointer;
  z-index: 200; box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  transition: opacity 0.3s; opacity: 0; pointer-events: none;
}
.scroll-top-btn.visible { opacity: 1; pointer-events: auto; }
.scroll-top-btn:hover { background: var(--surface-card); color: var(--pop); }

/* === RESPONSIVE === */
@media (max-width: 1200px) {
  .section-nav { display: none; }
  .mobile-nav-toggle { display: flex; }
  .scroll-top-btn { display: flex; }
}
.mobile-nav-menu {
  display: none; position: fixed; bottom: 4.5rem; right: 1.5rem;
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: 12px; padding: 0.75rem 0; z-index: 200;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5); max-height: 60vh; overflow-y: auto;
}
.mobile-nav-menu.open { display: block; }
.mobile-nav-menu a {
  display: block; padding: 0.5rem 1.2rem; font-size: 0.75rem;
  color: var(--text-muted); text-decoration: none;
  font-family: var(--font-heading); letter-spacing: 0.03em;
  transition: color 0.2s, background 0.2s;
}
.mobile-nav-menu a:hover,
.mobile-nav-menu a.active { color: var(--pop); background: rgba(45,212,191,0.05); }
/* Shrink scrolly for medium screens */
@media (max-width: 900px) {
  .scrolly-sticky { flex: 0 0 40%; }
  .scrolly-steps { flex: 0 0 55%; }
  .phone-frame { width: 220px; height: 440px; border-radius: 26px; padding: 10px; }
  .phone-notch { width: 80px; height: 20px; border-radius: 0 0 10px 10px; }
  .phone-screen { border-radius: 18px; padding: 32px 12px 12px; }
  .arch-grid { max-width: 300px; gap: 6px; }
  .arch-node { font-size: 0.55rem !important; padding: 6px 8px !important; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col, .commit-compare { grid-template-columns: 1fr; }
  html { font-size: 16px; }
  h1 { font-size: 2.2rem; }
}

/* Stack only on truly small screens */
@media (max-width: 550px) {
  .container { padding: 0 1.2rem; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  .hero-stats { gap: 1.5rem; }
  .hero-stat .number { font-size: 1.6rem; }
  .scrolly { flex-direction: column; }
  .scrolly-sticky { position: relative; top: auto; height: auto; flex: none; padding: 2rem 0; }
  .scrolly-steps { flex: none; padding: 2rem 0; }
  .scrolly-step { margin-bottom: 4rem; opacity: 1; min-height: auto; }
  .scrolly-step:first-child { margin-top: 0; }
  .phone-frame { width: 200px; height: 400px; margin: 0 auto; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .stat .number { font-size: 1.8rem; }
  section { padding: 4rem 0; }
  .glass-card { padding: 1.2rem; }
  blockquote { padding: 1rem; font-size: 0.9rem; }
}
