/* ShelfWolf — design tokens + global styles */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&family=Instrument+Serif:ital@0;1&display=swap');

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

:root {
  --bg-deep:   #0a0a0f;
  --bg-card:   #111118;
  --bg-card2:  #16161f;
  --accent:    #c084fc;
  --accent-glow: #a855f7;
  --accent-soft: rgba(192, 132, 252, 0.12);
  --accent-border: rgba(192, 132, 252, 0.25);
  --text:      #e4e4ec;
  --text-dim:  #8888a0;
  --text-bright: #f4f4ff;
  --border:    rgba(255,255,255,0.06);
  --amber:     #f59e0b;
  --red:       #ef4444;
  --green:     #10b981;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Noise texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-bright);
  line-height: 1.15;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text-bright); }

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo .wolf-icon { font-size: 1.4rem; }
.nav-logo span { color: var(--accent); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  color: var(--accent);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.nav-cta:hover {
  background: rgba(192, 132, 252, 0.2);
  border-color: var(--accent);
  color: var(--text-bright);
}

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, rgba(168, 85, 247, 0.03) 40%, transparent 70%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 760px; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-eyebrow::before { content: '🐺'; font-size: 0.9rem; }

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.hero h1 em {
  font-style: italic;
  font-family: 'Instrument Serif', serif;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 auto 40px;
  font-weight: 300;
  line-height: 1.7;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent-glow);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
}
.btn-primary:hover {
  background: #9333ea;
  box-shadow: 0 0 50px rgba(168, 85, 247, 0.6);
  transform: translateY(-1px);
  color: #fff;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: transparent;
  color: var(--text-dim);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-ghost:hover { color: var(--text-bright); border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.03); }

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.stat-item { text-align: center; }
.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-bright);
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* ── HOW IT WORKS ── */
.how-section {
  padding: 100px 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 56px;
  letter-spacing: -0.02em;
}
.section-title span { color: var(--text-dim); font-weight: 400; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.step-card {
  background: var(--bg-card);
  padding: 36px 32px;
  position: relative;
}
.step-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-soft);
  line-height: 1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--accent) 0%, transparent 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.step-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.step-card p { font-size: 0.9rem; color: var(--text-dim); line-height: 1.6; }

/* ── QUIZ SECTION ── */
.quiz-section {
  padding: 80px 24px 120px;
  position: relative;
}
.quiz-section::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(168, 85, 247, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.quiz-container {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.quiz-header { text-align: center; margin-bottom: 48px; }
.quiz-header h2 { font-size: 2rem; margin-bottom: 12px; }
.quiz-header p { color: var(--text-dim); font-size: 0.95rem; }

.quiz-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 3px;
  background: var(--border);
  position: relative;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-glow), var(--accent));
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-step {
  padding: 40px;
  display: none;
}
.quiz-step.active { display: block; }

.quiz-step-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 10px;
}
.quiz-step h3 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}
.quiz-step > p {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 28px;
}

/* Book inputs */
.book-inputs { display: flex; flex-direction: column; gap: 10px; }

.book-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.book-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

.quiz-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-bright);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}
.quiz-input::placeholder { color: var(--text-dim); }
.quiz-input:focus {
  border-color: var(--accent-border);
  background: rgba(192, 132, 252, 0.05);
}

/* Trope chips */
.trope-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trope-chip {
  padding: 9px 16px;
  border-radius: 100px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  user-select: none;
}
.trope-chip:hover {
  border-color: var(--accent-border);
  color: var(--text);
  background: var(--accent-soft);
}
.trope-chip.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* Heat level */
.heat-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.heat-option {
  padding: 20px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  cursor: pointer;
  text-align: center;
  transition: all 0.18s;
}
.heat-option:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}
.heat-option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.heat-icon { font-size: 1.8rem; margin-bottom: 8px; }
.heat-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 4px;
}
.heat-desc { font-size: 0.75rem; color: var(--text-dim); }

/* Email step */
.email-step-content { display: flex; flex-direction: column; gap: 16px; }

.email-input-wrap {
  display: flex;
  gap: 10px;
}
.email-input-wrap .quiz-input { flex: 1; }

