:root {
  --midnight: #101726;
  --midnight-soft: #182236;
  --ivory: #FAF7F2;
  --ivory-deep: #F1ECE3;
  --gold: #C4A265;
  --gold-light: #DFC48F;
  --gold-dark: #9B7B42;
  --ink: #1C2331;
  --muted: #5F687A;
  --border-light: rgba(196, 162, 101, 0.28);
  --border-dark: rgba(28, 35, 49, 0.12);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background-color: var(--ivory);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 22px;
}

.hidden {
  display: none !important;
}

/* Header */
.site-header {
  background: var(--midnight);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ivory);
}

.brand-mark {
  color: var(--gold);
  font-size: 1.1rem;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  text-decoration: none;
  color: rgba(250, 247, 242, 0.82);
  font-size: 0.88rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--gold-light);
}

.btn-outline-sm {
  border: 1px solid var(--gold);
  color: var(--gold-light) !important;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.btn-outline-sm:hover {
  background: var(--gold);
  color: var(--midnight) !important;
}

/* Hero & Calculator */
.hero-section {
  background: radial-gradient(circle at 18% 20%, #1d2a44 0%, var(--midnight) 62%);
  color: var(--ivory);
  padding: 64px 0 80px;
  border-bottom: 1px solid var(--border-light);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.eyebrow.dark {
  color: var(--gold-dark);
}

.hero-copy h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 4.8vw, 3.85rem);
  font-weight: 500;
  line-height: 1.08;
  margin-bottom: 20px;
  color: var(--ivory);
}

.hero-copy h1 em {
  color: var(--gold-light);
  font-style: italic;
}

.hero-sub {
  color: rgba(250, 247, 242, 0.8);
  font-size: 1.02rem;
  max-width: 500px;
  margin-bottom: 28px;
}

.trust-pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: 0.85rem;
  color: var(--gold-light);
}

/* Calculator Card */
.calc-card {
  background: rgba(250, 247, 242, 0.98);
  color: var(--ink);
  border-radius: 14px;
  padding: 32px;
  border: 1px solid var(--border-light);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.calc-card-header {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-dark);
}

.calc-card-header h2 {
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--midnight);
}

.calc-card-header p {
  font-size: 0.88rem;
  color: var(--muted);
}

.form-group {
  margin-bottom: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="time"] {
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid rgba(28, 35, 49, 0.2);
  background: #ffffff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px rgba(196, 162, 101, 0.2);
}

.form-group input:disabled {
  background: var(--ivory-deep);
  color: var(--muted);
  cursor: not-allowed;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: -4px 0 18px;
}

.checkbox-row input {
  margin-top: 4px;
  accent-color: var(--midnight);
}

.checkbox-row label {
  font-size: 0.83rem;
  color: var(--muted);
  cursor: pointer;
}

.form-error {
  background: #fdf0ef;
  border: 1px solid #e0a39e;
  color: #8b2b24;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.86rem;
  margin-bottom: 16px;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 22px;
  background: linear-gradient(135deg, var(--gold) 0%, #b08b4c 100%);
  color: var(--midnight);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}

.btn-gold:hover {
  filter: brightness(1.05);
  box-shadow: 0 8px 22px rgba(196, 162, 101, 0.35);
  transform: translateY(-1px);
}

.btn-gold:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

/* Results Section */
.results-section {
  padding: 72px 0;
  background: var(--ivory);
  border-bottom: 1px solid var(--border-dark);
}

.results-header {
  text-align: center;
  margin-bottom: 40px;
}

.results-header h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 500;
  color: var(--midnight);
}

.results-header h2 em {
  color: var(--gold-dark);
}

.meta-line {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 6px;
}

/* Big Three Pillars */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 36px;
}

.pillar-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 22px;
  text-align: center;
}

.pillar-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--gold-dark);
  margin-bottom: 8px;
}

.pillar-card h3 {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--midnight);
}

.pillar-detail {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 4px;
}

/* Chart Showcase */
.chart-showcase {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 40px;
}

.wheel-frame {
  background: var(--midnight);
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 26px;
  text-align: center;
}

.wheel-medallion {
  background: var(--ivory);
  border-radius: 12px;
  padding: 14px;
  overflow: hidden;
}

