:root {
  --ink: #1c2b22;
  --ink-soft: #3c4c40;
  --paper: #f8f4e9;
  --paper-raised: #fffdf6;
  --forest: #1f4d3a;
  --forest-deep: #123023;
  --forest-soft: #2c664c;
  --gold: #b9902f;
  --gold-bright: #d4af37;
  --line: rgba(28, 43, 34, 0.14);
  --shadow: 0 12px 30px rgba(18, 48, 35, 0.14);
  --radius: 16px;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Frank Ruhl Libre", "Avenir Next", "Segoe UI", sans-serif;
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(31,77,58,0.08), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(185,144,47,0.10), transparent 55%),
    var(--paper);
  min-height: 100vh;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(248, 244, 233, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--forest-deep);
  text-decoration: none;
}
.brand .brand-mark {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold-bright), var(--gold));
  color: var(--forest-deep);
  font-size: 1rem;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pill-group {
  display: inline-flex;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.pill-group button {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.2s, color 0.2s;
}
.pill-group button.active {
  background: var(--forest);
  color: #fff;
}
.pill-group button:not(.active):hover { background: rgba(31,77,58,0.08); }

.nav-links {
  display: flex;
  gap: 6px;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 8px 12px;
  border-radius: 10px;
}
.nav-links a:hover, .nav-links a.active { background: rgba(31,77,58,0.09); color: var(--forest-deep); }

/* ---------- Main / Views ---------- */
main { min-height: 60vh; padding-bottom: 80px; }
.view { animation: fadein 0.35s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: translateY(0);} }

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 40px;
  text-align: center;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 14px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 18px;
  color: var(--forest-deep);
}
.hero p.lead {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.12rem;
  color: var(--ink-soft);
}
.hero-tree-row {
  margin-top: 28px;
  font-size: 1.6rem;
  letter-spacing: 0.3em;
  opacity: 0.5;
}

/* ---------- Level chooser (home) ---------- */
.level-choice {
  padding: 20px 0 56px;
}
.level-choice h2 {
  font-family: var(--serif);
  text-align: center;
  font-size: 1.5rem;
  color: var(--forest-deep);
  margin-bottom: 6px;
}
.level-choice .sub {
  text-align: center;
  color: var(--ink-soft);
  margin-bottom: 28px;
  font-size: 0.95rem;
}
.level-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.level-card {
  background: var(--paper-raised);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: left;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.level-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(185,144,47,0.5); }
.level-card.active { border-color: var(--gold); box-shadow: var(--shadow); background: #fffef9; }
.level-card .lc-icon { font-size: 1.5rem; margin-bottom: 10px; }
.level-card h3 { font-family: var(--serif); margin: 0 0 6px; font-size: 1.25rem; color: var(--forest-deep); }
.level-card p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }
.level-card .lc-check { float: right; color: var(--gold); font-weight: 700; visibility: hidden; }
.level-card.active .lc-check { visibility: visible; }

/* ---------- CTA buttons ---------- */
.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 34px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--forest); color: #fff; box-shadow: 0 8px 20px rgba(31,77,58,0.28); }
.btn-primary:hover { background: var(--forest-deep); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--forest-deep); }
.btn-ghost:hover { border-color: var(--gold); background: rgba(185,144,47,0.08); }
.btn-gold { background: linear-gradient(145deg, var(--gold-bright), var(--gold)); color: var(--forest-deep); box-shadow: 0 8px 20px rgba(185,144,47,0.30); }

/* ---------- Section shell ---------- */
.section { padding: 48px 0; }
.section-title {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--forest-deep);
  text-align: center;
  margin: 0 0 8px;
}
.section-sub { text-align: center; color: var(--ink-soft); margin-bottom: 36px; }

/* ---------- Birthdate form ---------- */
.date-form {
  max-width: 460px;
  margin: 0 auto;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.date-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--forest-deep);
  margin-bottom: 8px;
}
.date-form input[type=date] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
.date-form input[type=date]:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.date-form .btn { width: 100%; justify-content: center; margin-top: 18px; }
.date-hint { font-size: 0.8rem; color: var(--ink-soft); margin-top: 10px; text-align: center; }

/* ---------- Sign grid ---------- */
.sign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.sign-card {
  display: block;
  text-decoration: none;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.sign-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(185,144,47,0.5); }
.sign-card .sc-num { font-size: 0.72rem; color: var(--gold); font-weight: 700; letter-spacing: 0.08em; }
.sign-card h3 { font-family: var(--serif); font-size: 1.18rem; margin: 6px 0 4px; color: var(--forest-deep); line-height: 1.25; }
.sign-card .sc-dates { font-size: 0.8rem; color: var(--ink-soft); }

/* ---------- Sign detail ---------- */
.sign-hero {
  background: linear-gradient(160deg, var(--forest-deep), var(--forest) 70%);
  color: #f3ede0;
  border-radius: 20px;
  padding: 44px 34px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}
.sign-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(500px 260px at 90% -10%, rgba(212,175,55,0.22), transparent 60%);
  pointer-events: none;
}
.sign-hero .sh-num { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-bright); font-weight: 700; }
.sign-hero h1 { font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 10px 0 8px; }
.sign-hero .sh-dates { font-size: 0.95rem; opacity: 0.85; }
.sign-hero-nav { display: flex; justify-content: space-between; margin-top: 22px; gap: 10px; flex-wrap: wrap; }
.sign-hero-nav a { font-size: 0.82rem; color: #f3ede0; text-decoration: none; opacity: 0.85; border: 1px solid rgba(255,255,255,0.25); padding: 8px 14px; border-radius: 999px; }
.sign-hero-nav a:hover { opacity: 1; border-color: var(--gold-bright); }

.sign-body { padding: 36px 0 10px; }
.sign-section { margin-bottom: 34px; }
.sign-section h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--forest-deep);
  border-bottom: 2px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sign-section h2 .icon { color: var(--gold); }
.myth-subtitle {
  font-family: var(--serif);
  font-style: italic;
  color: var(--forest-soft);
  font-size: 1.15rem;
  margin: -4px 0 14px;
}
.sign-section p { margin: 0 0 14px; color: var(--ink); }
.sign-section p:last-child { margin-bottom: 0; }

/* ---------- Compatibility placeholder ---------- */
.coming-soon {
  max-width: 640px;
  margin: 40px auto;
  text-align: center;
  background: var(--paper-raised);
  border: 1px dashed var(--gold);
  border-radius: var(--radius);
  padding: 48px 32px;
}
.coming-soon .cs-icon { font-size: 2.2rem; margin-bottom: 14px; }
.coming-soon h2 { font-family: var(--serif); color: var(--forest-deep); margin: 0 0 10px; }
.coming-soon p { color: var(--ink-soft); margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* ---------- Level bar (persistent, on content pages) ---------- */
.level-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 30px;
  flex-wrap: wrap;
}
.level-bar span.lb-label { font-size: 0.8rem; color: var(--ink-soft); font-weight: 600; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-lg { margin-top: 40px; }
.hidden { display: none !important; }

@media (max-width: 720px) {
  .level-cards { grid-template-columns: 1fr; }
  .site-header-inner { flex-direction: column; align-items: stretch; }
  .header-controls { justify-content: space-between; }
  .sign-hero { padding: 32px 22px; }
}
