/* =========================================================================
   PromptQuery — marketing site
   Aesthetic: industrial / terminal. Deep ink, one terminal-green accent
   (the demo's ✓ green), steel-blue secondary. Fine 1px rules, faint grid
   texture, monospace display. No gradient slop, no purple.
   ========================================================================= */

:root {
  /* Ink + surfaces */
  --ink:        #0a0b10;
  --ink-2:      #0d0e14;
  --panel:      #11131b;
  --panel-2:    #161924;
  --line:       #232634;
  --line-soft:  #1a1d28;

  /* Text */
  --fg:         #e6e9f0;
  --fg-2:       #aeb4c4;
  --fg-3:       #79808f;

  /* Accent — terminal green (echoes the demo's ✓) */
  --green:      #4ee07a;
  --green-deep: #2bb45c;
  --green-dim:  rgba(78, 224, 122, 0.12);
  --green-line: rgba(78, 224, 122, 0.32);

  /* Secondary — steel blue (from the demo's syntax tokens) */
  --blue:       #76a9ff;
  --blue-dim:   rgba(118, 169, 255, 0.12);

  /* Functional */
  --amber:      #f2c879;
  --red:        #ff6b6b;

  --maxw: 1120px;
  --radius: 12px;
  --radius-sm: 8px;

  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Faint grid + vignette texture for atmosphere (not a gradient blob) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(78, 224, 122, 0.06), transparent 60%),
    linear-gradient(180deg, var(--ink-2), var(--ink) 60%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 78%);
          mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 78%);
}

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

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--green); color: #04120a; padding: 10px 16px;
  font-family: var(--font-mono); font-weight: 700; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 3px; }

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 11, 16, 0.72);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-weight: 800; letter-spacing: -0.02em; }
.brand-mark { color: var(--green); font-size: 1.05em; text-shadow: 0 0 14px var(--green-line); }
.brand-name { font-size: 1.05rem; color: var(--fg); }
.brand-accent { color: var(--green); }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a { font-size: 0.92rem; color: var(--fg-2); font-weight: 500; transition: color 0.18s var(--ease); }
.nav a:hover { color: var(--fg); }
.nav-cta {
  font-family: var(--font-mono); font-weight: 700; font-size: 0.85rem !important;
  color: var(--green) !important; border: 1px solid var(--green-line);
  padding: 7px 14px; border-radius: 999px; background: var(--green-dim);
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.nav-cta:hover { background: rgba(78, 224, 122, 0.2); border-color: var(--green); }

@media (max-width: 860px) {
  .nav a:not(.nav-cta) { display: none; }
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero { padding: 86px 0 40px; position: relative; }
.hero-inner { text-align: center; max-width: 880px; margin: 0 auto; }

.eyebrow { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 30px; }
.badge {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.02em; color: var(--fg-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
  background: var(--panel);
}

h1#hero-headline {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: clamp(2.5rem, 6.4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 26px;
  color: var(--fg);
}
h1#hero-headline br { display: block; }

.subhead {
  font-size: clamp(1.04rem, 2vw, 1.22rem);
  color: var(--fg-2);
  max-width: 660px; margin: 0 auto 38px; line-height: 1.62;
}
.subhead code {
  color: var(--green); background: var(--green-dim);
  padding: 1px 7px; border-radius: 5px; font-size: 0.9em;
  border: 1px solid var(--green-line);
}

/* Install one-liner */
.install-row { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.install {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 12px 12px 18px;
  font-family: var(--font-mono); box-shadow: 0 18px 40px -28px rgba(0,0,0,0.9);
}
.install-prompt { color: var(--green); font-weight: 700; user-select: none; }
.install code { color: var(--fg); font-size: 0.98rem; white-space: nowrap; }
.copy-btn {
  font-family: var(--font-mono); font-weight: 600; font-size: 0.78rem;
  color: var(--fg-2); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 7px 12px; cursor: pointer;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.copy-btn:hover { color: var(--green); border-color: var(--green-line); background: var(--green-dim); }
.copy-btn.copied { color: var(--green); border-color: var(--green); background: var(--green-dim); }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.92rem;
  padding: 12px 24px; border-radius: var(--radius-sm);
  transition: transform 0.16s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary {
  background: var(--green); color: #04130a;
  box-shadow: 0 10px 30px -12px rgba(78, 224, 122, 0.5);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(78, 224, 122, 0.62); background: #5ff088; }
.btn-ghost { background: var(--panel); color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--fg-3); }

/* ---------- Demo (centerpiece) ---------- */
.demo {
  margin: 64px auto 0; max-width: 940px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #14151c; overflow: hidden;
  box-shadow: 0 50px 120px -50px rgba(0,0,0,0.95), 0 0 0 1px rgba(255,255,255,0.02) inset;
  position: relative;
}
.demo::after { /* subtle green edge glow */
  content: ""; position: absolute; inset: -1px; border-radius: var(--radius); pointer-events: none;
  box-shadow: 0 0 80px -30px rgba(78, 224, 122, 0.28);
}
.demo-chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; background: var(--panel-2); border-bottom: 1px solid var(--line);
}
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }
.demo-title { margin-left: 12px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--fg-3); }
.demo-video { display: block; width: 100%; height: auto; background: #1e1e2e; }
.demo-video img { display: block; width: 100%; height: auto; }
.demo-cap {
  padding: 16px 20px; font-size: 0.88rem; color: var(--fg-3);
  border-top: 1px solid var(--line); background: var(--panel);
  font-family: var(--font-mono); line-height: 1.55;
}
.demo-cap code { color: var(--green); }

/* =========================================================================
   Section scaffolding
   ========================================================================= */
.section { padding: 96px 0; border-top: 1px solid var(--line-soft); position: relative; }
.kicker {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--green);
  margin: 0 0 14px; display: inline-flex; align-items: center; gap: 10px;
}
.kicker::before { content: ""; width: 22px; height: 1px; background: var(--green-line); }
.section h2 {
  font-family: var(--font-mono); font-weight: 800;
  font-size: clamp(1.7rem, 3.6vw, 2.55rem); line-height: 1.08;
  letter-spacing: -0.03em; margin: 0 0 18px; color: var(--fg); max-width: 18ch;
}
.lede { font-size: 1.08rem; color: var(--fg-2); max-width: 64ch; margin: 0 0 8px; line-height: 1.62; }
.section code { color: var(--green); font-size: 0.92em; }
.r-tag {
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3);
  border: 1px solid var(--line); border-radius: 5px; padding: 3px 8px; margin-right: 10px;
  white-space: nowrap;
}
.text-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 26px;
  font-family: var(--font-mono); font-weight: 600; font-size: 0.92rem; color: var(--green);
  border-bottom: 1px solid var(--green-line); padding-bottom: 2px;
  transition: border-color 0.18s var(--ease); width: fit-content;
}
.text-link:hover { border-color: var(--green); }

