/* ─────────────────────────────────────────────────────────────────────────────
   BIMKit marketing — v3
   Aesthetic: confident editorial dark. Inter Tight + Instrument Serif italic
   accents + JetBrains Mono. Spacious. Restrained. The product carries the page.
   ───────────────────────────────────────────────────────────────────────────── */

:root {
  /* Surfaces (warmer, less blue than v2) */
  --bg:        #0b0e16;
  --bg-soft:   #0e121d;
  --bg-panel:  #131826;
  --bg-elev:   #181e2e;
  --bg-code:   #0a0d16;

  /* Text — values chosen for WCAG AA on --bg #0b0e16:
       --fg      ~14.5:1
       --fg-mid  ~9.4:1
       --fg-mute ~4.7:1  (was #6e7791 = 4.2:1, failed for small mono labels)
       --fg-faint ~3.2:1 (was #4a5170 = 2.5:1, only used for separators) */
  --fg:        #ecf0f9;
  --fg-mid:    #a8b2cb;
  --fg-mute:   #8a92ae;
  --fg-faint:  #5a6383;

  /* Lines */
  --line:      #1f2638;
  --line-soft: #161c2b;
  --line-strong: #2e3850;

  /* Accents — restrained palette */
  --blue:      #3b82f6;
  --blue-hi:   #6ea3f7;
  --blue-deep: #1e3a8a;

  --gold:      #fbbf24;
  --gold-hi:   #fde68a;
  --gold-deep: #92400e;

  --ok:        #10b981;
  --err:       #ef4444;

  /* Type */
  --f-display: 'Inter Tight', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --f-body:    'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --f-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;
  --s-32: 128px;
  --s-40: 160px;

  /* Radii */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-2xl: 28px;

  /* Shadows */
  --sh-sm: 0 1px 2px rgba(0,0,0,0.4);
  --sh-md: 0 8px 30px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.45);
  --sh-lg: 0 32px 64px -16px rgba(0,0,0,0.7), 0 8px 24px rgba(0,0,0,0.5);
  --sh-glow: 0 0 0 1px rgba(59,130,246,0.30), 0 12px 40px -12px rgba(59,130,246,0.50);
  --sh-gold: 0 0 0 1px rgba(251,191,36,0.25), 0 12px 40px -12px rgba(251,191,36,0.35);
}

/* ─── Reset / base ──────────────────────────────────────────────────────── */

* { box-sizing: border-box; }
*::selection { background: rgba(251,191,36,0.30); color: var(--fg); }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  background: var(--bg);
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--fg-mid);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ─── Custom scrollbars — thin and dark so they read as navigation
   affordances against the editorial-dark palette without the chunky
   default Windows look. */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 5px;
  border: 2px solid var(--bg);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--fg-mute);
  border-color: var(--bg);
  background-clip: padding-box;
}
::-webkit-scrollbar-corner {
  background: var(--bg);
}

/* Subtle dot-grid behind content for depth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.020) 1px, transparent 0);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
}

/* Film-grain overlay — sits on top of everything (incl. nav), pointer-events
   off so it never blocks clicks. SVG fractalNoise via data URL keeps it
   network-request-free. mix-blend-mode: overlay keeps it as texture, not
   tint. Tile size 200x200 so the grain doesn't read as a regular pattern. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  mix-blend-mode: overlay;
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  color: var(--fg);
  line-height: 1.10;
  letter-spacing: -0.025em;
  margin: 0;
  font-weight: 600;
}

p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--blue-hi);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--gold); }

/* <em> renders as plain inline text site-wide — no italic, no serif,
   no gradient. Keeps the semantic emphasis without the visual flourish. */
em {
  font-family: inherit;
  font-style: normal;
  font-weight: inherit;
  color: inherit;
}

code {
  font-family: var(--f-mono);
  font-size: 0.90em;
  font-weight: 500;
  color: var(--fg);
  background: rgba(110,163,247,0.08);
  border: 1px solid rgba(110,163,247,0.16);
  padding: 0.05em 0.40em;
  border-radius: var(--r-sm);
  letter-spacing: -0.005em;
}

/* ─── Layout primitives ─────────────────────────────────────────────────── */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--s-6);
  position: relative;
  z-index: 1;
}
.container-narrow { max-width: 760px; }

