:root {
  --bg:        #0f1419;
  --bg-elev:   #161c24;
  --bg-card:   #1a212b;
  --border:    #283341;
  --text:      #e6edf3;
  --text-dim:  #9fb0c0;
  --green:     #67ea94;   /* Meshtastic green */
  --green-700: #34c46a;
  --green-300: #a8f4c4;
  --green-glow: rgba(103, 234, 148, 0.18);
  --maxw: 1080px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--green); color: #04210f;
  padding: 8px 14px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 20, 25, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 1.2rem; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; }
.brand-text { letter-spacing: 0.2px; font-weight: 500; }
.brand-text strong { color: var(--green); }

.site-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.site-nav a {
  color: var(--text-dim); padding: 8px 12px; border-radius: 8px; font-size: 0.95rem;
  display: inline-block; transition: color .15s, background .15s;
}
.site-nav a:hover { color: var(--text); background: var(--bg-elev); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--green); }
.site-nav a.disabled { opacity: 0.5; pointer-events: none; }
.nav-cta a {
  background: var(--green); color: #04210f !important; font-weight: 600;
  margin-left: 6px;
}
.nav-cta a:hover { background: var(--green-300); }

.nav-toggle-label { display: none; cursor: pointer; padding: 8px; }
.nav-toggle-label span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: .2s; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-inner { padding: 88px 20px 76px; position: relative; z-index: 2; }
.hero-copy { max-width: 720px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 2px; font-size: 0.78rem; font-weight: 600;
  color: var(--green); margin: 0 0 14px;
}
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.1; margin: 0 0 18px; letter-spacing: -0.5px; }
.hero-sub { font-size: 1.2rem; color: var(--text-dim); margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-glow {
  position: absolute; top: -30%; right: -10%; width: 60vw; height: 60vw; max-width: 700px; max-height: 700px;
  background: radial-gradient(circle, var(--green-glow) 0%, transparent 65%);
  z-index: 1; pointer-events: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px; font-weight: 600;
  font-size: 0.98rem; border: 1px solid transparent; transition: transform .12s, background .15s, border-color .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--green); color: #04210f; }
.btn-primary:hover { background: var(--green-300); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }

/* ---------- Content ---------- */
.content { padding: 56px 20px 72px; }
.content h2 { font-size: 1.7rem; margin: 2.2em 0 0.6em; letter-spacing: -0.3px; }
.content h2:first-child { margin-top: 0; }
.content h3 { font-size: 1.2rem; margin: 1.8em 0 0.4em; color: var(--green-300); }
.content p, .content li { color: var(--text); }
.content ul, .content ol { padding-left: 1.3em; }
.content li { margin: 0.35em 0; }
.content a { text-decoration: underline; text-underline-offset: 2px; }
.content hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }
.content blockquote {
  margin: 1.5em 0; padding: 14px 18px; border-left: 3px solid var(--green);
  background: var(--bg-elev); border-radius: 0 10px 10px 0; color: var(--text-dim);
}
.content code {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 6px;
  padding: 1px 6px; font-size: 0.9em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--green-300);
}
.lead { font-size: 1.2rem; color: var(--text-dim); max-width: 760px; }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 20px; margin: 28px 0; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--green-700); transform: translateY(-2px); }
.card h3 { margin-top: 0; color: var(--text); }
.card .icon { font-size: 1.6rem; display: block; margin-bottom: 8px; }
.card .partner-logo { display: block; height: 46px; width: auto; max-width: 100%; margin-bottom: 16px; }
.card p { color: var(--text-dim); margin-bottom: 0; }

/* ---------- Settings table ---------- */
.settings-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.97rem; }
.settings-table th, .settings-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.settings-table th { color: var(--text-dim); font-weight: 600; background: var(--bg-elev); }
.settings-table td:first-child { font-weight: 600; white-space: nowrap; }
.settings-table tr:last-child td { border-bottom: 0; }

/* ---------- Callout ---------- */
.callout {
  background: var(--bg-elev); border: 1px solid var(--border); border-left: 3px solid var(--green);
  border-radius: 10px; padding: 16px 20px; margin: 24px 0;
}
.callout strong { color: var(--green-300); }

/* ---------- Map embed ---------- */
.map-embed {
  width: 100%; aspect-ratio: 16 / 9; min-height: 420px; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; background: var(--bg-elev);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-placeholder {
  display: flex; align-items: center; justify-content: center; height: 100%; flex-direction: column;
  color: var(--text-dim); text-align: center; padding: 24px;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-elev); margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; padding: 48px 20px 24px; flex-wrap: wrap; }
.footer-brand { max-width: 360px; }
.footer-brand p { color: var(--text-dim); font-size: 0.95rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-nav a { color: var(--text-dim); }
.footer-nav a:hover { color: var(--green); }
.footer-bottom { padding: 20px 20px 36px; border-top: 1px solid var(--border); }
.footer-bottom p { color: var(--text-dim); font-size: 0.85rem; margin: 4px 0; }
.footer-note { opacity: 0.7; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-toggle-label { display: block; }
  .site-nav {
    position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-elev);
    border-bottom: 1px solid var(--border); display: none; padding: 8px 0;
  }
  .nav-toggle:checked ~ .site-nav { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { padding: 12px 20px; border-radius: 0; }
  .nav-cta a { margin: 8px 20px; text-align: center; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 28px; }
}
