/* ==========================================================================
   HOOKPULSE LANDING PAGE DESIGN SYSTEM — OBSIDIAN & ELECTRIC INDIGO
   ========================================================================== */

:root {
  --bg: #090b10;
  --bg-subtle: #0d1017;
  --panel: #121620;
  --panel-2: #141824;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f1f3f9;
  --muted: #8b95a5;
  --dim: #545e70;

  --brand: #6366f1;
  --brand-hover: #4f46e5;
  --brand-dim: rgba(99, 102, 241, 0.12);
  --brand-border: rgba(99, 102, 241, 0.28);
  --brand-glow: rgba(99, 102, 241, 0.25);

  --green: #10b981;
  --green-dim: rgba(16, 185, 129, 0.12);
  --red: #ef4444;
  --amber: #f59e0b;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  color-scheme: dark;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--brand);
  color: #ffffff;
}

.mono { font-family: "JetBrains Mono", monospace; }
.container { width: min(1200px, 92%); margin-inline: auto; }
h1, h2, h3, h4 { font-family: "Space Grotesk", sans-serif; letter-spacing: -0.02em; }

/* Subtle Ambient Gradient */
.glow {
  position: fixed;
  top: -180px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 420px;
  background: radial-gradient(closest-side, rgba(99, 102, 241, 0.12), transparent);
  z-index: -3;
  pointer-events: none;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(9, 11, 16, 0.85);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; height: 68px; gap: 24px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand), #818cf8);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 2px 8px var(--brand-glow);
}

.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.trend {
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.25);
  background: var(--green-dim);
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--brand-glow);
}
.btn-primary:hover {
  background: var(--brand-hover);
  box-shadow: 0 4px 14px var(--brand-glow);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: var(--panel);
}
.btn-ghost:hover {
  border-color: var(--line-strong);
  background: var(--panel-2);
}

.btn-login {
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}
.btn-login:hover {
  border-color: var(--line-strong);
  background: var(--panel);
}

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-block { width: 100%; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.burger span { width: 22px; height: 2px; background: var(--text); transition: all 0.25s ease; }

/* Hero */
.hero {
  padding: 72px 0 32px;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--brand-border);
  background: var(--brand-dim);
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.spark { display: inline-block; }

h1 {
  font-size: clamp(2.8rem, 6.5vw, 4.8rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.grad {
  background: linear-gradient(135deg, #f1f3f9, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  color: var(--muted);
  max-width: 54ch;
  margin: 20px auto 0;
  font-size: 1.1rem;
}

.url-box {
  margin: 36px auto 0;
  max-width: 680px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  flex-wrap: wrap;
}
.url-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 4px;
}
.url-box code {
  flex: 1;
  min-width: 220px;
  text-align: left;
  font-size: 0.88rem;
  color: var(--brand);
  overflow-x: auto;
  white-space: nowrap;
}
.url-box code.flash {
  animation: flashIndigo 0.6s ease;
}
@keyframes flashIndigo {
  0% { background: var(--brand-dim); }
}

.trust-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.84rem;
}

/* Terminal */
.terminal {
  max-width: 680px;
  margin: 40px auto 0;
  background: #090c12;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.terminal figcaption {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot.r { background: #ef4444; } .dot.y { background: #f59e0b; } .dot.g { background: #10b981; }
.terminal em { font-style: normal; color: var(--muted); font-size: 0.76rem; margin-left: 8px; }

.copy-btn {
  margin-left: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.copy-btn:hover { color: var(--text); border-color: var(--line-strong); }
.terminal pre { padding: 18px 20px; font-size: 0.82rem; line-height: 1.8; color: #cbd5e1; overflow-x: auto; }

/* Sections */
.section { padding: 84px 0 0; }
.eyebrow { color: var(--brand); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.15em; margin-bottom: 10px; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); font-weight: 700; }
.sec-sub { color: var(--muted); margin-top: 8px; font-size: 0.95rem; }

/* Playground */
.hidden-until-gen .pg-grid { opacity: 0.4; pointer-events: none; filter: saturate(0.5); transition: all 0.4s ease; }
.hidden-until-gen.live .pg-grid { opacity: 1; pointer-events: auto; filter: none; }

.pg-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.pg-status { color: var(--muted); font-size: 0.82rem; }
.pg-status.on { color: var(--green); font-weight: 600; }

.pg-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; margin-top: 28px; align-items: start; }
.feed-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.feed-head {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
}
.feed { max-height: 400px; overflow-y: auto; }
.req {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.req:last-child { border-bottom: none; }
.req-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.method {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--green-dim);
  color: var(--green);
}
.status-code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}
.status-code.s2 { color: var(--green); }
.status-code.s4 { color: var(--amber); }
.status-code.s5 { color: var(--red); }
.req-path { font-size: 0.84rem; color: var(--text); }
.req-time { margin-left: auto; font-size: 0.72rem; color: var(--muted); }
.req pre {
  margin-top: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.76rem;
  line-height: 1.5;
  color: #94a3b8;
  overflow-x: auto;
}

.feed-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
  flex-wrap: wrap;
}

/* Mock Panel */
.mock-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.mock-panel h3 { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 16px; }
.mock-panel label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.mock-panel select, .mock-panel textarea, .mock-panel input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  outline: none;
  margin-top: 4px;
}
.mock-panel select:focus, .mock-panel textarea:focus, .mock-panel input:focus {
  border-color: var(--brand);
}

/* Feature Grid */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.feat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.15s ease;
}
.feat-card:hover {
  border-color: var(--line-strong);
}
.feat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--brand-dim);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  font-size: 1.1rem;
}
.feat-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.feat-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }

/* Pricing Grid */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
  align-items: stretch;
}
.price-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.15s ease;
}
.price-card.featured {
  border-color: var(--brand-border);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.12);
}
.pop-tag {
  position: absolute;
  top: -12px;
  left: 28px;
  background: var(--brand);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}
.tier { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; }
.tier-sub { color: var(--muted); font-size: 0.82rem; margin-bottom: 20px; }
.price-row { display: flex; align-items: baseline; gap: 4px; margin-bottom: 24px; }
.curr { font-size: 1.2rem; font-weight: 600; }
.num { font-size: 2.4rem; font-weight: 700; font-family: "Space Grotesk", sans-serif; letter-spacing: -0.03em; }
.per { color: var(--muted); font-size: 0.85rem; }

.price-feats {
  list-style: none;
  margin-bottom: 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--muted);
}
.price-feats li { display: flex; align-items: center; gap: 10px; }
.price-feats li i { color: var(--green); font-style: normal; font-size: 0.95rem; }

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.faq-item h4 { font-size: 0.98rem; font-weight: 600; margin-bottom: 8px; }
.faq-item p { font-size: 0.86rem; color: var(--muted); line-height: 1.6; }

/* Footer */
footer {
  margin-top: 100px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
  .feat-grid, .price-grid, .faq-grid { grid-template-columns: 1fr; }
  .pg-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .burger { display: flex; }
}
