:root {
  --bg: #03060d;
  --ink: #fff8ea;
  --muted: rgba(255, 248, 234, .68);
  --soft: rgba(255, 248, 234, .1);
  --line: rgba(239, 202, 126, .18);
  --gold: #f0c86d;
  --gold-2: #b98634;
  --violet: #9b7ad7;
  --panel: rgba(5, 11, 22, .78);
  --panel-2: rgba(11, 19, 35, .88);
  --shadow: 0 28px 90px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Manrope, system-ui, sans-serif;
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.site-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(3, 6, 13, .2), #03060d 80%),
    url("/assets/cosmic-inlay.png") center top / cover no-repeat fixed;
}

.site-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, transparent, rgba(3, 6, 13, .86) 72%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 0 clamp(18px, 4vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(3, 6, 13, .72);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font: 700 25px "Cormorant Garamond", serif;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
}

.desktop-nav {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 4vw, 48px);
}

.desktop-nav a {
  color: rgba(255, 248, 234, .78);
  text-decoration: none;
  font-weight: 600;
}

.top-actions { display: flex; gap: 12px; align-items: center; }

.gold, .ghost, .glass {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.gold {
  color: #160f05;
  background: linear-gradient(135deg, #fff0b8, var(--gold) 45%, var(--gold-2));
  box-shadow: 0 14px 36px rgba(240, 200, 109, .22), inset 0 1px 0 rgba(255,255,255,.7);
}

.gold:hover, .glass:hover, .ghost:hover { transform: translateY(-1px); }
.gold.small { min-height: 42px; padding-inline: 18px; }
.gold.full, .ghost.full { width: 100%; }

.ghost, .glass {
  color: var(--gold);
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--line);
}

.glass { color: var(--ink); }

.hero {
  position: relative;
  min-height: min(820px, calc(100vh - 76px));
  display: grid;
  align-items: center;
  padding: clamp(48px, 7vw, 110px) clamp(18px, 5vw, 84px);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(3, 6, 13, .96) 0%, rgba(3, 6, 13, .72) 35%, rgba(3, 6, 13, .18) 72%),
    linear-gradient(0deg, #03060d 0%, rgba(3, 6, 13, 0) 22%),
    url("/assets/hero-astrologer.png") center right / cover no-repeat;
}

.hero-content {
  max-width: 820px;
  padding-top: 26px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 12px;
  font-weight: 800;
}

h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(56px, 7.2vw, 112px);
  line-height: .88;
  max-width: 860px;
}

.lead {
  max-width: 720px;
  color: rgba(255, 248, 234, .78);
  font-size: clamp(18px, 1.5vw, 23px);
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 34px; }

.hero-panel {
  position: absolute;
  right: clamp(18px, 5vw, 84px);
  bottom: clamp(20px, 5vw, 72px);
  width: min(420px, calc(100% - 36px));
  padding: 24px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(3, 6, 13, 0), rgba(3, 6, 13, .36));
}

.hero-panel span, .hero-panel strong { display: block; }
.hero-panel strong { font-size: 24px; color: var(--gold); margin: 8px 0; }
.hero-panel p { color: var(--muted); line-height: 1.65; margin: 0; }

.section {
  padding: clamp(54px, 7vw, 110px) clamp(18px, 5vw, 84px);
}

.section-head {
  max-width: 920px;
  margin-bottom: 34px;
}

.section-head h2, .signup-copy h2, .tool-head h2, .natus h2 {
  margin: 0;
  font-size: clamp(38px, 4.8vw, 72px);
  line-height: .98;
}

