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

:root {
  --bg: #0a0a0f;
  --bg-alt: #0e0e16;
  --bg-card: #12121a;
  --text: #e8e8ed;
  --text-muted: #8888a0;
  --accent: #7c6cf0;
  --accent-glow: rgba(124, 108, 240, 0.3);
  --warm: #f0a060;
  --warm-glow: rgba(240, 160, 96, 0.2);
  --cyan: #60c8d0;
  --cyan-glow: rgba(96, 200, 208, 0.2);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(124, 108, 240, 0.3);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav-brand span {
  color: var(--accent);
}

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

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  background: #6b5ce0;
  color: white;
  box-shadow: 0 0 30px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

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

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, var(--accent-glow) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 70%, var(--warm-glow) 0%, transparent 50%);
  pointer-events: none;
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent), var(--warm));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections */
.section {
  padding: 6rem 2rem;
}

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

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.section p.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 650px;
  line-height: 1.8;
}

/* Story block */
.story-block {
  max-width: 750px;
}

.story-block .lead + .lead {
  margin-top: 1.2rem;
}

/* Split section */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.split.reverse {
  direction: rtl;
}

.split.reverse > * {
  direction: ltr;
}

.split-image {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.split-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Pillars grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  transition: border-color 0.3s, transform 0.3s;
}

.pillar-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.pillar-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.pillar-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.pillar-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Nexus section */
#nexus h2 .highlight {
  background: linear-gradient(135deg, var(--accent), var(--warm));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nexus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.nexus-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  transition: border-color 0.3s, transform 0.3s;
}

.nexus-card:hover {
  transform: translateY(-2px);
}

.nexus-card--nexus { border-top: 3px solid var(--accent); }
.nexus-card--nexus:hover { border-color: var(--accent); }
.nexus-card--nexus .nexus-icon { color: var(--accent); }

.nexus-card--beacon { border-top: 3px solid var(--warm); }
.nexus-card--beacon:hover { border-color: var(--warm); }
.nexus-card--beacon .nexus-icon { color: var(--warm); }

.nexus-card--pylon { border-top: 3px solid var(--cyan); }
.nexus-card--pylon:hover { border-color: var(--cyan); }
.nexus-card--pylon .nexus-icon { color: var(--cyan); }

.nexus-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.nexus-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.nexus-role {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.nexus-card--nexus .nexus-role { color: var(--accent); }
.nexus-card--beacon .nexus-role { color: var(--warm); }
.nexus-card--pylon .nexus-role { color: var(--cyan); }

.nexus-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.nexus-privacy {
  margin-top: 4rem;
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.nexus-privacy h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.privacy-item strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.privacy-item p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Chronicles */
.chronicles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.chronicle-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.8rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  transition: border-color 0.3s, transform 0.3s;
}

.chronicle-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.chronicle-card--featured {
  grid-column: 1 / -1;
  border-color: rgba(124, 108, 240, 0.2);
}

.chronicle-card--text {
  border-style: dashed;
}

.chronicle-avatar {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  object-fit: cover;
  object-position: top;
  flex-shrink: 0;
  background: var(--bg-alt);
}

.chronicle-card--featured .chronicle-avatar {
  width: 140px;
  height: 140px;
}

.chronicle-info h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.chronicle-role {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.chronicle-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.chronicles-cta {
  margin-top: 2.5rem;
  text-align: center;
}

.chronicles-tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-style: italic;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Whitepapers */
.papers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.paper-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.8rem;
  transition: border-color 0.3s, transform 0.3s;
  color: var(--text);
}

.paper-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  color: var(--text);
}

.paper-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(124, 108, 240, 0.1);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.8rem;
}

.paper-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.paper-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.papers-cta {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.papers-note {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Commons actions */
.commons-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* CTA */
.cta {
  text-align: center;
  padding: 8rem 2rem;
  position: relative;
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.cta h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

/* Footer */
.footer {
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

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

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

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
  .nav {
    padding: 1rem;
  }
  .nav-links {
    gap: 1rem;
  }
  .nav-links a:not(.btn) {
    display: none;
  }
  .split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .split.reverse {
    direction: ltr;
  }
  .split-image {
    order: -1;
  }
  .pillars-grid,
  .papers-grid,
  .nexus-grid,
  .chronicles-grid {
    grid-template-columns: 1fr;
  }
  .privacy-grid {
    grid-template-columns: 1fr;
  }
  .chronicle-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .chronicle-card--featured .chronicle-avatar {
    width: 120px;
    height: 120px;
  }
  .hero {
    padding: 6rem 1.5rem 3rem;
  }
  .section {
    padding: 4rem 1.5rem;
  }
  .papers-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .pillars-grid,
  .papers-grid,
  .nexus-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
