/* ============================================================
   Kraftkit — design tokens
   ============================================================ */
:root {
  color-scheme: dark;

  --bg: #030303;
  --bg-raised: #080808;
  --bg-code: #0a0a0a;
  --stroke: #141414;
  --stroke-soft: #101010;
  --text: #ffffff;
  --subtext: #7a7a7a;
  --subtext-dim: rgba(255, 255, 255, 0.42);
  --badge-bg: rgba(255, 255, 255, 0.02);

  --surface-hover: rgba(255, 255, 255, 0.05);
  --surface-soft: rgba(255, 255, 255, 0.012);
  --surface-mid: rgba(255, 255, 255, 0.028);
  --surface-inset: rgba(255, 255, 255, 0.015);
  --text-soft: rgba(255, 255, 255, 0.75);
  --text-strong: rgba(255, 255, 255, 0.86);
  --text-muted: #4a4a4a;
  --text-faint: #4f4f4f;
  --dot-muted: #2e2e2e;
  --border-hover: #222;
  --header-bg: rgba(3, 3, 3, 0.72);

  --btn-primary-bg: #ffffff;
  --btn-primary-fg: #030303;
  --btn-primary-hover: #e2e2e2;
  --btn-primary-glow: rgba(255, 255, 255, 0.14);
  --btn-ghost-fg: rgba(255, 255, 255, 0.88);
  --btn-ghost-hover-bg: rgba(255, 255, 255, 0.05);
  --btn-ghost-hover-border: #1f1f1f;

  --code-inline-fg: rgba(255, 255, 255, 0.82);
  --code-inline-bg: rgba(255, 255, 255, 0.05);
  --scrollbar: #1f1f1f;
  --scrollbar-hover: #2b2b2b;
  --shadow-lg: 0 40px 120px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.015);
  --shadow-md: 0 18px 40px -22px rgba(0, 0, 0, 0.95);
  --copy-btn-bg: #111;
  --copy-btn-hover-bg: #171717;
  --copy-btn-hover-border: #262626;
  --tab-active-bg: rgba(255, 255, 255, 0.07);
  --panel-bg: rgba(255, 255, 255, 0.008);
  --card-bg: rgba(255, 255, 255, 0.012);
  --mock-bg: #080808;
  --price-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 40%);

  --hl-a-bg: rgba(255, 169, 51, 0.16);
  --hl-a-fg: #ffc978;
  --hl-b-bg: rgba(0, 147, 255, 0.16);
  --hl-b-fg: #6fc0ff;
  --tag-fg: #6fc0ff;
  --tag-bg: rgba(0, 147, 255, 0.08);
  --tag-border: rgba(0, 147, 255, 0.28);
  --ok-soft: rgba(74, 222, 128, 0.14);
  --ok-track: rgba(74, 222, 128, 0.35);
  --selection: rgba(0, 147, 255, 0.3);
  --c-str: #b58cff;
  --ok-dim: #2c2c2c;
  --phone-chrome: #0d0d0d;
  --phone-stroke: #1c1c1c;
  --ring-track: #1a1a1a;
  --faq-icon: #ffffff;
  --grain-opacity: 0.035;
  --theme-meta: #030303;
  --banner-fg: rgba(255, 169, 51, 0.85);
  --banner-strong: #ffc978;
  --banner-bg: rgba(255, 169, 51, 0.05);

  --g1: #ff4458;
  --g2: #ffa933;
  --g3: #0093ff;
  --ok: #4ade80;

  /* Routed through magenta so orange→blue never washes out to grey */
  --gradient: linear-gradient(96deg, #0093ff 0%, #7b6bff 18%, #e0479b 38%, #ff4458 62%, #ffa933 100%);

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;

  --shell: 1150px;
  --gutter: max(4vw, 1.25rem);
  --header-h: 64px;

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --faq-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  color-scheme: light;

  --bg: #ffffff;
  --bg-raised: #f7f7f2;
  --bg-code: #f2f2ea;
  --stroke: #e5e5db;
  --stroke-soft: #eeeee6;
  --text: #1a1a18;
  --subtext: #6f6f66;
  --subtext-dim: rgba(26, 26, 24, 0.5);
  --badge-bg: rgba(26, 26, 24, 0.03);

  --surface-hover: rgba(26, 26, 24, 0.045);
  --surface-soft: rgba(26, 26, 24, 0.025);
  --surface-mid: rgba(26, 26, 24, 0.04);
  --surface-inset: rgba(26, 26, 24, 0.025);
  --text-soft: rgba(26, 26, 24, 0.72);
  --text-strong: rgba(26, 26, 24, 0.88);
  --text-muted: #9a9a90;
  --text-faint: #a5a59a;
  --dot-muted: #d4d4c9;
  --border-hover: #cfcfc3;
  --header-bg: rgba(255, 255, 255, 0.85);

  --btn-primary-bg: #1a1a18;
  --btn-primary-fg: #ffffff;
  --btn-primary-hover: #33332e;
  --btn-primary-glow: rgba(26, 26, 24, 0.12);
  --btn-ghost-fg: rgba(26, 26, 24, 0.86);
  --btn-ghost-hover-bg: rgba(26, 26, 24, 0.04);
  --btn-ghost-hover-border: #cfcfc3;

  --code-inline-fg: rgba(26, 26, 24, 0.84);
  --code-inline-bg: rgba(26, 26, 24, 0.05);
  --scrollbar: #d4d4c9;
  --scrollbar-hover: #bcbcb0;
  --shadow-lg: 0 36px 90px -40px rgba(40, 38, 28, 0.22), 0 0 0 1px rgba(26, 26, 24, 0.045);
  --shadow-md: 0 16px 34px -20px rgba(40, 38, 28, 0.16);
  --copy-btn-bg: #ffffff;
  --copy-btn-hover-bg: #f7f7f2;
  --copy-btn-hover-border: #cfcfc3;
  --tab-active-bg: rgba(26, 26, 24, 0.07);
  --panel-bg: #f7f7f2;
  --card-bg: #f7f7f2;
  --mock-bg: #ffffff;
  --price-bg: linear-gradient(180deg, #f7f7f2, transparent 48%);

  --hl-a-bg: #aec327;
  --hl-a-fg: #1f2405;
  --hl-b-bg: #aec327;
  --hl-b-fg: #1f2405;
  --tag-fg: #4f5d0c;
  --tag-bg: rgba(174, 195, 39, 0.2);
  --tag-border: rgba(174, 195, 39, 0.5);
  --ok-soft: rgba(174, 195, 39, 0.25);
  --ok-track: rgba(174, 195, 39, 0.7);
  --selection: rgba(174, 195, 39, 0.4);
  --c-str: #7a4fb8;
  --ok: #6d8a12;
  --ok-dim: #dcdcd2;
  --phone-chrome: #ebebe3;
  --phone-stroke: #dcdcd2;
  --ring-track: #e4e4da;
  --faq-icon: #1a1a18;
  --grain-opacity: 0.04;
  --theme-meta: #ffffff;
  --banner-fg: rgba(110, 84, 10, 0.95);
  --banner-strong: #6e540a;
  --banner-bg: rgba(174, 195, 39, 0.14);
}

/* The rainbow ambient blooms go muddy on paper-white, so light mode
   warms them into the olive/amber range instead */
[data-theme="light"] .hero-glow {
  background:
    radial-gradient(48% 46% at 50% 42%, rgba(174, 195, 39, 0.3) 0%, transparent 70%),
    radial-gradient(42% 40% at 66% 52%, rgba(255, 169, 51, 0.16) 0%, transparent 72%),
    radial-gradient(34% 34% at 36% 56%, rgba(174, 195, 39, 0.18) 0%, transparent 74%);
}

[data-theme="light"] .cta-glow {
  background:
    radial-gradient(46% 44% at 50% 50%, rgba(174, 195, 39, 0.32) 0%, transparent 72%),
    radial-gradient(38% 38% at 34% 56%, rgba(255, 169, 51, 0.16) 0%, transparent 74%),
    radial-gradient(36% 36% at 68% 56%, rgba(174, 195, 39, 0.18) 0%, transparent 74%);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background 0.25s ease, color 0.25s ease;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.032em;
  line-height: 1.1;
}

p { margin: 0; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--code-inline-fg);
  background: var(--code-inline-bg);
  border: 1px solid var(--stroke);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

::selection { background: var(--selection); }

pre::-webkit-scrollbar { height: 6px; }
pre::-webkit-scrollbar-track { background: transparent; }
pre::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 999px; }
pre::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover); }
pre { scrollbar-width: thin; scrollbar-color: var(--scrollbar) transparent; }

