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

:root {
  --bg: #0a0f0a;
  --surface: #111a11;
  --surface-raised: #162016;
  --border: #243824;
  --green: #4a8c4a;
  --green-hover: #5aaa5a;
  --green-light: #c8e6c8;
  --text: #d8ecd8;
  --text-muted: #7a9a7a;
  --text-dim: #4a6a4a;
  --radius: 8px;
  --nav-h: 60px;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  color: var(--green-light);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 0.75rem; }
h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }

p { color: var(--text-muted); }
p + p { margin-top: 0.75rem; }

a {
  color: var(--green-light);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover { color: #fff; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Nav ──────────────────────────────────────────────── */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 15, 10, 0.97);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--green-light);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links > li > a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

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

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}

.nav-dropdown-toggle::after {
  content: '▾';
  font-size: 0.7rem;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle {
  color: var(--green-light);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  min-width: 190px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  list-style: none;
  padding: 0.4rem 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu li a {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all 0.15s;
}

.nav-dropdown-menu li a:hover,
.nav-dropdown-menu li a.active {
  background: var(--surface-raised);
  color: var(--green-light);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}

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

.nav-mobile {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--border);
  padding: 0.5rem 1.5rem 1rem;
  background: rgba(10, 15, 10, 0.97);
}

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

.nav-mobile a {
  display: block;
  padding: 0.7rem 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}

.nav-mobile a:last-child {
  border-bottom: none;
}

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

.page-content {
  padding-top: var(--nav-h);
}

/* ── Hero ─────────────────────────────────────────────── */

.home-hero {
  padding: 6rem 0 5rem;
  text-align: center;
  position: relative;
}

.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% -10%, rgba(74, 140, 74, 0.13) 0%, transparent 55%);
  pointer-events: none;
}

.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1rem;
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 2rem;
}

.app-icon {
  width: 88px;
  height: 88px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem;
  overflow: hidden;
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

/* ── Buttons ──────────────────────────────────────────── */

.btn-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--green);
  color: #fff;
}

.btn-primary:hover {
  background: var(--green-hover);
  color: #fff;
}

.btn-primary.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-secondary {
  background: transparent;
  color: var(--green-light);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--green);
  background: rgba(74, 140, 74, 0.1);
  color: var(--green-light);
}

/* ── Sections ─────────────────────────────────────────── */

.section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.4rem;
}

/* ── Feature grid ─────────────────────────────────────── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: border-color 0.2s;
}

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

.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
  display: block;
}

.feature-card p {
  font-size: 0.875rem;
  margin: 0;
}

/* ── Screenshots ──────────────────────────────────────── */

.screenshot-gallery {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  margin-top: 2rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.screenshot-gallery::-webkit-scrollbar {
  height: 4px;
}

.screenshot-gallery::-webkit-scrollbar-track {
  background: transparent;
}

.screenshot-gallery::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.screenshot-placeholder {
  flex: 0 0 200px;
  height: 380px;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
}

.screenshot-placeholder::before {
  content: '📱';
  font-size: 2rem;
}

/* ── App cards (home) ─────────────────────────────────── */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.app-card:hover {
  border-color: var(--green);
  background: var(--surface-raised);
  transform: translateY(-2px);
}

.app-card-icon {
  font-size: 2rem;
  margin-bottom: 0.25rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-card-icon img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  object-fit: cover;
}

.app-card-type {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}

.app-card h3 {
  font-size: 1.15rem;
  color: var(--green-light);
  margin-bottom: 0;
}

.app-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.app-card-arrow {
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ── Patch notes ──────────────────────────────────────── */

.patch-notes-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.patch-note-entry {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.patch-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  background: var(--surface);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.patch-note-header:hover {
  background: var(--surface-raised);
}

.patch-note-meta {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.patch-version {
  font-weight: 700;
  color: var(--green-light);
  font-size: 0.95rem;
}

.patch-date {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.patch-toggle {
  font-size: 0.75rem;
  color: var(--text-dim);
  transition: transform 0.2s;
  display: inline-block;
}

.patch-note-entry.open .patch-toggle {
  transform: rotate(180deg);
}

.patch-note-body {
  display: none;
  padding: 1rem 1.1rem;
  border-top: 1px solid var(--border);
}

.patch-note-entry.open .patch-note-body {
  display: block;
}

.patch-note-body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.patch-note-body li {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.patch-note-body li::before {
  content: '→';
  color: var(--green);
  flex-shrink: 0;
}

.patch-empty {
  margin-top: 1.5rem;
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-dim);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.8;
}

/* ── Live link badge ──────────────────────────────────── */

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  color: var(--green-light);
  margin-top: 1.5rem;
  transition: border-color 0.2s;
  text-decoration: none;
}

.live-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}

.live-badge:hover {
  border-color: var(--green);
  color: var(--green-light);
}

/* ── Privacy policy ───────────────────────────────────── */

.privacy-wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 0 5rem;
}

.privacy-meta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin-bottom: 2.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.privacy-wrapper h2 {
  font-size: 1.3rem;
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  margin-bottom: 0;
}

.privacy-wrapper h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.privacy-wrapper p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.privacy-wrapper ul {
  list-style: none;
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.privacy-wrapper li {
  display: flex;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.privacy-wrapper li::before {
  content: '▸';
  color: var(--green);
  flex-shrink: 0;
}

/* ── Footer ───────────────────────────────────────────── */

.site-footer {
  margin-top: 5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--green-light);
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .home-hero { padding: 4rem 0 3rem; }
  .hero { padding: 3.5rem 0 2.5rem; }
  .section { padding: 2.5rem 0; }

  .feature-grid { grid-template-columns: 1fr; }
  .app-grid { grid-template-columns: 1fr; }

  .privacy-wrapper { padding: 2rem 0 4rem; }
  .privacy-meta { gap: 0.75rem; }
}
