:root {
  --void: #07080b;
  --ink: #0d0f14;
  --mist: #9a917f;
  --bone: #ebe4d4;
  --gold: #c9a24d;
  --gold-bright: #e0bd6a;
  --gold-dim: #7a6230;
  --ember: #8a3a22;
  --online: #4faf68;
  --offline: #c24a3f;
  --checking: #c4a84a;
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Outfit", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--bone);
  background: var(--void);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Topbar */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem clamp(1.25rem, 4vw, 3rem);
  background: linear-gradient(180deg, rgba(7, 8, 11, 0.92), rgba(7, 8, 11, 0));
}

.logo img {
  width: clamp(140px, 18vw, 187px);
  height: auto;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.55));
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist);
  transition: color 0.25s var(--ease);
}

.nav a:hover {
  color: var(--bone);
}

.server-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(201, 162, 77, 0.35);
  background:
    linear-gradient(180deg, rgba(20, 18, 14, 0.85), rgba(10, 11, 14, 0.9)),
    var(--ui-panel) center / cover;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%);
}

.server-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--checking);
  box-shadow: 0 0 10px currentColor;
}

.server-pill[data-state="online"] .server-dot { background: var(--online); color: var(--online); }
.server-pill[data-state="online"] .server-label { color: var(--online); }
.server-pill[data-state="offline"] .server-dot { background: var(--offline); color: var(--offline); }
.server-pill[data-state="offline"] .server-label { color: var(--offline); }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: end stretch;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transform: scale(1.06);
  animation: heroDrift 28s var(--ease) infinite alternate;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 8, 11, 0.88) 0%, rgba(7, 8, 11, 0.42) 48%, rgba(7, 8, 11, 0.75) 100%),
    linear-gradient(180deg, rgba(7, 8, 11, 0.4) 0%, rgba(7, 8, 11, 0.12) 35%, rgba(7, 8, 11, 0.94) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  padding: clamp(5.5rem, 14vh, 8rem) clamp(1.25rem, 4vw, 3rem) clamp(4rem, 10vh, 6rem);
}

.brand {
  margin: 0;
}

.brand-logo {
  width: min(560px, 86vw);
  height: auto;
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.65));
  animation: brandGlow 4.5s var(--ease) infinite alternate;
}

.hero-lead {
  margin: 1.5rem 0 0;
  max-width: 28ch;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 300;
  color: var(--bone);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.95rem;
  margin-top: 2.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  min-width: 12.5rem;
  padding: 0.85rem 1.6rem 1rem;
  border: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone);
  transition: transform 0.25s var(--ease), filter 0.25s var(--ease), color 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn-gold {
  background-image: var(--ui-btn-primary);
  color: #1a1408;
  text-shadow: 0 1px 0 rgba(255, 230, 170, 0.35);
}

.btn-gold:hover {
  background-image: var(--ui-btn-primary-hover);
}

.btn-ghost {
  background-image: var(--ui-btn-secondary);
  color: var(--bone);
}

.btn-ghost:hover {
  background-image: var(--ui-btn-secondary-hover);
  color: var(--gold-bright);
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  z-index: 2;
  width: 1px;
  height: 3rem;
  background: rgba(201, 162, 77, 0.25);
  transform: translateX(-50%);
}

.hero-scroll span {
  display: block;
  width: 1px;
  height: 1.1rem;
  background: var(--gold);
  animation: scrollPulse 1.8s var(--ease) infinite;
}

/* Shared */
.band {
  position: relative;
  padding: clamp(5.5rem, 12vh, 9rem) clamp(1.25rem, 4vw, 3rem);
  overflow: hidden;
}

.band-inner {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.band-inner.narrow {
  width: min(860px, 100%);
}

.band h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  line-height: 1.08;
  letter-spacing: 0.03em;
  color: var(--bone);
}

.lede {
  margin: 1.5rem 0 0;
  max-width: 38ch;
  color: var(--mist);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  font-weight: 300;
  line-height: 1.7;
}

.lede.wide {
  max-width: 42ch;
}

.section-banner {
  width: min(420px, 100%);
  height: auto;
  aspect-ratio: 900 / 120;
  margin: 0 0 1.35rem;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
}

.section-banner--list { background-image: var(--ui-banner-list); aspect-ratio: 900 / 132; }
.section-banner--hero { background-image: var(--ui-banner-hero); aspect-ratio: 900 / 104; }
.section-banner--commands { background-image: var(--ui-banner-commands); aspect-ratio: 900 / 115; }

.ornament-divider {
  width: min(280px, 70%);
  height: 28px;
  margin: 1.5rem 0 0;
  background: var(--ui-divider) center / contain no-repeat;
  opacity: 0.9;
}

.ornament-divider--center {
  margin-left: auto;
  margin-right: auto;
}

/* Vision */
.vision {
  min-height: 78vh;
  display: grid;
  align-items: center;
  background: #08090d;
}

.band-bg {
  position: absolute;
  inset: 0;
  background-image: var(--band-image);
  background-size: cover;
  background-position: 70% center;
  filter: saturate(0.7) brightness(0.35);
  transform: scale(1.04);
}