section {
  padding: var(--s-32) 0;
  position: relative;
}
section + section { border-top: 1px solid var(--line-soft); }

.section-head {
  margin-bottom: var(--s-16);
  max-width: 720px;
}
.section-head-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-tag {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-mute);
  letter-spacing: 0.04em;
  margin: 0 0 var(--s-5);
}

.section-h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin: 0 0 var(--s-5);
  line-height: 1.08;
}
.section-h2 code { font-size: 0.78em; vertical-align: 0.06em; }

.section-lede {
  font-size: 1.125rem;
  color: var(--fg-mid);
  max-width: 60ch;
  line-height: 1.55;
  margin: 0;
}

/* ─── .bim chip — appears in many places ────────────────────────────────── */

.chip-bim {
  display: inline-block;
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 0.72em;
  color: var(--blue-hi);
  background: rgba(59,130,246,0.10);
  border: 1px solid rgba(59,130,246,0.28);
  padding: 0.04em 0.30em;
  border-radius: 7px;
  letter-spacing: -0.01em;
  vertical-align: 0.13em;
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 11px 20px;
  font-family: var(--f-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease,
              transform 0.06s ease, box-shadow 0.25s ease, color 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: 2px solid var(--blue-hi);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.16) inset, 0 0 0 1px rgba(255,255,255,0.06) inset, var(--sh-sm);
}
.btn-primary:hover {
  background: #4f8ef7;
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.20) inset, 0 0 0 1px rgba(255,255,255,0.08) inset, var(--sh-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  background: var(--bg-elev);
  border-color: var(--blue);
  color: var(--fg);
}

.btn-lg { padding: 14px 24px; font-size: 15px; }

/* ─── Nav ───────────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,14,22,0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px var(--s-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
}
.brand:hover { color: var(--fg); }
.brand-word {
  font-family: var(--f-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand-tag {
  font-size: 13px;
  color: var(--fg-mute);
  font-weight: 400;
  margin-left: var(--s-2);
}

.nav-links {
  display: flex;
  gap: var(--s-6);
  align-items: center;
}
.nav-links a {
  color: var(--fg-mid);
  font-size: 14px;
  font-weight: 400;
  font-family: var(--f-display);
}
.nav-links a:hover { color: var(--fg); }

.nav-cta { padding: 9px 16px; font-size: 13px; }

@media (max-width: 880px) {
  .nav-links { display: none; }
}

/* ─── HERO ──────────────────────────────────────────────────────────────── */

.hero {
  padding: var(--s-32) 0 var(--s-20);
  position: relative;
  overflow: hidden;
  border-top: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 18% 0%,  rgba(59,130,246,0.22), transparent 60%),
    radial-gradient(ellipse 60% 50% at 95% 30%, rgba(251,191,36,0.10), transparent 60%);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(110,163,247,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(110,163,247,0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent 80%);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-mid);
  letter-spacing: 0.02em;
  margin: 0 0 var(--s-8);
  padding: 6px 14px;
  background: rgba(110,163,247,0.07);
  border: 1px solid rgba(110,163,247,0.20);
  border-radius: 100px;
  backdrop-filter: blur(8px);
}
.kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-hi);
  box-shadow: 0 0 0 4px rgba(110,163,247,0.18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(110,163,247,0.18); }
  50%      { box-shadow: 0 0 0 8px rgba(110,163,247,0.04); }
}

/* Staggered hero reveal — page-load cascade. Each landmark fades up one
   beat after the previous. Reduced-motion users skip it (handled in the
   prefers-reduced-motion media query at the bottom of this file). */
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero .kicker,
.hero .hero-h1,
.hero .hero-lede,
.hero .cta-row,
.hero .hero-aside,
.hero .morph,
.hero .proof {
  opacity: 0;
  animation: hero-rise 720ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.hero .kicker      { animation-delay:    0ms; }
.hero .hero-h1     { animation-delay:   90ms; }
.hero .hero-lede   { animation-delay:  240ms; }
.hero .cta-row     { animation-delay:  380ms; }
.hero .hero-aside  { animation-delay:  500ms; }
.hero .morph       { animation-delay:  620ms; }
.hero .proof       { animation-delay: 1500ms; }  /* lands after morph completes */

.hero-h1 {
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--fg);
  margin: 0 0 var(--s-6);
  max-width: none;
}
.hero-h1 .chip-bim {
  font-size: 0.62em;
  vertical-align: 0.18em;
  margin: 0 0.05em;
}

