/* ==========================================================
   Tokens
   ========================================================== */
:root {
  --green-deep:   #1B3D33;
  --green-shadow: #142A24;
  --gold:         #C98B4E;
  --gold-soft:    #E4B37E;
  --mint:         #8FBFAE;
  --cream:        #F7F4EC;
  --ink:          #202821;
  --white:        #FFFFFF;

  --display: 'Fraunces', serif;
  --body:    'Inter', system-ui, sans-serif;
  --mono:    'Space Mono', monospace;

  --radius: 14px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.08; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

/* focus visibility */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

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

/* ==========================================================
   Nav
   ========================================================== */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(27,61,51,0.96);
  backdrop-filter: blur(6px);
}
.nav-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  color: var(--white); font-family: var(--display); font-weight: 600; font-size: 1.05rem;
  display: flex; align-items: center; gap: 10px;
}
.nav-logo { height: 42px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--mint); font-size: 0.92rem; font-weight: 500; }
.nav-links a:hover { color: var(--gold-soft); }
.nav-login {
  border: 1px solid var(--mint); border-radius: 999px; padding: 7px 16px;
}
.nav-login:hover { border-color: var(--gold-soft); color: var(--gold-soft); }
.nav-lang {
  border: 1px solid rgba(143,191,174,0.5); border-radius: 999px; padding: 7px 14px;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.03em;
}
.nav-lang:hover { border-color: var(--gold-soft); color: var(--gold-soft); }

/* ==========================================================
   Hero
   ========================================================== */
.hero {
  position: relative;
  background: var(--green-deep);
  color: var(--white);
  text-align: center;
  padding: 96px 24px 140px;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.eyebrow {
  font-family: var(--mono); letter-spacing: 0.18em; font-size: 0.78rem;
  color: var(--gold-soft); margin-bottom: 28px; text-transform: uppercase;
}
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 700; }
.hero-white { color: var(--white); }
.hero-gold { color: var(--gold); }
.hero-subtitle {
  margin-top: 18px; font-family: var(--body); font-weight: 600; font-size: 1.05rem;
  color: var(--white); text-transform: uppercase; letter-spacing: 0.04em;
}
.hero-sub {
  margin-top: 18px; font-size: 1.15rem; color: var(--white); opacity: 0.92;
}
.hero-tagline {
  margin-top: 10px; font-style: italic; color: var(--mint); font-size: 1rem;
}

.hero-roots {
  position: absolute; left: 0; right: 0; bottom: -2px; height: 90px;
  background:
    radial-gradient(ellipse at 10% 100%, rgba(143,191,174,0.18), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(201,139,78,0.14), transparent 55%);
  pointer-events: none;
}

/* ==========================================================
   Buttons
   ========================================================== */