/* Quiz nav */
.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.quiz-nav .step-indicator {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.btn-next, .btn-back, .btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 9px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  border: none;
}
.btn-next, .btn-submit {
  background: var(--accent-glow);
  color: #fff;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}
.btn-next:hover, .btn-submit:hover {
  background: #9333ea;
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
}
.btn-next:disabled, .btn-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}
.btn-back {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.btn-back:hover { color: var(--text); border-color: rgba(255,255,255,0.15); }

/* ── RESULTS ── */
.results-section {
  padding: 100px 24px 120px;
  max-width: 820px;
  margin: 0 auto;
}
.results-header {
  text-align: center;
  margin-bottom: 56px;
}
.results-header h2 { font-size: 2.2rem; margin-bottom: 12px; }
.results-header p { color: var(--text-dim); }

.book-card {
  display: flex;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 16px;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.book-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.book-card:hover { border-color: var(--accent-border); transform: translateY(-2px); }
.book-card:hover::before { opacity: 1; }

.book-rank {
  position: absolute;
  top: 16px; right: 20px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  padding: 2px 10px;
}

.book-cover {
  width: 90px;
  height: 130px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-card2);
  border: 1px solid var(--border);
}

.book-cover-placeholder {
  width: 90px;
  height: 130px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--bg-card2), var(--accent-soft));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.book-info { flex: 1; min-width: 0; }
.book-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-bright);
}
.book-author {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 12px;
  font-style: italic;
  font-family: 'Instrument Serif', serif;
}
.book-why {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 16px;
}
.book-tropes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.trope-tag {
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  font-size: 0.73rem;
  color: var(--text-dim);
}
.book-links { display: flex; gap: 10px; flex-wrap: wrap; }
.book-link {
  padding: 7px 16px;
  border-radius: 7px;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: all 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.book-link:hover {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-soft);
}

/* Email capture on results */
.results-email-capture {
  margin-top: 48px;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card2));
  border: 1px solid var(--accent-border);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
}
.results-email-capture h3 { font-size: 1.4rem; margin-bottom: 10px; }
.results-email-capture p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 24px; }
.capture-form {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}
.capture-form .quiz-input { flex: 1; }

/* ── LOADING STATE ── */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(8px);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.loading-overlay.active { display: flex; }
.loading-wolf { font-size: 4rem; animation: wolfPulse 1.5s ease-in-out infinite; }
@keyframes wolfPulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.15); opacity: 0.7; } }
.loading-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  color: var(--text-bright);
}
.loading-sub { font-size: 0.85rem; color: var(--text-dim); }
.loading-dots span {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin: 0 3px;
  animation: dotBounce 1.4s infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce { 0%,80%,100% { transform: translateY(0); } 40% { transform: translateY(-8px); } }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text);
  z-index: 300;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.toast.success { border-color: var(--green); }
.toast.error   { border-color: var(--red); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ── PRICING PAGE ── */
.nav-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  color: var(--text-dim);
  transition: color 0.2s;
}
.nav-link:hover { color: var(--text); }

.pricing-card {
  flex: 1;
  min-width: 280px;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.pricing-card--featured {
  border-color: var(--accent-border);
  box-shadow: 0 0 60px rgba(168, 85, 247, 0.15);
}
.pricing-badge {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--accent-glow);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
}
.pricing-header {
  padding: 36px 24px 24px;
  border-bottom: 1px solid var(--border);
}
.pricing-features {
  list-style: none;
  padding: 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-item {
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
}
.feature-item.included { color: var(--text); }
.feature-icon { width: 18px; text-align: center; flex-shrink: 0; }
.feature-item.included .feature-icon { color: var(--green); }
.feature-item.excluded .feature-icon { color: var(--text-dim); }

/* ── FAQ ── */
.faq-item {
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 28px;
}
.faq-q {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-bright);
  margin-bottom: 8px;
}
.faq-a {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ── PREMIUM CTA (results page) ── */
.premium-cta {
  margin: 40px 0;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card2));
  border: 1px solid var(--accent-border);
  border-radius: 20px;
  padding: 32px;
}
.premium-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.premium-cta h3 { font-size: 1.1rem; margin-bottom: 6px; }
@media (max-width: 768px) {
  .nav { padding: 16px 20px; }
  .hero { padding: 100px 20px 60px; }
  .steps-grid { grid-template-columns: 1fr; }
  .heat-options { grid-template-columns: 1fr; }
  .book-card { flex-direction: column; }
  .book-cover, .book-cover-placeholder { width: 100%; height: 180px; }
  .capture-form { flex-direction: column; }
  .quiz-step { padding: 28px 24px; }
  .hero-stats { gap: 20px; }
  footer { flex-direction: column; gap: 8px; text-align: center; }
  .email-input-wrap { flex-direction: column; }
}
