/* ClickSpool — marketing site. Shares the product's control-room aesthetic. */

:root {
  --ink: #0a0c0e;
  --panel: #12151a;
  --panel-2: #171b21;
  --line: #232a33;
  --text: #d7dde3;
  --text-dim: #7c8894;
  --text-faint: #4a545e;
  --rec: #ff2e2e;
  --amber: #ffb454;
  --live: #3ddc97;
  --data: #b8761c;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --display: 'Bricolage Grotesque', 'Avenir Next', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.13) 2px 3px);
  mix-blend-mode: multiply;
  opacity: 0.5;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, .wordmark { font-family: var(--display); }
.mono { font-family: var(--mono); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 12px 22px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--amber); }
.btn-primary {
  background: var(--rec);
  border-color: var(--rec);
  color: #fff;
  box-shadow: 0 0 0 1px var(--rec), 0 8px 30px rgba(255, 46, 46, 0.28);
}
.btn-primary:hover { border-color: var(--rec); box-shadow: 0 0 0 1px var(--rec), 0 10px 40px rgba(255, 46, 46, 0.45); }
.btn-ghost { background: transparent; }
.btn-lg { padding: 15px 28px; font-size: 15px; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(10, 12, 14, 0.7);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; }
.wordmark { font-size: 19px; font-weight: 750; letter-spacing: 0.14em; color: #fff; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--text-dim); font-size: 14px; transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
@media (max-width: 820px) { .nav-links { display: none; } }

/* spool logo mark */
.spool { width: 26px; height: 26px; flex-shrink: 0; }
.spool .spin { transform-origin: 50% 50%; animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.rec-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--rec); box-shadow: 0 0 10px rgba(255, 46, 46, 0.9);
  animation: blink 1.6s steps(1) infinite;
}
@keyframes blink { 0%, 70% { opacity: 1; } 71%, 100% { opacity: 0.25; } }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 90px 0 60px;
  background:
    radial-gradient(1100px 520px at 78% -5%, rgba(255, 46, 46, 0.10), transparent 60%),
    radial-gradient(820px 460px at -5% 100%, rgba(255, 180, 84, 0.06), transparent 62%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 22px;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px;
}
.hero h1 {
  font-size: clamp(38px, 5.4vw, 62px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: #fff;
}
.hero h1 .hl { color: var(--rec); }
.hero-sub { margin-top: 22px; font-size: 17px; color: var(--text-dim); max-width: 520px; }
.hero-actions { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 12.5px; color: var(--text-faint); }

/* staggered load reveal */
.reveal-load { opacity: 0; transform: translateY(14px); animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.d1 { animation-delay: 0.05s; } .d2 { animation-delay: 0.15s; } .d3 { animation-delay: 0.25s; }
.d4 { animation-delay: 0.35s; } .d5 { animation-delay: 0.45s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- fake replay monitor (hero + demo) ---------- */

.monitor {
  background: #05070a;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 0 50px rgba(0, 0, 0, 0.5);
}
.monitor-bar { display: flex; align-items: center; gap: 8px; padding: 6px 8px 10px; }
.dot3 { width: 10px; height: 10px; border-radius: 50%; background: #2a323c; }
.monitor-url {
  margin-left: 8px; flex: 1;
  font-size: 11px; color: var(--text-faint);
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
  padding: 4px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.monitor-rec { display: flex; align-items: center; gap: 6px; font-size: 10px; letter-spacing: 0.18em; color: var(--rec); }

.screen {
  position: relative;
  height: 340px;
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}
.screen.tall { height: 420px; }

/* fake site rendered inside the screen */
.fsite { position: absolute; inset: 0; color: #2a1c14; font-family: var(--display); transition: transform 1.2s ease; }
.fsite-nav { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 2px solid #2a1c14; background: #fffaf1; }
.fsite-logo { font-weight: 800; font-size: 15px; }
.fsite-links { display: flex; gap: 14px; font-size: 11px; color: #6b4a32; }
.fsite-body { padding: 26px 22px; background: #f6efe4; height: 100%; }
.fkicker { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: #b5541d; font-family: var(--mono); }
.fsite-body h3 { font-size: 26px; font-weight: 900; margin: 8px 0 10px; line-height: 1.05; }
.fsite-body p { font-size: 12px; color: #6b4a32; font-family: var(--mono); max-width: 300px; }
.fbtns { display: flex; gap: 10px; margin-top: 16px; }
.fbtn { font-family: var(--mono); font-size: 11px; font-weight: 700; padding: 8px 16px; border-radius: 999px; border: 2px solid #2a1c14; }
.fbtn.solid { background: #d96e30; border-color: #b5541d; color: #fff; }
.fcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.fcard { background: #fffaf1; border: 2px solid #2a1c14; border-radius: 10px; padding: 12px; box-shadow: 4px 4px 0 rgba(42, 28, 20, 0.12); }
.fcard .fswatch { width: 34px; height: 34px; border-radius: 8px; border: 2px solid #2a1c14; display: grid; place-items: center; font-size: 16px; margin-bottom: 8px; }
.fcard h4 { font-size: 13px; }
.fcard span { font-family: var(--mono); font-size: 9px; color: #6b4a32; }

/* animated ghost cursor */
.ghost-cursor {
  position: absolute; z-index: 6; width: 22px; height: 22px;
  margin: -3px 0 0 -3px; pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
  transition: left 0.9s cubic-bezier(0.5, 0, 0.2, 1), top 0.9s cubic-bezier(0.5, 0, 0.2, 1);
}
.click-ping {
  position: absolute; z-index: 5; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; border: 2px solid var(--rec); pointer-events: none;
  animation: ping 0.9s ease-out forwards;
}
@keyframes ping { 0% { transform: scale(0.3); opacity: 0.9; } 100% { transform: scale(3.4); opacity: 0; } }

/* heatmap overlay */
.heat { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity 0.6s; }
.heat.on { opacity: 1; }
.heat span {
  position: absolute; border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,46,46,0.85) 0%, rgba(255,180,84,0.5) 45%, transparent 72%);
  mix-blend-mode: screen;
}

/* ---------- section scaffolding ---------- */

section { position: relative; }
.section-pad { padding: 84px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-tag { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--rec); }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 780; color: #fff; margin: 12px 0 14px; letter-spacing: -0.01em; }
.section-head p { color: var(--text-dim); font-size: 16px; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s, transform 0.7s; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- demo section ---------- */

.demo-wrap { max-width: 900px; margin: 0 auto; }
.demo-controls { display: flex; justify-content: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.demo-controls .btn.active { border-color: var(--rec); color: #fff; box-shadow: inset 0 0 0 1px var(--rec); }

/* ---------- features ---------- */

.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .feat-grid { grid-template-columns: 1fr; } }
.feat {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 26px 24px;
  transition: transform 0.15s, border-color 0.15s;
}
.feat:hover { transform: translateY(-3px); border-color: var(--amber); }
.feat-ico { font-size: 24px; margin-bottom: 14px; }
.feat h3 { font-size: 17px; color: #fff; margin-bottom: 8px; }
.feat p { font-size: 14px; color: var(--text-dim); }

/* ---------- steps ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 26px 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--display); font-size: 34px; font-weight: 800; color: var(--rec); display: block; margin-bottom: 10px;
}
.step h3 { font-size: 16px; color: #fff; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--text-dim); }
.step code { background: var(--ink); color: var(--amber); padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.snippet-line {
  margin-top: 40px; text-align: center;
}
.snippet-line pre {
  display: inline-block; text-align: left; max-width: 100%; overflow-x: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 14px 18px; color: var(--amber); font-size: 12.5px; white-space: pre;
}

/* ---------- pricing ---------- */

.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; max-width: 860px; margin: 0 auto; }
@media (max-width: 820px) { .price-grid { grid-template-columns: 1fr; max-width: 420px; } }
.tier {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 26px 22px;
  transition: transform 0.15s, border-color 0.15s;
}
.tier:hover { transform: translateY(-3px); }
.tier.featured { border-color: var(--rec); box-shadow: 0 0 0 1px var(--rec), 0 18px 50px rgba(255, 46, 46, 0.14); }
.tier-badge { align-self: flex-start; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--rec); margin-bottom: 10px; }
.tier h3 { font-size: 16px; color: #fff; }
.tier .price { font-family: var(--display); font-size: 38px; font-weight: 800; color: #fff; margin: 10px 0 2px; }
.tier .price small { font-size: 14px; font-weight: 400; color: var(--text-faint); }
.tier .per { font-size: 12px; color: var(--text-faint); margin-bottom: 18px; }
.tier ul { list-style: none; display: flex; flex-direction: column; gap: 9px; font-size: 13px; color: var(--text-dim); margin-bottom: 22px; flex: 1; }
.tier li { display: flex; gap: 8px; }
.tier li::before { content: '›'; color: var(--live); }
.tier .btn { justify-content: center; }

/* ---------- faq ---------- */

.faq { max-width: 760px; margin: 0 auto; }
.qa { border-bottom: 1px solid var(--line); }
.qa summary { cursor: pointer; padding: 18px 4px; font-size: 16px; color: var(--text); font-family: var(--display); font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+'; color: var(--rec); font-size: 20px; }
.qa[open] summary::after { content: '−'; }
.qa p { padding: 0 4px 20px; color: var(--text-dim); font-size: 14px; }

/* ---------- signup ---------- */

.signup {
  background:
    radial-gradient(700px 380px at 50% -20%, rgba(255, 46, 46, 0.12), transparent 62%),
    var(--panel);
  border: 1px solid var(--line); border-radius: 16px; padding: 52px 32px; text-align: center;
}
.signup h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 780; color: #fff; margin-bottom: 12px; }
.signup p { color: var(--text-dim); max-width: 480px; margin: 0 auto 28px; }
.signup-form { display: flex; gap: 10px; max-width: 560px; margin: 0 auto; flex-wrap: wrap; }
.signup-form input, .signup-form select {
  font-family: var(--mono); font-size: 14px; color: var(--text);
  background: var(--ink); border: 1px solid var(--line); border-radius: 5px; padding: 13px 15px;
}
.signup-form input { flex: 1; min-width: 180px; }
.signup-form input:focus, .signup-form select:focus { outline: none; border-color: var(--amber); }
.signup-msg { margin-top: 16px; font-size: 14px; min-height: 1.4em; }
.signup-msg.ok { color: var(--live); }
.signup-msg.err { color: var(--rec); }
.signup-fine { margin-top: 14px; font-size: 12px; color: var(--text-faint); }

/* ---------- legal pages ---------- */

.legal { max-width: 760px; margin: 0 auto; padding: 60px 0 40px; }
.legal h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 780; color: #fff; margin-bottom: 8px; letter-spacing: -0.01em; }
.legal .updated { color: var(--text-faint); font-size: 13px; margin-bottom: 30px; }
.legal .lead { color: var(--text-dim); font-size: 16px; margin-bottom: 30px; }
.legal h2 { font-family: var(--display); font-size: 20px; font-weight: 700; color: #fff; margin: 34px 0 12px; }
.legal h3 { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--amber); margin: 20px 0 8px; letter-spacing: 0.02em; }
.legal p, .legal li { color: var(--text-dim); font-size: 14.5px; line-height: 1.75; }
.legal p { margin-bottom: 14px; }
.legal ul { margin: 0 0 14px 20px; }
.legal li { margin-bottom: 8px; }
.legal strong { color: var(--text); }
.legal a { color: var(--amber); text-decoration: underline; }
.legal .callout { border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 4px; padding: 14px 18px; margin: 20px 0; color: var(--text-dim); font-size: 13.5px; background: var(--panel); }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--line); padding: 40px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer .brand { opacity: 0.9; }
.footer-links { display: flex; gap: 22px; font-size: 13px; color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 12px; color: var(--text-faint); }
