/* =========================================================================
   KraftApp — landing page styles
   Golden-hour workshop: pure-white surface, honey-gold brand, aubergine shadow
   ========================================================================= */

/* ----- Tokens --------------------------------------------------------- */
:root {
  /* Color (OKLCH) */
  --bg: oklch(1 0 0);
  --surface: oklch(0.975 0.004 85);
  --surface-2: oklch(0.955 0.006 85);
  --ink: oklch(0.21 0.018 70);
  --muted: oklch(0.52 0.02 70);
  --primary: oklch(0.80 0.15 84);
  --primary-soft: oklch(0.93 0.07 88);
  --primary-deep: oklch(0.54 0.135 68);
  --accent: oklch(0.34 0.09 320);
  --accent-soft: oklch(0.95 0.02 320);
  --line: oklch(0.90 0.006 85);
  --line-strong: oklch(0.84 0.008 85);

  /* Glow / shadow */
  --glow-amber: 0 1px 0 oklch(0.80 0.15 84 / 0.5),
                0 14px 40px -18px oklch(0.72 0.16 72 / 0.55);
  --shadow-sm: 0 1px 2px oklch(0.3 0.02 70 / 0.06),
               0 2px 8px -4px oklch(0.3 0.02 70 / 0.10);
  --shadow-md: 0 10px 30px -14px oklch(0.30 0.03 70 / 0.22),
               0 2px 8px -4px oklch(0.30 0.03 70 / 0.10);
  --shadow-lg: 0 30px 70px -28px oklch(0.28 0.04 72 / 0.34),
               0 8px 24px -12px oklch(0.30 0.03 70 / 0.14);

  /* Typography */
  --font-display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.4vw, 1.5rem);
  --step-2:  clamp(1.5rem, 1.35rem + 0.75vw, 2.1rem);
  --step-3:  clamp(2rem, 1.7rem + 1.5vw, 3rem);
  --step-4:  clamp(2.6rem, 2.05rem + 2.75vw, 4.5rem);
  --step-5:  clamp(2.5rem, 1.5rem + 5vw, 5.75rem);

  /* Space ramp */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: clamp(5rem, 3.5rem + 7vw, 9rem);

  --container: 1200px;
  --gutter: clamp(1.1rem, 0.6rem + 2.5vw, 3rem);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* z-scale */
  --z-base: 1;
  --z-sticky: 100;
  --z-nav: 200;
  --z-menu: 300;
  --z-toast: 400;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);     /* quart-ish */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ----- Reset ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ----- Type ----------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
  color: var(--ink);
}
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.02em; line-height: 1.15; }
p { text-wrap: pretty; }
.lead { font-size: var(--step-1); color: var(--muted); line-height: 1.5; max-width: 60ch; font-weight: 400; }
strong { font-weight: 600; }

.mark { color: var(--primary-deep); }
.amber-underline {
  background-image: linear-gradient(var(--primary), var(--primary));
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 100% 0.32em;
  padding-bottom: 0.04em;
}