.band-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(7, 8, 11, 0.96) 0%, rgba(7, 8, 11, 0.78) 42%, rgba(7, 8, 11, 0.55) 100%),
    linear-gradient(180deg, rgba(7, 8, 11, 0.35), rgba(7, 8, 11, 0.88));
}

.vision .band-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: end;
}

.vision-stage {
  justify-self: end;
  width: min(320px, 100%);
}

.stage-frame {
  position: relative;
  padding: 1.1rem 1rem 1.35rem;
  background:
    linear-gradient(180deg, rgba(12, 12, 16, 0.55), rgba(8, 8, 12, 0.72)),
    var(--ui-panel) center / cover;
  box-shadow:
    inset 0 0 0 1px rgba(201, 162, 77, 0.28),
    0 18px 40px rgba(0, 0, 0, 0.45);
}

.stage-frame img {
  width: 100%;
  height: auto;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.05);
}

/* Systems */
.systems {
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(138, 58, 34, 0.14), transparent 55%),
    linear-gradient(180deg, #0a0b10 0%, #07080b 100%);
}

.systems-head {
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
}

.systems-head h2 {
  max-width: 14ch;
}

.manifesto {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(201, 162, 77, 0.28);
}

.manifesto-item {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.6rem, 3.5vh, 2.4rem) 0;
  border-bottom: 1px solid rgba(154, 145, 127, 0.16);
  transition: background 0.35s var(--ease);
}

.manifesto-item:hover {
  background: linear-gradient(90deg, rgba(201, 162, 77, 0.05), transparent 55%);
}

.manifesto-index {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  padding-top: 0.35rem;
}

.manifesto-body h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  letter-spacing: 0.06em;
  color: var(--gold-bright);
}

.manifesto-body p {
  margin: 0;
  max-width: 46ch;
  color: var(--mist);
  font-size: 1.02rem;
  font-weight: 300;
  line-height: 1.65;
}

/* Status */
.status {
  background:
    radial-gradient(ellipse 50% 45% at 20% 100%, rgba(201, 162, 77, 0.1), transparent 55%),
    linear-gradient(180deg, #090a0e, #050608);
}

.status-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2.5rem, 7vw, 5.5rem);
  align-items: start;
}

.status-head h2 {
  max-width: 11ch;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.1rem;
  border-left: 1px solid rgba(201, 162, 77, 0.28);
}

.timeline-item {
  position: relative;
  padding: 0 0 2rem 1.6rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-node {
  position: absolute;
  left: -1.1rem;
  top: 0.35rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #3a3a42;
  border: 1px solid rgba(154, 145, 127, 0.45);
  transform: translateX(-50%);
}

.timeline-item.is-done .timeline-node {
  background: var(--online);
  border-color: var(--online);
  box-shadow: 0 0 12px rgba(79, 175, 104, 0.45);
}

.timeline-item.is-active .timeline-node {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  box-shadow: 0 0 14px rgba(224, 189, 106, 0.55);
}

.timeline-phase {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mist);
}

.timeline-item.is-done .timeline-phase { color: var(--online); }
.timeline-item.is-active .timeline-phase { color: var(--gold); }

.timeline-item h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  color: var(--bone);
}

.timeline-item p {
  margin: 0;
  color: var(--mist);
  font-size: 0.95rem;
  font-weight: 300;
  max-width: 36ch;
}

.status-note {
  grid-column: 1 / -1;
  margin: 2.5rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid rgba(201, 162, 77, 0.18);
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--mist);
  font-size: 0.9rem;
}

.status-portrait {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid rgba(201, 162, 77, 0.4);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

/* Footer */
.footer {
  padding: 2.75rem clamp(1.25rem, 4vw, 3rem) 3rem;
  background: #040507;
  text-align: center;
}

.footer-logo {
  width: min(220px, 55vw);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.5));
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
  margin-top: 0.25rem;
  color: var(--mist);
  font-size: 0.82rem;
}

.footer-meta a {
  color: var(--gold-dim);
  transition: color 0.2s ease;
}

.footer-meta a:hover {
  color: var(--gold-bright);
}

/* Motion */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: riseIn 0.9s var(--ease) forwards;
}

.delay-1 { animation-delay: 0.14s; }
.delay-2 { animation-delay: 0.28s; }

.in-view {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}

.in-view.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.manifesto-item.in-view:nth-child(2) { transition-delay: 0.08s; }
.manifesto-item.in-view:nth-child(3) { transition-delay: 0.16s; }

@keyframes riseIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroDrift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); }
}

@keyframes brandGlow {
  from { filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 10px rgba(201, 162, 77, 0.12)); }
  to { filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 22px rgba(201, 162, 77, 0.28)); }
}

@keyframes scrollPulse {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(1.6rem); opacity: 0; }
}

@media (max-width: 900px) {
  .nav {
    display: none;
  }

  .vision .band-inner,
  .status-layout {
    grid-template-columns: 1fr;
  }

  .vision-stage {
    justify-self: start;
    order: -1;
    width: min(240px, 70%);
  }

  .manifesto-item {
    grid-template-columns: 3.2rem minmax(0, 1fr);
  }

  .btn {
    min-width: 0;
    width: 100%;
    max-width: 20rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .hero-img,
  .hero-scroll span,
  .brand-logo {
    animation: none !important;
  }
  .reveal,
  .in-view {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
