/* ============================================================
   fv — landing page styles
   Dark, low-saturation theme + single teal accent.
   Mono (JetBrains Mono) for logo/keys/code, sans (Geist) for body.
   ============================================================ */

:root {
  /* Surfaces */
  --bg:        #0e1014;
  --bg-1:      #14171d;   /* cards / elevated */
  --bg-2:      #1a1e26;   /* inset / code */
  --bg-3:      #20252f;   /* hover */
  --border:    #262c36;
  --border-soft: #1d222a;

  /* Text */
  --text:      #e7eaf0;
  --text-dim:  #99a2b1;
  --text-faint:#646d7a;

  /* Accent (tweakable) */
  --accent:        #5db8a4;
  --accent-strong: #6ec9b4;
  --accent-soft:   rgba(93, 184, 164, 0.12);
  --accent-line:   rgba(93, 184, 164, 0.30);

  /* Fonts (tweakable) */
  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Radii */
  --r-sm: 7px;
  --r:    11px;
  --r-lg: 16px;

  /* Rhythm */
  --section-y: 116px;
  --maxw: 1120px;

  /* Shadow */
  --shadow: 0 1px 0 rgba(255,255,255,0.02) inset, 0 12px 40px -12px rgba(0,0,0,0.5);
  --shadow-sm: 0 2px 8px -2px rgba(0,0,0,0.4);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'liga' 1, 'calt' 1;
  letter-spacing: -0.01em;
}

/* subtle top glow */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 620px;
  background: radial-gradient(120% 90% at 50% -10%, var(--accent-soft), transparent 60%);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
code, kbd, pre { font-family: var(--font-mono); }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}
.site-header.scrolled {
  background: rgba(14, 16, 20, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
}
.brand .caret {
  color: var(--accent);
  font-weight: 500;
  margin-right: 1px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a.nav-link {
  font-size: 14.5px;
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: var(--r-sm);
  transition: color .18s ease, background .18s ease;
}
.nav-links a.nav-link:hover { color: var(--text); background: var(--bg-1); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* language toggle */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.lang-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: 0.01em;
  transition: color .18s ease, background .18s ease;
}
.lang-toggle button:hover { color: var(--text-dim); }
.lang-toggle button.active {
  color: var(--bg);
  background: var(--accent);
  font-weight: 600;
}

.gh-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-dim);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--bg-1);
  transition: color .18s ease, border-color .18s ease, transform .18s ease;
}
.gh-link:hover { color: var(--text); border-color: var(--border); transform: translateY(-1px); }
.gh-link svg { width: 17px; height: 17px; }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 550;
  padding: 12px 20px;
  border-radius: var(--r-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .18s cubic-bezier(.2,.7,.3,1), background .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--accent);
  color: #07140f;
  font-weight: 650;
  box-shadow: 0 8px 24px -10px var(--accent);
}
.btn-primary:hover { background: var(--accent-strong); box-shadow: 0 12px 30px -10px var(--accent); }
.btn-ghost {
  background: var(--bg-1);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--bg-3); border-color: #313945; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding-top: 128px;
  padding-bottom: 80px;
}
.hero-inner {
  display: grid;
  gap: 26px;
  text-align: center;
}
.hero-inner > * { max-width: 100%; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  justify-self: center;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  background: var(--bg-1);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.hero h1 {
  font-family: var(--font-mono);
  font-size: clamp(68px, 11vw, 132px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  margin: 4px 0 0;
  white-space: nowrap;
}
.hero h1 .caret { color: var(--accent); font-weight: 500; }
.hero-tagline {
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.35;
  color: var(--text);
  max-width: 20ch;
  margin: 0 auto;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.hero-sub {
  font-size: 16px;
  color: var(--text-dim);
  max-width: 52ch;
  margin-top: -34px;
}
.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}

/* ============================================================
   Terminal mock (hero demo placeholder)
   ============================================================ */
.terminal {
  width: 100%;
  max-width: 940px;
  margin: 34px auto 0;
  border-radius: var(--r-lg);
  background: var(--bg-1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: left;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #181c23, #14171d);
  border-bottom: 1px solid var(--border-soft);
}
.term-dots { display: flex; gap: 8px; }
.term-dots i {
  width: 12px; height: 12px; border-radius: 50%;
  background: #2c333d;
}
.term-title {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  letter-spacing: 0.01em;
}
.term-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  border: 1px dashed var(--border);
  padding: 3px 9px;
  border-radius: 999px;
}

/* TUI body */
.tui {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  background:
    repeating-linear-gradient(180deg, transparent 0 27px, rgba(255,255,255,0.012) 27px 28px),
    #0c0e12;
}
.tui-path {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-dim);
}
.tui-path .seg { color: var(--text-faint); }
.tui-path .cur { color: var(--accent); }
.tui-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 296px;
}
.tui-list { padding: 8px 0; border-right: 1px solid var(--border-soft); }
.tui-row {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 10px;
  align-items: center;
  height: 28px;
  padding: 0 18px;
  color: var(--text-dim);
}
.tui-row .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tui-row .ic { color: var(--text-faint); }
.tui-row .nm { color: var(--text); }
.tui-row .dir .nm { color: #cdd5e2; }
.tui-row .meta { color: var(--text-faint); font-size: 12px; white-space: nowrap; }
.tui-row.sel {
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent);
}
.tui-row.sel .nm { color: var(--accent-strong); }
.tui-row.sel .ic { color: var(--accent); }
.tui-row.marked .ic { color: var(--accent); }

