/* ============================================================
   pepbits.com homepage — design system (ported from reference)
   Dark, futuristic, "bits" pixel motif.
   Type: Space Grotesk (display) · Plus Jakarta Sans (body) · Space Mono (labels)
   ============================================================ */

:root {
  /* base */
  --bg:        oklch(0.16 0.018 268);
  --bg-2:      oklch(0.19 0.020 268);
  --surface:   oklch(0.22 0.022 268);
  --surface-2: oklch(0.26 0.024 268);
  --line:      oklch(0.32 0.022 268);
  --line-soft: oklch(0.28 0.020 268 / 0.6);

  /* text */
  --ink:       oklch(0.97 0.005 268);
  --ink-2:     oklch(0.80 0.012 268);
  --ink-3:     oklch(0.64 0.016 268);

  /* accents — equal L/C, varying hue */
  --indigo:    oklch(0.66 0.17 280);
  --cyan:      oklch(0.78 0.13 205);
  --violet:    oklch(0.66 0.17 305);
  --blue:      oklch(0.66 0.17 255);
  --teal:      oklch(0.74 0.13 180);
  --magenta:   oklch(0.66 0.17 340);
  --lime:      oklch(0.80 0.15 130);
  --amber:     oklch(0.80 0.13 75);

  --accent:    var(--indigo);
  --accent-2:  var(--cyan);

  --maxw: 1240px;
  --radius: 18px;
  --radius-sm: 12px;

  --ff-display: "Space Grotesk", system-ui, sans-serif;
  --ff-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --ff-mono: "Space Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* persistent dotted "bits" field + glow behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, oklch(0.5 0.02 268 / 0.25) 1px, transparent 0);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, black 30%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: none; margin-inline: auto; padding-inline: 40px; }

section { position: relative; z-index: 1; }

/* ---------- shared bits ---------- */
.eyebrow {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--accent-2);
  box-shadow: 10px 0 0 var(--accent), 20px 0 0 var(--ink-3);
}

h1, h2, h3 { font-family: var(--ff-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.04; }

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(30px, 4.2vw, 52px); margin: 18px 0 16px; }
.section-head p { color: var(--ink-2); font-size: clamp(16px, 1.5vw, 19px); max-width: 600px; }

/* buttons */
.btn {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .18s ease, background .2s ease, border-color .2s ease, box-shadow .25s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(120deg, var(--indigo), var(--cyan));
  color: oklch(0.16 0.02 268);
  box-shadow: 0 8px 30px -8px oklch(0.66 0.17 275 / 0.6);
}
.btn-primary:hover { box-shadow: 0 14px 40px -10px oklch(0.66 0.17 275 / 0.75); }
.btn-ghost {
  background: oklch(0.99 0 0 / 0.04);
  border-color: var(--line);
  color: var(--ink);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--accent-2); background: oklch(0.99 0 0 / 0.08); }
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(3px); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in oklch, var(--bg) 76%, transparent);
  border-bottom: 1px solid var(--line);
}
/* Animated accent line sweeping along the header's bottom edge. */
.nav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 25%, var(--accent-2) 50%, var(--accent) 75%, transparent 100%);
  background-size: 200% 100%;
  animation: navsweep 4.5s linear infinite;
}
@keyframes navsweep { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--ff-display); font-weight: 600; font-size: 20px; letter-spacing: -0.01em; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--indigo), var(--cyan));
  display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr);
  gap: 3px; padding: 6px;
}
.brand .mark i { background: oklch(0.16 0.02 268); border-radius: 2px; }
.brand .mark i:nth-child(2) { background: oklch(0.16 0.02 268 / 0.45); }
.brand .mark i:nth-child(3) { background: oklch(0.16 0.02 268 / 0.45); }
.brand b { font-weight: 700; }
.brand .dim { color: oklch(0.16 0.02 268); }
.brand-text .tld { color: var(--ink-3); font-weight: 500; }

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { color: var(--ink-2); font-size: 15px; transition: color .18s ease; position: relative; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 14px; }