/* ============================================================
   Ambient layers
   ============================================================ */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Blueprint rails behind the whole page */
.layout-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: flex;
  justify-content: center;
}

.rail {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--stroke);
}

.rail-l { left: max(calc(50% - var(--shell) / 2), var(--gutter)); }
.rail-r { right: max(calc(50% - var(--shell) / 2), var(--gutter)); }

@media (max-width: 720px) {
  .layout-grid { display: none; }
}

/* ============================================================
   Banner + header
   ============================================================ */
.test-banner {
  position: relative;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  letter-spacing: -0.005em;
  color: var(--banner-fg);
  background: var(--banner-bg);
  border-bottom: 1px solid var(--stroke);
}

.test-banner strong { color: var(--banner-strong); font-weight: 500; }

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-amber {
  background: var(--g2);
  box-shadow: 0 0 0 3px rgba(255, 169, 51, 0.12);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.header {
  position: sticky;
  top: 0;
  z-index: 110;
  border-bottom: 1px solid var(--stroke);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.35s var(--ease), background 0.25s ease, border-color 0.25s ease;
}

.header.is-hidden { transform: translateY(-100%); }

.header-inner {
  max-width: var(--shell);
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 1.75rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 0.98rem;
}

.logo-mark {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(140deg, var(--g3) 0%, var(--g1) 55%, var(--g2) 100%);
  box-shadow: 0 0 18px rgba(255, 105, 80, 0.28);
}

.nav-links {
  display: flex;
  gap: 1.6rem;
  font-size: 0.86rem;
  color: var(--subtext);
}

.nav-links a { transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--badge-bg);
  color: var(--subtext);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
}

