/* === RESET & ROOT === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #080c14;
  --bg-alt: #0d1420;
  --fg: #e8e6df;
  --fg-muted: #8a857a;
  --accent: #c9a84c;
  --accent-dim: rgba(201, 168, 76, 0.12);
  --accent-border: rgba(201, 168, 76, 0.25);
  --card: rgba(255,255,255,0.035);
  --card-border: rgba(255,255,255,0.07);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', 'Courier New', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* === NAV === */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(8,12,20,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: 0.02em;
}

.nav-tagline {
  font-size: 0.8rem;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: opacity 0.2s;
  margin-left: auto;
}

.nav-cta:hover { opacity: 0.7; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.nav-link:hover { color: var(--fg); }

/* === HERO === */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  padding: 8rem 5rem 5rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.hero-orb--1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 70%);
  top: -100px;
  right: -100px;
}

.hero-orb--2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(201,168,76,0.04) 0%, transparent 70%);
  bottom: 100px;
  left: 20%;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

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

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 1.5rem;
}

.hero-headline em {
  font-style: italic;
  color: var(--accent);
}

.hero-lede {
  font-size: 1.1rem;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 2.5rem;
}

.hero-entities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.entity-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
  background: var(--card);
  border: 1px solid var(--card-border);
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

/* === PORTFOLIO DIAGRAM === */
.hero-visual {
  position: relative;
  z-index: 1;
}

.portfolio-diagram {
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2.5rem;
  position: relative;
}

.portfolio-diagram::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(201,168,76,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.diagram-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.diagram-node--root {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  letter-spacing: 0.08em;
}

.diagram-lines {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  padding-left: 3rem;
  border-left: 1px dashed var(--card-border);
}

.diagram-branch {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.diagram-node--child {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-muted);
  background: var(--card);
  border: 1px solid var(--card-border);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
}

.diagram-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--card-border);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: center;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--accent);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--fg-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* === MANIFESTO === */
.manifesto {
  padding: 6rem 5rem;
  max-width: 900px;
  margin: 0 auto;
}

.manifesto-rule {
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 2.5rem;
}

.manifesto-quote {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
  color: var(--fg);
  margin-bottom: 1.5rem;
}

.manifesto-sub p {
  font-size: 1rem;
  color: var(--fg-muted);
  max-width: 560px;
  line-height: 1.7;
}

/* === FEATURES === */
.features {
  padding: 6rem 5rem;
  background: var(--bg-alt);
}

.features-header {
  margin-bottom: 4rem;
}

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.section-sub {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--fg-muted);
  max-width: 600px;
  line-height: 1.7;
}

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

.feature-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.feature-card:hover {
  border-color: var(--accent-border);
  background: rgba(201,168,76,0.03);
}

.feature-icon {
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.feature-title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 0.6rem;
}

.feature-desc {
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* === STRUCTURE === */
.structure {
  padding: 6rem 5rem;
}

.structure-header {
  max-width: 680px;
  margin-bottom: 4rem;
}

.structure-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.layer {
  width: 100%;
  border-radius: 8px;
  padding: 1.25rem 2rem;
  text-align: center;
}

.layer--meta {
  background: rgba(201,168,76,0.06);
  border: 1px solid var(--accent-border);
}

.layer--holding {
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  position: relative;
}

.layer-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-muted);
  flex-wrap: wrap;
}

.layer--subs {
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  border-top: none;
  border-radius: 0 0 8px 8px;
}

.sub-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.sub-entity {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
  background: var(--card);
  border: 1px solid var(--card-border);
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
}

.layer-connector {
  width: 1px;
  height: 24px;
  background: var(--card-border);
}

.layer-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: 0.04em;
}

.structure-caption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--fg-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* === CLOSING === */
.closing {
  position: relative;
  padding: 8rem 5rem;
  overflow: hidden;
  text-align: center;
}

.closing-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(201,168,76,0.06) 0%, transparent 65%);
  pointer-events: none;
}

.closing-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}

.closing-rule {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  margin: 0 auto 3rem;
}

.closing-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 1.5rem;
}

.closing-sub {
  font-size: 1.05rem;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 3rem;
}

.closing-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
}

.tag-divider {
  color: var(--accent);
  opacity: 0.5;
}

/* === FOOTER === */
.footer {
  padding: 2rem 5rem;
  border-top: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.footer-note {
  font-size: 0.8rem;
  color: var(--fg-muted);
  opacity: 0.5;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 7rem 2rem 4rem;
    gap: 3rem;
  }
  .hero-visual {
    order: -1;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .features,
  .manifesto,
  .structure,
  .closing,
  .footer {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  .nav {
    padding: 1rem 1.5rem;
  }
  .diagram-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  .hero-headline {
    font-size: 2.5rem;
  }
  .layer-stats {
    flex-direction: column;
    gap: 0.4rem;
  }
}