/* ════════════════════════════════════════════════════════════════
   webelves landing — blended premium theme
   Layout/whitespace/motion from the PreKnowl model; one restrained
   teal accent + mono labels for technical character.
   Lean fonts: system-ui everywhere, IBM Plex Mono is the only import.
   Isolated from site.css so sibling pages don't change.
   ════════════════════════════════════════════════════════════════ */

:root {
  --bg:        #08090a;
  --surface:   #0f1113;
  --surface-2: #15181a;
  --border:    #1e2225;
  --border-2:  #2a2f33;

  --ink:        #f2f3f2;
  --ink-soft:   #a4aaa8;
  --ink-faint:  #6b7270;

  --accent:     #5fcfb8;
  --accent-dim: #3a8a78;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;

  --max: 1140px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 70% 55% at 70% -5%, rgba(95,207,184,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 45% 45% at 8% 95%, rgba(95,207,184,0.04) 0%, transparent 55%);
}

a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); }

/* ── AMBIENT GEOMETRY ───────────────────────────────── */
.bg-geo { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.geo { position: absolute; opacity: .06; filter: blur(2px); will-change: transform; }
.geo polygon { fill: none; stroke: var(--accent); stroke-width: .4; }
@keyframes geo-spin { to { transform: rotate(360deg); } }
.g1 { width: 62vmax; height: 62vmax; top: -16vmax; right: -12vmax; animation: geo-spin 110s linear infinite; }
.g2 { width: 44vmax; height: 44vmax; bottom: -14vmax; left: -10vmax; opacity: .05; animation: geo-spin 150s linear infinite reverse; }
.g2 polygon { stroke: #fff; }
.g3 { width: 30vmax; height: 30vmax; top: 38%; left: 46%; opacity: .04; animation: geo-spin 80s linear infinite; }
@media (prefers-reduced-motion: reduce) { .geo { animation: none !important; } }

/* ── shared utility ─────────────────────────────────── */
.wrap { max-width: var(--max); margin: 0 auto; padding-left: 28px; padding-right: 28px; }
.eyebrow {
  font-family: var(--mono);
  font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--accent);
}
.grad { background: linear-gradient(120deg, #fff 25%, var(--accent) 110%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ── NAV ────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 64px;
  display: flex; align-items: center;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8,9,10,0.72);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand { display: flex; align-items: baseline; gap: 9px; }
.brand-mark { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.brand-mark b { color: var(--accent); font-weight: 700; }
.brand-sub { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--ink-faint); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 14px; color: var(--ink-soft); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: none; color: var(--ink); cursor: pointer; font-size: 22px; line-height: 1; }

/* ── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  padding: 11px 20px; border-radius: 4px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn .arr { transition: transform .2s; }
.btn:hover .arr { transform: translateX(3px); }
.btn-fill { background: var(--accent); color: #04140f; font-weight: 600; }
.btn-fill:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { border-color: var(--border-2); color: var(--ink); }
.btn-ghost:hover { background: rgba(255,255,255,0.04); border-color: var(--ink-faint); }
.btn-text { color: var(--ink-soft); padding: 8px 4px; }
.btn-text:hover { color: var(--ink); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; }

/* ── HERO ───────────────────────────────────────────── */
.hero { position: relative; padding: 150px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; color: var(--ink-soft);
  border: 1px solid var(--border-2); background: var(--surface);
  border-radius: 5px; padding: 6px 14px; margin-bottom: 26px;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
h1 {
  font-size: clamp(38px, 5.4vw, 66px);
  font-weight: 680; line-height: 1.04; letter-spacing: -0.035em;
  margin-bottom: 22px;
}
.hero-sub { font-size: 18px; color: var(--ink-soft); max-width: 520px; line-height: 1.6; margin-bottom: 32px; }
.hero-sub code { color: var(--accent); font-size: 15px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 64px; max-width: 720px; }
.stat { border-left: 1px solid var(--border-2); padding-left: 16px; }
.stat-v { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; }
.stat-l { font-size: 12px; color: var(--ink-faint); margin-top: 3px; }

/* hero mock terminal */
.term { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; box-shadow: 0 30px 80px -40px rgba(0,0,0,0.9); }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--bg); }
.term-dots { display: flex; gap: 6px; }
.term-dots i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.term-dots i:nth-child(1){ background:#e87a8a; } .term-dots i:nth-child(2){ background:#f0c674; } .term-dots i:nth-child(3){ background:var(--accent); }
.term-file { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); margin-left: 4px; }
.term-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.term-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.term-meta b { color: var(--accent); font-weight: 500; }
.msg-role { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); margin-bottom: 5px; }
.msg-text { font-size: 14px; color: var(--ink-soft); line-height: 1.55; }
.msg-text.ans { color: var(--ink); }
.cite { color: var(--accent); font-family: var(--mono); font-size: 11px; }
.term-input { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border-2); border-radius: 4px; padding: 8px 10px 8px 12px; font-size: 13px; color: var(--ink-faint); margin-top: 4px; }
.term-input input { flex: 1; background: none; border: none; outline: none; color: var(--ink); font-family: var(--sans); font-size: 13px; }
.term-input input::placeholder { color: var(--ink-faint); }
.term-input input:disabled { color: var(--ink-faint); cursor: not-allowed; }
.term-send { font-family: var(--mono); font-size: 11px; color: var(--accent); background: none; border: none; cursor: pointer; padding: 4px 6px; white-space: nowrap; }
.term-send:disabled { color: var(--ink-faint); cursor: not-allowed; }

