/* ============================================================
   PureMac Landing Page — Organic Eco-Conscious Theme
   Colors sourced from Theme.swift
   ============================================================ */

:root {
  /* Brand */
  --green: rgb(56, 143, 89);
  --amber: rgb(199, 140, 46);
  --terracotta: rgb(189, 102, 66);
  --sage: rgb(102, 148, 112);

  /* Backgrounds (dark — default) */
  --bg: #1A1712;
  --bg-sidebar: #1F1C14;
  --bg-surface: #24211A;
  --bg-surface-overlay: rgba(255, 255, 255, 0.04);

  /* Text */
  --text: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-muted: rgba(255, 255, 255, 0.35);
  --text-faint: rgba(255, 255, 255, 0.25);

  /* Divider */
  --divider: rgba(255, 255, 255, 0.08);

  /* Light palette (unused for now — site is dark-first) */
  --light-bg: #F5F0E6;
  --light-surface: #FAF5ED;
  --light-text: rgb(38, 33, 26);

  /* Spacing */
  --section-pad: 100px 0;
  --container: 1100px;

  /* Radius */
  --radius: 12px;
  --radius-lg: 20px;
}

/* ── Reset ──────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navigation ─────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(31, 28, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--divider);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-brand svg {
  width: 28px;
  height: 28px;
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links .btn-sm {
  background: var(--green);
  color: white;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.nav-links .btn-sm:hover {
  opacity: 0.9;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

.nav-toggle svg { width: 24px; height: 24px; }

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

.hero {
  padding: 160px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Gradient glow behind hero */
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(56, 143, 89, 0.15) 0%, rgba(199, 140, 46, 0.08) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero > * { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--green), var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.2s;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

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

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text);
  border: 1px solid var(--divider);
}

.btn-secondary:hover {
  background: var(--bg-surface-overlay);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Hero screenshot placeholder */
.hero-screenshot {
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--divider);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), 0 0 120px rgba(56, 143, 89, 0.08);
}

.hero-screenshot img {
  width: 100%;
  display: block;
}

.screenshot-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Features ───────────────────────────────────────────────── */

.features {
  padding: var(--section-pad);
}

.section-label {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green);
  margin-bottom: 12px;
}

.section-title {
  text-align: center;
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 60px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  transition: border-color 0.3s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* Feature accent backgrounds */
.feature-icon.green  { background: rgba(56, 143, 89, 0.15); color: var(--green); }
.feature-icon.amber  { background: rgba(199, 140, 46, 0.15); color: var(--amber); }
.feature-icon.terra  { background: rgba(189, 102, 66, 0.15); color: var(--terracotta); }
.feature-icon.sage   { background: rgba(102, 148, 112, 0.15); color: var(--sage); }

/* ── Trust / Promises ───────────────────────────────────────── */

.trust {
  padding: var(--section-pad);
  border-top: 1px solid var(--divider);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.trust-item {
  text-align: center;
  padding: 40px 24px;
}

.trust-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(56, 143, 89, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 24px;
}

.trust-item h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.trust-item p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

/* ── Open Source ─────────────────────────────────────────────── */

.opensource {
  padding: var(--section-pad);
  border-top: 1px solid var(--divider);
  text-align: center;
}

.opensource h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.opensource p {
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 32px;
  font-size: 16px;
  line-height: 1.7;
}

.github-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--divider);
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  transition: border-color 0.2s, transform 0.15s;
}

.github-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.github-btn svg { width: 22px; height: 22px; }

/* ── Download CTA ───────────────────────────────────────────── */

.download {
  padding: var(--section-pad);
  border-top: 1px solid var(--divider);
  text-align: center;
}

.download h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.download > .container > p {
  color: var(--text-secondary);
  margin-bottom: 48px;
  font-size: 16px;
}

.download-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.download-card {
  background: var(--bg-surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  transition: border-color 0.3s, transform 0.2s;
}

.download-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.download-card .card-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.download-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.download-card p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.download-card .btn {
  width: 100%;
  justify-content: center;
  font-size: 14px;
  padding: 12px 20px;
}

.btn-amber {
  background: var(--amber);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--divider);
  color: var(--text);
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

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

.footer {
  padding: 48px 0;
  border-top: 1px solid var(--divider);
  background: var(--bg-sidebar);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.footer-brand svg { width: 20px; height: 20px; }

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

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

.footer-copy {
  width: 100%;
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-faint);
}

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

@media (max-width: 768px) {
  :root { --section-pad: 72px 0; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(31, 28, 20, 0.97);
    backdrop-filter: blur(20px);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--divider);
  }
  .nav-toggle { display: block; }

  .hero { padding: 120px 0 60px; }
  .features-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .download-options { grid-template-columns: 1fr; max-width: 360px; }

  .footer-inner { justify-content: center; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 32px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}
