/* ── Solar Builder — shared styles for the static pages ─────────────────────
   Used by index/about/contact/changelog.html. The builder and gallery are
   separate Vite bundles with their own styles; keep the brand values here
   (colors, .nav-brand lockup) in sync with src-react global.css + gallery. */

:root {
  --bg:      #0d1b2a;
  --surface: #16213e;
  --border:  #0f3460;
  --accent:  #f0c040;
  --text:    #e0e0e0;
  --muted:   #7a8a9a;
  --nav-h:   52px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  /* Dot grid everywhere — same motif as the builder canvas / landing hero,
     a notch brighter so it reads on every page. */
  background:
    radial-gradient(circle, #22364e 1px, transparent 1px) 0 0 / 24px 24px,
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-wrap: break-word;
  -webkit-text-size-adjust: 100%;
  padding-top: var(--nav-h); /* room for the fixed nav */
}

a:focus-visible, button:focus-visible, label:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Nav ─────────────────────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(22, 33, 62, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h);
}

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; color: var(--accent);
  letter-spacing: 0.5px; text-decoration: none;
  white-space: nowrap;
}
.nav-brand span { font-size: 20px; }

.nav-toggle { display: none; }

.nav-right { display: flex; align-items: center; gap: 8px; }

.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-link {
  color: var(--muted); text-decoration: none;
  font-size: 13px; padding: 6px 12px;
  border-radius: 4px; border: 1px solid transparent;
  transition: all 0.15s; white-space: nowrap;
}
.nav-link:hover { color: var(--text); border-color: var(--border); }
.nav-link.active {
  color: var(--accent);
  border-color: rgba(240, 192, 64, 0.3);
  background: rgba(240, 192, 64, 0.06);
}

.nav-bmc {
  display: flex; align-items: center; gap: 6px;
  background: #ffdd00; color: #000;
  font-size: 12px; font-weight: 700;
  padding: 7px 13px; border-radius: 4px;
  text-decoration: none; white-space: nowrap;
  transition: opacity 0.15s;
  margin-left: 4px;
}
.nav-bmc:hover { opacity: 0.85; }

.nav-launch {
  background: #1a6abd; color: #fff;
  border: none; border-radius: 4px;
  padding: 7px 18px; font-size: 13px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  letter-spacing: 0.3px; white-space: nowrap;
  transition: opacity 0.15s, transform 0.1s;
}
.nav-launch:hover { opacity: 0.88; transform: translateY(-1px); }

/* Hamburger — hidden on desktop, swaps the link row for a dropdown on mobile */
.nav-burger { display: none; }

@media (max-width: 800px) {
  nav { padding: 0 1rem; }

  .nav-burger {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border: 1px solid var(--border); border-radius: 6px;
    color: var(--text); font-size: 17px;
    cursor: pointer; user-select: none; flex-shrink: 0;
  }
  .nav-burger::before { content: '☰'; }
  .nav-toggle:checked ~ .nav-right .nav-burger::before { content: '✕'; }

  .nav-links {
    display: none;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #0e1c2c;
    border-bottom: 1px solid var(--border);
    padding: 10px 12px 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  }
  .nav-toggle:checked ~ .nav-right .nav-links { display: flex; }

  .nav-link { font-size: 15px; padding: 12px 14px; border-radius: 6px; }

  .nav-bmc { margin: 8px 0 0; padding: 12px; justify-content: center; font-size: 13px; }

  .nav-launch { padding: 9px 14px; font-size: 12px; }
}

/* ── Page scaffolding (about / contact / changelog headers) ──────────────── */
.page-label {
  font-size: 11px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 0.75rem;
}
.page-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700; color: #fff;
  margin-bottom: 0.75rem;
}
.page-desc {
  font-size: 1rem; color: var(--muted);
  line-height: 1.7;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  font-size: 12px; color: var(--muted);
}
.footer-brand { color: var(--accent); font-weight: 600; }
.footer-note { font-size: 11px; color: #556070; }

@media (max-width: 600px) {
  footer {
    flex-direction: column; align-items: flex-start; gap: 6px;
    padding: 1.25rem 1.25rem 1.5rem;
  }
}