.wheel-medallion svg {
  width: 100%;
  height: auto;
  max-width: 520px;
  display: block;
  margin: 0 auto;
}

.wheel-caption {
  color: var(--gold-light);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 16px;
}

.chart-insights {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.insight-box {
  background: #ffffff;
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 24px;
}

.sun-blurb {
  font-family: var(--serif);
  font-size: 1.32rem;
  line-height: 1.45;
  color: var(--midnight);
}

.elements-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.elements-top .eyebrow {
  margin-bottom: 0;
}

.dominant-pill {
  background: var(--ivory-deep);
  color: var(--midnight);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
}

.element-row {
  display: grid;
  grid-template-columns: 68px 1fr 28px;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.85rem;
}

.element-bar-bg {
  height: 8px;
  background: var(--ivory-deep);
  border-radius: 999px;
  overflow: hidden;
}

.element-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--midnight) 0%, var(--gold-dark) 100%);
  border-radius: 999px;
}

/* Dynamic Sign CTA */
.featured-cta-card {
  background: linear-gradient(155deg, var(--midnight) 0%, #1c2841 100%);
  color: var(--ivory);
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 28px;
}

.cta-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
  border: 1px solid var(--border-light);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.featured-cta-card h3 {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 10px;
}

.featured-cta-card p {
  font-size: 0.9rem;
  color: rgba(250, 247, 242, 0.8);
  margin-bottom: 20px;
}

/* Planets Table */
.planets-panel {
  background: #ffffff;
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 26px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.panel-header h3 {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--midnight);
}

.panel-header span {
  font-size: 0.82rem;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

.planets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.planets-table th {
  text-align: left;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-dark);
}

.planets-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(28, 35, 49, 0.06);
}

.rx-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #8b3a2b;
  background: #f9ebe8;
  padding: 2px 7px;
  border-radius: 4px;
}

/* Etsy Ladder Section */
.editions-section {
  background: var(--midnight);
  color: var(--ivory);
  padding: 76px 0;
}

.section-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 44px;
}

.section-intro h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.8vw, 2.9rem);
  font-weight: 500;
  margin-bottom: 12px;
}

.section-intro h2 em {
  color: var(--gold-light);
}

.section-intro p {
  color: rgba(250, 247, 242, 0.78);
  font-size: 0.95rem;
}

.ladder-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--midnight-soft);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, border-color 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.product-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 12px;
}

.product-card h3 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 10px;
  color: var(--ivory);
}

.product-card p {
  font-size: 0.85rem;
  color: rgba(250, 247, 242, 0.72);
  margin-bottom: 20px;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(196, 162, 101, 0.18);
}

.product-price {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--gold-light);
}

.product-link {
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--midnight);
  background: var(--gold);
  padding: 8px 14px;
  border-radius: 6px;
  transition: filter 0.2s;
}

.product-link:hover {
  filter: brightness(1.08);
}

/* Footer */
.site-footer {
  background: #0b101b;
  color: rgba(250, 247, 242, 0.7);
  padding: 36px 0;
  border-top: 1px solid rgba(196, 162, 101, 0.18);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-note {
  font-size: 0.8rem;
  max-width: 680px;
  margin-top: 8px;
  color: rgba(250, 247, 242, 0.56);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .chart-showcase {
    grid-template-columns: 1fr;
  }

  .ladder-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .nav-links a:not(.btn-outline-sm) {
    display: none;
  }

  .pillars-grid,
  .form-row,
  .ladder-grid {
    grid-template-columns: 1fr;
  }

  .calc-card {
    padding: 22px;
  }
}

/* City Autocomplete Dropdown */
.city-field {
  position: relative;
}

.city-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--gold);
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(16, 23, 38, 0.18);
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  z-index: 60;
}

.city-suggestions li {
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  border-bottom: 1px solid rgba(28, 35, 49, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.city-suggestions li:last-child {
  border-bottom: none;
}

.city-suggestions li:hover,
.city-suggestions li.active {
  background: var(--ivory-deep);
  color: var(--midnight);
}

.city-coords {
  font-size: 0.74rem;
  color: var(--muted);
  white-space: nowrap;
}