/* hamburger menu button (mobile only) */
.menu-btn {
  display: none; width: 42px; height: 42px; flex: none;
  align-items: center; justify-content: center; cursor: pointer;
  background: oklch(0.99 0 0 / 0.04); border: 1px solid var(--line); border-radius: 11px;
  transition: border-color .2s ease, background .2s ease;
}
.menu-btn:hover { border-color: var(--accent-2); }
.menu-btn .bars { display: grid; gap: 4px; width: 18px; }
.menu-btn .bars i { height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.nav.open .menu-btn .bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.open .menu-btn .bars i:nth-child(2) { opacity: 0; }
.nav.open .menu-btn .bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* mobile dropdown panel */
.mobile-menu {
  display: none; flex-direction: column; gap: 4px;
  padding: 10px 20px 22px; border-bottom: 1px solid var(--line-soft);
  background: color-mix(in oklch, var(--bg) 95%, transparent); backdrop-filter: blur(14px);
}
.mobile-menu a:not(.btn) { padding: 14px 6px; font-size: 17px; color: var(--ink); border-bottom: 1px solid var(--line-soft); font-family: var(--ff-display); }
.mobile-menu a:not(.btn):active { color: var(--accent-2); }
.mobile-menu .btn { margin-top: 14px; justify-content: center; padding: 15px; }
.nav.open .mobile-menu { display: flex; animation: menudrop .22s ease; }
@keyframes menudrop { from { opacity: 0; transform: translateY(-8px); } }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 28px 0 20px; overflow: hidden; }
.hero-orb {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5; z-index: 0; pointer-events: none;
}
.orb-1 { width: 520px; height: 520px; background: var(--indigo); top: -160px; right: -80px; }
.orb-2 { width: 420px; height: 420px; background: var(--cyan); top: 120px; right: 240px; opacity: 0.35; }
.orb-3 { width: 380px; height: 380px; background: var(--violet); top: 280px; left: -140px; opacity: 0.3; }

.hero-inner { position: relative; z-index: 1; max-width: 980px; margin-inline: auto; text-align: center; }
.hero h1 { font-size: clamp(44px, 7vw, 88px); margin: 26px 0; }
.hero h1 .grad {
  background: linear-gradient(110deg, var(--cyan), var(--indigo) 55%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* Keep "Software for the new era," on a single line (the <br> handles the break);
   allow wrapping on small phones so it never clips. */
@media (min-width: 820px) { .hero h1 { white-space: nowrap; } }
.hero p.lead { font-size: clamp(16px, 1.6vw, 21px); color: var(--ink-2); max-width: 760px; margin-inline: auto; margin-bottom: 0; text-align: center; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; justify-content: center; }
.hero-note { font-family: var(--ff-mono); font-size: 12.5px; color: var(--ink-3); margin-left: 4px; }

/* marquee capability strip */
.cap-strip { margin-top: 76px; border-block: 1px solid var(--line-soft); padding: 22px 0; -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent); mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent); overflow: hidden; }
.cap-track { display: flex; gap: 56px; width: max-content; animation: marquee 32s linear infinite; }
.cap-track span { font-family: var(--ff-mono); font-size: 14px; letter-spacing: 0.06em; color: var(--ink-3); display: flex; align-items: center; gap: 56px; white-space: nowrap; }
.cap-track span::after { content: "·"; color: var(--accent); }
@keyframes marquee { to { transform: translateX(calc(-50% - 28px)); } }

/* ============================================================
   PRODUCTS
   ============================================================ */
.products { padding: 12px 0 100px; }
.prod-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.card {
  position: relative;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .3s ease;
  --c: var(--indigo);
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px 200px at var(--mx, 80%) -10%, var(--c), transparent 70%);
  opacity: 0.16; transition: opacity .3s ease; pointer-events: none;
}
.card:hover { transform: translateY(-5px); border-color: color-mix(in oklch, var(--c) 55%, var(--line)); box-shadow: 0 24px 50px -24px oklch(0.1 0.02 268 / 0.9); }
.card:hover::before { opacity: 0.28; }