.hero-lede {
  font-size: 1.2rem;
  color: var(--fg-mid);
  max-width: 56ch;
  line-height: 1.55;
  margin: 0 0 var(--s-10);
}

.cta-row {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--s-6);
}

.hero-aside {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--fg-mute);
  margin: 0 0 var(--s-20);
  letter-spacing: -0.005em;
}
.hero-sep {
  color: var(--fg-faint);
}
.dot-ok {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.18);
}

/* ─── The Morph stage — single panel, code → dashboard transformation ─────
   Two layers stacked. After the hero reveal cascade lands, a one-shot
   timeline plays:
     0.0s  code visible
     1.5s  scan line starts sweeping
     2.0s  scan reaches mid-panel; code starts dimming + blurring
     2.5s  dashboard begins fading up under the dimmed code
     3.5s  scan exits, dashboard at 100%, code at ~15%
     4.0s  BIMKit transformation badge fades in bottom-right
     ────  state holds — page feels resolved on a working report
*/

.morph {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 0 var(--s-16);
  height: clamp(380px, 56vw, 540px);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  box-shadow: var(--sh-lg);
}

.morph-pane {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* IN — the code (shown first, then dimmed) */
.morph-code {
  z-index: 1;
  background: var(--bg-code);
  animation: morph-code 5s cubic-bezier(0.4, 0, 0.2, 1) 1 forwards;
  animation-delay: 1s;
}
.morph-code pre {
  flex: 1;
  margin: 0;
  padding: var(--s-6) var(--s-8);
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg-mid);
  white-space: pre;
  overflow: hidden;
}
.morph-code .t-key { color: var(--blue-hi); }
.morph-code .t-str { color: #f5b681; }

/* OUT — the dashboard (rises up under the dimming code) */
.morph-out {
  z-index: 2;
  opacity: 0;
  animation: morph-out 5s cubic-bezier(0.4, 0, 0.2, 1) 1 forwards;
  animation-delay: 1s;
}
.morph-out img {
  display: block;
  flex: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

/* Shared label strip on each pane */
.morph-label {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 11px 18px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--fg-mid);
  background: rgba(11,14,22,0.68);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  flex-shrink: 0;
}
.tag {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.06em;
}
.tag-in {
  color: var(--blue-hi);
  background: rgba(59,130,246,0.16);
  border: 1px solid rgba(59,130,246,0.30);
}
.tag-out {
  color: var(--gold-hi);
  background: rgba(251,191,36,0.14);
  border: 1px solid rgba(251,191,36,0.32);
}

/* Gold scan line — the moment of transformation */
.morph-scan {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  pointer-events: none;
  height: 80px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(251,191,36,0.08) 30%,
    rgba(251,191,36,0.55) 50%,
    rgba(251,191,36,0.08) 70%,
    transparent 100%
  );
  filter: blur(1px);
  opacity: 0;
  animation: morph-scan 5s cubic-bezier(0.4, 0, 0.2, 1) 1 forwards;
  animation-delay: 1s;
}

/* BIMKit badge — appears bottom-right after the morph completes */
.morph-badge {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 7px 12px 7px 9px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
  background: rgba(11,14,22,0.86);
  border: 1px solid rgba(251,191,36,0.45);
  border-radius: 100px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  animation: morph-badge 5s cubic-bezier(0.4, 0, 0.2, 1) 1 forwards;
  animation-delay: 1s;
}
.morph-badge-mark { display: inline-flex; }
.morph-badge-text {
  letter-spacing: -0.01em;
}