/* hero engine: load + progress */
.term-load { width: 100%; justify-content: center; margin-top: 4px; }
.term-status { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); margin-top: 4px; min-height: 14px; }
.term-status b { color: var(--accent); font-weight: 500; }
.term-bar-prog { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.term-bar-prog i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.cursor-blink::after { content: '▍'; color: var(--accent); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ── PRIVACY STRIP ──────────────────────────────────── */
.privacy { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(95,207,184,0.03); }
.privacy .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; padding-top: 16px; padding-bottom: 16px; }
.privacy span { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }
.privacy .yes { color: var(--accent); font-weight: 500; }

/* ── SECTIONS ───────────────────────────────────────── */
section { scroll-margin-top: 80px; }
.section { padding: 96px 0; }
.section-head { margin-bottom: 48px; max-width: 640px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 660; letter-spacing: -0.03em; line-height: 1.1; margin: 14px 0 14px; }
.section-head p { font-size: 17px; color: var(--ink-soft); }

/* ── BENTO PRODUCTS ─────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.tile {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 8px; padding: 30px;
  display: flex; flex-direction: column;
  transition: border-color .3s, transform .3s;
}
.tile:hover { border-color: var(--border-2); transform: translateY(-3px); }
.tile::after { content:''; position:absolute; inset:0; background: radial-gradient(circle at 50% 0%, rgba(95,207,184,0.06), transparent 60%); opacity:0; transition: opacity .4s; pointer-events:none; }
.tile:hover::after { opacity: 1; }
.tile-8 { grid-column: span 8; } .tile-4 { grid-column: span 4; } .tile-6 { grid-column: span 6; }
.tile-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tile-name { font-size: 20px; font-weight: 640; letter-spacing: -0.02em; }
.tile-tag { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); border: 1px solid var(--border-2); border-radius: 3px; padding: 3px 8px; }
.tile-tag.free { color: var(--accent); border-color: var(--accent-dim); }
.tile-desc { font-size: 15px; color: var(--ink-soft); line-height: 1.55; flex: 1; }
.tile-link { margin-top: 20px; font-size: 14px; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.tile-link .arr { transition: transform .2s; }
.tile:hover .tile-link .arr { transform: translateX(3px); }

/* ── PRICING ────────────────────────────────────────── */
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tier {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 8px; padding: 28px 24px;
  display: flex; flex-direction: column;
  transition: border-color .3s;
}
.tier:hover { border-color: var(--border-2); }
.tier.feat { border-color: var(--accent-dim); background: var(--surface-2); box-shadow: 0 0 50px -20px rgba(95,207,184,0.35); }
.tier-badge { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); margin-bottom: 14px; }
.tier.feat .tier-badge { color: var(--accent); }
.tier-name { font-size: 17px; font-weight: 620; }
.tier-price { font-size: 40px; font-weight: 680; letter-spacing: -0.03em; margin: 12px 0 2px; }
.tier-price sub { font-size: 14px; font-weight: 400; color: var(--ink-faint); letter-spacing: 0; vertical-align: baseline; }
.tier-desc { font-size: 13px; color: var(--ink-faint); margin-bottom: 22px; min-height: 34px; }
.tier ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; flex: 1; }
.tier li { font-size: 14px; color: var(--ink-soft); display: flex; gap: 9px; align-items: flex-start; }
.tier li::before { content: '✓'; color: var(--accent); flex-shrink: 0; }
.tier li.lock { color: var(--ink-faint); } .tier li.lock::before { content: '○'; color: var(--ink-faint); }
.tier .btn { width: 100%; justify-content: center; }