.prod-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: color-mix(in oklch, var(--c) 22%, transparent);
  border: 1px solid color-mix(in oklch, var(--c) 45%, transparent);
  margin-bottom: 20px;
}
.prod-icon svg { width: 24px; height: 24px; stroke: var(--c); fill: none; stroke-width: 1.7; }
.card .tag { font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c); }
.card h3 { font-size: 25px; margin: 8px 0 10px; }
.card p { color: var(--ink-2); font-size: 15px; }
.card .feats { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.card .feats b { font-family: var(--ff-mono); font-weight: 400; font-size: 11.5px; color: var(--ink-2); background: oklch(0.99 0 0 / 0.05); border: 1px solid var(--line-soft); padding: 4px 9px; border-radius: 6px; }
.card .status { position: absolute; top: 20px; right: 20px; font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.card .status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }

/* sizing */
.span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; }
.span-12 { grid-column: span 12; }

/* feature card (large) */
.card.feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; padding: 36px; }
.card.feature .feature-art {
  align-self: stretch; min-height: 240px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(135deg, oklch(0.99 0 0 / 0.03) 0 10px, transparent 10px 20px),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  display: grid; place-items: center;
}
.card.feature .feature-art .ph { font-family: var(--ff-mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.08em; }
.card.feature h3 { font-size: 30px; }

/* The feature visual only shows on the (rotating) full-width card. */
.card:not(.feature) .feature-art { display: none; }
/* A product's first image fills the feature visual when present. */
.card.feature .feature-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* Soft fade when a new product is promoted to the feature slot. */
.card.feature.just-featured { animation: featurePop .55s ease both; }
@keyframes featurePop { from { opacity: .25; transform: scale(.985); } to { opacity: 1; transform: none; } }

/* Modal media gallery (images + videos, multiple per product). */
.gallery { display: grid; gap: 12px; }
.g-main { position: relative; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); aspect-ratio: 16 / 10; }
.g-main-media { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.g-thumb { width: 66px; height: 46px; padding: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; display: grid; place-items: center; }
.g-thumb img { width: 100%; height: 100%; object-fit: cover; }
.g-thumb .g-vid { color: var(--c); font-size: 13px; }
.g-thumb.on { border-color: var(--c); box-shadow: 0 0 0 2px color-mix(in oklch, var(--c) 40%, transparent); }

/* ============================================================
   CUSTOM / "BUILD ANYTHING"
   ============================================================ */
.build { padding: 100px 0; }
.build-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.build-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.build-list .chip {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  display: flex; align-items: center; gap: 12px; transition: border-color .2s ease, transform .2s ease;
}
.build-list .chip:hover { border-color: var(--accent-2); transform: translateX(4px); }
.build-list .chip .dot { width: 9px; height: 9px; border-radius: 2px; background: var(--c, var(--accent)); flex: none; }
.build-list .chip span { font-size: 15px; color: var(--ink); font-weight: 500; }
.build-visual {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; position: relative; overflow: hidden;
  background: radial-gradient(600px 300px at 80% 0%, oklch(0.66 0.17 275 / 0.18), transparent 60%), linear-gradient(180deg, var(--surface), var(--bg-2));
}
.build-visual .terminal { font-family: var(--ff-mono); font-size: 13.5px; line-height: 1.9; }
.build-visual .terminal .pl { color: var(--accent-2); }
.build-visual .terminal .cm { color: var(--ink-3); }
.build-visual .terminal .ok { color: var(--lime); }
.build-visual .terminal .hl { color: var(--ink); }
.term-head { display: flex; gap: 7px; margin-bottom: 18px; }
.term-head i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.term-head i:first-child { background: var(--magenta); }
.term-head i:nth-child(2) { background: var(--amber); }
.term-head i:nth-child(3) { background: var(--lime); }
.cursor { display: inline-block; width: 8px; height: 16px; background: var(--accent-2); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ============================================================
   PROCESS
   ============================================================ */
.process { padding: 100px 0; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { border-top: 1px solid var(--line); padding-top: 22px; position: relative; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--ff-mono); font-size: 13px; color: var(--accent-2); letter-spacing: 0.1em;
}
.step h3 { font-size: 21px; margin: 12px 0 8px; }
.step p { color: var(--ink-2); font-size: 14.5px; }
.step .bar { position: absolute; top: -1px; left: 0; height: 2px; width: 0; background: linear-gradient(90deg, var(--indigo), var(--cyan)); transition: width .8s ease; }
.step.in .bar { width: 46px; }

/* ============================================================
   CTA / CONTACT
   ============================================================ */
.cta { padding: 40px 0 110px; }
.cta-box {
  border: 1px solid var(--line); border-radius: 28px; padding: 64px 56px; text-align: center; position: relative; overflow: hidden;
  background: radial-gradient(800px 360px at 50% -20%, oklch(0.66 0.17 275 / 0.28), transparent 60%), linear-gradient(180deg, var(--surface), var(--bg-2));
}
.cta-box::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, oklch(0.7 0.05 268 / 0.18) 1px, transparent 0);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 70% 100% at 50% 100%, black, transparent 75%);
}
.cta-box h2 { font-size: clamp(32px, 5vw, 58px); margin-bottom: 18px; position: relative; }
.cta-box p { color: var(--ink-2); font-size: 18px; max-width: 520px; margin: 0 auto 32px; position: relative; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line-soft); padding: 56px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer .brand { margin-bottom: 16px; }
.footer .blurb { color: var(--ink-3); font-size: 14px; max-width: 280px; }
.footer h4 { font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; font-weight: 400; }
.footer ul { list-style: none; display: grid; gap: 11px; }
.footer ul a { color: var(--ink-2); font-size: 14.5px; transition: color .18s ease; }
.footer ul a:hover { color: var(--accent-2); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line-soft); color: var(--ink-3); font-size: 13px; flex-wrap: wrap; gap: 12px; font-family: var(--ff-mono); }