.theme-toggle:hover {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.theme-toggle:active { transform: scale(0.96); }

.theme-toggle svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

@media (max-width: 880px) {
  .nav-links { display: none; }
}

@media (max-width: 520px) {
  .hide-sm { display: none; }
}

/* ============================================================
   Shell + section framing
   ============================================================ */
.shell {
  position: relative;
  z-index: 1;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 1.75rem);
}

.section {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
  border-bottom: 1px solid var(--stroke);
}

.section:last-child { border-bottom: none; }

.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 40rem; }

.section-head h2 {
  font-size: clamp(1.85rem, 4.6vw, 3rem);
  line-height: 1.08;
}

.section-head .muted { color: var(--subtext); }

.section-sub {
  margin-top: 0.9rem;
  color: var(--subtext);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  max-width: 34rem;
}

.section-sub.center { margin-left: auto; margin-right: auto; }
.section-sub a { color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtext);
}

.eyebrow-bar {
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, var(--g1), var(--g2));
}

.grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.12s, box-shadow 0.2s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
  box-shadow: 0 0 32px var(--btn-primary-glow);
}

.btn-ghost {
  background: var(--badge-bg);
  border-color: var(--stroke);
  color: var(--btn-ghost-fg);
}

.btn-ghost:hover {
  background: var(--btn-ghost-hover-bg);
  border-color: var(--btn-ghost-hover-border);
  color: var(--text);
}

.btn-sm { padding: 0.42rem 0.85rem; font-size: 0.82rem; }
.btn-lg { padding: 0.72rem 1.4rem; font-size: 0.94rem; }
.btn.full { width: 100%; }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding-top: clamp(3.5rem, 9vw, 6rem); overflow: hidden; }

.hero-glow {
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 120%);
  height: 640px;
  pointer-events: none;
  background:
    radial-gradient(48% 46% at 50% 42%, rgba(255, 68, 88, 0.13) 0%, transparent 70%),
    radial-gradient(42% 40% at 66% 52%, rgba(0, 147, 255, 0.13) 0%, transparent 72%),
    radial-gradient(34% 34% at 36% 56%, rgba(255, 169, 51, 0.09) 0%, transparent 74%);
  filter: blur(28px);
}

.hero-inner {
  position: relative;
  text-align: center;
  max-width: 46rem;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  margin-bottom: 1.6rem;
  border: 1px solid var(--stroke);
  background: var(--badge-bg);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--subtext-dim);
  transition: border-color 0.2s, color 0.2s;
}