/* ----- Layout --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--space-3xl); }
.section--tight { padding-block: var(--space-2xl); }
.section--surface { background: var(--surface); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.02em;
  color: var(--accent);
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.section-head { max-width: 64ch; margin-bottom: var(--space-lg); }
.section-head .lead { margin-top: var(--space-sm); }

/* ----- Buttons -------------------------------------------------------- */
.btn {
  --_bg: var(--ink);
  --_fg: oklch(0.99 0.003 85);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.72em 1.3em;
  background: var(--_bg);
  color: var(--_fg);
  font-weight: 600;
  font-size: var(--step-0);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out),
              background-color 0.3s var(--ease-out);
  will-change: transform;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-amber);
}
.btn:active { transform: translateY(0); }
.btn .arrow { transition: transform 0.4s var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

.btn--ghost {
  --_bg: transparent;
  --_fg: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  border-color: var(--ink);
  box-shadow: none;
  background: var(--surface);
}
.btn--amber {
  --_bg: var(--primary-deep);
  --_fg: oklch(0.99 0.01 85);
}
.btn--sm { padding: 0.5em 1em; font-size: var(--step--1); }
.btn--block { width: 100%; justify-content: center; }

/* ----- Nav ------------------------------------------------------------ */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: oklch(1 0 0 / 0.72);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}
.nav[data-scrolled="true"] {
  border-bottom-color: var(--line);
  background: oklch(1 0 0 / 0.86);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.04em;
}
.brand__mark {
  width: 30px; height: 30px;
  flex: none;
  filter: drop-shadow(0 4px 10px oklch(0.72 0.16 72 / 0.4));
}
.nav__links {
  display: flex;
  gap: clamp(0.5rem, 0.2rem + 1.2vw, 1.6rem);
  margin-inline: auto;
  list-style: none;
  padding: 0;
}
.nav__links a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.96rem;
  padding: 0.4em 0.2em;
  position: relative;
  transition: color 0.2s var(--ease-out);
}
.nav__links a:hover { color: var(--ink); }
.nav__actions { display: flex; align-items: center; gap: var(--space-xs); }
.nav__signin { font-weight: 600; font-size: 0.96rem; color: var(--ink); padding: 0.4em 0.6em; }
.nav__signin:hover { color: var(--primary-deep); }

.nav__burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: 10px;
}
.nav__burger svg { width: 24px; height: 24px; }

/* mobile menu */
.menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  background: oklch(1 0 0 / 0.98);
  backdrop-filter: blur(8px);
  padding: var(--space-md) var(--gutter) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s var(--ease-out), transform 0.32s var(--ease-out),
              visibility 0s linear 0.32s;
}
.menu[data-open="true"] {
  opacity: 1; visibility: visible; transform: translateY(0);
  transition-delay: 0s;
}
.menu__top { display: flex; align-items: center; justify-content: space-between; height: 40px; }
.menu__close { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; }
.menu__close svg { width: 26px; height: 26px; }
.menu__links { display: flex; flex-direction: column; list-style: none; padding: 0; margin-top: var(--space-sm); }
.menu__links a {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.02em;
  padding: 0.4em 0;
  border-bottom: 1px solid var(--line);
}
.menu__actions { display: grid; gap: var(--space-xs); margin-top: auto; }

/* ----- Hero ----------------------------------------------------------- */
.hero { position: relative; padding-top: clamp(2.5rem, 1rem + 6vw, 5rem); padding-bottom: var(--space-3xl); overflow: hidden; }
.hero__glow {
  position: absolute;
  top: -28%; left: 50%;
  width: min(120vw, 1400px); aspect-ratio: 1.6;
  transform: translateX(-50%);
  background:
    radial-gradient(46% 50% at 50% 40%, oklch(0.86 0.14 86 / 0.42), transparent 70%),
    radial-gradient(40% 44% at 72% 24%, oklch(0.7 0.12 40 / 0.18), transparent 72%);
  filter: blur(8px);
  z-index: 0;
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
}
.hero__copy { max-width: 38rem; min-width: 0; }
.hero__media { min-width: 0; }
.badge-row { display: flex; flex-wrap: wrap; gap: var(--space-2xs); margin-bottom: var(--space-md); }
.pill {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-size: var(--step--1); font-weight: 500;
  padding: 0.36em 0.8em;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
}
.pill svg { width: 15px; height: 15px; color: var(--primary-deep); }
.pill--amber { background: var(--primary-soft); border-color: oklch(0.86 0.1 86); color: oklch(0.42 0.11 70); }

.hero h1 {
  font-size: var(--step-5);
  font-weight: 800;
  letter-spacing: -0.045em;
  margin-bottom: var(--space-md);
}
.hero .lead { margin-bottom: var(--space-lg); font-size: var(--step-1); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; }
.hero__note { display: flex; align-items: center; gap: 0.5em; margin-top: var(--space-md); color: var(--muted); font-size: var(--step--1); }
.hero__note svg { width: 16px; height: 16px; color: oklch(0.62 0.13 150); }

