:root {
  --ink: #0c1610;
  --forest: #102018;
  --moss: #1b3326;
  --leaf: #2a4a36;
  --canopy: #3d6b4e;
  --gold: #c9a227;
  --gold-soft: #e8d48b;
  --amber: #d4a017;
  --cream: #f3ebd8;
  --parchment: #e8dcc4;
  --muted: #a8b5a4;
  --line: rgba(201, 162, 39, 0.28);
  --card: #15241b;
  --danger: #c45c4a;
  --ok: #6fbf7a;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  --radius: 18px;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--cream);
  line-height: 1.55;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }
a { color: var(--gold-soft); text-decoration: none; }
a:hover { color: #fff; }

.wrap {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: linear-gradient(180deg, rgba(12,22,16,.92), rgba(12,22,16,.72) 70%, transparent);
  border-bottom: 1px solid transparent;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 3px rgba(201,162,39,.15);
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
}
.brand-name span { color: var(--gold); }
.nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
  list-style: none;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-links a { color: var(--muted); }
.nav-links a:hover, .nav-links a.active { color: var(--gold-soft); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-soft);
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  transition: 0.2s ease;
}
.btn:hover { background: var(--gold); color: var(--ink); }
.btn.solid { background: var(--gold); color: var(--ink); font-weight: 600; }
.btn.solid:hover { background: var(--gold-soft); }
.btn.ghost { border-color: rgba(243,235,216,.2); color: var(--cream); }
.btn.danger { border-color: var(--danger); color: #f0b8ae; }
.nav-toggle { display: none; background: none; border: 0; color: var(--cream); font-size: 1.4rem; cursor: pointer; }

/* HERO */
.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  place-items: end start;
  isolation: isolate;
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: saturate(1.05) contrast(1.05);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(12,22,16,.25) 0%, rgba(12,22,16,.15) 35%, rgba(12,22,16,.78) 78%, var(--ink) 100%),
    radial-gradient(60% 50% at 80% 20%, rgba(201,162,39,.12), transparent 60%);
}
.hero-copy { padding: 0 0 72px; max-width: 760px; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3rem, 7vw, 6.2rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold-soft);
}
.lede {
  margin-top: 22px;
  max-width: 54ch;
  color: var(--parchment);
  font-size: 1.12rem;
}
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* STATS */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: -28px;
  position: relative;
  z-index: 2;
}
.stat {
  background: linear-gradient(180deg, #1a2c21, #122018);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px 18px;
  box-shadow: var(--shadow);
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--gold-soft);
  line-height: 1;
}
.stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* SECTIONS */
section { padding: 88px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 500;
}
.section-head p { color: var(--muted); max-width: 46ch; }

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.search {
  flex: 1;
  min-width: 220px;
  background: var(--forest);
  border: 1px solid var(--line);
  color: var(--cream);
  padding: 12px 14px;
  border-radius: 12px;
}
select.chip, .chip {
  background: var(--forest);
  border: 1px solid var(--line);
  color: var(--cream);
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.chip.active { border-color: var(--gold); color: var(--gold-soft); }

/* CARDS */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--gold); }
.card-img {
  height: 210px;
  width: 100%;
  object-fit: cover;
  background: #1a2a20;
}
.card-body { padding: 16px 16px 18px; }
.order-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.card h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  margin: 4px 0 2px;
}
.sci {
  font-style: italic;
  color: var(--muted);
  font-size: 0.92rem;
}
.meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

/* MAP */
#map {
  height: 460px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
}
.leaflet-container { background: #142019; font-family: var(--font-body); }

/* ATLAS */
.atlas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.plate {
  background: #1a241c;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.plate img {
  height: 280px;
  width: 100%;
  object-fit: cover;
  object-position: top;
  background: #e8dcc4;
}
.plate-body { padding: 16px; }
.plate h3 { font-family: var(--font-display); font-size: 1.4rem; }
.plate .sci { margin-bottom: 8px; display: block; }

/* GUIDE */
.guide {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: stretch;
}
.guide-visual {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 360px;
}
.guide-visual img { width: 100%; height: 100%; object-fit: cover; }
.steps { display: grid; gap: 14px; }
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
}
.step strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 4px;
  color: var(--gold-soft);
}

/* FOOTER */
footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  color: var(--muted);
}
.foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  align-items: start;
}
.foot small { display: block; margin-top: 6px; }

/* MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6,10,8,.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: min(720px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  background: #121c16;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-family: var(--font-display); font-size: 1.6rem; }
.icon-btn {
  background: none; border: 0; color: var(--cream); font-size: 1.4rem; cursor: pointer;
}
.modal-body { padding: 20px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field select, .field textarea {
  background: var(--forest);
  border: 1px solid var(--line);
  color: var(--cream);
  padding: 10px 12px;
  border-radius: 10px;
}
.field textarea { min-height: 90px; resize: vertical; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.detail-hero {
  height: 240px;
  object-fit: cover;
  width: 100%;
}
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; margin-top: 14px; }
.kv dt { color: var(--muted); font-size: 0.82rem; }
.kv dd { color: var(--cream); }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e3326;
  border: 1px solid var(--gold);
  color: var(--cream);
  padding: 12px 16px;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: .25s ease;
  z-index: 100;
}
.toast.show { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .stats, .grid, .atlas-grid { grid-template-columns: 1fr 1fr; }
  .guide { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px; right: 20px;
    background: #121c16;
    border: 1px solid var(--line);
    padding: 16px 20px;
    border-radius: 14px;
  }
  .nav-toggle { display: block; }
  .stats, .grid, .atlas-grid, .form-grid { grid-template-columns: 1fr; }
  .hero { min-height: 78vh; }
}