.btn {
  display: inline-block; font-family: var(--body); font-weight: 600; font-size: 0.98rem;
  padding: 14px 30px; border-radius: 999px; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-gold {
  background: var(--gold); color: var(--green-shadow);
  box-shadow: 0 6px 18px rgba(201,139,78,0.35);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(201,139,78,0.45); }
.btn-outline {
  background: transparent; color: var(--green-deep);
  border: 2px solid var(--green-deep);
}
.btn-outline:hover { background: var(--green-deep); color: var(--white); }
.btn-outline-light {
  background: transparent; color: var(--white);
  border: 2px solid rgba(255,255,255,0.65);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }
.hero-ctas { margin-top: 40px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-distro {
  margin-top: 22px; font-size: 0.82rem; color: rgba(255,255,255,0.6);
  max-width: 480px; margin-left: auto; margin-right: auto; line-height: 1.5;
}
.hero-secondary-link {
  margin-top: 18px; font-size: 0.88rem; color: rgba(255,255,255,0.7);
}
.hero-secondary-link a { color: var(--gold-soft); text-decoration: underline; }
.hero-secondary-link a:hover { color: var(--gold); }

/* ==========================================================
   Shared section chrome
   ========================================================== */
.tag {
  display: inline-block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em;
  color: var(--green-deep); border: 1px solid var(--green-deep); border-radius: 999px;
  padding: 5px 14px; margin-bottom: 22px;
}
.tag-light { color: var(--mint); border-color: var(--mint); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 600; color: var(--green-deep); max-width: 640px; }
h2.light { color: var(--white); }
.lede { margin-top: 18px; max-width: 640px; font-size: 1.05rem; line-height: 1.6; color: #3b453f; }
.light-lede { color: rgba(255,255,255,0.82); }

/* ==========================================================
   About the book
   ========================================================== */
.about-book { padding: 88px 0 24px; }
.about-book-inner {
  display: flex; align-items: center; gap: 56px;
}
.about-book-cover {
  width: 32%; max-width: 300px; height: auto; border-radius: 12px;
  box-shadow: 0 20px 40px rgba(27,61,51,0.22);
  flex-shrink: 0;
}
.about-book-copy { flex: 1; min-width: 0; }
.about-book-subtitle {
  margin-top: 16px; font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.03em;
  color: #5a655e; font-style: italic;
}
.about-book-text {
  margin-top: 14px; font-family: var(--display); font-size: 1.3rem; line-height: 1.55;
  color: var(--green-deep); font-weight: 500;
}
.about-book-author {
  margin-top: 16px; font-size: 0.95rem; color: var(--green-deep); font-weight: 600;
}
.about-book-edition {
  margin-top: 6px; font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.04em;
  color: var(--gold); text-transform: uppercase;
}
.about-book-links {
  margin-top: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
}
.about-book-btn { margin-top: 0; }
.about-book-secondary { margin-top: 16px; font-size: 0.88rem; color: #5a655e; }
.about-book-secondary a { color: var(--gold); text-decoration: underline; }
.about-book-secondary a:hover { color: var(--green-deep); }

@media (max-width: 760px) {
  .about-book-inner { flex-direction: column; text-align: center; }
  .about-book-cover { width: 56%; max-width: 260px; }
  .about-book-links { align-items: center; }
}

/* ==========================================================
   Dropdown (Get the Book)
   ========================================================== */
.dropdown { position: relative; display: inline-block; }
.dropdown-toggle { cursor: pointer; border: none; font-family: var(--body); }
.caret { font-size: 0.7em; margin-left: 4px; }
.dropdown-menu {
  display: none;
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  background: var(--white); border-radius: 12px; overflow: hidden;
  box-shadow: 0 14px 30px rgba(0,0,0,0.22); min-width: 240px; z-index: 30;
}
.dropdown-menu.open { display: block; }
.dropdown-menu a {
  display: block; padding: 13px 20px; font-size: 0.95rem; font-weight: 600;
  color: var(--green-deep); text-align: left; white-space: nowrap;
}
.dropdown-menu a:not(:last-child) { border-bottom: 1px solid rgba(27,61,51,0.1); }
.dropdown-menu a:hover { background: var(--cream); color: var(--gold); }

/* ==========================================================
   Footer logo
   ========================================================== */
.footer-logo { height: auto; width: 220px; max-width: 60%; margin-bottom: 18px; opacity: 0.95; }

/* ==========================================================
   Overview
   ========================================================== */
.overview { padding: 96px 0; }
.stat-row { display: flex; gap: 56px; margin-top: 48px; flex-wrap: wrap; }
.stat-num {
  display: block; font-family: var(--display); font-size: 2.4rem; font-weight: 700; color: var(--gold);
}
.stat-label { font-family: var(--mono); font-size: 0.78rem; color: #5a655e; letter-spacing: 0.03em; }

/* ==========================================================
   Inside the kit
   ========================================================== */
.inside { background: var(--green-deep); padding: 96px 0; }
.card-grid {
  margin-top: 48px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.card {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(143,191,174,0.25);
  border-radius: var(--radius); padding: 26px 22px;
}
.card-index { font-family: var(--mono); color: var(--mint); font-size: 0.85rem; }
.card h3 { color: var(--white); font-size: 1.1rem; margin-top: 10px; }
.card p { color: rgba(255,255,255,0.75); font-size: 0.92rem; margin-top: 10px; line-height: 1.5; }

/* ==========================================================
   Districts
   ========================================================== */
.districts { padding: 96px 0; }
.check-list { margin-top: 28px; max-width: 620px; display: flex; flex-direction: column; gap: 16px; }
.check-list li {
  position: relative; padding-left: 32px; font-size: 1.02rem; line-height: 1.55; color: var(--ink);
}
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--gold); font-weight: 700; font-family: var(--mono);
}

/* ==========================================================
   Access / permits (signature element)
   ========================================================== */
.access { background: var(--green-shadow); padding: 96px 0 108px; }
.permit-row {
  margin-top: 52px; display: flex; gap: 28px; flex-wrap: wrap;
}
.permit {
  flex: 1 1 320px; position: relative; background: var(--cream);
  border-radius: var(--radius); padding: 34px 30px 30px;
  border: 1.5px dashed rgba(27,61,51,0.35);
}
.permit-primary { background: var(--white); border-color: rgba(201,139,78,0.55); }
.permit-stamp {
  position: absolute; top: 24px; right: 26px;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em;
  color: var(--mint); border: 1.5px solid var(--mint); border-radius: 999px;
  padding: 5px 12px; transform: rotate(6deg);
}
.permit-stamp-gold { color: var(--gold); border-color: var(--gold); }
.permit-kicker {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; color: #6b756e; text-transform: uppercase;
}
.permit h3 { margin-top: 8px; font-size: 1.5rem; color: var(--green-deep); }
.permit-detail { margin-top: 12px; font-size: 0.96rem; line-height: 1.55; color: #3b453f; max-width: 30ch; }
.permit .btn { margin-top: 22px; width: 100%; text-align: center; }
.permit-fine { margin-top: 14px; font-size: 0.8rem; color: #6b756e; }

.gate-demo { margin-top: 56px; text-align: center; }
/* Sensible default before MemberSpace's script is installed/active:
   assume logged-out, so only the "locked" message shows. Once the
   MemberSpace install snippet is added, it manages this visibility
   correctly based on real member/plan status. */
[data-ms-show] { display: none; }
.gate-line {
  display: inline-block; font-family: var(--mono); font-size: 0.85rem; color: var(--mint);
  border: 1px dashed rgba(143,191,174,0.4); border-radius: 10px; padding: 14px 22px;
}
.gate-line-unlocked { color: var(--gold-soft); border-color: rgba(201,139,78,0.4); }

/* ==========================================================
   Footer
   ========================================================== */
.footer {
  background: var(--green-deep); color: var(--white); text-align: center; padding: 48px 24px;
}
.footer-tagline { font-style: italic; color: var(--gold); font-size: 1.02rem; }
.footer-meta { margin-top: 12px; font-size: 0.85rem; color: var(--mint); }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 860px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { gap: 16px; }
}
@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
  .nav-links a:not(.nav-login):not(.nav-lang) { display: none; }
  .stat-row { gap: 32px; }
}