/* =========================================================================
   Numbers
   ========================================================================= */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 44px 0 36px; }
.stat-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 30px 28px; position: relative; overflow: hidden;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.stat-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(var(--green), var(--green-deep));
}
.stat-card:hover { border-color: var(--green-line); transform: translateY(-3px); }
.stat-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.stat-value {
  font-family: var(--font-mono); font-weight: 800; font-size: clamp(2.8rem, 7vw, 4rem);
  line-height: 1; color: var(--fg); letter-spacing: -0.04em;
}
.stat-value .pct { color: var(--green); font-size: 0.5em; margin-left: 2px; }
.stat-delta {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; color: var(--green);
  background: var(--green-dim); border: 1px solid var(--green-line); border-radius: 999px;
  padding: 4px 11px; white-space: nowrap;
}
.stat-name { font-family: var(--font-mono); font-size: 1.18rem; font-weight: 700; margin: 6px 0 2px; color: var(--fg); }
.stat-meta { font-family: var(--font-mono); font-size: 0.82rem; color: var(--green); margin: 0 0 12px; }
.stat-desc { font-size: 0.96rem; color: var(--fg-2); margin: 0; line-height: 1.55; }

.receipts-note {
  font-size: 0.95rem; color: var(--fg-2); max-width: 72ch; margin: 0 0 12px;
  padding: 14px 18px; background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); line-height: 1.6;
}
.receipts-note.muted { color: var(--fg-3); background: transparent; border-color: transparent; padding: 4px 18px; }
.receipts-note code { color: var(--blue); }