/* ── DEMOS ──────────────────────────────────────────── */
.demos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.demo { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 24px; display: flex; flex-direction: column; transition: border-color .3s, transform .3s; }
.demo:hover { border-color: var(--border-2); transform: translateY(-3px); }
.demo-name { font-size: 17px; font-weight: 620; color: var(--accent); }
.demo-src { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-faint); margin: 6px 0 12px; }
.demo-desc { font-size: 14px; color: var(--ink-soft); line-height: 1.5; flex: 1; }
.demo-cta { margin-top: 18px; font-size: 14px; color: var(--accent); }

/* ── WAITLIST ───────────────────────────────────────── */
.waitlist { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 44px; text-align: center; max-width: 620px; margin: 0 auto; }
.waitlist h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 660; letter-spacing: -0.03em; margin-bottom: 12px; }
.waitlist p { color: var(--ink-soft); margin-bottom: 26px; }
.waitlist-row { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }
.waitlist input { flex: 1; background: var(--bg); border: 1px solid var(--border-2); border-radius: 4px; color: var(--ink); padding: 12px 14px; font-family: var(--sans); font-size: 14px; outline: none; }
.waitlist input:focus { border-color: var(--accent); }
.waitlist-note { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); margin-top: 14px; }

/* ── FOOTER ─────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.footer-brand { font-size: 14px; color: var(--ink-soft); }
.footer-brand b { color: var(--accent); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; color: var(--ink-faint); }
.footer-links a:hover { color: var(--ink); }

/* ── AUTH MODAL ─────────────────────────────────────── */
.modal-bg { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-bg.open { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--border-2); border-radius: 8px; padding: 30px; width: 100%; max-width: 360px; }
.modal h3 { font-size: 20px; font-weight: 640; letter-spacing: -.02em; margin-bottom: 6px; }
.modal > p { font-size: 13px; color: var(--ink-soft); margin-bottom: 18px; }
.modal input { width: 100%; background: var(--bg); border: 1px solid var(--border-2); border-radius: 4px; color: var(--ink); padding: 11px 13px; font-family: var(--sans); font-size: 14px; outline: none; margin-bottom: 10px; }
.modal input:focus { border-color: var(--accent); }
.modal .btn { width: 100%; justify-content: center; margin-top: 4px; }
.modal-alt { margin-top: 12px; }
.modal-alt .btn { margin-top: 0; }
.modal-err { color: #e87a8a; font-size: 12px; min-height: 16px; margin-top: 8px; }
.modal-x { float: right; color: var(--ink-faint); cursor: pointer; font-size: 20px; line-height: 1; background: none; border: none; }
.modal-foot { font-size: 12px; color: var(--ink-faint); margin-top: 14px; text-align: center; }
.modal-foot a { color: var(--accent); cursor: pointer; }

/* ── TOAST ──────────────────────────────────────────── */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--surface-2); border: 1px solid var(--accent); color: var(--ink); padding: 13px 20px; border-radius: 6px; font-size: 14px; z-index: 200; opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }

/* ── SCROLLBAR ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: rgba(8,9,10,0.96); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); padding: 20px 28px; gap: 18px; }
  .nav-toggle { display: block; }
  /* hide the nav CTA — hero CTAs are always visible; this prevents overflow next to toggle+acct */
  .nav-actions .btn { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .term { order: 2; }
  .bento { grid-template-columns: 1fr; }
  .tile-8, .tile-4, .tile-6 { grid-column: 1 / -1; }
  .tiers { grid-template-columns: repeat(2, 1fr); }
  .demos { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .tiers { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero { padding: 110px 0 56px; }
  .hero-sub { font-size: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 44px; }
  .waitlist { padding: 30px 22px; }
  .waitlist-row { flex-direction: column; }
  .term-body { padding: 14px; gap: 12px; }
  .tile { padding: 22px 18px; }
}
@media (max-width: 420px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: clamp(30px, 9vw, 38px); }
  .hero-sub { font-size: 15px; }
  .section { padding: 52px 0; }
  .stats { max-width: 100%; }
  .tier { padding: 22px 18px; }
  .privacy .wrap { gap: 10px 20px; }
}