/* ---------- reveal animation ----------
   Visible by default. Only when JS adds .anim to <body> do we hide,
   then reveal via .in — so content always shows if JS fails. */
body.anim .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
body.anim .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  body.anim .reveal { opacity: 1; transform: none; transition: none; }
  .cap-track { animation: none; }
  .cursor { animation: none; }
  .nav::after { animation: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .span-6, .span-4 { grid-column: span 6; }
  .card.feature { grid-template-columns: 1fr; }
  .build-grid { grid-template-columns: 1fr; gap: 36px; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 680px) {
  .wrap { padding-inline: 18px; }
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
  .demo-btn { display: none; }
  .nav-inner { height: 62px; }
  .prod-grid { grid-template-columns: repeat(6, 1fr); gap: 16px; }
  .span-6, .span-4, .span-12 { grid-column: span 6; }
  .card { padding: 24px; }
  .card.feature { padding: 26px; }
  .build-list { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .hero { padding: 20px 0 56px; }
  .hero h1 { margin: 20px 0; }
  .products, .build, .process { padding: 70px 0; }
  .section-head { margin-bottom: 40px; }
  .cta-box { padding: 44px 22px; }
  .cap-strip { margin-top: 56px; }
}

@media (max-width: 430px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-note { display: none; }
  .term-input-row { flex-wrap: wrap; }
  .modal.show { padding: 0; }
  .modal-panel { border-radius: 0; min-height: 100%; padding: 20px 18px 32px; }
  .modal-info h3 { font-size: 26px; }
  .cta-actions .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   INTERACTIVE ADDITIONS — view cue, modal, mock UI, terminal
   ============================================================ */

/* clickable product cards */
.card[data-product] { cursor: pointer; transform-style: preserve-3d; }
.view-cue {
  position: absolute; bottom: 22px; right: 24px;
  font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.04em;
  color: var(--c); display: inline-flex; align-items: center; gap: 6px;
  opacity: 0; transform: translateX(-6px); transition: opacity .25s ease, transform .25s ease;
}
.card:hover .view-cue, .card:focus-visible .view-cue { opacity: 1; transform: none; }
.card.feature .view-cue { bottom: 28px; right: 28px; }
.card:focus-visible { outline: 2px solid var(--c); outline-offset: 3px; }

/* ---------- terminal: interactive ---------- */
.term-title { margin-left: 8px; font-family: var(--ff-mono); font-size: 12px; color: var(--ink-3); }
.term-input-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-family: var(--ff-mono); font-size: 13.5px; }
.term-input-row .pl { color: var(--accent-2); white-space: nowrap; }
.term-input {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  font-family: var(--ff-mono); font-size: 13.5px; color: var(--ink);
  caret-color: var(--accent-2);
}
.term-input::placeholder { color: var(--ink-3); }
.term-input:disabled { color: var(--ink-3); }
#terminal { max-height: 340px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
#termOut > div { margin-bottom: 2px; }
.terminal .run { color: var(--amber); }
.terminal .link { color: var(--accent-2); border-bottom: 1px dashed var(--accent-2); }
.terminal a { color: var(--accent-2); }
.term-launch { margin-top: 6px; }
.term-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; transition: opacity .2s ease; }
.term-chips button {
  font-family: var(--ff-mono); font-size: 12px; color: var(--ink-2);
  background: oklch(0.99 0 0 / 0.04); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; cursor: pointer; transition: border-color .2s ease, color .2s ease, transform .15s ease;
}
.term-chips button:hover { border-color: var(--accent-2); color: var(--ink); transform: translateY(-1px); }

/* ============================================================
   MODAL
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.show { display: flex; align-items: flex-start; justify-content: center; padding: 4.5vh 20px 5vh; overflow-y: auto; }
.modal-backdrop { position: fixed; inset: 0; background: oklch(0.1 0.018 268 / 0.66); backdrop-filter: blur(10px); animation: mfade .25s ease; }
@keyframes mfade { from { opacity: 0; } }
.modal-panel {
  position: relative; width: min(1060px, 100%);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: 26px; padding: 26px;
  box-shadow: 0 40px 100px -30px oklch(0.05 0.02 268 / 0.95);
  --c: var(--indigo);
  animation: mpop .32s cubic-bezier(.2,.8,.2,1);
}
@keyframes mpop { from { opacity: 0; transform: translateY(26px) scale(.98); } }
.modal-panel::before {
  content: ""; position: absolute; inset: 0; border-radius: 26px; pointer-events: none;
  background: radial-gradient(600px 240px at 80% -10%, var(--c), transparent 65%); opacity: 0.14;
}
.modal-close {
  position: absolute; top: 18px; right: 18px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  background: oklch(0.99 0 0 / 0.05); border: 1px solid var(--line); color: var(--ink-2);
  font-size: 15px; transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.modal-close:hover { background: oklch(0.99 0 0 / 0.1); color: var(--ink); border-color: var(--c); }

.modal-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; padding-right: 48px; position: relative; }
.modal-nav button {
  font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.02em; color: var(--ink-3);
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 13px; cursor: pointer; transition: all .18s ease; --c: var(--indigo);
}
.modal-nav button:hover { color: var(--ink); border-color: var(--c); }
.modal-nav button.on { color: oklch(0.16 0.02 268); background: var(--c); border-color: var(--c); font-weight: 700; }

.modal-body { display: grid; grid-template-columns: 1fr 1.12fr; gap: 30px; align-items: center; position: relative; }
.modal-info .tag { font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.modal-info h3 { font-size: 34px; margin: 8px 0 14px; }
.modal-info > p { color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.modal-feats { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 26px; }
.modal-feats b {
  font-family: var(--ff-mono); font-weight: 400; font-size: 12px; color: var(--ink-2);
  background: oklch(0.99 0 0 / 0.05); border: 1px solid var(--line-soft); padding: 6px 11px; border-radius: 7px;
}
.modal-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- mock app screen ---------- */
.modal-mock { perspective: 1200px; }
.mock {
  --c: var(--indigo);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--bg); box-shadow: 0 30px 60px -28px oklch(0.05 0.02 268 / 0.9);
  animation: mockin .5s cubic-bezier(.2,.8,.2,1);
}
@keyframes mockin { from { opacity: 0; transform: rotateY(-8deg) translateY(10px); } }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.mock-bar i:first-child { background: var(--magenta); }
.mock-bar i:nth-child(2) { background: var(--amber); }
.mock-bar i:nth-child(3) { background: var(--lime); }
.mock-url { margin-left: 10px; font-family: var(--ff-mono); font-size: 11px; color: var(--ink-3); }
.mock-app { display: flex; min-height: 300px; }
.mock-side { width: 138px; flex: none; padding: 14px 10px; border-right: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; gap: 4px; }
.ms-logo { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--c), transparent); margin: 2px 4px 12px; }
.ms-item { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 8px; font-size: 12.5px; color: var(--ink-3); }
.ms-item i { width: 7px; height: 7px; border-radius: 2px; background: var(--line); flex: none; }
.ms-item.on { background: color-mix(in oklch, var(--c) 18%, transparent); color: var(--ink); }
.ms-item.on i { background: var(--c); box-shadow: 0 0 8px var(--c); }
.mock-main { flex: 1; padding: 18px; min-width: 0; }
.ms-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ms-head b { font-family: var(--ff-display); font-size: 18px; }
.ms-ai { font-family: var(--ff-mono); font-size: 11px; color: var(--c); border: 1px solid color-mix(in oklch, var(--c) 45%, transparent); border-radius: 999px; padding: 4px 10px; }
.ms-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.ms-metric { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: oklch(0.99 0 0 / 0.02); }
.ms-k { display: block; font-size: 10.5px; color: var(--ink-3); font-family: var(--ff-mono); letter-spacing: 0.04em; margin-bottom: 6px; }
.ms-v { font-family: var(--ff-display); font-size: 20px; color: var(--ink); }
.ms-chart { display: flex; align-items: flex-end; gap: 8px; height: 72px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.ms-chart i { flex: 1; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--c), color-mix(in oklch, var(--c) 30%, transparent)); min-height: 6px; }
.ms-list { display: flex; flex-direction: column; gap: 8px; }
.ms-row { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border: 1px solid var(--line-soft); border-radius: 9px; }
.ms-av { width: 26px; height: 26px; border-radius: 7px; background: color-mix(in oklch, var(--c) 30%, var(--surface)); flex: none; }
.ms-rt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ms-rt b { font-size: 12.5px; color: var(--ink); font-family: var(--ff-body); font-weight: 600; }
.ms-rt span { font-size: 11px; color: var(--ink-3); }
.ms-st { font-family: var(--ff-mono); font-size: 10.5px; color: var(--c); white-space: nowrap; }

