/* ============================================================
   ZeroXClem — Lead Magnet Site (go.zeroxclem.org)
   Brand system: docs/DESIGN.md — "make invisible work visible"
   Display: Bricolage Grotesque · Body: Inter · Utility: IBM Plex Mono
   ============================================================ */

:root {
  --bg: #070a14;
  --bg-2: #0c1122;
  --bg-3: #121a36;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --text: #eef1fa;
  --text-dim: #a6adc4;
  --text-faint: #6b7192;
  --violet: #6d5cff;
  --primary: var(--violet);
  --primary-hover: #7d6eff;
  --cyan: #22d3ee;
  --accent: var(--cyan);
  --success: #34d399;
  --amber: #fbbf24;
  --danger: #f87171;
  --radius: 16px;      /* cards */
  --radius-btn: 12px;  /* buttons */
  --radius-sm: 10px;   /* inputs */
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --grad: linear-gradient(120deg, #6d5cff, #22d3ee);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Shared schedule-grid texture (42px calendar cells) */
  --grid-texture:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: inline-block; vertical-align: middle; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(109, 92, 255, 0.45); }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.container { width: min(1140px, 92%); margin-inline: auto; }
.container--narrow { width: min(820px, 92%); }

.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--primary); color: #fff; padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12; font-weight: 700; letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.25rem); font-weight: 800; margin: 0.85rem 0 1rem; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.15rem; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.lede { font-size: 1.08rem; color: var(--text-dim); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono); font-weight: 500; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--accent);
}

/* ---------- Urgency bar ---------- */
.urgency-bar {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.55rem 1rem; text-align: center;
  font-family: var(--font-mono); font-size: 0.78rem;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}
.urgency-bar strong { color: var(--accent); font-weight: 600; }
.urgency-bar .icon { color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 10, 20, 0.78);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 0; }
.logo {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--text); font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 600;
}
.logo:hover { text-decoration: none; }
.logo strong { font-weight: 800; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font); font-weight: 600; font-size: 0.95rem;
  border: none; border-radius: var(--radius-btn); cursor: pointer;
  padding: 0.7rem 1.4rem;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  text-decoration: none !important;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 8px 28px rgba(109, 92, 255, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary); background: rgba(109, 92, 255, 0.08); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid transparent; }
.btn-ghost:hover { color: var(--text); border-color: var(--border); }
.btn-sm { padding: 0.45rem 0.95rem; font-size: 0.85rem; }
.btn-lg { padding: 0.95rem 1.9rem; font-size: 1.02rem; }
.btn-block { width: 100%; }

.btn-spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
.btn.is-loading .btn-spinner { display: inline-block; }
.btn.is-loading .btn-label { opacity: 0.75; }
.btn.is-loading { pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(2.6rem, 6vw, 5rem) 0 clamp(3.5rem, 7vw, 6rem); overflow: hidden; }
.hero::before, .ty-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image: var(--grid-texture);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 40% 0%, #000 35%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 70% at 40% 0%, #000 35%, transparent 78%);
  pointer-events: none;
}
.hero-glow {
  position: absolute; z-index: 0; border-radius: 50%; filter: blur(120px);
  pointer-events: none; opacity: 0.35;
}
.hero-glow--violet { width: 560px; height: 560px; background: rgba(109, 92, 255, 0.35); top: -180px; left: -120px; }
.hero-glow--cyan { width: 480px; height: 480px; background: rgba(34, 211, 238, 0.2); bottom: -200px; right: -100px; }

.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.12fr 0.88fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
}

.benefit-list { list-style: none; margin: 1.3rem 0 1.7rem; display: grid; gap: 0.6rem; }
.benefit-list li { display: flex; align-items: flex-start; gap: 0.6rem; color: var(--text); font-size: 0.96rem; }
.icon-check { color: var(--accent); margin-top: 0.2em; }

/* ---------- Capture form ---------- */
.capture-form {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin-bottom: 0.9rem; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-dim); margin-bottom: 0.35rem; }
.optional { font-weight: 400; opacity: 0.7; }
.field input, .field select {
  width: 100%; font-family: var(--font); font-size: 0.95rem; color: var(--text);
  background: rgba(7, 10, 20, 0.6); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.7rem 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a6adc4' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.9rem center;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(109, 92, 255, 0.25);
}
.field input.is-invalid, .field select.is-invalid { border-color: var(--danger); }
.field-error { display: block; font-size: 0.78rem; color: var(--danger); min-height: 1.1em; margin-top: 0.25rem; }
.hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; width: 0; }
.form-note { font-size: 0.8rem; color: var(--text-dim); margin-top: 0.8rem; text-align: center; }
.form-note.is-error { color: var(--danger); }
.form-note.is-success { color: var(--success); }