.badge:hover { border-color: var(--border-hover); color: var(--text-soft); }

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--g1);
  box-shadow: 0 0 0 3px rgba(255, 68, 88, 0.14);
  animation: pulse 2.2s ease-in-out infinite;
}

.hero h1 {
  font-size: clamp(2.15rem, 6.6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.038em;
  font-weight: 500;
}

.lead {
  margin: 1.4rem auto 0;
  max-width: 34rem;
  color: var(--subtext);
  font-size: clamp(0.98rem, 1.8vw, 1.1rem);
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 2rem;
  justify-content: center;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.4rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  color: var(--subtext);
}

.hero-meta li { display: flex; align-items: center; gap: 0.5rem; }

.hero-meta li::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--dot-muted);
}

/* Terminal */
.terminal-wrap {
  position: relative;
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  max-width: 860px;
}

.terminal {
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid var(--stroke);
  background: var(--surface-inset);
}

.tl { width: 9px; height: 9px; border-radius: 50%; }
.tl-r { background: #ff5f57; }
.tl-y { background: #febc2e; }
.tl-g { background: #28c840; }

.terminal-title {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.terminal pre {
  margin: 0;
  padding: 1.35rem 1.4rem 1.5rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.72;
  color: var(--text-strong);
}

.terminal pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.c-dim { color: var(--text-muted); }
.c-cmd { color: var(--g2); }
.c-key { color: var(--g3); }
.c-str { color: var(--c-str); }
.c-ok { color: var(--ok); }

/* ============================================================
   Marquee strip
   ============================================================ */
.strip {
  position: relative;
  border-bottom: 1px solid var(--stroke);
  padding: 1.15rem 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee { display: flex; }

.marquee-track {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  white-space: nowrap;
  animation: scroll 32s linear infinite;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.marquee-track i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--dot-muted);
  flex-shrink: 0;
}

@keyframes scroll {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ============================================================
   Bordered cell grid
   ============================================================ */
.cell-grid {
  display: grid;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  overflow: hidden;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

.cell-grid.flush { margin-top: 1.25rem; }

.cell {
  position: relative;
  min-width: 0;
  padding: clamp(1.5rem, 2.6vw, 2rem);
  border-right: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
  background: transparent;
  transition: background 0.25s;
}

.cell:hover { background: var(--surface-soft); }

.cols-2 .cell:nth-child(2n) { border-right: none; }
.cols-3 .cell:nth-child(3n) { border-right: none; }
.cols-4 .cell:nth-child(4n) { border-right: none; }

.cols-2 .cell:nth-last-child(-n + 2),
.cols-3 .cell:nth-last-child(-n + 3),
.cols-4 .cell:nth-last-child(-n + 4) { border-bottom: none; }

.cell h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

.cell p {
  color: var(--subtext);
  font-size: 0.9rem;
  line-height: 1.6;
}

.cell-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--text-soft);
}

.cell-icon svg { width: 17px; height: 17px; stroke-linecap: round; stroke-linejoin: round; }

.cell:hover .cell-icon { border-color: var(--border-hover); color: var(--text); }

@media (max-width: 940px) {
  .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 .cell:nth-child(3n), .cols-4 .cell:nth-child(4n) { border-right: 1px solid var(--stroke); }
  .cols-3 .cell:nth-child(2n), .cols-4 .cell:nth-child(2n) { border-right: none; }
  .cols-3 .cell:nth-last-child(-n + 3), .cols-4 .cell:nth-last-child(-n + 4) { border-bottom: 1px solid var(--stroke); }
  .cols-3 .cell:nth-last-child(-n + 2), .cols-4 .cell:nth-last-child(-n + 2) { border-bottom: none; }
}

@media (max-width: 600px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .cell { border-right: none !important; border-bottom: 1px solid var(--stroke) !important; }
  .cell:last-child { border-bottom: none !important; }
}

/* ============================================================
   How it works — paired story cards
   ============================================================ */
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.works-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.work-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
}

.work-title {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -0.03em;
}

.hl {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.05em 0.45em;
  border-radius: var(--radius-sm);
  vertical-align: baseline;
}

.hl svg {
  width: 0.78em;
  height: 0.78em;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hl-a { background: var(--hl-a-bg); color: var(--hl-a-fg); }
.hl-b { background: var(--hl-b-bg); color: var(--hl-b-fg); }

.work-mock {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--mock-bg);
  overflow: hidden;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--stroke-soft);
}

.mock-body {
  flex: 1;
  padding: 1.15rem 1.25rem 1.6rem;
  min-height: 200px;
}

.mock-title {
  margin-bottom: 0.9rem;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.mock-line {
  font-size: 0.8rem;
  line-height: 1.75;
  color: var(--subtext);
}

.caret {
  display: inline-block;
  width: 1.5px;
  height: 0.95em;
  margin-left: 1px;
  vertical-align: -0.14em;
  background: var(--g2);
  animation: blink 1.1s steps(1) infinite;
}

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

.mock-group + .mock-group { margin-top: 0.85rem; }

.mock-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.mock-item {
  padding-left: 0.85rem;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--subtext);
}

.mock-item.dim { color: var(--text-muted); }

@media (max-width: 880px) {
  .works-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; }
}

/* ============================================================
   Workflow — art card + caption
   ============================================================ */
.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2.2vw, 1.6rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.flow-item { min-width: 0; }

.flow-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 222px;
  padding: 1.4rem 1.1rem;
  border-radius: 14px;
  background: var(--surface-mid);
  box-shadow: inset 0 0 0 1px var(--stroke);
  overflow: hidden;
  transition: background 0.25s var(--ease);
}