/* ----- Builder mockup ------------------------------------------------- */
.builder {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.builder__bar {
  display: flex; align-items: center; gap: 0.5em;
  padding: 0.7em 0.9em;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.dots { display: flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.builder__tab {
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted);
  margin-left: 0.4em; padding: 0.2em 0.6em; background: var(--bg);
  border: 1px solid var(--line); border-radius: 7px;
}
.builder__body { display: grid; grid-template-columns: 1fr; }

.prompt {
  padding: var(--space-sm);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(var(--surface-2), var(--surface-2)) padding-box;
}
.prompt__label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent); letter-spacing: 0.04em; margin-bottom: 0.5em; }
.prompt__box {
  display: flex; gap: 0.6em; align-items: flex-start;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0.8em 0.9em;
  min-height: 4.4em;
}
.prompt__spark { width: 18px; height: 18px; color: var(--primary-deep); flex: none; margin-top: 2px; }
.prompt__text { font-size: 0.95rem; line-height: 1.45; color: var(--ink); }
.caret {
  display: inline-block; width: 2px; height: 1.05em;
  background: var(--primary-deep); vertical-align: -0.18em; margin-left: 1px;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.prompt__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 0.7em; }
.modelswitch { display: inline-flex; align-items: center; gap: 0.45em; }
.modelswitch__label { font-size: 0.72rem; color: var(--muted); font-family: var(--font-mono); }
.chip {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-family: var(--font-mono); font-size: 0.76rem; font-weight: 500;
  padding: 0.34em 0.66em;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  transition: border-color 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}
.chip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--primary)); }
.chip.is-swapping { animation: chipswap 0.5s var(--ease-out); }
@keyframes chipswap {
  0% { transform: translateY(0); opacity: 1; }
  40% { transform: translateY(-5px); opacity: 0; }
  60% { transform: translateY(5px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.prompt__go {
  font-size: 0.72rem; font-weight: 600; color: var(--muted);
  display: inline-flex; gap: 0.35em; align-items: center;
}
.prompt__go kbd {
  font-family: var(--font-mono); font-size: 0.68rem;
  background: var(--surface); border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 5px; padding: 0.1em 0.4em; color: var(--ink);
}

/* preview canvas inside builder */
.preview { padding: var(--space-sm); background: var(--surface); }
.preview__app {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.preview__topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6em 0.8em; border-bottom: 1px solid var(--line);
}
.preview__logo { display: inline-flex; align-items: center; gap: 0.4em; font-weight: 700; font-size: 0.82rem; font-family: var(--font-display); }
.preview__logo i { width: 16px; height: 16px; border-radius: 5px; background: var(--primary); display: inline-block; }
.preview__nav { display: flex; gap: 0.7em; }
.preview__nav span { width: 26px; height: 6px; border-radius: 3px; background: var(--line-strong); }
.preview__hero { padding: 1em 0.9em 0.8em; }
.skeleton { border-radius: 6px; background: var(--surface-2); }
.skeleton--title { height: 14px; width: 70%; background: linear-gradient(90deg, var(--ink), oklch(0.4 0.02 70)); opacity: 0.9; }
.skeleton--line { height: 9px; margin-top: 7px; }
.preview__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 0.9em 1em; }
.preview__card { border: 1px solid var(--line); border-radius: 9px; padding: 0.6em; }
.preview__card i { display: block; width: 22px; height: 22px; border-radius: 6px; background: var(--primary-soft); margin-bottom: 0.5em; }
.preview__pill {
  display: inline-flex; align-items: center; gap: 0.4em;
  position: absolute; right: 14px; bottom: 14px;
  font-size: 0.7rem; font-weight: 600; font-family: var(--font-mono);
  background: var(--ink); color: oklch(0.98 0.01 85);
  padding: 0.4em 0.7em; border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
}
.preview__pill .ok { width: 8px; height: 8px; border-radius: 50%; background: oklch(0.72 0.15 150); }
.builder__body { position: relative; }

/* logo strip */
.trust { margin-top: var(--space-2xl); }
.trust__label { text-align: center; color: var(--muted); font-size: var(--step--1); font-weight: 500; margin-bottom: var(--space-sm); }
.trust__row {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: clamp(1.2rem, 0.5rem + 3vw, 3.4rem);
  opacity: 0.85;
}
.trust__row span {
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  letter-spacing: -0.02em; color: oklch(0.45 0.01 70);
  display: inline-flex; align-items: center; gap: 0.4em;
}
.trust__row span::before { content: ""; width: 16px; height: 16px; border-radius: 5px; background: var(--line-strong); }

/* ----- Build loop ----------------------------------------------------- */
.loop { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-sm); margin-top: var(--space-lg); list-style: none; padding: 0; }
.loop__step {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-md);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), border-color 0.5s var(--ease-out);
}
.loop__step::after {
  content: "";
  position: absolute; right: -1px; top: 50%; width: var(--space-sm); height: 2px;
  background: var(--line-strong);
  transform: translateX(100%);
}
.loop__step:last-child::after { display: none; }
.loop__step[data-active="true"] { border-color: oklch(0.86 0.1 86); box-shadow: var(--glow-amber); transform: translateY(-3px); }
.loop__num {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 0.5em;
  margin-bottom: var(--space-sm);
}
.loop__num b {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent); font-weight: 700;
}
.loop__step[data-active="true"] .loop__num b { background: var(--primary-deep); color: oklch(0.99 0.01 85); }
.loop__step h3 { font-size: var(--step-0); font-weight: 700; margin-bottom: 0.3em; letter-spacing: -0.01em; }
.loop__step p { font-size: var(--step--1); color: var(--muted); }