/* ── Morph keyframes ── */
@keyframes morph-code {
  0%, 30%   { opacity: 1; transform: scale(1); filter: blur(0); }
  60%       { opacity: 0.18; transform: scale(0.97); filter: blur(1.5px); }
  100%      { opacity: 0.15; transform: scale(0.97); filter: blur(1.5px); }
}
@keyframes morph-out {
  0%, 30%   { opacity: 0; transform: scale(0.96) translateY(18px); }
  60%       { opacity: 1; transform: scale(1) translateY(0); }
  100%      { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes morph-scan {
  0%, 25%   { transform: translateY(-100%); opacity: 0; }
  30%       { opacity: 1; }
  50%       { transform: translateY(280px); opacity: 1; }
  60%       { transform: translateY(540px); opacity: 0.6; }
  100%      { transform: translateY(640px); opacity: 0; }
}
@keyframes morph-badge {
  0%, 65%    { opacity: 0; transform: translateY(8px); }
  85%, 100%  { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .morph { height: clamp(320px, 90vw, 480px); }
  .morph-code pre { font-size: 11px; padding: var(--s-4); }
}

/* ─── Proof bar ─────────────────────────────────────────────────────────── */

.proof {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  padding: var(--s-5) var(--s-8);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: rgba(15,20,36,0.5);
  backdrop-filter: blur(10px);
  margin-top: var(--s-8);
}
.proof-item {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  padding: 0 var(--s-6);
  text-align: center;
  align-items: center;
  justify-content: center;
}
.proof-num {
  font-family: var(--f-mono);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.proof-lbl {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.02em;
}
.proof-sep {
  width: 1px;
  background: var(--line);
}
@media (max-width: 720px) {
  .proof {
    flex-direction: column;
    gap: var(--s-3);
    padding: var(--s-5);
    width: 100%;
  }
  .proof-item { padding: 0; }
  .proof-sep { width: 100%; height: 1px; }
}

/* ─── Problem section ───────────────────────────────────────────────────── */

.problem {
  text-align: center;
}
.problem .container-narrow {
  margin: 0 auto;
}

.problem .section-tag {
  text-align: center;
}

.problem .section-h2 {
  margin-bottom: var(--s-8);
}

.problem .lede {
  font-size: 1.2rem;
  color: var(--fg-mid);
  line-height: 1.6;
  margin: 0 auto var(--s-12);
  max-width: 60ch;
}

.bad-options {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s-12);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  text-align: left;
}
.bad-options li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--s-4);
  align-items: start;
  padding: var(--s-5) var(--s-6);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--fg-mid);
  line-height: 1.55;
}
.bad-options .x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(239,68,68,0.10);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.25);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  margin-top: 1px;
}
.bad-options strong { color: var(--fg); font-weight: 600; }

.closer {
  font-family: var(--f-display);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--fg);
  max-width: 56ch;
  margin: 0 auto;
  border-top: 1px solid var(--line-soft);
  padding-top: var(--s-10);
}
.closer code { font-family: var(--f-mono); }

/* ─── How it works — 4 steps ────────────────────────────────────────────── */

.how {
  background: linear-gradient(to bottom, transparent, rgba(15,20,36,0.4) 50%, transparent);
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-32);
}

.step {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--s-12);
  align-items: center;
}
.step-flip .step-text { order: 2; }
.step-flip .step-shot { order: 1; }

@media (max-width: 880px) {
  .step { grid-template-columns: 1fr; gap: var(--s-6); }
  .step-flip .step-text { order: 0; }
  .step-flip .step-shot { order: 0; }
}

.step-text {
  display: flex;
  flex-direction: column;
}

.step-meta {
  display: flex;
  align-items: baseline;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
}
.step-num {
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-mute);
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--bg-panel);
  letter-spacing: 0.04em;
}
.step-meta h3 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.025em;
  margin: 0;
}

.step-text > p {
  font-size: 1.05rem;
  color: var(--fg-mid);
  line-height: 1.65;
  margin: 0 0 var(--s-5);
}

.step-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.step-points li {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--fg-mid);
  padding-left: 22px;
  position: relative;
  line-height: 1.5;
}
.step-points li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--blue-hi);
  font-weight: 500;
}

/* Step screenshots — full-bleed, no fake browser chrome. Gold corner label
   names the step using JetBrains Mono. */