.flow-item:hover .flow-art { background: var(--surface-hover); }

.flow-copy {
  margin-top: 1.15rem;
  text-align: center;
}

.flow-num {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.flow-copy h3 {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.flow-copy p {
  color: var(--subtext);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* shared mock chrome */
.fm-card {
  width: 100%;
  max-width: 240px;
  padding: 0.85rem 0.9rem;
  border-radius: 10px;
  background: var(--bg-raised);
  box-shadow: var(--shadow-md), inset 0 0 0 1px var(--stroke);
}

.fm-strong { font-size: 0.78rem; font-weight: 500; letter-spacing: -0.01em; }
.fm-meta { margin-top: 0.35rem; font-size: 0.7rem; color: var(--text-muted); }

.fm-row { display: flex; align-items: center; gap: 0.5rem; }

.fm-check {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  flex-shrink: 0;
}

.fm-check svg { width: 10px; height: 10px; stroke-linecap: round; stroke-linejoin: round; }

.fm-key {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.45rem 0.45rem 0.45rem 0.6rem;
  border-radius: 7px;
  background: var(--bg-code);
  box-shadow: inset 0 0 0 1px var(--stroke);
}

.fm-mono {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-soft);
}

.fm-pill {
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  font-size: 0.66rem;
  font-weight: 600;
}

/* 02 — terminal */
.fm-term {
  width: 100%;
  max-width: 250px;
  border-radius: 10px;
  background: var(--bg-code);
  box-shadow: var(--shadow-md), inset 0 0 0 1px var(--stroke);
  overflow: hidden;
}

.fm-term-bar {
  display: flex;
  gap: 5px;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--stroke-soft);
}

.fm-term-body {
  padding: 0.7rem 0.75rem 0.85rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  line-height: 1.85;
  color: var(--text-soft);
  white-space: nowrap;
}

.fm-term-ok { margin-top: 0.3rem; }

/* 03 — plugin list */
.fm-card-list { padding-bottom: 0.6rem; }

.fm-label {
  margin-bottom: 0.55rem;
  font-size: 0.64rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.fm-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.5rem;
  border-radius: 7px;
  font-size: 0.76rem;
  color: var(--subtext);
}

.fm-item-on {
  background: var(--surface-hover);
  color: var(--text);
}

.fm-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex-shrink: 0; }
.fm-dot.dim { background: var(--ok-dim); }

.fm-toggle {
  margin-left: auto;
  width: 22px;
  height: 13px;
  border-radius: 999px;
  background: var(--ok-track);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 2px;
}

.fm-toggle i { width: 9px; height: 9px; border-radius: 50%; background: #fff; display: block; }

/* 04 — simulator */
.fm-phone {
  width: 100px;
  height: 162px;
  margin-bottom: 0.6rem;
  padding: 7px;
  border-radius: 20px;
  background: var(--phone-chrome);
  box-shadow: var(--shadow-md), inset 0 0 0 1px var(--phone-stroke);
}

.fm-phone-screen {
  height: 100%;
  padding: 0.7rem 0.6rem;
  border-radius: 14px;
  background: var(--bg-raised);
  box-shadow: inset 0 0 0 1px var(--stroke);
  text-align: center;
}

.fm-phone-title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.fm-ring {
  width: 52px;
  height: 52px;
  margin: 0.6rem auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--g2) 0turn 0.62turn, var(--ring-track) 0.62turn 1turn);
  font-size: 0.7rem;
  font-weight: 600;
}

