/* ==========================================================================
   Numerologist Guide — Design System
   Premium editorial + modern SaaS + restrained cosmic accent
   ========================================================================== */

:root {
  /* Palette — deep midnight base, indigo, restrained gold accent */
  --ink-950: #0b0a17;
  --ink-900: #12102420;
  --ink-900-solid: #121024;
  --ink-800: #1b1830;
  --ink-700: #262140;
  --ink-600: #3a3358;
  --surface: #ffffff;
  --surface-alt: #f7f5fb;
  --surface-card: #ffffff;
  --border-soft: #e7e3f0;

  --violet-600: #6a3fd1;
  --violet-500: #7c4fe0;
  --violet-400: #9b74ea;
  --magenta-500: #b23fb0;
  --gold-500: #c8973a;
  --gold-400: #dcae54;

  --text-primary: #1b1830;
  --text-secondary: #4a4560;
  --text-muted: #726c8c;
  --text-on-dark: #f3f1fa;
  --text-on-dark-muted: #b8b2d4;

  --success: #2f8f5b;
  --warn: #b3691a;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 4px 24px rgba(18, 16, 36, 0.08);
  --shadow-card-hover: 0 12px 40px rgba(18, 16, 36, 0.14);
  --shadow-dark: 0 20px 60px rgba(0, 0, 0, 0.35);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--surface);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--violet-600); text-decoration: none; }
a:hover { color: var(--magenta-500); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
h4 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 700; }
p { margin: 0 0 1.1em; color: var(--text-secondary); }
.lede { font-size: 1.15rem; color: var(--text-secondary); }

ul, ol { color: var(--text-secondary); padding-left: 1.3em; }
li { margin-bottom: 0.5em; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 72px 0; }
section.tight { padding: 48px 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--violet-600), var(--magenta-500));
  color: #fff;
  box-shadow: 0 10px 30px rgba(106, 63, 209, 0.35);
}
.btn-primary:hover { color: #fff; box-shadow: 0 14px 36px rgba(106, 63, 209, 0.45); }
.btn-secondary {
  background: transparent;
  color: var(--text-on-dark);
  border-color: rgba(255,255,255,0.35);
}
.btn-secondary:hover { color: #fff; border-color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--violet-600);
  border-color: var(--violet-600);
}
.btn-outline:hover { background: var(--violet-600); color: #fff; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 10px 20px; font-size: 0.88rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 10, 23, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 34px; width: auto; filter: brightness(0) invert(1); }
.brand-text {
  font-family: var(--font-display);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand-text .accent { color: var(--gold-400); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-on-dark-muted);
  font-size: 0.92rem;
  font-weight: 600;
}
.nav-links a:hover { color: #fff; }
.nav-links .has-dropdown { position: relative; }
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: -16px;
  background: var(--ink-900-solid);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 10px;
  min-width: 240px;
  box-shadow: var(--shadow-dark);
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { display: block; }
.dropdown a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  font-weight: 500;
  color: var(--text-on-dark-muted);
}
.dropdown a:hover { background: rgba(255,255,255,0.06); color: #fff; }

.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(124, 79, 224, 0.35), transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(178, 63, 176, 0.28), transparent 55%),
    linear-gradient(180deg, var(--ink-950), var(--ink-900-solid));
  color: var(--text-on-dark);
  padding: 96px 0 88px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.35;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { color: #fff; }
.hero .lede { color: var(--text-on-dark-muted); font-size: 1.18rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero-trust {
  display: flex;
  gap: 22px;
  margin-top: 34px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-on-dark-muted);
}
.hero-trust span { display: flex; align-items: center; gap: 8px; }
.hero-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow-dark);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }

.page-hero {
  background: linear-gradient(180deg, var(--ink-950), var(--ink-900-solid));
  color: var(--text-on-dark);
  padding: 68px 0 56px;
}
.page-hero h1 { color: #fff; margin-bottom: 0.4em; }
.page-hero .lede { color: var(--text-on-dark-muted); max-width: 760px; }
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-on-dark-muted);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--text-on-dark-muted); }
.breadcrumb a:hover { color: #fff; }

/* ---------- Sections / Cards ---------- */
.section-head { max-width: 720px; margin-bottom: 46px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover h3 { color: var(--violet-600); }
.card h3 { margin-bottom: 0.5em; }
.card .num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet-600), var(--magenta-500));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.section-alt { background: var(--surface-alt); }
.section-dark {
  background: linear-gradient(180deg, var(--ink-900-solid), var(--ink-950));
  color: var(--text-on-dark);
}
.section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-dark p, .section-dark li { color: var(--text-on-dark-muted); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { text-align: left; padding: 26px 22px; background: var(--surface-card); border: 1px solid var(--border-soft); border-radius: var(--radius-md); position: relative; }
.step .step-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--violet-500);
  opacity: 0.5;
  margin-bottom: 8px;
}
.step-arrow { display: none; }
@media (min-width: 900px) {
  .steps { position: relative; }
}

/* Table */
.table-wrap { overflow-x: auto; margin: 24px 0; }
table { width: 100%; border-collapse: collapse; min-width: 520px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border-soft); font-size: 0.95rem; }
th { background: var(--surface-alt); font-family: var(--font-body); font-weight: 700; color: var(--text-primary); }
td { color: var(--text-secondary); }

