/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Variables ── */
:root {
  --bg:        #0d1a0f;
  --bg-card:   #111f13;
  --green-dim: #2d6a35;
  --green:     #3dba50;
  --green-lt:  #5fd471;
  --text:      #e8f5ea;
  --text-muted:#8aaa8e;
  --border:    #1e3322;
}

/* ── Base ── */
html, body { height: 100%; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Grid background ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

nav, main, footer { position: relative; z-index: 1; }

/* ── Nav ── */
nav {
  width: 100%;
  max-width: 960px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 24px;
  flex-wrap: wrap;
  gap: 0;
}

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--green-lt);
  text-decoration: none;
}

.logo span { color: var(--text-muted); font-weight: 400; }

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--green-lt); }

/* ── Hamburger ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ── Badge ── */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(61, 186, 80, 0.1);
  border: 1px solid rgba(61, 186, 80, 0.2);
  border-radius: 100px;
  padding: 6px 16px;
  margin-bottom: 20px;
}

/* ── Gradient highlight ── */
.highlight {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-lt) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Page header (inner pages) ── */
.page-header { margin-bottom: 48px; }

.page-header .badge { margin-bottom: 20px; }

.page-header h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.page-header p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Build cards (builds.html + builds-ios.html) ── */
.builds-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.build-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 8px 24px;
  align-items: start;
  transition: border-color 0.2s;
}

.build-card:hover { border-color: var(--green-dim); }

.build-card.latest {
  border-color: var(--green-dim);
  background: rgba(29, 58, 32, 0.4);
}

.build-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.version {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.latest-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--green);
  color: var(--bg);
  border-radius: 100px;
  padding: 3px 10px;
}

.build-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.build-notes {
  grid-column: 1;
  grid-row: 2;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.build-notes ul {
  list-style: none;
  padding: 0;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.build-notes ul li::before {
  content: '— ';
  color: var(--green-dim);
}

.build-notes ul li ul {
  margin-top: 4px;
  margin-left: 20px;
  flex-direction: column;
  gap: 3px;
}

.build-notes ul li ul li { font-size: 0.85rem; }

.build-notes ul li ul li::before {
  content: '· ';
  color: var(--green-dim);
}

.build-actions {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}

.download-btn:hover {
  background: var(--green-lt);
  transform: translateY(-1px);
}

.download-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ── Footer ── */
footer {
  width: 100%;
  max-width: 960px;
  padding: 24px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--green-lt); }

/* ── Mobile nav ── */
@media (max-width: 640px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 16px;
    padding: 16px 0 8px;
    border-top: 1px solid var(--border);
    margin-top: 16px;
  }

  .nav-links.open { display: flex; }

  .build-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .build-actions {
    grid-column: 1;
    grid-row: 3;
    justify-content: flex-start;
    margin-top: 8px;
  }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}