.step-shot {
  position: relative;
  margin: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  box-shadow: var(--sh-lg);
}
.step-shot::before {
  content: attr(data-label);
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-hi);
  background: rgba(11,14,22,0.72);
  padding: 5px 10px;
  border-radius: 3px;
  border: 1px solid rgba(251,191,36,0.32);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
}
.step-shot::after {
  /* subtle corner accent — gold bracket, top-left */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 48px;
  height: 48px;
  border-top: 2px solid rgba(251,191,36,0.55);
  border-left: 2px solid rgba(251,191,36,0.55);
  border-top-left-radius: var(--r-lg);
  pointer-events: none;
  z-index: 1;
}
.step-shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* ─── Features grid ─────────────────────────────────────────────────────── */

.grid-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}

/* Hero card breaks the 3×2 grid — spans 2 columns × 2 rows on the
   left, so the eye lands on the parser claim first and the rest of
   the cards wrap around it. */
.grid-features .card-feat-hero {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  padding: var(--s-10);
  background:
    linear-gradient(135deg, rgba(59,130,246,0.06) 0%, rgba(251,191,36,0.04) 100%),
    var(--bg-panel);
  border-color: var(--line-strong);
}
.grid-features .card-feat-hero:hover {
  border-color: rgba(110,163,247,0.40);
  transform: translateY(-2px);
  box-shadow: var(--sh-glow);
}

.card-feat-eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--fg-mute);
  margin: 0 0 var(--s-3);
}

.card-feat-hero h3 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-5);
  line-height: 1.18;
}
.card-feat-hero p {
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 0 var(--s-6);
}

.card-icon-hero {
  width: 48px;
  height: 48px;
  background: rgba(251,191,36,0.10);
  border-color: rgba(251,191,36,0.28);
  color: var(--gold-hi);
}
.card-icon-hero svg { width: 26px; height: 26px; }

.card-feat-points {
  list-style: none;
  padding: 0;
  margin: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  border-top: 1px solid var(--line);
  padding-top: var(--s-5);
}
.card-feat-points li {
  position: relative;
  padding-left: 22px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--fg-mid);
}
.card-feat-points li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--gold);
}

@media (max-width: 980px) {
  .grid-features { grid-template-columns: repeat(2, 1fr); }
  .grid-features .card-feat-hero {
    grid-column: span 2;
    grid-row: auto;
  }
}
@media (max-width: 600px) {
  .grid-features { grid-template-columns: 1fr; }
  .grid-features .card-feat-hero { grid-column: span 1; padding: var(--s-6); }
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-8);
  position: relative;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  background: rgba(59,130,246,0.10);
  border: 1px solid rgba(59,130,246,0.22);
  color: var(--blue-hi);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-5);
}
.card-icon svg { width: 20px; height: 20px; }

.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 var(--s-3);
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.card p {
  font-size: 0.95rem;
  color: var(--fg-mid);
  line-height: 1.6;
  margin: 0;
}
.card strong {
  color: var(--fg);
  font-weight: 600;
}

/* ─── Under the hood ────────────────────────────────────────────────────── */

.hood-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
@media (max-width: 880px) {
  .hood-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .hood-grid { grid-template-columns: 1fr; }
}

.hood-item {
  padding: var(--s-8);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  transition: background 0.2s;
}
.hood-item:hover { background: var(--bg-panel); }
.hood-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 var(--s-3);
  font-family: var(--f-mono);
  letter-spacing: -0.005em;
}
.hood-item p {
  font-size: 0.92rem;
  color: var(--fg-mid);
  line-height: 1.6;
  margin: 0;
}

/* Stat strip */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  margin-top: var(--s-12);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-soft);
}
@media (max-width: 980px) {
  .stat-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 540px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}

.stat {
  padding: var(--s-6) var(--s-4);
  text-align: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat:last-child { border-right: 0; }
.stat strong {
  display: block;
  font-family: var(--f-mono);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.stat span {
  display: block;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.02em;
}

/* ─── Editions ──────────────────────────────────────────────────────────── */

.ed-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
}
@media (max-width: 880px) {
  .ed-cards { grid-template-columns: 1fr; }
}

.ed-card {
  position: relative;
  padding: var(--s-10);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.25s;
}
.ed-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}
.ed-card-local {
  border-color: rgba(59,130,246,0.30);
}
.ed-card-local:hover {
  box-shadow: var(--sh-glow);
}
.ed-card-hosted {
  border-color: rgba(251,191,36,0.20);
}
.ed-card-hosted:hover {
  box-shadow: var(--sh-gold);
}