@media (max-width: 880px) {
  .modal-body { grid-template-columns: 1fr; gap: 24px; }
  .modal-mock { order: -1; }
  .modal-info h3 { font-size: 28px; }
}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.theme-wrap { position: relative; }
.theme-btn {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center; cursor: pointer;
  background: oklch(0.99 0 0 / 0.04); border: 1px solid var(--line); color: var(--ink-2);
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.theme-btn:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.theme-swatch {
  width: 19px; height: 19px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 1px oklch(0 0 0 / 0.15) inset;
}

/* theme picker popover */
.theme-pop {
  position: absolute; top: calc(100% + 12px); right: 0; z-index: 60;
  width: 232px; padding: 9px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 26px 60px -22px oklch(0.05 0.02 268 / 0.8);
  display: none; opacity: 0; transform: translateY(-8px) scale(.98);
  transition: opacity .18s ease, transform .18s ease;
}
.theme-pop.open { display: block; opacity: 1; transform: none; }
.theme-pop-title { display: block; font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); padding: 6px 8px 9px; }
.theme-pop button {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 9px 9px; border: 1px solid transparent; border-radius: 11px; cursor: pointer;
  background: transparent; color: var(--ink-2); font-family: var(--ff-body); font-size: 14px;
  transition: background .15s ease, color .15s ease;
}
.theme-pop button:hover { background: color-mix(in oklch, var(--ink) 7%, transparent); color: var(--ink); }
.theme-pop button .sw { width: 24px; height: 24px; border-radius: 7px; flex: none; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: 0 0 0 1px oklch(0 0 0 / 0.12) inset; }
.theme-pop button.on { color: var(--ink); border-color: color-mix(in oklch, var(--accent) 50%, var(--line)); background: color-mix(in oklch, var(--accent) 10%, transparent); }
.theme-pop button.on::after { content: "✓"; margin-left: auto; color: var(--accent-2); font-size: 13px; }