/* =========================================================================
   How it works — pipeline
   ========================================================================= */
.pipeline { list-style: none; counter-reset: step; padding: 0; margin: 46px 0 0; display: grid; gap: 0; }
.step {
  display: grid; grid-template-columns: 88px 1fr; gap: 24px;
  padding: 28px 0; border-top: 1px solid var(--line-soft); position: relative;
}
.step:first-child { border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step-no {
  font-family: var(--font-mono); font-weight: 800; font-size: 1.5rem;
  color: var(--green); opacity: 0.55; letter-spacing: -0.04em;
}
.step-body h3 { font-family: var(--font-mono); font-size: 1.18rem; font-weight: 700; margin: 0 0 7px; color: var(--fg); letter-spacing: -0.01em; }
.step-body p { margin: 0; color: var(--fg-2); font-size: 0.99rem; line-height: 1.6; max-width: 70ch; }
.step:hover .step-no { opacity: 1; text-shadow: 0 0 18px var(--green-line); transition: opacity 0.2s var(--ease); }
.defaults-line {
  margin-top: 30px; font-family: var(--font-mono); font-size: 0.9rem; color: var(--fg-2);
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px;
}

/* =========================================================================
   Safety
   ========================================================================= */
.safety-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 44px 0 30px; }
.safety-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; position: relative; transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.safety-card:hover { border-color: var(--green-line); transform: translateY(-3px); }
.layer-tag {
  display: inline-block; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.04em; color: var(--green); background: var(--green-dim);
  border: 1px solid var(--green-line); border-radius: 6px; padding: 5px 10px; margin-bottom: 16px;
}
.safety-card h3 { font-family: var(--font-mono); font-size: 1.2rem; font-weight: 700; margin: 0 0 10px; color: var(--fg); letter-spacing: -0.01em; }
.safety-card p { margin: 0; color: var(--fg-2); font-size: 0.98rem; line-height: 1.62; }
.safety-card code { color: var(--blue); font-size: 0.88em; word-break: break-word; }
.safety-foot {
  font-size: 0.96rem; color: var(--fg-2); max-width: 70ch; margin: 0;
  display: flex; align-items: baseline; flex-wrap: wrap; line-height: 1.6;
}

/* =========================================================================
   Compare table
   ========================================================================= */
