/* ──────────────────────────────────────────────────────────
   MENTA — Variant A (Editorial)
   Shared stylesheet for all pages.
   Drop-in replacement for the inline <style> blocks.
   ────────────────────────────────────────────────────────── */

:root {
  /* Palette */
  --ink:        #1A1F1B;
  --ink-soft:   #2a2a2a;
  --text:       #4a4f4b;
  --muted:      #8a8f8b;
  --hairline:   #E8E6DE;
  --paper:      #FAFAF7;
  --paper-warm: #F2EFE6;
  --mist:       #f4f4f0;
  --sage:       #7BAA9E;
  --sage-dark:  #5a8a7e;
  --sage-soft:  #E4EEEA;
  --error:      #c0392b;

  /* Type */
  --display: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans:    'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Rhythm */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: #fff;
  color: var(--text);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a   { color: inherit; }

/* ── HEADER ────────────────────────────────────────────── */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 40px;
  border-bottom: 1px solid var(--hairline);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo a { display: inline-block; }
.logo img {
  height: 56px;
  transform: scale(2.4);
  transform-origin: left center;
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav { display: flex; align-items: center; }

.nav a,
.nav .dropdown-toggle {
  margin-left: 24px;
  text-decoration: none;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color .2s;
  background: none;
  border: none;
  font-family: var(--sans);
  cursor: pointer;
  padding: 0;
}
.nav a:first-child,
.nav .dropdown:first-child .dropdown-toggle { margin-left: 0; }
.nav a:hover,
.nav .dropdown-toggle:hover { color: var(--sage-dark); }
.nav a.active { color: var(--ink); font-weight: 500; }

/* Language switch */
.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px;
  font-family: var(--sans);
}
.lang-switch button {
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.lang-switch button.active {
  background: var(--ink);
  color: #fff;
}

/* Dropdown */
.dropdown { position: relative; margin-left: 24px; }
.dropdown:first-child { margin-left: 0; }
.dropdown-toggle::after {
  content: '';
  display: inline-block;
  margin-left: 6px;
  border: 4px solid transparent;
  border-top-color: currentColor;
  vertical-align: middle;
  transform: translateY(2px);
  transition: transform .2s;
}
.dropdown:hover .dropdown-toggle::after { transform: translateY(2px) rotate(180deg); }

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -8px;
  padding-top: 12px;
  min-width: 200px;
  z-index: 100;
  background: transparent;
}
.dropdown-menu-inner {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(26,31,27,0.08);
  overflow: hidden;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: 12px 16px;
  margin: 0;
  font-size: 13.5px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid #f3f1e9;
  transition: background .15s, color .15s;
}
.dropdown-menu a:last-child { border-bottom: none; }
.dropdown-menu a:hover { background: var(--paper); color: var(--sage-dark); }
.dropdown-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding: 12px 16px 4px;
  display: block;
  border-bottom: none !important;
}

.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  color: var(--ink);
}

/* ── KICKER / EYEBROW ──────────────────────────────────── */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 24px;
}
.kicker::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--sage-dark);
  display: inline-block;
}

/* ── BUTTONS ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, color .2s, transform .1s, border-color .2s;
}
.btn:hover { background: var(--sage-dark); border-color: var(--sage-dark); }
.btn:active { transform: scale(0.99); }
.btn:disabled { background: #bbb; border-color: #bbb; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: #fff; }

.btn-sage {
  background: var(--sage);
  border-color: var(--sage);
}
.btn-sage:hover { background: var(--sage-dark); border-color: var(--sage-dark); }

.btn-block { width: 100%; }

.btn-link {
  background: none;
  border: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding: 4px 0;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.btn-link:hover { color: var(--sage-dark); border-color: var(--sage-dark); }

/* ── FORM PRIMITIVES ───────────────────────────────────── */
.card {
  background: #fff;
  padding: 36px;
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
}
.card-mist {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 36px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-divider { grid-column: 1 / -1; border: none; border-top: 1px solid var(--hairline); margin: 12px 0; }
.form-section-label {
  grid-column: 1 / -1;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--sage-dark);
  padding-top: 4px;
}

label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

input, select {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--hairline);
  background: #fff;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
}
input:focus, select:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px var(--sage-soft);
}

.autocomplete-wrapper { position: relative; }
.autocomplete-items {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  max-height: 220px;
  overflow: auto;
  z-index: 100;
  box-shadow: 0 12px 32px rgba(26,31,27,0.08);
}
.autocomplete-items div {
  padding: 12px 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid #f3f1e9;
}
.autocomplete-items div:last-child { border-bottom: none; }
.autocomplete-items div:hover { background: var(--paper); }

.error-msg {
  display: none;
  background: #fdf0ef;
  border: 1px solid #f5c6c2;
  border-radius: var(--r-md);
  padding: 14px 18px;
  color: var(--error);
  font-size: 14px;
  margin-top: 16px;
}