/* ============================================================
   THEME PALETTES
   ============================================================ */

/* ---- Light themes share these component overrides ---- */
:is([data-theme="light"], [data-theme="sand"]) body::before { background-image: radial-gradient(circle at 1px 1px, color-mix(in oklch, var(--ink) 28%, transparent) 1px, transparent 0); }
:is([data-theme="light"], [data-theme="sand"]) .btn-primary { color: oklch(1 0 0); box-shadow: 0 8px 26px -10px color-mix(in oklch, var(--accent) 55%, transparent); }
:is([data-theme="light"], [data-theme="sand"]) .btn-ghost { background: color-mix(in oklch, var(--ink) 4%, transparent); }
:is([data-theme="light"], [data-theme="sand"]) .btn-ghost:hover { background: color-mix(in oklch, var(--ink) 7%, transparent); }
:is([data-theme="light"], [data-theme="sand"]) .theme-btn,
:is([data-theme="light"], [data-theme="sand"]) .menu-btn { background: color-mix(in oklch, var(--ink) 4%, transparent); }
:is([data-theme="light"], [data-theme="sand"]) .brand .mark i { background: oklch(1 0 0); }
:is([data-theme="light"], [data-theme="sand"]) .brand .mark i:nth-child(2),
:is([data-theme="light"], [data-theme="sand"]) .brand .mark i:nth-child(3) { background: oklch(1 0 0 / 0.55); }
:is([data-theme="light"], [data-theme="sand"]) .hero-orb { opacity: 0.22; filter: blur(80px); }
:is([data-theme="light"], [data-theme="sand"]) .orb-2 { opacity: 0.16; }
:is([data-theme="light"], [data-theme="sand"]) .orb-3 { opacity: 0.14; }
:is([data-theme="light"], [data-theme="sand"]) .card .feats b,
:is([data-theme="light"], [data-theme="sand"]) .modal-feats b,
:is([data-theme="light"], [data-theme="sand"]) .card.feature .feature-art .ph,
:is([data-theme="light"], [data-theme="sand"]) .term-chips button,
:is([data-theme="light"], [data-theme="sand"]) .modal-close,
:is([data-theme="light"], [data-theme="sand"]) .ms-metric { background: color-mix(in oklch, var(--ink) 4%, transparent); }
:is([data-theme="light"], [data-theme="sand"]) .modal-backdrop { background: color-mix(in oklch, var(--ink) 40%, transparent); }
:is([data-theme="light"], [data-theme="sand"]) .cta-box::after { background-image: radial-gradient(circle at 1px 1px, color-mix(in oklch, var(--ink) 22%, transparent) 1px, transparent 0); }
:is([data-theme="light"], [data-theme="sand"]) .build-visual .terminal .hl { color: var(--ink); }

