/* ============================================================
   ZeroXClem — Lead Magnet Site (go.zeroxclem.org)
   Dark premium SaaS aesthetic
   ============================================================ */

:root {
  --bg: #0a0e1a;
  --bg-alt: #0d1224;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-border: rgba(255, 255, 255, 0.09);
  --text: #e6e9f5;
  --text-muted: #9aa3c0;
  --primary: #6d5cff;
  --primary-hover: #7d6eff;
  --accent: #22d3ee;
  --danger: #f87171;
  --success: #34d399;
  --radius: 16px;
  --radius-sm: 10px;
  --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;
}

*, *::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; }

.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 { line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 0.75rem 0 1rem; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
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.1rem; color: var(--text-muted); }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent);
  padding: 0.3rem 0.8rem; border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px; background: rgba(34, 211, 238, 0.07);
}

/* ---------- Urgency bar ---------- */
.urgency-bar {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.55rem 1rem; font-size: 0.88rem; text-align: center;
  background: linear-gradient(90deg, rgba(109, 92, 255, 0.18), rgba(34, 211, 238, 0.14));
  border-bottom: 1px solid var(--surface-border);
  color: var(--text-muted);
}
.urgency-bar strong { color: var(--accent); }
.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(10, 14, 26, 0.75);
  border-bottom: 1px solid var(--surface-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-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: 700; font-size: 0.95rem;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  padding: 0.7rem 1.4rem; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none !important;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 8px 28px rgba(109, 92, 255, 0.4);
}
.btn-primary:hover { box-shadow: 0 12px 34px rgba(109, 92, 255, 0.55); transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--surface-border);
}
.btn-outline:hover { border-color: var(--primary); background: rgba(109, 92, 255, 0.08); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: 0.45rem 0.95rem; font-size: 0.85rem; }
.btn-lg { padding: 0.95rem 1.9rem; font-size: 1.05rem; }
.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(3rem, 7vw, 6rem) 0 clamp(3.5rem, 7vw, 6rem); overflow: hidden; }
.hero-glow {
  position: absolute; border-radius: 50%; filter: blur(120px);
  pointer-events: none; opacity: 0.5;
}
.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.22); bottom: -200px; right: -100px; }

.hero-grid {
  position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}

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

/* ---------- Capture form ---------- */
.capture-form {
  background: var(--surface); border: 1px solid var(--surface-border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  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-muted); 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(10, 14, 26, 0.6); border: 1px solid var(--surface-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='%239aa3c0' 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-muted); margin-top: 0.8rem; text-align: center; }
.form-note.is-error { color: var(--danger); }
.form-note.is-success { color: var(--success); }