.ed-tag {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: var(--s-4);
}
.ed-card-local .ed-tag {
  color: var(--blue-hi);
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.25);
}
.ed-card-hosted .ed-tag {
  color: var(--gold);
  background: rgba(251,191,36,0.10);
  border: 1px solid rgba(251,191,36,0.22);
}

.ed-card-head h3 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 var(--s-2);
  letter-spacing: -0.02em;
}
.ed-card-sub {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--fg-mute);
  margin: 0 0 var(--s-8);
}

.ed-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.ed-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: var(--s-3);
  font-size: 0.95rem;
  color: var(--fg-mid);
  line-height: 1.55;
  align-items: start;
}
.check, .cross {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  padding-top: 4px;
}
.check { color: var(--ok); }
.cross { color: #f87171; }

.editions-note {
  margin: var(--s-12) 0 var(--s-8);
  text-align: center;
  font-family: var(--f-display);
  font-size: 1.05rem;
  color: var(--fg-mid);
}

.pricing-strip {
  margin-top: var(--s-8);
  padding: var(--s-6) var(--s-8);
  background: linear-gradient(135deg, rgba(30,58,138,0.18) 0%, rgba(251,191,36,0.06) 100%);
  border: 1px solid rgba(110,163,247,0.22);
  border-radius: var(--r-md);
  text-align: center;
}
.pricing-strip p { margin: 0; font-size: 1rem; color: var(--fg-mid); }
.pricing-strip strong { color: var(--fg); margin-right: var(--s-2); }
.pricing-strip a { color: var(--gold); }
.pricing-strip a:hover { color: var(--gold-hi); }

/* ─── FAQ ───────────────────────────────────────────────────────────────── */

.qa {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.qa details {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color 0.2s, background 0.2s;
}
.qa details:hover { border-color: var(--line-strong); }
.qa details[open] {
  background: var(--bg-panel);
  border-color: var(--line-strong);
}
.qa summary {
  list-style: none;
  cursor: pointer;
  padding: var(--s-5) var(--s-6);
  font-size: 1rem;
  font-weight: 500;
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}
.qa summary > span { flex: 1; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  font-family: var(--f-mono);
  font-size: 1.4rem;
  color: var(--fg-mute);
  transition: transform 0.2s, color 0.2s;
  line-height: 1;
  flex-shrink: 0;
}
.qa details[open] summary::after { content: "−"; color: var(--blue-hi); }
.qa-body {
  padding: 0 var(--s-6) var(--s-5);
}
.qa-body p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--fg-mid);
  line-height: 1.65;
}

/* ─── Contact form ──────────────────────────────────────────────────────── */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  margin-top: var(--s-10);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field span {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--fg-mid);
  letter-spacing: 0.02em;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--f-display);
  font-size: 15px;
  color: var(--fg);
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--fg-faint); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--bg-panel);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.18);
}
.field textarea { resize: vertical; min-height: 120px; font-family: var(--f-display); }

.field-actions {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  margin-top: var(--s-3);
  flex-wrap: wrap;
}

.form-status {
  margin: 0;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--fg-mute);
}
.form-status.ok  { color: var(--ok); }
.form-status.err { color: var(--err); }

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */

.footer {
  padding: var(--s-16) 0 var(--s-12);
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s-8);
  flex-wrap: wrap;
  margin-bottom: var(--s-10);
}
.footer-nav {
  display: flex;
  gap: var(--s-6);
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: 13px;
  color: var(--fg-mid);
}
.footer-nav a:hover { color: var(--gold); }

.footer-fine {
  margin-top: var(--s-3);
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.01em;
}

/* ─── Reduced motion ────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  /* Hero elements pre-set opacity:0 and depend on the hero-rise
     animation to fade in. With animations disabled we MUST reset
     opacity explicitly — otherwise the entire hero is invisible to
     reduced-motion users. */
  .hero .kicker,
  .hero .hero-h1,
  .hero .hero-lede,
  .hero .cta-row,
  .hero .hero-aside,
  .hero .morph,
  .hero .proof,
  .morph-code,
  .morph-out,
  .morph-badge {
    opacity: 1 !important;
    transform: none !important;
  }
  .morph-scan { display: none !important; }
}