/* ----- Feature rows --------------------------------------------------- */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: center;
}
.feature + .feature { margin-top: var(--space-3xl); }
.feature--flip .feature__media { order: -1; }
.feature__copy, .feature__media { min-width: 0; }
.feature__copy h2 { font-size: var(--step-2); margin-bottom: var(--space-sm); }
.feature__copy .lead { font-size: var(--step-0); margin-bottom: var(--space-md); }
.feature__list { list-style: none; padding: 0; display: grid; gap: var(--space-xs); }
.feature__list li { display: flex; gap: 0.7em; align-items: flex-start; font-size: 0.98rem; }
.feature__list svg { width: 20px; height: 20px; color: var(--primary-deep); flex: none; margin-top: 2px; }
.feature__list b { font-weight: 600; }

.panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-md);
}
.feature--flip .panel { background: var(--surface); }

/* model picker (feature 1) */
.models { display: grid; gap: 0.6em; }
.models__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4em; }
.models__head span { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); }
.model {
  display: flex; align-items: center; gap: 0.8em;
  padding: 0.75em 0.9em;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.3s var(--ease-out), background-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  text-align: left;
  width: 100%;
}
.model:hover { transform: translateX(2px); border-color: var(--line-strong); }
.model[aria-pressed="true"] { border-color: var(--primary-deep); background: var(--primary-soft); box-shadow: inset 0 0 0 1px oklch(0.78 0.13 80); }
.model__icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; font-family: var(--font-mono); font-weight: 700; font-size: 0.84rem; color: var(--bg); }
.model__name { font-weight: 600; font-size: 0.92rem; }
.model__meta { font-size: 0.76rem; color: var(--muted); font-family: var(--font-mono); }
.model__check { margin-left: auto; width: 20px; height: 20px; color: var(--primary-deep); opacity: 0; transition: opacity 0.2s; }
.model[aria-pressed="true"] .model__check { opacity: 1; }
.model--byom { border-style: dashed; background: var(--bg); }
.model--byom .model__icon { background: repeating-linear-gradient(45deg, var(--accent), var(--accent) 4px, oklch(0.42 0.09 320) 4px, oklch(0.42 0.09 320) 8px); }