/* ── HERO (form pages) ─────────────────────────────────── */
.hero-form {
  text-align: center;
  padding: 80px 40px 56px;
  background: linear-gradient(180deg, var(--paper) 0%, #fff 100%);
  border-bottom: 1px solid var(--hairline);
}
.hero-form .kicker { justify-content: center; }
.hero-form h1 {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 300;
  font-variation-settings: "SOFT" 50, "WONK" 0, "opsz" 40;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin-bottom: 16px;
}
.hero-form h1 em { font-style: italic; font-weight: 300; }
.hero-form > p {
  font-size: 16px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
  font-weight: 400;
  line-height: 1.7;
}

/* ── CONTAINER ────────────────────────────────────────── */
.container { max-width: 860px; margin: auto; padding: 60px 40px; }

.section-title {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 300;
  font-variation-settings: "SOFT" 50, "WONK" 0, "opsz" 40;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.section-text {
  font-size: 15.5px;
  color: var(--muted);
  margin-bottom: 36px;
  line-height: 1.7;
}

/* ── RESULT CARDS (chart pages) ───────────────────────── */
.results { display: none; animation: fadeIn .4s ease; }
.results.visible { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.results-header {
  font-family: var(--display);
  font-size: 36px;
  font-weight: 300;
  font-variation-settings: "SOFT" 50, "WONK" 0, "opsz" 40;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.results-sub { font-size: 13px; color: var(--muted); margin-bottom: 28px; }

.section-label {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 14px;
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--sage);
}

.angles-grid, .planets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.angle-card {
  background: #fff;
  border: 1px solid var(--sage);
  border-radius: var(--r-md);
  padding: 16px 12px;
  text-align: center;
}
.angle-card .angle-name {
  font-family: var(--sans);
  font-size: 10.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--sage-dark); margin-bottom: 8px;
}
.angle-card .angle-sign {
  font-family: var(--display); font-size: 20px; font-weight: 300;
  color: var(--ink);
}
.angle-card .angle-deg { font-size: 11px; color: var(--muted); margin-top: 3px; }

.planet-card {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 16px 12px;
  text-align: center;
}
.planet-card .planet-name {
  font-family: var(--sans);
  font-size: 10.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--muted); margin-bottom: 8px;
}
.planet-card .planet-sign {
  font-family: var(--display); font-size: 20px; font-weight: 300;
  color: var(--ink);
}
.planet-card .planet-deg { font-size: 11px; color: var(--muted); margin-top: 3px; }

.chart-container {
  margin-top: 12px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 32px;
  text-align: center;
}
.chart-svg-wrapper { width: 100%; max-width: 580px; margin: 0 auto; }
.chart-svg-wrapper svg { width: 100% !important; height: auto !important; }

/* ── LOADING ──────────────────────────────────────────── */
.loading { display: none; text-align: center; padding: 56px 20px; color: var(--muted); font-size: 14px; }
.loading.visible { display: block; }
.spinner {
  width: 32px; height: 32px;
  border: 2px solid var(--hairline);
  border-top-color: var(--sage);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── FEATURES ─────────────────────────────────────────── */
.features { margin-top: 72px; }
.features-grid, .features ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.features li, .feature-card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 24px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
  transition: border-color .2s, transform .2s;
}
.features li:hover, .feature-card:hover {
  border-color: var(--sage);
  transform: translateY(-2px);
}
.features li::before, .feature-card::before {
  content: '✦';
  color: var(--sage);
  display: block;
  font-size: 16px;
  margin-bottom: 10px;
}
.feature-card strong {
  display: block;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}

/* ── FOOTER ──────────────────────────────────────────── */
footer {
  background: var(--ink);
  color: #c8ccc9;
  padding: 72px 40px 32px;
  margin-top: 80px;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
.footer-brand p {
  font-size: 13px;
  color: #9ea29f;
  max-width: 280px;
  margin-top: 16px;
  line-height: 1.7;
}
.footer-links h4 {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--sage);
  margin-bottom: 18px;
}
.footer-links a {
  display: block;
  font-size: 13.5px;
  color: #c8ccc9;
  text-decoration: none;
  margin-bottom: 10px;
  transition: color .2s;
}
.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  font-size: 12px;
  color: #7a807c;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
.footer-bottom a { color: #9ea29f; text-decoration: none; transition: color .2s; }
.footer-bottom a:hover { color: #fff; }

/* ── PRIVACY MODAL ────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,31,27,0.55);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
  max-width: 660px;
  width: 100%;
  max-height: 84vh;
  overflow-y: auto;
  padding: 48px;
  position: relative;
}
.modal h2 {
  font-family: var(--display);
  font-size: 32px; font-weight: 300;
  color: var(--ink); margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.modal .modal-date { font-size: 12px; color: var(--muted); margin-bottom: 24px; letter-spacing: 0.04em; }
.modal h3 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--sage-dark);
  margin: 28px 0 10px;
}
.modal p, .modal li { font-size: 14px; color: var(--text); line-height: 1.8; }
.modal ul { padding-left: 20px; margin-bottom: 12px; }
.modal-close {
  position: sticky;
  top: 0;
  float: right;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 50%;
  width: 34px; height: 34px;
  font-size: 16px;
  cursor: pointer;
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  transition: background .2s;
}
.modal-close:hover { background: var(--hairline); }

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 768px) {
  .header { padding: 14px 20px; }
  .logo img { height: 46px; transform: scale(2.8); }
  .menu-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-wrap { gap: 12px; }

  .nav {
    position: absolute;
    top: 70px;
    right: 20px;
    background: #fff;
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    padding: 14px;
    display: none;
    flex-direction: column;
    box-shadow: 0 12px 32px rgba(26,31,27,0.08);
    min-width: 200px;
  }
  .nav a, .nav .dropdown-toggle { margin: 8px 0; }
  .nav.active { display: flex; }

  .dropdown { margin-left: 0; width: 100%; }
  .dropdown-toggle { padding: 8px 0; width: 100%; justify-content: space-between; display: flex; }
  .dropdown-menu { position: static; padding-top: 0; }
  .dropdown-menu-inner { box-shadow: none; border: none; border-radius: 0; border-top: 1px solid var(--hairline); }
  .dropdown.open .dropdown-menu { display: block; }

  .hero-form { padding: 56px 20px 40px; }
  .container { padding: 40px 20px; }
  .card, .card-mist { padding: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .angles-grid, .planets-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid, .features ul { grid-template-columns: 1fr; }

  footer { padding: 48px 20px 24px; margin-top: 56px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .modal { padding: 32px 22px; }
}
