/* =========================
   DESIGN TOKENS
========================= */
:root {
  --bg-main: #020617;
  --bg-card: #020617;

  --text-main: #e5e7eb;
  --text-muted: #94a3b8;
  --accent: #38bdf8;

  --border-soft: rgba(255, 255, 255, 0.08);

  --radius-sm: 8px;
  --radius-md: 14px;

  --container-max: 1100px;
}

/* =========================
   RESET & BASE
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

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

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0;
  color: var(--text-muted);
}

/* =========================
   LAYOUT SYSTEM
========================= */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(16px, 5vw, 24px);
}

/* ONE SINGLE VERTICAL RHYTHM */
section {
  padding-block: clamp(54px, 5vw, 102px);
}

/* =========================
   HEADER / NAV
========================= */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

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

.logo {
  font-weight: 600;
  font-size: 1.1rem;
}

.nav nav {
  display: flex;
  gap: 24px;
}

.nav a {
  font-size: 0.95rem;
  color: var(--text-muted);
}

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

/* MOBILE NAV */
@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-block: 12px;
  }

  .nav nav {
    gap: 16px;
  }
}

/* =========================
   HERO
========================= */
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  letter-spacing: -0.03em;
  max-width: 18ch;
}

.hero p {
  margin-top: 16px;
  max-width: 42ch;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  gap: 16px;
}

/* HERO MOBILE */
@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* =========================
   BUTTONS
========================= */
.btn {
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.primary {
  background: var(--accent);
  color: #000;
}

.btn.primary:hover {
  opacity: 0.9;
}

.btn.ghost {
  border: 1px solid var(--border-soft);
  color: var(--text-main);
}

.btn.ghost:hover {
  border-color: var(--accent);
}

/* =========================
   PROOF SECTION
========================= */
.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(20px, 5vw, 40px);
}

.proof h3 {
  margin-bottom: 8px;
}

/* =========================
   SERVICES
========================= */
.services h2,
.open-source h2,
.contact h2 {
  margin-bottom: 32px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(16px, 4vw, 32px);
}

.service {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 24px;
}

.service h4 {
  margin-bottom: 8px;
}

/* =========================
   OPEN SOURCE
========================= */
.section-desc {
  margin-bottom: 32px;
  max-width: 48ch;
}

.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(16px, 4vw, 32px);
  margin-bottom: 40px;
}

.repo {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 20px;
}

.repo h4 {
  margin-bottom: 6px;
}

.repo small {
  color: var(--text-muted);
}

/* =========================
   CONTACT
========================= */
.contact-box {
  text-align: center;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: clamp(32px, 6vw, 48px);
}

.contact-box p {
  margin: 12px 0 24px;
}

/* =========================
   FOOTER
========================= */
.footer {
  padding: 40px 20px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
}

/* =========================
   ACCESSIBILITY
========================= */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