/* backend diagram (feature 2) */
.stack { display: grid; gap: 0.7em; }
.stack__app {
  display: flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.9em; border-radius: 12px; font-weight: 600;
  background: var(--ink); color: oklch(0.98 0.01 85); font-size: 0.92rem;
}
.stack__app svg { width: 18px; height: 18px; color: var(--primary); }
.stack__wires { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6em; }
.wire {
  display: flex; align-items: center; gap: 0.6em;
  padding: 0.7em 0.8em;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface);
  font-size: 0.86rem; font-weight: 500;
}
.wire svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.wire .tag { margin-left: auto; font-family: var(--font-mono); font-size: 0.66rem; color: oklch(0.55 0.12 150); background: oklch(0.95 0.04 150); padding: 0.18em 0.45em; border-radius: 5px; }
.stack__db {
  display: flex; align-items: center; gap: 0.6em; justify-content: center;
  padding: 0.7em; border: 1px dashed var(--line-strong); border-radius: 11px;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted);
}
.stack__db svg { width: 16px; height: 16px; }

/* phone (feature 3) */
.phonewrap { display: flex; justify-content: center; gap: var(--space-md); align-items: center; }
.phone {
  width: min(260px, 64vw);
  aspect-ratio: 9 / 18.5;
  background: var(--ink);
  border-radius: 34px;
  padding: 9px;
  box-shadow: var(--shadow-lg);
  flex: none;
}
.phone__screen {
  width: 100%; height: 100%;
  background: var(--bg);
  border-radius: 26px;
  overflow: hidden;
  position: relative;
  display: flex; flex-direction: column;
}
.phone__notch { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 84px; height: 20px; background: var(--ink); border-radius: 11px; z-index: 2; }
.phone__top { padding: 1.7em 1em 0.7em; background: var(--surface); }
.phone__top .skeleton--title { background: var(--ink); height: 13px; }
.phone__chat { padding: 0.8em; display: grid; gap: 0.55em; flex: 1; align-content: start; }
.bubble { font-size: 0.74rem; padding: 0.55em 0.75em; border-radius: 13px; max-width: 85%; line-height: 1.35; }
.bubble--me { background: var(--ink); color: oklch(0.98 0.01 85); justify-self: end; border-bottom-right-radius: 4px; }
.bubble--ai { background: var(--surface-2); border: 1px solid var(--line); justify-self: start; border-bottom-left-radius: 4px; }
.bubble--ai b { color: var(--primary-deep); }
.phone__build {
  margin: 0 0.8em 0.9em; padding: 0.6em 0.7em; border-radius: 11px;
  background: var(--primary-soft); border: 1px solid oklch(0.86 0.1 86);
  display: flex; align-items: center; gap: 0.5em; font-size: 0.72rem; font-weight: 600; color: oklch(0.42 0.11 70);
  font-family: var(--font-mono);
}
.phone__build .spin { width: 14px; height: 14px; border: 2px solid oklch(0.78 0.1 80); border-top-color: var(--primary-deep); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.phone__targets { display: flex; flex-direction: column; gap: 0.7em; }
.target {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.7em 0.9em; border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
  font-weight: 600; font-size: 0.9rem; box-shadow: var(--shadow-sm);
}
.target svg { width: 20px; height: 20px; color: var(--accent); }
.target small { margin-left: auto; font-family: var(--font-mono); font-weight: 500; font-size: 0.7rem; color: oklch(0.55 0.12 150); }

/* ----- Templates ------------------------------------------------------ */
.tmpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}
.tmpl {
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), border-color 0.45s var(--ease-out);
}
.tmpl:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.tmpl__thumb { aspect-ratio: 16 / 10; position: relative; overflow: hidden; display: grid; place-items: center; }
.tmpl__thumb svg { width: 100%; height: 100%; }
.tmpl__body { padding: var(--space-sm); display: flex; flex-direction: column; gap: 0.3em; }
.tmpl__cat { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.03em; color: var(--accent); text-transform: uppercase; }
.tmpl__name { font-family: var(--font-display); font-weight: 700; font-size: 1.06rem; letter-spacing: -0.01em; }
.tmpl__desc { font-size: 0.86rem; color: var(--muted); }
.tmpl__use { margin-top: 0.5em; font-weight: 600; font-size: 0.82rem; color: var(--ink); display: inline-flex; align-items: center; gap: 0.35em; }
.tmpl:hover .tmpl__use { color: var(--primary-deep); }
.tmpl__use svg { width: 15px; height: 15px; transition: transform 0.4s var(--ease-out); }
.tmpl:hover .tmpl__use svg { transform: translateX(3px); }
.tmpl--wide { grid-column: span 2; }