/* ---- Daylight (light) ---- */
[data-theme="light"] {
  color-scheme: light;
  --bg: oklch(0.985 0.004 268); --bg-2: oklch(0.965 0.006 268);
  --surface: oklch(1 0 0); --surface-2: oklch(0.955 0.008 268);
  --line: oklch(0.90 0.010 268); --line-soft: oklch(0.92 0.008 268 / 0.7);
  --ink: oklch(0.24 0.025 268); --ink-2: oklch(0.42 0.022 268); --ink-3: oklch(0.56 0.020 268);
  --indigo: oklch(0.54 0.18 280); --cyan: oklch(0.58 0.13 220); --violet: oklch(0.54 0.18 305);
  --blue: oklch(0.54 0.18 255); --teal: oklch(0.56 0.12 195); --magenta: oklch(0.55 0.19 350);
  --lime: oklch(0.58 0.15 135); --amber: oklch(0.62 0.14 70);
}

/* ---- Sand (warm light) ---- */
[data-theme="sand"] {
  color-scheme: light;
  --bg: oklch(0.972 0.012 75); --bg-2: oklch(0.95 0.015 72);
  --surface: oklch(0.992 0.009 80); --surface-2: oklch(0.945 0.017 70);
  --line: oklch(0.88 0.018 68); --line-soft: oklch(0.90 0.014 68 / 0.7);
  --ink: oklch(0.30 0.030 50); --ink-2: oklch(0.45 0.030 55); --ink-3: oklch(0.58 0.028 60);
  --indigo: oklch(0.56 0.15 45); --cyan: oklch(0.54 0.10 195); --violet: oklch(0.54 0.16 30);
  --blue: oklch(0.50 0.10 230); --teal: oklch(0.52 0.10 185); --magenta: oklch(0.55 0.17 15);
  --lime: oklch(0.55 0.13 130); --amber: oklch(0.60 0.13 65);
}