.fm-ring span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-raised);
}

.fm-bar {
  height: 8px;
  margin: 0 auto 6px;
  border-radius: 4px;
  background: var(--surface-hover);
}

.fm-bar.short { width: 62%; }

.fm-badge {
  position: absolute;
  bottom: 0.7rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: var(--badge-bg);
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  white-space: nowrap;
}

@media (max-width: 940px) {
  .flow-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .flow-grid { grid-template-columns: 1fr; }
  .flow-art { height: 208px; }
}

/* ============================================================
   Install
   ============================================================ */
.install-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 940px) {
  .install-grid { grid-template-columns: 1fr; }
}

.panel {
  min-width: 0;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 2.5vw, 1.9rem);
  background: var(--panel-bg);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.panel h3 { font-size: 1.02rem; font-weight: 600; }

.tag {
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--tag-border);
  border-radius: 999px;
  background: var(--tag-bg);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--tag-fg);
}

.panel-note {
  color: var(--subtext);
  font-size: 0.88rem;
  margin: 0.9rem 0;
}

.panel-note:first-of-type { margin-top: 0; }

.tight { margin: 0 0 0.5rem; padding-left: 1.15rem; color: var(--subtext); font-size: 0.9rem; }
.tight li { margin-bottom: 0.3rem; }
.tight strong { color: var(--text-strong); font-weight: 500; }

.usage-label {
  margin: 1.25rem 0 0.55rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Code block + copy */
.code-block {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--bg-code);
  overflow: hidden;
}

.code-block pre {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0.85rem 0.25rem 0.85rem 0.95rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-soft);
}

.code-block pre code { background: none; border: none; padding: 0; font-size: inherit; color: inherit; }

.copy-btn {
  flex-shrink: 0;
  margin-right: 0.5rem;
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  background: var(--copy-btn-bg);
  color: var(--subtext);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.copy-btn:hover { color: var(--text); border-color: var(--copy-btn-hover-border); background: var(--copy-btn-hover-bg); }
.copy-btn.copied { color: var(--ok); border-color: var(--ok-track); }

/* Tabs */
.tabs {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  margin-bottom: 1.4rem;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--bg-raised);
}

.tab {
  padding: 0.4rem 0.85rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--subtext);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.tab:hover { color: var(--text); }

.tab.active {
  background: var(--tab-active-bg);
  color: var(--text);
}

.tab-panel[hidden] { display: none; }

/* Check lists */
.check {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.check.two { grid-template-columns: 1fr 1fr; gap: 0.55rem 1.5rem; }

.check li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--subtext);
  font-size: 0.88rem;
  line-height: 1.5;
}

.check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 11px;
  height: 6px;
  border-left: 1.5px solid var(--ok);
  border-bottom: 1.5px solid var(--ok);
  transform: rotate(-45deg);
  opacity: 0.85;
}

.check a { color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 720px) {
  .check.two { grid-template-columns: 1fr; }
}

/* ============================================================
   Pricing
   ============================================================ */
.price-card {
  position: relative;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background: var(--price-bg);
  overflow: hidden;
}

/* Crisp gradient hairline along the card's top edge, plus a soft bloom below it */
.price-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient);
  pointer-events: none;
}

.price-glow::after {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 26px;
  opacity: 0.45;
  filter: blur(18px);
  background: var(--gradient);
}

.price-left {
  min-width: 0;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border-right: 1px solid var(--stroke);
}

.price-right { min-width: 0; padding: clamp(1.75rem, 3vw, 2.5rem); }

.price-kicker {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--subtext);
}

.price-amount {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin: 0.85rem 0 0;
  font-size: clamp(3rem, 8vw, 4.25rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
}

.price-currency { font-size: 0.42em; align-self: flex-start; margin-top: 0.35em; color: var(--subtext); }

.price-term {
  margin-left: 0.6rem;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--subtext);
}

.price-desc {
  margin: 0.9rem 0 1.6rem;
  color: var(--subtext);
  font-size: 0.92rem;
}