.tmpl-foot { margin-top: var(--space-md); display: flex; justify-content: center; }

/* ----- Capability grid (the rest) ------------------------------------- */
.caps { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--space-sm); margin-top: var(--space-lg); }
.cap {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--space-md);
  background: var(--bg);
  display: flex; flex-direction: column; gap: 0.5em;
  transition: border-color 0.4s var(--ease-out), background-color 0.4s var(--ease-out);
}
.cap:hover { border-color: var(--line-strong); background: var(--surface); }
.cap__icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.cap__icon svg { width: 20px; height: 20px; }
.cap h3 { font-size: var(--step-0); font-weight: 700; letter-spacing: -0.01em; }
.cap p { font-size: 0.88rem; color: var(--muted); }
.cap__row { display: flex; flex-wrap: wrap; gap: 0.4em; margin-top: 0.2em; }
.cap__row code { font-family: var(--font-mono); font-size: 0.7rem; background: var(--surface); border: 1px solid var(--line); padding: 0.18em 0.5em; border-radius: 6px; color: var(--ink); }
.cap--locale { grid-column: span 3; }
.cap--seo { grid-column: span 3; }
.cap--mcp { grid-column: span 3; }
.cap--collab { grid-column: span 3; }
.cap--feat { grid-column: span 2; }

.locale-flags { display: flex; flex-wrap: wrap; gap: 0.4em; margin-top: 0.4em; }
.locale-flags span {
  font-family: var(--font-mono); font-size: 0.72rem;
  padding: 0.25em 0.6em; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
}
.locale-flags span[data-on="true"] { background: var(--primary-soft); border-color: oklch(0.86 0.1 86); color: oklch(0.42 0.11 70); }