/* ---------- 3D CSS book ---------- */
.hero-visual { display: flex; justify-content: center; }
.book-scene { position: relative; perspective: 1200px; padding: 2rem 0 3rem; }
.book {
  position: relative; width: 280px; height: 380px;
  transform-style: preserve-3d;
  transform: rotateY(-24deg) rotateX(6deg);
  animation: bookFloat 6s ease-in-out infinite;
}
@keyframes bookFloat {
  0%, 100% { transform: rotateY(-24deg) rotateX(6deg) translateY(0); }
  50% { transform: rotateY(-20deg) rotateX(4deg) translateY(-14px); }
}
.book-cover {
  position: absolute; inset: 0; border-radius: 6px 14px 14px 6px;
  background: linear-gradient(145deg, #151b36 0%, #0d1224 55%, #131a38 100%);
  border: 1px solid rgba(109, 92, 255, 0.45);
  box-shadow: inset 0 0 60px rgba(109, 92, 255, 0.15), var(--shadow);
  padding: 1.8rem 1.6rem; display: flex; flex-direction: column;
  transform: translateZ(14px);
}
.book-spine {
  position: absolute; left: -14px; top: 0; width: 28px; height: 100%;
  background: linear-gradient(90deg, #090c18, #1a2140);
  transform: rotateY(90deg) translateZ(0);
  transform-origin: right center; border-radius: 3px 0 0 3px;
}
.book-pages {
  position: absolute; right: -9px; top: 4px; width: 18px; height: calc(100% - 8px);
  background: repeating-linear-gradient(90deg, #d8dcf0 0 2px, #b9bedb 2px 4px);
  transform: rotateY(90deg) translateZ(0); transform-origin: left center;
  border-radius: 0 3px 3px 0;
}
.book-badge {
  align-self: flex-start; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em;
  background: var(--grad); color: #fff; padding: 0.25rem 0.7rem; border-radius: 999px;
}
.book-brand { margin-top: 1.1rem; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; }
.book-title { font-size: 1.9rem; font-weight: 900; line-height: 1.1; margin-top: 0.3rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.book-sub { margin-top: 0.7rem; font-size: 0.85rem; color: var(--text-muted); }
.book-lines { margin-top: auto; display: grid; gap: 0.5rem; }
.book-lines span { display: block; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.09); }
.book-lines span:nth-child(2) { width: 82%; }
.book-lines span:nth-child(3) { width: 68%; }
.book-lines span:nth-child(4) { width: 90%; }
.book-lines span:nth-child(5) { width: 55%; }
.book-score { position: absolute; bottom: 1.4rem; right: 1.2rem; display: flex; align-items: center; gap: 0.5rem; font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.book-shadow {
  position: absolute; bottom: 0.2rem; left: 8%; width: 84%; height: 26px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.55), transparent 70%);
  filter: blur(6px);
}
.float-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.8rem; font-weight: 700; color: var(--text);
  background: rgba(13, 18, 36, 0.9); border: 1px solid var(--surface-border);
  border-radius: 999px; padding: 0.5rem 0.9rem; box-shadow: var(--shadow);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.chip-1 { top: 0; right: -8%; color: var(--accent); animation: chipFloat 5s ease-in-out infinite; }
.chip-2 { bottom: 2rem; left: -10%; color: #b7aaff; animation: chipFloat 5s ease-in-out 1.2s infinite; }
@keyframes chipFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--surface-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-muted); }

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

.glass-card {
  background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: var(--radius); padding: 1.6rem;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.glass-card:hover { transform: translateY(-4px); border-color: rgba(109, 92, 255, 0.4); }
.card-icon {
  display: inline-flex; padding: 0.7rem; border-radius: var(--radius-sm);
  background: rgba(109, 92, 255, 0.14); 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: linear-gradient(150deg, rgba(109, 92, 255, 0.16), rgba(34, 211, 238, 0.08)); border-color: rgba(109, 92, 255, 0.45); }
.glass-card--cta p { color: var(--text-muted); font-size: 0.95rem; }

.check-list { list-style: none; display: grid; gap: 0.5rem; font-size: 0.92rem; color: var(--text-muted); }
.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.98rem; font-style: italic; color: var(--text); }
.quote-card footer { display: flex; flex-direction: column; font-size: 0.85rem; color: var(--text-muted); }
.quote-card footer strong { color: var(--text); }
.stars { color: #fbbf24; 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(--surface-border); border-radius: var(--radius);
  padding: 1.6rem 1rem; background: var(--surface);
}
.stat strong { display: block; font-size: 2rem; font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat span { font-size: 0.82rem; color: var(--text-muted); }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 0.8rem; }
.faq-item {
  background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.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: 700; 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-muted); 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: linear-gradient(150deg, rgba(109, 92, 255, 0.18), rgba(34, 211, 238, 0.08));
  border-color: rgba(109, 92, 255, 0.4);
}
.final-card h2 { margin-bottom: 0.6rem; }
.final-card p { color: var(--text-muted); margin-bottom: 1.6rem; }

/* ---------- Thank-you page ---------- */
.ty-hero { position: relative; overflow: hidden; text-align: center; }
.ty-inner { position: relative; }
.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; counter-reset: steps; }
.steps-list li { display: flex; gap: 1.1rem; align-items: flex-start; }
.step-num {
  flex-shrink: 0; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 1.05rem;
}
.steps-list h3 { margin-bottom: 0.3rem; }
.steps-list p { color: var(--text-muted); font-size: 0.93rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--surface-border); background: #080b14; padding-top: 2.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; }
.footer-grid h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 0.7rem; }
.footer-grid a, .footer-grid span { display: block; color: var(--text-muted); font-size: 0.92rem; margin-bottom: 0.4rem; }
.footer-grid a:hover { color: var(--accent); }
.footer-tag { margin-top: 0.8rem; color: var(--text-muted); 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(--surface-border);
  font-size: 0.8rem; color: var(--text-muted);
}

/* ---------- 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: #10162c; animation: modalIn 0.25s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.exit-card h2 { font-size: 1.5rem; margin: 0.7rem 0 0.5rem; }
.exit-card p { color: var(--text-muted); 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-muted); 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(10, 14, 26, 0.6); border: 1px solid var(--surface-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(24px); 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; }
  .book, .chip-1, .chip-2 { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .book { width: 230px; height: 315px; }
  .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; }
  .exit-form-row { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .urgency-bar { font-size: 0.8rem; }
  .chip-1 { right: 0; }
  .chip-2 { left: 0; }
}