.price-test {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--text-faint);
  text-align: center;
}

.price-test a { color: var(--subtext); text-decoration: underline; text-underline-offset: 3px; }

.after-buy {
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--stroke);
}

.after-buy h4 {
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--subtext);
}

@media (max-width: 880px) {
  .price-card { grid-template-columns: 1fr; }
  .price-left { border-right: none; border-bottom: 1px solid var(--stroke); }
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(1.5rem, 4vw, 4rem);
}

.section-head.sticky { position: sticky; top: calc(var(--header-h) + 2rem); margin-bottom: 0; align-self: start; }

.faq-list {
  border-top: 1px solid var(--stroke);
}

.faq-item { border-bottom: 1px solid var(--stroke); }

.faq-q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.15rem 0;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.faq-q-text {
  flex: 1;
  color: var(--subtext);
  transition: color 0.3s var(--faq-ease);
}

.faq-q:hover .faq-q-text,
.is-open > .faq-q .faq-q-text { color: var(--text); }

/* Plus / minus cross-rotate swap */
.faq-icon {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.ic {
  position: absolute;
  inset: 0;
  transition:
    opacity 0.3s var(--faq-ease),
    transform 0.3s var(--faq-ease),
    filter 0.3s var(--faq-ease);
}

.ic::before, .ic::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1.25px;
  border-radius: 1px;
  transform: translate(-50%, -50%);
}

.ic-plus::before, .ic-plus::after { background: rgba(122, 122, 122, 0.75); }
.ic-plus::after { transform: translate(-50%, -50%) rotate(90deg); }

.ic-minus::before { background: var(--faq-icon); }
.ic-minus::after { display: none; }

.ic-minus { opacity: 0; transform: rotate(-90deg); filter: blur(3px); }
.is-open .ic-minus { opacity: 1; transform: rotate(0deg); filter: blur(0); }
.is-open .ic-plus { opacity: 0; transform: rotate(90deg); filter: blur(2px); }

/* Answer: height is driven in JS so it can animate to its measured size */
.faq-a {
  height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  filter: blur(2px);
  transition:
    height 0.3s var(--faq-ease),
    opacity 0.3s var(--faq-ease),
    transform 0.3s var(--faq-ease),
    filter 0.3s var(--faq-ease);
}

.faq-item.is-open .faq-a {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.faq-a-inner {
  padding: 0 2rem 1.35rem 0;
  margin-top: -0.25rem;
}

.faq-a p {
  color: var(--subtext);
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.7;
}

@media (max-width: 880px) {
  .faq-layout { grid-template-columns: 1fr; }
  .section-head.sticky { position: static; margin-bottom: 2rem; }
}

/* ============================================================
   CTA
   ============================================================ */
.cta { text-align: center; overflow: hidden; }

.cta-glow {
  position: absolute;
  bottom: -55%;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, 110%);
  height: 480px;
  pointer-events: none;
  filter: blur(34px);
  background:
    radial-gradient(46% 44% at 50% 50%, rgba(0, 147, 255, 0.16) 0%, transparent 72%),
    radial-gradient(38% 38% at 34% 56%, rgba(255, 68, 88, 0.13) 0%, transparent 74%),
    radial-gradient(36% 36% at 68% 56%, rgba(255, 169, 51, 0.1) 0%, transparent 74%);
}

.cta-inner { position: relative; }

.cta h2 {
  font-size: clamp(1.9rem, 5.4vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.038em;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--stroke);
  background: var(--bg);
}

.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 3vw, 1.75rem);
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand p {
  margin-top: 0.75rem;
  max-width: 20rem;
  color: var(--subtext);
  font-size: 0.85rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 0.65rem 2.25rem;
  font-size: 0.85rem;
  color: var(--subtext);
}

.footer-links a { transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }

.footer-base {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 1.1rem clamp(1rem, 3vw, 1.75rem) 2rem;
  border-top: 1px solid var(--stroke);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-faint);
}

.footer-base a { color: var(--subtext); }
.footer-base a:hover { color: var(--text); }

@media (max-width: 560px) {
  .footer-links { grid-template-columns: repeat(2, auto); }
}

/* ============================================================
   Scroll reveal
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(6px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), filter 0.7s var(--ease);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; filter: none; transition: none; }
  .header { transition: none; }
  .faq-a, .ic { transition: none; }
}
