/* ==========================================================================
   Avacore — Stylesheet
   Ethereal Glow in an Ephemeral Realm.
   ========================================================================== */

:root {
  --bg-color: #ffffff;
  --text-primary: #0a0a0a;
  --text-secondary: #4a4a4a;
  --text-muted: #888888;
  --text-subtle: #bbbbbb;
  --accent-line: rgba(0, 0, 0, 0.08);
  --font-serif: "Newsreader", "Cormorant Garamond", "Georgia", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Cinzel", "Newsreader", serif;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-color);
  overflow-x: hidden;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Page Layout & Sections
   -------------------------------------------------------------------------- */
.page-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
}

/* Hero Section (Logo + 3D Constellation Sphere) */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 82vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px 24px 16px;
  overflow: hidden;
}

/* 3D Constellation Sphere Canvas */
.constellation-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 1;
}

.logo-clearing {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 520px;
  height: 240px;
  max-width: 90vw;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.86) 0%,
    rgba(255, 255, 255, 0.45) 48%,
    rgba(255, 255, 255, 0) 75%
  );
  pointer-events: none;
  z-index: 2;
}

/* Stardust Ambient Canvas */
.stardust-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1000px;
  height: 600px;
  max-width: 98vw;
  max-height: 90vh;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

/* Stardust Stream Flow Animations */
.stardust-container {
  transform-origin: center center;
  animation: cosmicDrift 28s ease-in-out infinite alternate;
}

.dust-stream {
  stroke-dasharray: 6 8;
  animation: streamFlow 32s linear infinite;
}

.dust-stream-1 {
  animation-duration: 38s;
}

.dust-stream-2 {
  animation-duration: 44s;
  animation-direction: reverse;
}

.dust-stream-3 {
  animation-duration: 30s;
}

.dust-stream-4 {
  animation-duration: 50s;
  animation-direction: reverse;
}

.stream-glow {
  animation: glowBreathe 12s ease-in-out infinite alternate;
}

.stream-glow-2 {
  animation: glowBreathe 16s ease-in-out infinite alternate-reverse;
}

/* Individual Stardust Particle Classes */
.stardust-mote {
  transform-box: fill-box;
  transform-origin: center;
}

.drift-layer-1 {
  animation: stardustFloat1 18s ease-in-out infinite alternate;
}

.drift-layer-2 {
  animation: stardustFloat2 24s ease-in-out infinite alternate;
}

.drift-layer-3 {
  animation: stardustFloat3 30s ease-in-out infinite alternate;
}

.twinkle-subtle-1 {
  animation: stardustTwinkle 5s ease-in-out infinite;
}

.twinkle-subtle-2 {
  animation: stardustTwinkle 7.5s ease-in-out infinite 1.8s;
}

.twinkle-subtle-3 {
  animation: stardustTwinkle 9s ease-in-out infinite 3.2s;
}

.twinkle-subtle-4 {
  animation: stardustTwinkle 6.2s ease-in-out infinite 2.4s;
}

/* Logo Stage */
.logo-container {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 320px;
  padding: 16px;
  animation: logoEntrance 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.logo {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.scroll-indicator {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.3s ease;
  z-index: 3;
  opacity: 0.55;
}

.scroll-indicator:hover {
  opacity: 1;
}

.scroll-line {
  width: 1px;
  height: 24px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent);
  animation: scrollPulse 2.4s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   Manifesto Section
   -------------------------------------------------------------------------- */
.manifesto-section {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 780px;
  padding: 0 28px 100px;
  margin: 0 auto;
}

/* Axiom / Core Line */
.manifesto-axiom {
  text-align: center;
  margin-bottom: 50px;
  padding: 0 16px;
}

.axiom-quote {
  font-family: var(--font-sans);
  font-size: 1.12rem;
  font-weight: 300;
  font-style: normal;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 12px;
}

.axiom-author {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.divider {
  width: 44px;
  height: 1px;
  background-color: var(--text-primary);
  margin: 12px auto 28px;
  opacity: 0.2;
}

/* Intro Lead */
.manifesto-lead {
  text-align: center;
  font-size: 1.12rem;
  line-height: 1.85;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 54px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.manifesto-lead strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* Pillars Grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 36px;
  margin-bottom: 60px;
}

.pillar-card {
  display: flex;
  flex-direction: column;
  padding-top: 4px;
  position: relative;
}

.pillar-number {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.pillar-number::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: var(--accent-line);
}

.pillar-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.pillar-body {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 400;
  text-align: justify;
}

.pillar-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-primary);
  border-left: 2px solid var(--text-primary);
  padding-left: 12px;
  margin: 8px 0 10px;
  line-height: 1.45;
}

/* Footer / Heritage */
.manifesto-footer {
  text-align: center;
  padding-top: 8px;
}

.manifesto-footer::before {
  content: "";
  display: block;
  width: 44px;
  height: 1px;
  background-color: var(--text-primary);
  margin: 0 auto 36px;
  opacity: 0.2;
}

.heritage-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.heritage-badge::before,
.heritage-badge::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 1px;
  background-color: var(--accent-line);
}

.footer-mission {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   CSS Keyframes for Stardust Streams
   -------------------------------------------------------------------------- */
@keyframes cosmicDrift {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(6px, -4px) rotate(0.6deg);
  }
  100% {
    transform: translate(-5px, 5px) rotate(-0.5deg);
  }
}

@keyframes streamFlow {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: 200;
  }
}

@keyframes glowBreathe {
  0%, 100% {
    opacity: 0.22;
  }
  50% {
    opacity: 0.45;
  }
}

@keyframes stardustFloat1 {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(8px, -6px);
  }
  100% {
    transform: translate(-6px, 4px);
  }
}

@keyframes stardustFloat2 {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-10px, 8px);
  }
  100% {
    transform: translate(7px, -5px);
  }
}

@keyframes stardustFloat3 {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(5px, 9px);
  }
  100% {
    transform: translate(-8px, -7px);
  }
}

@keyframes stardustTwinkle {
  0%, 100% {
    opacity: 0.15;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.75;
    transform: scale(1.2);
  }
}

@keyframes scrollPulse {
  0%, 100% {
    transform: scaleY(0.7);
    opacity: 0.3;
  }
  50% {
    transform: scaleY(1.2);
    opacity: 0.85;
  }
}

@keyframes logoEntrance {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .hero-section {
    min-height: 70vh;
    padding-top: 24px;
  }

  .logo-container {
    max-width: 250px;
  }

  .manifesto-section {
    padding: 0 20px 70px;
  }

  .axiom-quote {
    font-size: 1.02rem;
  }

  .manifesto-lead {
    font-size: 1.02rem;
  }

  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .stardust-canvas {
    width: 680px;
    height: 440px;
  }
}

@media (min-width: 1400px) {
  .logo-container {
    max-width: 340px;
  }
  .stardust-canvas {
    width: 1100px;
    height: 660px;
  }
}