.feature-grid, .plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.feature-grid article, .plan, .signup-form, .natus, .login-card, .tool-column {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.feature-grid article {
  min-height: 210px;
  padding: 28px;
  border-radius: 18px;
}

.feature-grid b {
  display: block;
  color: var(--gold);
  font-size: 20px;
  margin-bottom: 16px;
}

.feature-grid p, .signup-copy p, .plan p, .tool-head p, .natus p, .text-output {
  color: var(--muted);
  line-height: 1.75;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, .7fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}

.promise-list {
  display: grid;
  gap: 14px;
  margin-top: 34px;
}

.promise-list span::before { content: "✦"; color: var(--gold); margin-right: 12px; }

.signup-form {
  display: grid;
  gap: 16px;
  padding: 28px;
  border-radius: 22px;
}

label { display: grid; gap: 8px; color: rgba(255, 248, 234, .78); font-weight: 700; }
input, select {
  width: 100%;
  min-height: 50px;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 12px;
  outline: 0;
  padding: 0 14px;
  background: rgba(2, 5, 11, .72);
}

input:focus, select:focus { border-color: rgba(240, 200, 109, .76); }
input::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .75; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.topics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.topics button {
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  padding: 9px 13px;
  font-weight: 700;
}

.topics button.active {
  color: #170f05;
  background: var(--gold);
}

.form-note { margin: 0; color: var(--muted); text-align: center; }
.form-note button { color: var(--gold); border: 0; background: transparent; font-weight: 800; }

.plans {
  background:
    linear-gradient(180deg, rgba(3, 6, 13, .15), rgba(3, 6, 13, .8)),
    url("/assets/chart-ambient.png") center / cover fixed;
}

.plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan {
  position: relative;
  min-height: 450px;
  display: flex;
  flex-direction: column;
  padding: 34px;
  border-radius: 22px;
}

.plan.featured { border-color: rgba(240, 200, 109, .72); background: rgba(17, 23, 38, .88); }
.plan em {
  position: absolute;
  top: 24px;
  right: 24px;
  color: #120d04;
  background: var(--gold);
  border-radius: 999px;
  padding: 7px 12px;
  font-style: normal;
  font-weight: 900;
  font-size: 12px;
}

.plan h3 { margin: 0 0 12px; font-size: 38px; }
.plan strong { display: block; margin: 22px 0; font-size: 42px; }
.plan strong small { font-size: 16px; color: var(--muted); }
.plan ul { display: grid; gap: 12px; padding: 0; margin: 0 0 28px; list-style: none; color: rgba(255, 248, 234, .78); }
.plan li::before { content: "⊙"; color: var(--gold); margin-right: 10px; }
.plan button { margin-top: auto; }

.workspace {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  scroll-margin-top: 84px;
}

.profile-column { display: grid; gap: 16px; position: sticky; top: 92px; }
.natus, .login-card, .tool-column { border-radius: 22px; padding: 26px; }
.natus h2 { color: var(--gold); font-size: 52px; }
.natus strong {
  display: inline-flex;
  margin: 14px 0;
  color: var(--gold);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.zodiac-orb {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  margin: 18px 0;
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 52px;
  background: radial-gradient(circle, rgba(240, 200, 109, .18), transparent 68%);
}

.profile-place { color: var(--muted); line-height: 1.6; }
.login-card form { display: grid; gap: 12px; }

.tool-tabs {
  display: flex;
  gap: 8px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.tool-tabs button {
  color: rgba(255, 248, 234, .78);
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  padding: 10px 16px;
  font-weight: 800;
}

.tool-tabs button.active {
  color: #160f05;
  background: var(--gold);
}

.tool-page { display: none; padding-top: 24px; }
.tool-page.active { display: block; }

.tool-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
  margin-bottom: 22px;
}

.tool-head h2 { font-size: 44px; }
.tool-head p { max-width: 760px; margin-bottom: 0; }

.chart-frame {
  min-height: 420px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
  background: radial-gradient(circle at 50% 50%, rgba(240, 200, 109, .08), transparent 64%);
}

.chart-frame svg {
  display: block;
  width: min(100%, 900px);
  height: auto;
}

.chart-frame span { color: var(--muted); }
.text-output {
  white-space: pre-wrap;
  color: rgba(255, 248, 234, .86);
  font-size: 18px;
  min-height: 190px;
}

.forecast-controls, .compat-inputs {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.forecast-controls { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.compat-inputs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.compat-inputs label { min-width: 0; }

.hidden { display: none !important; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 40;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  max-width: min(520px, calc(100% - 32px));
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(4, 8, 15, .94);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1180px) {
  .desktop-nav { display: none; }
  .feature-grid, .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .workspace { grid-template-columns: 1fr; }
  .profile-column { position: static; }
  .compat-inputs, .forecast-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .topbar { grid-template-columns: 1fr auto; height: auto; min-height: 68px; padding: 12px 16px; }
  .top-actions .ghost, .desktop-nav { display: none; }
  .brand { font-size: 22px; }
  .hero { min-height: 700px; align-items: end; }
  .hero-media { background-position: 62% center; }
  .hero-panel { position: static; width: auto; margin-top: 36px; padding-inline: 0; }
  .feature-grid, .plan-grid, .two, .forecast-controls, .compat-inputs { grid-template-columns: 1fr; }
  .tool-head { display: grid; }
  .chart-frame { min-height: 280px; }
}