/* ============================================================
   Signature: sample audit scorecard (console-flavored panel)
   ============================================================ */
.hero-visual { display: flex; justify-content: center; align-self: center; }
.scorecard {
  width: min(440px, 100%);
  background-color: var(--bg-3);
  background-image: var(--grid-texture);
  background-size: 42px 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.scorecard-head {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.scorecard-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--success);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.8);
}
.scorecard-title { color: var(--accent); font-weight: 600; }
.scorecard-meta { margin-left: auto; color: var(--text-faint); letter-spacing: 0.04em; }
.scorecard-findings {
  list-style: none;
  padding: 1.05rem 1.1rem 0.35rem;
  display: grid; gap: 0.72rem;
  font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.5;
}
.finding { display: flex; align-items: baseline; gap: 0.55rem; color: var(--text-dim); }
.finding-dot { color: var(--accent); font-size: 0.7em; flex-shrink: 0; }
.finding strong { color: var(--text); font-weight: 500; }
.scorecard-score {
  display: flex; align-items: center; gap: 1.1rem;
  margin-top: 0.7rem; padding: 1rem 1.1rem 1.15rem;
  border-top: 1px dashed var(--border);
}
.score-readout { font-family: var(--font-mono); line-height: 1; white-space: nowrap; }
.score-num { font-size: 2.7rem; font-weight: 600; color: var(--text); }
.score-denom { font-size: 1.05rem; color: var(--text-faint); }
.score-band { flex: 1; min-width: 0; display: grid; gap: 0.35rem; font-family: var(--font-mono); }
.score-band-label {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--accent);
}
.score-meter {
  height: 4px; border-radius: 999px; overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}
.score-meter span { display: block; height: 100%; border-radius: 999px; background: var(--violet); }
.score-band-note { font-size: 0.7rem; color: var(--text-faint); }

/* Sequential fade-in — static under reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .finding, .scorecard-score { animation: lineIn 0.5s ease backwards; }
  .finding:nth-child(1) { animation-delay: 0.2s; }
  .finding:nth-child(2) { animation-delay: 0.4s; }
  .finding:nth-child(3) { animation-delay: 0.6s; }
  .finding:nth-child(4) { animation-delay: 0.8s; }
  .finding:nth-child(5) { animation-delay: 1s; }
  .scorecard-score { animation-delay: 1.25s; }
}
@keyframes lineIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--border); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(2rem, 5vw, 3.5rem); }
.section-head h2 { margin: 0.75rem 0 0.6rem; }
.section-head p { color: var(--text-dim); }

.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* Cards: flat surface + hairline. Hover: warm border + cyan edge, -2px max. */
.glass-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}
.glass-card::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px;
  border-radius: 2px; background: var(--cyan);
  transform: scaleY(0); transform-origin: top;
  transition: transform 0.25s ease;
}
.glass-card:hover { transform: translateY(-2px); border-color: rgba(109, 92, 255, 0.5); }
.glass-card:hover::before { transform: scaleY(1); }
.card-icon {
  display: inline-flex; padding: 0.7rem; border-radius: var(--radius-sm);
  background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34, 211, 238, 0.18);
  color: var(--accent); margin-bottom: 1rem;
}
.card-icon .icon { width: 1.5em; height: 1.5em; }
.glass-card h3 { margin-bottom: 0.8rem; }
.glass-card--cta {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 0.8rem;
  background: rgba(109, 92, 255, 0.08); border-color: rgba(109, 92, 255, 0.4);
}
.glass-card--cta p { color: var(--text-dim); font-size: 0.95rem; }

.check-list { list-style: none; display: grid; gap: 0.5rem; font-size: 0.92rem; color: var(--text-dim); }
.check-list li { padding-left: 1.4rem; position: relative; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 0.42em;
  width: 0.7em; height: 0.7em; border-radius: 2px;
  border: 1.5px solid var(--accent); opacity: 0.8;
}

/* ---------- Social proof ---------- */
.quote-card { display: flex; flex-direction: column; gap: 0.9rem; }
.quote-card p { font-size: 0.97rem; color: var(--text); }
.quote-card footer { display: flex; flex-direction: column; font-size: 0.85rem; color: var(--text-dim); }
.quote-card footer strong { color: var(--text); }
.quote-card footer span { font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-faint); margin-top: 0.15rem; }
.stars { color: var(--amber); letter-spacing: 0.15em; font-size: 0.9rem; }