.tui-preview { padding: 12px 18px; color: var(--text-dim); }
.tui-preview .ph {
  font-size: 11px; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 10px;
}
.tui-preview .code .ln { display: flex; gap: 16px; white-space: nowrap; }
.tui-preview .code .n { color: #3a424d; width: 18px; text-align: right; }
.tui-preview .kw { color: var(--accent); }
.tui-preview .st { color: #9db98f; }
.tui-preview .cm { color: var(--text-faint); }
.tui-preview .fn { color: #c9c3e6; }

.tui-status {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 9px 18px;
  border-top: 1px solid var(--border-soft);
  background: #0a0c0f;
  color: var(--text-faint);
  font-size: 12px;
}
.tui-status > span { white-space: nowrap; }
.tui-status .k {
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 6px;
  margin-right: 5px;
}

/* ============================================================
   Section primitives
   ============================================================ */
section { padding-top: var(--section-y); }
.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: block;
}
.section-head h2 {
  font-size: clamp(30px, 4.2vw, 42px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
}
.section-head p {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 17px;
  max-width: 56ch;
}

/* ============================================================
   Value-prop features (3)
   ============================================================ */
.vp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.vp-card {
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  padding: 30px 28px 32px;
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.vp-card:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.vp-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  margin-bottom: 22px;
}
.vp-icon svg { width: 22px; height: 22px; }
.vp-card h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.vp-card p { color: var(--text-dim); font-size: 15px; line-height: 1.62; }

/* ============================================================
   Install
   ============================================================ */
.install-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.install-card {
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.install-card .ic-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.install-card .ic-head h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.install-card .ic-tag {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--accent);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  border-radius: 999px; padding: 2px 9px;
  white-space: nowrap;
}
.install-card > p { color: var(--text-dim); font-size: 14.5px; margin-bottom: 20px; }
.install-card .grow { flex: 1; }

.code-block {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--text);
  padding: 16px 18px;
  overflow-x: auto;
}
.code-block .cmt { color: var(--text-faint); }
.code-block .pmt { color: var(--accent); user-select: none; }
.copy-btn {
  position: absolute;
  top: 10px; right: 10px;
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-1);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent-line); }
.copy-btn.copied { color: var(--accent); border-color: var(--accent-line); }

.rel-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 14.5px;
  font-weight: 500;
  margin-top: 18px;
  transition: gap .2s ease;
}
.rel-link:hover { gap: 12px; }

/* feature screenshot placeholders */
.shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 38px;
}
.shot {
  border: 1px dashed var(--border);
  border-radius: var(--r);
  background:
    repeating-linear-gradient(135deg, transparent 0 11px, rgba(255,255,255,0.018) 11px 12px),
    var(--bg-1);
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-align: center;
}
.shot span { display: block; }
.shot .big { color: var(--text-dim); font-size: 13.5px; margin-bottom: 4px; }

/* ============================================================
   Features (4 categories)
   ============================================================ */
.feat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.feat-card {
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  padding: 28px;
  transition: border-color .25s ease;
}
.feat-card:hover { border-color: var(--border); }
.feat-card .fc-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 22px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border-soft);
}
.feat-card .fc-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 7px;
  flex-shrink: 0;
}
.feat-card h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.feat-card .fc-sub { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }

.key-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  padding: 8px 0;
  align-items: baseline;
}
.key-row + .key-row { border-top: 1px solid var(--border-soft); }
.keys { display: flex; flex-wrap: wrap; gap: 5px; }
kbd {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 2px 7px;
  min-width: 22px;
  text-align: center;
  white-space: nowrap;
}
.key-row .desc { color: var(--text-dim); font-size: 14px; line-height: 1.55; }
.feat-note {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--text-faint);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.5;
}
.feat-note::before {
  content: "*";
  color: var(--accent);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  margin-top: var(--section-y);
  border-top: 1px solid var(--border-soft);
  padding: 48px 0 56px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-brand .brand { font-size: 18px; }
.footer-brand .tag { font-size: 13px; color: var(--text-faint); }
.footer-links { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.footer-links a {
  font-size: 14px;
  color: var(--text-dim);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  transition: color .18s ease, background .18s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.footer-links a:hover { color: var(--text); background: var(--bg-1); }
.footer-links .lic { font-family: var(--font-mono); font-size: 12.5px; }

/* ============================================================
   Scroll reveal
   ============================================================ */
/* ============================================================
   Scroll reveal (progressive enhancement)
   Hidden state only applies once JS adds .js-reveal to <html>,
   so a no-JS / failed-JS render always shows content.
   ============================================================ */
.reveal {
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
  transition-delay: var(--d, 0ms);
}
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(20px);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  :root { --section-y: 88px; }
  .vp-grid { grid-template-columns: 1fr; gap: 16px; }
  .install-grid { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .hero { padding-top: 64px; }
  .hero h1 { font-size: clamp(64px, 22vw, 96px); }
  .tui-grid { grid-template-columns: 1fr; }
  .tui-preview { display: none; }
  .tui-list { border-right: 0; }
  .gh-link span { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .key-row { grid-template-columns: 1fr; gap: 6px; }
}

/* ============================================================
   Real screenshots (hero demo GIF / feature captures)
   ============================================================ */
.hero-shot {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
}
.shot.has-img {
  border-style: solid;
  border-color: var(--border-soft);
  background: var(--bg-1);
  padding: 0;
  overflow: hidden;
}
.shot.has-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
