/* Observe First — S² solarpunk land-steward UI */
:root {
  --bg: #070a0f;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.1);
  --text: #f4f6fb;
  --muted: rgba(244, 246, 251, 0.72);
  --emerald: #34d399;
  --cyan: #22d3ee;
  --gold: #fbbf24;
  --radius: 14px;
  --display: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

.cosmic-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(52, 211, 153, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(34, 211, 238, 0.08), transparent),
    linear-gradient(180deg, #070a0f 0%, #0a1410 50%, #070a0f 100%);
  pointer-events: none;
  z-index: 0;
}
.grain {
  position: fixed;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: rgba(7, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}
.logo-mark { font-size: 1.25rem; }
.logo-text { font-size: 1rem; }
.nav {
  display: none;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  align-items: center;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.nav a:hover, .nav a.is-active { color: var(--emerald); }
.nav-cta {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: var(--emerald) !important;
}
@media (min-width: 900px) { .nav { display: flex; } .menu-toggle { display: none; } }

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
}

.beta-bar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
  padding: 0.4rem 1rem;
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(52, 211, 153, 0.08);
  border-bottom: 1px solid rgba(52, 211, 153, 0.15);
}
.beta-bar a { color: var(--cyan); }

.app-main {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
  min-height: 60vh;
}

.eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--emerald);
  margin: 0 0 0.5rem;
}
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.15;
}
h1 { font-size: clamp(1.85rem, 5vw, 2.5rem); margin: 0 0 1rem; }
h2 { font-size: 1.45rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.05rem; margin: 0 0 0.5rem; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 62ch; margin: 0 0 1.5rem; }

.tile-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  margin: 1.5rem 0;
}
.tile {
  display: block;
  padding: 1.15rem;
  border-radius: var(--radius);
  border: 1px solid rgba(52, 211, 153, 0.25);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.15s;
}
.tile:hover {
  border-color: var(--emerald);
  transform: translateY(-2px);
}
.tile-icon { font-size: 1.75rem; display: block; margin-bottom: 0.5rem; }
.tile-title { font-weight: 700; font-size: 0.95rem; display: block; }
.tile-desc { font-size: 0.8rem; color: var(--muted); margin-top: 0.35rem; display: block; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  margin-bottom: 0.85rem;
}
.card-accent { border-color: rgba(52, 211, 153, 0.3); }

.form-row { margin-bottom: 1rem; }
.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--muted);
}
input, textarea, select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font: inherit;
}
textarea { min-height: 100px; resize: vertical; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  border: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, #059669, #34d399);
  color: #042f1a;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.85rem; }

.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0; }
.chip {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(52, 211, 153, 0.12);
  color: var(--emerald);
  border: 1px solid rgba(52, 211, 153, 0.25);
}
.chip-warn { background: rgba(251, 191, 36, 0.12); color: var(--gold); border-color: rgba(251, 191, 36, 0.3); }

.sources-panel {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--cyan);
  font-size: 0.85rem;
}
.sources-panel h4 { margin: 0 0 0.5rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--cyan); }
.sources-panel ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.sources-panel li { margin: 0.35rem 0; }

.obs-list { list-style: none; padding: 0; margin: 0; }
.obs-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.obs-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.25rem; }

.zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}
.zone-btn {
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.zone-btn.is-selected {
  border-color: var(--emerald);
  background: rgba(52, 211, 153, 0.12);
}
.zone-btn strong { display: block; font-size: 1.1rem; color: var(--emerald); }

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
}

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
  margin-top: 2rem;
}
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}
.footer-inner p { margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; }
.footer-links a { color: var(--muted); font-size: 0.85rem; text-decoration: none; }
.footer-links a:hover { color: var(--emerald); }

.mobile-nav-open .nav {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(7, 10, 15, 0.98);
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.marker-type.is-selected { border-color: var(--emerald) !important; color: var(--emerald); }

.site-map-legend { font-size: 0.8rem; color: var(--muted); margin-top: 0.35rem; }

@media (max-width: 899px) {
  .site-header { flex-wrap: wrap; }
}