.table-scroll { margin: 44px 0 14px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.cmp { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 0.94rem; }
.cmp th, .cmp td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.cmp thead th {
  font-family: var(--font-mono); font-size: 0.86rem; font-weight: 700; color: var(--fg-2);
  background: var(--panel-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.cmp thead .cmp-us {
  color: var(--green); position: relative;
}
.cmp tbody th[scope="row"] {
  font-family: var(--font-sans); font-weight: 600; color: var(--fg); white-space: nowrap;
}
.cmp tbody tr:last-child th, .cmp tbody tr:last-child td { border-bottom: none; }
.cmp td { color: var(--fg-2); }
.cmp .cmp-us { background: rgba(78, 224, 122, 0.05); color: var(--fg); font-weight: 500; border-left: 1px solid var(--green-line); border-right: 1px solid var(--green-line); }
.cmp tbody tr:last-child .cmp-us { border-bottom: 1px solid var(--green-line); }
.cmp thead .cmp-us { border-top: 1px solid var(--green-line); }
.cmp .yes { color: var(--green); }
.cmp .cmp-us.yes { color: var(--green); font-weight: 600; }
.cmp .part { color: var(--amber); }
.cmp .no { color: var(--fg-3); }
.cmp .muted-cell { color: var(--fg-3); font-style: italic; }
.sup { color: var(--green); font-size: 0.75em; vertical-align: super; }
.cmp-foot { font-size: 0.84rem; color: var(--fg-3); margin: 14px 0 0; }

/* =========================================================================
   Try it
   ========================================================================= */
.try-steps { list-style: none; padding: 0; margin: 44px 0 0; display: grid; gap: 18px; }
.try-steps > li { display: grid; grid-template-columns: 44px 1fr; gap: 18px; align-items: start; }
.try-no {
  font-family: var(--font-mono); font-weight: 800; font-size: 1rem;
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--green-line); border-radius: 50%; color: var(--green); background: var(--green-dim);
}
.try-cmd-wrap { min-width: 0; }
.try-label { font-family: var(--font-mono); font-size: 0.82rem; color: var(--fg-2); margin: 6px 0 10px; font-weight: 500; }
.try-install { display: flex; width: 100%; max-width: 100%; }
.try-install code { white-space: nowrap; overflow-x: auto; flex: 1; min-width: 0; }
.try-install-long code { font-size: 0.82rem; }
.try-hint { font-size: 0.94rem; color: var(--fg-2); margin: 14px 0 0; line-height: 1.6; }
.try-hint em { color: var(--fg); font-style: normal; background: var(--panel); border: 1px solid var(--line-soft); padding: 1px 6px; border-radius: 4px; }
.try-foot { margin-top: 28px; font-size: 0.9rem; }
.muted { color: var(--fg-3); }

/* =========================================================================
   What it does NOT do
   ========================================================================= */
.notdo-list {
  list-style: none; padding: 0; margin: 40px 0 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line-soft); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.notdo-list li {
  background: var(--panel); padding: 20px 24px; font-size: 0.98rem; color: var(--fg-2);
  display: flex; align-items: baseline; gap: 10px;
}
.notdo-list li::before { content: "✗"; color: var(--red); font-family: var(--font-mono); font-weight: 700; }
.notdo-list code { color: var(--blue); }
.notdo-foot { margin: 28px 0 0; font-size: 1.02rem; color: var(--fg); font-family: var(--font-mono); }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { border-top: 1px solid var(--line); background: var(--ink-2); padding: 72px 0 30px; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 2fr; gap: 48px; }
.footer-brand .brand-name { font-size: 1.2rem; }
.footer-brand .brand-mark { font-size: 1.2rem; }
.footer-tag { font-family: var(--font-mono); font-size: 0.85rem; color: var(--fg-3); margin: 16px 0 0; line-height: 1.6; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.footer-h { font-family: var(--font-mono); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); margin: 0 0 14px; }
.footer-col a { display: block; font-size: 0.94rem; color: var(--fg-2); margin-bottom: 10px; transition: color 0.16s var(--ease); width: fit-content; }
.footer-col a:hover { color: var(--green); }
.footer-install { padding: 8px 8px 8px 14px; }
.footer-install code { font-size: 0.82rem; }
.footer-install .copy-btn { padding: 5px 9px; font-size: 0.72rem; }
.footer-base {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--fg-3);
}
.footer-base a { color: var(--green); border-bottom: 1px solid var(--green-line); }
.footer-base a:hover { border-color: var(--green); }

/* =========================================================================
   Entrance animation — one orchestrated load, staggered
   ========================================================================= */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero .eyebrow,
.hero h1,
.hero .subhead,
.hero .install-row,
.hero .demo {
  opacity: 0;
  animation: rise 0.7s var(--ease) forwards;
}
.hero .eyebrow     { animation-delay: 0.05s; }
.hero h1           { animation-delay: 0.15s; }
.hero .subhead     { animation-delay: 0.28s; }
.hero .install-row { animation-delay: 0.4s; }
.hero .demo        { animation-delay: 0.52s; }

@media (prefers-reduced-motion: reduce) {
  .hero .eyebrow, .hero h1, .hero .subhead, .hero .install-row, .hero .demo { opacity: 1; animation: none; }
}

/* Caret blink on the brand mark */
@keyframes blink { 50% { opacity: 0.25; } }
.brand-mark { animation: blink 1.4s steps(1) infinite; }
@media (prefers-reduced-motion: reduce) { .brand-mark { animation: none; } }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 820px) {
  .stat-grid, .safety-grid, .notdo-list { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 56px 0 24px; }
  .section { padding: 68px 0; }
  .install { width: 100%; max-width: 100%; }
  .install code { overflow-x: auto; }
  .hero .install code { white-space: nowrap; }
  .cta-row { width: 100%; }
  .btn { flex: 1; justify-content: center; }
  .step { grid-template-columns: 1fr; gap: 10px; }
  .step-no { font-size: 1.2rem; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .demo { margin-top: 44px; }
  .demo-cap { font-size: 0.8rem; }
}
@media (max-width: 420px) {
  .footer-cols { grid-template-columns: 1fr; }
}
