/* ==========================================================================
   Saturn Return Calculator — Dark Celestial Premium
   Design system: deep-space surfaces, antique-gold accents, display serif.
   No frameworks. Mobile-first.
   ========================================================================== */

:root {
  --bg-deep: #070912;
  --bg-space: #0b0e1c;
  --bg-panel: #12162b;
  --bg-panel-2: #171c36;
  --line: rgba(212, 169, 78, 0.18);
  --line-soft: rgba(230, 226, 216, 0.08);
  --gold: #d4a94e;
  --gold-bright: #e9c97b;
  --gold-dim: #9a7c3c;
  --ink: #ece8dd;
  --ink-muted: #a9a5b4;
  --ink-faint: #7d7990;
  --good: #7fc98f;
  --accent-glow: rgba(212, 169, 78, 0.12);
  --serif: "Fraunces", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 72rem;
  --radius: 14px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, #141a38 0%, transparent 60%),
    var(--bg-deep);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
}

#starfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

img { max-width: 100%; height: auto; }

::selection { background: var(--gold-dim); color: var(--bg-deep); }

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.15rem); margin: 3rem 0 1rem; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); margin: 2rem 0 0.75rem; }
h4 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }

p { margin: 0 0 1.15rem; }
p, li { color: var(--ink-muted); }
strong { color: var(--ink); }

a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: #f4dfa4; text-decoration: underline; text-underline-offset: 3px; }

ul, ol { padding-left: 1.4rem; margin: 0 0 1.15rem; }
li { margin-bottom: 0.45rem; }

blockquote {
  border-left: 3px solid var(--gold);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--ink);
}

/* ---------- Layout ---------- */

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.wrap-narrow { max-width: 50rem; margin: 0 auto; padding: 0 1.25rem; }

main { display: block; }

.section { padding: 3rem 0; }

.divider {
  border: none;
  height: 1px;
  margin: 3.5rem auto;
  max-width: var(--maxw);
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 9, 18, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--gold-bright); }
.brand svg { flex: 0 0 auto; }

.site-nav { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink-muted);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--gold-bright); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font-size: 1rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .brand { font-size: 1.02rem; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg-space);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.65rem 0; width: 100%; border-bottom: 1px solid var(--line-soft); }
}

/* ---------- Hero ---------- */

.hero { text-align: center; padding: 4rem 0 2.5rem; position: relative; }

.hero .kicker {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  margin-bottom: 1.5rem;
  background: var(--accent-glow);
}

.hero h1 { margin-bottom: 1rem; }
.hero h1 em { font-style: italic; color: var(--gold-bright); }

.hero .lede {
  max-width: 44rem;
  margin: 0 auto 0.5rem;
  font-size: 1.15rem;
  color: var(--ink-muted);
}

/* ---------- Calculator card ---------- */

.calc-card {
  background: linear-gradient(180deg, var(--bg-panel-2), var(--bg-panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(212,169,78,0.06), 0 0 60px var(--accent-glow);
  padding: 2rem 1.5rem;
  max-width: 46rem;
  margin: 2rem auto 0;
}

@media (min-width: 640px) { .calc-card { padding: 2.5rem 2.75rem; } }

.calc-card h2 { margin: 0 0 1.5rem; font-size: 1.4rem; text-align: center; }

.field-row { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (min-width: 560px) { .field-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; } .field-row.cols-2 { grid-template-columns: 1fr 1fr; } }

.field label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
}

.field select, .field input {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--ink);
  font-size: 1rem;
  padding: 0.8rem 0.9rem;
  font-family: var(--sans);
  appearance: none;
  -webkit-appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select:focus, .field input:focus { outline: none; border-color: var(--gold-dim); box-shadow: 0 0 0 3px rgba(212, 169, 78, 0.15); }

.calc-optional summary {
  cursor: pointer;
  color: var(--ink-faint);
  font-size: 0.9rem;
  margin: 0.25rem 0 1rem;
  list-style: none;
}
.calc-optional summary::before { content: "+ "; color: var(--gold); }
.calc-optional[open] summary::before { content: "− "; }
.calc-optional summary::-webkit-details-marker { display: none; }

.btn-gold {
  display: block;
  width: 100%;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #201803;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 10px;
  padding: 1rem;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 24px rgba(212, 169, 78, 0.25);
  font-family: var(--sans);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(212, 169, 78, 0.35); }
.btn-gold:active { transform: translateY(0); }

.calc-note { text-align: center; font-size: 0.85rem; color: var(--ink-faint); margin: 1rem 0 0; }

/* ---------- Results ---------- */

#results { max-width: 46rem; margin: 0 auto; }
#results[hidden] { display: none; }

.result-natal {
  text-align: center;
  background: linear-gradient(180deg, var(--bg-panel-2), var(--bg-panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  margin: 2.5rem 0 1.5rem;
}
.result-natal .glyph { font-size: 2.2rem; color: var(--gold-bright); line-height: 1; }
.result-natal h3 { margin: 0.75rem 0 0.25rem; font-size: 1.6rem; }
.result-natal .sub { color: var(--ink-muted); font-size: 0.95rem; }

.return-card {
  background: var(--bg-panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  position: relative;
}
.return-card.is-active { border-color: var(--gold); box-shadow: 0 0 40px var(--accent-glow); }

.return-card .rc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.return-card h3 { margin: 0; font-size: 1.25rem; }

.status-pill {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-muted);
  white-space: nowrap;
}
.status-pill.active { color: #1d1503; background: var(--gold); border-color: var(--gold); font-weight: 700; }
.status-pill.complete { color: var(--good); border-color: rgba(127, 201, 143, 0.4); }

.pass-list { list-style: none; padding: 0; margin: 0.75rem 0; }
.pass-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--line-soft);
  color: var(--ink);
  font-size: 0.98rem;
}
.pass-list li:last-child { border-bottom: none; }
.pass-list .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: 0 0 auto; }
.pass-list .rx { color: var(--ink-faint); font-size: 0.8rem; letter-spacing: 0.05em; }

.window-line { font-size: 0.9rem; color: var(--ink-faint); margin: 0.35rem 0 0; }
.window-line b { color: var(--ink-muted); font-weight: 600; }

.result-actions { display: flex; gap: 0.75rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }
.btn-ghost {
  background: none;
  border: 1px solid var(--line);
  color: var(--gold-bright);
  border-radius: 10px;
  padding: 0.65rem 1.3rem;
  font-size: 0.92rem;
  cursor: pointer;
  font-family: var(--sans);
}
.btn-ghost:hover { background: var(--accent-glow); }

/* ---------- Content / article ---------- */

.article { padding: 1rem 0 2rem; }
.article h2 { border-bottom: 1px solid var(--line-soft); padding-bottom: 0.6rem; }
.article .byline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 2rem;
  font-size: 0.9rem;
  color: var(--ink-faint);
}
.article .byline .avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dim), var(--bg-panel-2));
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--bg-deep);
  font-weight: 700;
  flex: 0 0 auto;
}
.article .byline b { color: var(--ink-muted); display: block; }