/* ---- Carbon (dark neutral, warm-tech accents) ---- */
[data-theme="carbon"] {
  --bg: oklch(0.165 0.005 70); --bg-2: oklch(0.20 0.006 70);
  --surface: oklch(0.225 0.006 70); --surface-2: oklch(0.26 0.007 70);
  --line: oklch(0.33 0.006 70); --line-soft: oklch(0.29 0.006 70 / 0.6);
  --ink: oklch(0.96 0.004 70); --ink-2: oklch(0.80 0.005 70); --ink-3: oklch(0.62 0.006 70);
  --indigo: oklch(0.80 0.13 75); --cyan: oklch(0.82 0.15 130); --violet: oklch(0.78 0.13 55);
  --blue: oklch(0.80 0.14 95); --teal: oklch(0.82 0.14 145); --magenta: oklch(0.78 0.14 40);
  --lime: oklch(0.82 0.15 130); --amber: oklch(0.80 0.13 75);
}

/* ---- Aurora (dark teal/green) ---- */
[data-theme="aurora"] {
  --bg: oklch(0.17 0.020 200); --bg-2: oklch(0.20 0.022 200);
  --surface: oklch(0.23 0.024 200); --surface-2: oklch(0.27 0.026 200);
  --line: oklch(0.33 0.024 195); --line-soft: oklch(0.29 0.022 200 / 0.6);
  --ink: oklch(0.97 0.006 200); --ink-2: oklch(0.81 0.012 195); --ink-3: oklch(0.64 0.016 195);
  --indigo: oklch(0.74 0.13 180); --cyan: oklch(0.82 0.15 145); --violet: oklch(0.72 0.14 200);
  --blue: oklch(0.74 0.13 210); --teal: oklch(0.76 0.13 175); --magenta: oklch(0.74 0.15 155);
  --lime: oklch(0.82 0.16 135); --amber: oklch(0.80 0.13 90);
}

/* ---- Grape (dark violet/magenta) ---- */
[data-theme="grape"] {
  --bg: oklch(0.17 0.025 305); --bg-2: oklch(0.20 0.027 305);
  --surface: oklch(0.23 0.030 305); --surface-2: oklch(0.27 0.032 305);
  --line: oklch(0.34 0.030 305); --line-soft: oklch(0.30 0.028 305 / 0.6);
  --ink: oklch(0.97 0.006 305); --ink-2: oklch(0.82 0.014 305); --ink-3: oklch(0.65 0.020 305);
  --indigo: oklch(0.68 0.18 305); --cyan: oklch(0.74 0.16 345); --violet: oklch(0.68 0.18 300);
  --blue: oklch(0.66 0.17 280); --teal: oklch(0.72 0.15 320); --magenta: oklch(0.70 0.18 345);
  --lime: oklch(0.80 0.15 130); --amber: oklch(0.80 0.13 75);
}

/* smooth cross-fade when switching */
body, .nav, .card, .modal-panel, .mock, .build-visual, .theme-pop, .btn {
  transition: background-color .35s ease, border-color .35s ease, color .35s ease;
}