/* ----- Pricing / credits --------------------------------------------- */
.credits { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem,1rem+3vw,4rem); align-items: center; }
.credits__meter {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: var(--space-md);
}
.meter__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--space-sm); }
.meter__bal { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); letter-spacing: -0.03em; }
.meter__bal small { font-size: var(--step--1); color: var(--muted); font-weight: 500; font-family: var(--font-body); }
.meter__plan { font-family: var(--font-mono); font-size: 0.74rem; color: var(--accent); background: var(--accent-soft); padding: 0.3em 0.7em; border-radius: var(--radius-pill); }
.meter__bar { height: 12px; border-radius: var(--radius-pill); background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.meter__fill { height: 100%; width: 64%; border-radius: inherit; background: linear-gradient(90deg, var(--primary-deep), var(--primary)); }
.meter__rows { display: grid; gap: 0.5em; margin-top: var(--space-md); }
.meter__row { display: flex; align-items: center; justify-content: space-between; font-size: 0.86rem; padding: 0.5em 0; border-top: 1px solid var(--line); }
.meter__row:first-child { border-top: 0; }
.meter__row span:first-child { display: inline-flex; align-items: center; gap: 0.5em; color: var(--muted); }
.meter__row svg { width: 16px; height: 16px; color: var(--accent); }
.meter__row b { font-family: var(--font-mono); font-weight: 600; }

.credits__copy ul { list-style: none; padding: 0; display: grid; gap: var(--space-xs); margin: var(--space-md) 0 var(--space-lg); }
.credits__copy li { display: flex; gap: 0.7em; align-items: flex-start; }
.credits__copy svg { width: 20px; height: 20px; color: var(--primary-deep); flex: none; margin-top: 2px; }

/* ----- Closing CTA ---------------------------------------------------- */
.cta {
  position: relative;
  background: var(--ink);
  color: oklch(0.97 0.01 85);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 1.5rem + 5vw, 5rem) var(--gutter);
  text-align: center;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cta__glow {
  position: absolute; inset: -40% -10% auto; height: 120%;
  background: radial-gradient(40% 60% at 50% 0%, oklch(0.7 0.16 75 / 0.55), transparent 70%);
  pointer-events: none;
}
.cta__inner { position: relative; z-index: 1; max-width: 44rem; margin-inline: auto; }
.cta h2 { color: oklch(0.99 0.01 85); font-size: var(--step-4); letter-spacing: -0.04em; }
.cta p { color: oklch(0.86 0.02 85); font-size: var(--step-1); margin: var(--space-sm) auto var(--space-lg); max-width: 36ch; }
.cta .hero__cta { justify-content: center; }
.cta .btn--ghost { --_fg: oklch(0.97 0.01 85); border-color: oklch(0.5 0.02 85); }
.cta .btn--ghost:hover { background: oklch(0.28 0.02 70); border-color: oklch(0.7 0.02 85); }

/* ----- Footer --------------------------------------------------------- */
.footer { padding-block: var(--space-2xl) var(--space-lg); border-top: 1px solid var(--line); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-lg); }
.footer__brand { max-width: 32ch; }
.footer__brand .brand { margin-bottom: var(--space-xs); }
.footer__brand p { color: var(--muted); font-size: 0.9rem; }
.footer__soon { margin-top: var(--space-sm); font-weight: 500; }
.footer__soon a { color: var(--primary-deep); font-weight: 600; }
.footer__soon a:hover { text-decoration: underline; }
.footer__social { display: flex; gap: 0.6em; margin-top: var(--space-sm); }
.footer__social a { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); transition: color 0.2s, border-color 0.2s; }
.footer__social a:hover { color: var(--ink); border-color: var(--line-strong); }
.footer__social svg { width: 18px; height: 18px; }
.footer__col h4 { font-family: var(--font-body); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; margin-bottom: var(--space-sm); }
.footer__col ul { list-style: none; padding: 0; display: grid; gap: 0.6em; }
.footer__col a { color: var(--ink); font-size: 0.92rem; opacity: 0.8; }
.footer__col a:hover { opacity: 1; color: var(--primary-deep); }
.footer__bar { display: flex; flex-wrap: wrap; gap: var(--space-sm); justify-content: space-between; align-items: center; margin-top: var(--space-xl); padding-top: var(--space-md); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.84rem; }
.footer__bar .legal { display: flex; gap: var(--space-md); flex-wrap: wrap; }

/* ----- Reveal animations ---------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo); }
.reveal.is-in { opacity: 1; transform: none; }
[data-stagger] > * { transition-delay: calc(var(--i, 0) * 70ms); }

/* hero load orchestration */
.hero [data-load] { opacity: 0; transform: translateY(16px); }
.hero.is-ready [data-load] {
  opacity: 1; transform: none;
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
  transition-delay: calc(var(--d, 0) * 1ms);
}

/* ----- Responsive ----------------------------------------------------- */
@media (max-width: 1020px) {
  .caps { grid-template-columns: repeat(4, 1fr); }
  .cap--locale, .cap--seo, .cap--mcp, .cap--collab { grid-column: span 2; }
  .cap--feat { grid-column: span 2; }
}
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__actions .btn, .nav__signin { display: none; }
  .nav__burger { display: inline-flex; }
  .nav__inner { justify-content: space-between; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__copy { max-width: 40rem; }
  .builder { max-width: 540px; margin-inline: auto; width: 100%; }
  .feature, .feature--flip { grid-template-columns: minmax(0, 1fr); }
  .feature--flip .feature__media { order: 0; }
  .loop { grid-template-columns: repeat(2, 1fr); }
  .loop__step::after { display: none; }
  .credits { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .caps { grid-template-columns: 1fr 1fr; }
  .cap--locale, .cap--seo, .cap--mcp, .cap--collab, .cap--feat { grid-column: span 2; }
  .preview__cards { grid-template-columns: repeat(3, 1fr); }
  .stack__wires { grid-template-columns: 1fr; }
  .tmpl--wide { grid-column: span 1; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__bar { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) {
  .loop { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
}

/* ----- Reduced motion ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero [data-load] { opacity: 1; transform: none; }
  .caret { animation: none; }
}