.callout {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}
.callout p:last-child { margin-bottom: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.table-scroll { overflow-x: auto; margin: 1.5rem 0; }
.table-scroll table { margin: 0; min-width: 540px; }
th, td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line-soft); }
th { color: var(--gold-bright); font-family: var(--serif); font-weight: 600; letter-spacing: 0.03em; }
td { color: var(--ink-muted); }
tbody tr:hover { background: rgba(212, 169, 78, 0.04); }

/* ---------- FAQ ---------- */

.faq h3 { margin: 0; }
.faq details {
  border-bottom: 1px solid var(--line-soft);
  padding: 0.25rem 0;
}
.faq summary {
  cursor: pointer;
  padding: 1rem 2rem 1rem 0;
  font-family: var(--serif);
  font-size: 1.12rem;
  color: var(--ink);
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 1.4rem;
  font-family: var(--sans);
}
.faq details[open] summary::after { content: "−"; }
.faq .faq-a { padding: 0 0 1.25rem; }
.faq .faq-a p:last-child { margin-bottom: 0; }

/* ---------- Hub / spoke cards ---------- */

.spoke-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 2rem 0;
}
@media (min-width: 640px) { .spoke-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .spoke-grid { grid-template-columns: 1fr 1fr 1fr; } }

.spoke-card {
  display: block;
  background: var(--bg-panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.spoke-card:hover { border-color: var(--gold-dim); transform: translateY(-3px); text-decoration: none; }
.spoke-card h3 { margin: 0 0 0.5rem; font-size: 1.15rem; color: var(--gold-bright); }
.spoke-card p { margin: 0; font-size: 0.92rem; color: var(--ink-faint); }

.breadcrumbs { font-size: 0.85rem; color: var(--ink-faint); padding: 1.25rem 0 0; }
.breadcrumbs a { color: var(--ink-faint); }
.breadcrumbs a:hover { color: var(--gold-bright); }
.breadcrumbs span[aria-current] { color: var(--ink-muted); }

/* ---------- Related links ---------- */

.related {
  background: var(--bg-panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 2.5rem 0;
}
.related h2 { margin: 0 0 1rem; font-size: 1.3rem; border: none; padding: 0; }
.related ul { list-style: none; padding: 0; margin: 0; }
.related li { padding: 0.4rem 0; border-bottom: 1px dashed var(--line-soft); }
.related li:last-child { border: none; }
.related li::before { content: "☽ "; color: var(--gold-dim); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line-soft);
  margin-top: 4rem;
  padding: 3rem 0 2.5rem;
  background: rgba(7, 9, 18, 0.6);
}
.footer-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 720px) { .footer-cols { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--gold); margin: 0 0 1rem; }
.site-footer p, .site-footer li { font-size: 0.9rem; color: var(--ink-faint); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a { color: var(--ink-muted); }
.site-footer a:hover { color: var(--gold-bright); }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.82rem;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- Print ---------- */

@media print {
  #starfield, .site-header, .site-footer, .result-actions { display: none; }
  body { background: #fff; color: #111; }
  p, li, td { color: #222; }
}