/* Pros/cons */
.pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pc-card { border-radius: var(--radius-md); padding: 28px; }
.pc-card.pros { background: #f0f8f3; border: 1px solid #cfe9d8; }
.pc-card.cons { background: #fbf1ee; border: 1px solid #f0d6cc; }
.pc-card h4 { display: flex; align-items: center; gap: 8px; }
.pc-card ul { list-style: none; padding: 0; margin: 0; }
.pc-card li { padding-left: 26px; position: relative; color: var(--text-secondary); }
.pc-card.pros li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.pc-card.cons li::before { content: "–"; position: absolute; left: 0; color: var(--warn); font-weight: 700; }

/* Callouts */
.callout {
  border-left: 4px solid var(--gold-500);
  background: var(--surface-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin: 28px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout.warn { border-left-color: var(--warn); }
.callout strong { color: var(--text-primary); }

.answer-block {
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  margin: 18px 0 26px;
}
.answer-block .label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet-600);
  margin-bottom: 8px;
  display: block;
}
.answer-block p:last-child { margin-bottom: 0; }

/* FAQ accordion */
.accordion { border-top: 1px solid var(--border-soft); }
.accordion-item { border-bottom: 1px solid var(--border-soft); }
.accordion-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 4px;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.accordion-trigger .icon { font-size: 1.2rem; color: var(--violet-500); transition: transform .2s ease; flex-shrink: 0; }
.accordion-item.open .accordion-trigger .icon { transform: rotate(45deg); }
.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.accordion-panel-inner { padding: 0 4px 20px; }
.accordion-item.open .accordion-panel { max-height: 800px; }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--ink-950), var(--violet-700, #2a1f52));
  background: radial-gradient(ellipse at top left, rgba(124,79,224,0.5), transparent 60%), var(--ink-950);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--text-on-dark-muted); max-width: 640px; margin-left: auto; margin-right: auto; }

/* Author / review meta bar */
.meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 14px 0;
  margin: 28px 0 36px;
}

/* Verdict score card */
.verdict-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-card);
  margin: 30px 0;
}
.verdict-score {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--violet-600);
  flex-shrink: 0;
}
.verdict-score small { font-size: 1rem; color: var(--text-muted); font-family: var(--font-body); }

/* Toc */
.toc {
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin: 30px 0;
}
.toc .eyebrow { margin-bottom: 10px; }
.toc ul { columns: 2; margin: 0; padding-left: 1.1em; }
.toc li { margin-bottom: 6px; font-size: 0.94rem; }

/* Related links grid */
.related-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.related-links a {
  display: block;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s ease, transform .2s ease;
}
.related-links a:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.related-links .rl-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 8px;
}
.related-links strong { display: block; font-family: var(--font-display); font-size: 1.08rem; color: var(--text-primary); margin-bottom: 6px; }
.related-links .desc { display: block; font-size: 0.9rem; color: var(--text-muted); }
@media (max-width: 900px) { .related-links { grid-template-columns: 1fr; } }

/* Green/caution flag lists */
.flag-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.flag-card { border-radius: var(--radius-md); padding: 26px; }
.flag-card.good { background: #f0f8f3; border: 1px solid #cfe9d8; }
.flag-card.caution { background: #fbf1ee; border: 1px solid #f0d6cc; }
.flag-card ul { list-style: none; padding: 0; margin: 0; }
.flag-card li { padding-left: 26px; position: relative; }
.flag-card.good li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.flag-card.caution li::before { content: "!"; position: absolute; left: 0; color: var(--warn); font-weight: 700; }
@media (max-width: 760px) { .flag-grid { grid-template-columns: 1fr; } }

/* 404 */
.error-code { font-family: var(--font-display); font-size: 4rem; font-weight: 700; color: var(--violet-500); margin: 0; opacity: 0.6; }

/* Footer */
.site-footer {
  background: var(--ink-950);
  color: var(--text-on-dark-muted);
  padding: 60px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand img { height: 30px; filter: brightness(0) invert(1); margin-bottom: 14px; }
.footer-brand p { color: var(--text-on-dark-muted); font-size: 0.9rem; max-width: 300px; }
.footer-col h5 {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text-on-dark-muted); font-size: 0.92rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 22px;
  font-size: 0.82rem;
}
.footer-social { display: flex; gap: 14px; }
.footer-social a {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 0.9rem;
}
.footer-social a:hover { background: var(--violet-600); }
.footer-disclosure {
  font-size: 0.78rem;
  color: var(--text-on-dark-muted);
  opacity: 0.8;
  max-width: 900px;
  margin-top: 10px;
  line-height: 1.6;
}

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.small { font-size: 0.85rem; color: var(--text-muted); }
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(106,63,209,0.1);
  color: var(--violet-600);
}

/* Citations / footnotes */
sup a {
  font-size: 0.7em;
  font-weight: 700;
  color: var(--violet-600);
  text-decoration: none;
  padding: 0 2px;
}
sup a:hover { color: var(--magenta-500); text-decoration: underline; }

/* Legal pages */
.legal-body h2 { margin-top: 1.6em; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body ul { color: var(--text-secondary); }
.legal-updated { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 2em; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-height: 320px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-links, .nav-cta .btn-outline-hide { display: none; }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  body.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--ink-900-solid);
    padding: 20px 24px 26px;
    gap: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  body.nav-open .nav-cta {
    display: flex;
    position: absolute;
    top: calc(100% + 210px);
    left: 0; right: 0;
    background: var(--ink-900-solid);
    padding: 0 24px 24px;
  }
  .dropdown { position: static; box-shadow: none; border: none; padding-left: 10px; }
  section { padding: 52px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .toc ul { columns: 1; }
  .cta-band { padding: 36px 22px; }
  .verdict-card { flex-direction: column; text-align: center; }
}
