/* GLDoze project website — dark, technical, lightweight */

:root {
  color-scheme: dark;
  --bg: #0b1220;
  --bg-soft: #101a2c;
  --surface: #121d33;
  --surface-2: #16233d;
  --line: rgba(148, 163, 184, 0.16);
  --text: #e6edf7;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #4ade80;
  --accent-dim: rgba(56, 189, 248, 0.12);
  --radius: 14px;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(1000px 420px at 85% -10%, rgba(56, 189, 248, 0.10), transparent 60%),
    radial-gradient(800px 380px at 5% 15%, rgba(74, 222, 128, 0.07), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, .btn:focus-visible, .nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #041018;
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

.wrap { width: min(var(--max), 92%); margin: 0 auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 32, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

/* The header row is allowed to be wider than the 1120px content column: the
   primary navigation now carries ten labels, and squeezing them into the
   content column would overflow the viewport between ~1210px and ~1330px.
   The header is a full-bleed bar, so a wider row inside it reads naturally. */
.wrap.nav { width: min(1300px, 97%); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; display: block; }
.brand .dot { color: var(--accent-2); }

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--muted);
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: var(--accent-dim); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
}

/* ---------- Warning banner ---------- */
.disclaimer {
  background: rgba(251, 191, 36, 0.12);
  border-bottom: 1px solid rgba(251, 191, 36, 0.45);
  color: #fde68a;
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 0.7rem 0;
}
.disclaimer strong {
  color: #fbbf24;
  letter-spacing: 0.06em;
  margin-right: 0.35rem;
}

/* ---------- Hero ---------- */
.hero { padding: 5.5rem 0 4.5rem; }
.hero .kicker {
  display: inline-block;
  color: var(--accent-2);
  background: rgba(74, 222, 128, 0.10);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}
.hero h1 .grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lede {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 46rem;
  margin: 0 0 2rem;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: #041018;
}
.btn-primary:hover { box-shadow: 0 8px 26px rgba(56, 189, 248, 0.28); color: #041018; }
.btn-ghost {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }

/* ---------- Sections ---------- */
section { padding: 4rem 0; }
.section-head { max-width: 42rem; margin-bottom: 2.5rem; }
.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
}
.section-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }

.alt { background: var(--bg-soft); border-block: 1px solid var(--line); }

/* ---------- Cards ---------- */
.grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card .icon {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-dim);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}
.card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.app-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.app-card h3 { display: flex; align-items: baseline; gap: 0.5rem; }
.app-card .tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-2);
  background: rgba(74, 222, 128, 0.10);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  letter-spacing: 0.03em;
}

/* ---------- Tech list ---------- */
.tech-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.tech-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 1rem 1.15rem;
}
.tech-item strong { display: block; margin-bottom: 0.2rem; }
.tech-item span { color: var(--muted); font-size: 0.9rem; }

/* ---------- OSS + status ---------- */
.split {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
}
.panel h2 { margin-top: 0; font-size: 1.4rem; }
.panel p { color: var(--muted); }
.panel .btn { margin-top: 0.6rem; }

.status-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.status-list li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.7rem;
  color: var(--muted);
}
.status-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}
.status-list li.pending::before { background: var(--accent-2); box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.15); }

/* ---------- Donate page ---------- */
.donate-hero { padding-bottom: 2rem; }
.donate-section { padding-top: 1rem; }

.donate-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr;
}

.donate-card {
  padding: 1.05rem 1.25rem;
}
.donate-card h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}
.donate-card .tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 999px;
  padding: 0.12rem 0.6rem;
  letter-spacing: 0.04em;
}
.asset-note {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 0.7rem;
}
.muted-small { font-size: 0.82rem; opacity: 0.85; }

.addr-block {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.75rem;
}
.addr {
  flex: 1 1 20rem;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-all;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  color: var(--text);
  user-select: all;
}
.copy-btn {
  flex: 0 0 auto;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.copy-btn:hover { background: rgba(56, 189, 248, 0.22); }
.copy-btn.copied {
  background: rgba(74, 222, 128, 0.18);
  color: var(--accent-2);
  border-color: rgba(74, 222, 128, 0.4);
}
.copy-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.thanks-panel {
  margin-top: 3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
}
.thanks-panel h2 { margin-top: 0; font-size: 1.35rem; }
.thanks-panel p { color: var(--muted); margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.footnote { margin-top: 1.4rem; font-size: 0.82rem; opacity: 0.8; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 4%;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 0.7rem 0.75rem; }
  .hero { padding: 3.5rem 0 3rem; }
}

/* ---------- Header CTA ---------- */
/* The header carries ten entries: brand + Overview, Features, Applications,
   Shortcut Keys, Development, Progress, Source Code, Screenshots, Donate and
   the Get GLDoze button. Beside the brand they need about 1200px, so below
   ~1330px (where .wrap.nav at 97% of the viewport still clears that plus a
   safety margin for scrollbars and font metrics) the hamburger menu takes
   over instead of letting them wrap or overflow. */
@media (max-width: 1330px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 4%;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 0.7rem 0.75rem; white-space: normal; }
  .nav-links a.nav-cta { display: block; text-align: center; margin: 0.5rem 0 0.2rem; }
}

/* A primary-button treatment for the "Get GLDoze" nav entry. It stays an
   ordinary anchor: it scrolls to the #get panel further down the homepage,
   exactly like the section links beside it. */
.nav-links a.nav-cta {
  color: #041018;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  font-weight: 600;
  padding: 0.45rem 1rem;
  margin-left: 0.35rem;
  border-radius: 10px;
}
.nav-links a.nav-cta:hover {
  color: #041018;
  text-decoration: none;
  filter: brightness(1.08);
}
/* #get is a panel INSIDE the #development section, so it stops one header
   height lower than the bare section anchors: the panel's top edge lands flush
   against the bottom of the sticky header instead of sliding underneath it.
   The homepage repeats this rule inline because some browsers serve a stale
   cached style.css while re-fetching the HTML. */
#get { scroll-margin-top: 3.5rem; }   /* flush: panel top meets the 56px sticky header */
@media (max-width: 1330px) {
  #get { scroll-margin-top: 3.875rem; } /* flush against the 62px collapsed header */
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
