/* Layer 8 Ecosystem — Core Styles */
/* Design: Radical Simplicity. Deterministic Power. Zero Noise. */

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

/* ── Tokens ── */
:root {
  --color-bg: #F9F9F7;
  --color-bg-alt: #F0F0EE;
  --color-text: #000000;
  --color-text-secondary: #666666;
  --color-text-muted: #999999;
  --color-accent: #0070F3;
  --color-border: #E5E5E5;

  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  --max-width: 1100px;
  --section-spacing: 20px;
  --content-padding: 24px;
}

/* ── Base ── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

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

/* ── Layout ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

section {
  padding: var(--section-spacing) 0;
}

section.alt {
  background: var(--color-bg-alt);
}

/* ── Typography ── */
h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  margin-top: 48px;
  margin-bottom: 20px;
}

h2:first-child {
  margin-top: 0;
}

h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 12px;
}

p {
  font-size: 20px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  max-width: 680px;
}

p + p {
  margin-top: 16px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Navigation ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(249, 249, 247, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.3s;
}

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

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}

.nav-logo::before {
  content: "";
  display: inline-block;
  width: 36px;
  height: 36px;
  background-image: url("../images/layer8-logo.gif");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  flex-shrink: 0;
}

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

.nav-links a {
  font-size: 16px;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero p {
  font-size: 20px;
  margin-bottom: 40px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font-primary);
  border: 1px solid var(--color-text);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-text);
  color: var(--color-bg);
}

.btn-primary:hover {
  background: var(--color-text-secondary);
  color: var(--color-bg);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
}

.btn-secondary:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

/* ── Proof Cards ── */
.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.proof-card {
  padding: 32px;
  border: 1px solid var(--color-border);
}

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

.proof-card p {
  font-size: 16px;
  margin-bottom: 16px;
}

.proof-card .evidence {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.proof-card a {
  font-size: 14px;
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  :root {
    --section-spacing: 34px;
    --content-padding: 20px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
  }

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

  .nav-links a {
    font-size: 18px;
  }

  .nav-toggle {
    display: block;
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn {
    text-align: center;
  }
}