.stat-strip {
  margin-top: 2.5rem; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem 1rem; background: var(--surface);
}
.stat strong {
  display: block; font-family: var(--font-mono);
  font-size: 1.9rem; font-weight: 600; color: var(--violet);
}
.stat span { font-size: 0.82rem; color: var(--text-dim); }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 0.8rem; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-btn); overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq-item:hover, .faq-item[open] { border-color: rgba(109, 92, 255, 0.5); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 1rem 1.2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-weight: 600; font-size: 0.98rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-chevron {
  width: 10px; height: 10px; flex-shrink: 0;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(45deg); transition: transform 0.2s ease;
}
.faq-item[open] .faq-chevron { transform: rotate(225deg); }
.faq-item p { padding: 0 1.2rem 1.1rem; color: var(--text-dim); font-size: 0.92rem; }

/* ---------- Final CTA ---------- */
.final-cta { padding-bottom: clamp(4rem, 8vw, 6.5rem); }
.final-card {
  text-align: center; padding: clamp(2.2rem, 5vw, 3.5rem);
  background: rgba(109, 92, 255, 0.08);
  border-color: rgba(109, 92, 255, 0.4);
}
.final-card h2 { margin-bottom: 0.6rem; }
.final-card p { color: var(--text-dim); margin-bottom: 1.6rem; }

/* ---------- Thank-you page ---------- */
.ty-hero { position: relative; overflow: hidden; text-align: center; }
.ty-inner { position: relative; z-index: 1; }
.ty-check {
  display: inline-flex; padding: 1rem; border-radius: 50%;
  background: rgba(52, 211, 153, 0.14); color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.4); margin-bottom: 1.2rem;
}
.ty-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; margin: 1.8rem 0 1rem; }
.steps-list { list-style: none; display: grid; gap: 1rem; }
.steps-list li { display: flex; gap: 1.1rem; align-items: flex-start; }
.step-num {
  flex-shrink: 0; width: 2.6rem; height: 2.6rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34, 211, 238, 0.35);
  color: var(--accent); font-family: var(--font-mono); font-weight: 600; font-size: 0.95rem;
}
.steps-list h3 { margin-bottom: 0.3rem; }
.steps-list p { color: var(--text-dim); font-size: 0.93rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding-top: 2.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; }
.footer-grid h4 {
  font-family: var(--font-mono); font-weight: 500; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--text-faint); margin-bottom: 0.7rem;
}
.footer-grid a, .footer-grid span { display: block; color: var(--text-dim); font-size: 0.92rem; margin-bottom: 0.4rem; }
.footer-grid a:hover { color: var(--accent); }
.footer-tag { margin-top: 0.8rem; color: var(--text-dim); font-size: 0.9rem; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: space-between;
  padding-block: 1.1rem; border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-faint);
}

/* ---------- Exit modal ---------- */
.exit-modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.exit-modal[hidden] { display: none; }
.exit-backdrop { position: absolute; inset: 0; background: rgba(5, 7, 14, 0.75); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.exit-card {
  position: relative; width: min(480px, 100%); padding: 2rem;
  box-shadow: var(--shadow); background: var(--bg-3);
}
.exit-card:hover { transform: none; }
.exit-card h2 { font-size: 1.5rem; margin: 0.7rem 0 0.5rem; }
.exit-card p { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 1.2rem; }
.exit-close {
  position: absolute; top: 0.6rem; right: 0.8rem; background: none; border: none;
  color: var(--text-dim); font-size: 1.6rem; cursor: pointer; line-height: 1;
}
.exit-close:hover { color: var(--text); }
.exit-form-row { display: flex; gap: 0.6rem; }
.exit-form-row input {
  flex: 1; min-width: 0; font-family: var(--font); font-size: 0.95rem; color: var(--text);
  background: rgba(7, 10, 20, 0.6); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.7rem 0.9rem;
}
.exit-form-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(109, 92, 255, 0.25); }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .exit-card { animation: none; }
  .glass-card:hover, .btn:hover, .btn-primary:hover, .btn-outline:hover { transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .exit-card { animation: modalIn 0.25s ease; }
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .form-row, .grid-3 { grid-template-columns: 1fr; }
  /* Conversion: surface the form right under the lede on small screens */
  .hero-copy { display: flex; flex-direction: column; }
  .hero-copy .benefit-list { order: 5; margin: 1.5rem 0 0; }
  .exit-form-row { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .urgency-bar { font-size: 0.7rem; }
  .scorecard-meta { display: none; }
}
