:root {
  --background: #e7e8e2;
  --foreground: #121310;
  --surface: rgba(255, 255, 255, .34);
  --muted: #62655d;
  --line: rgba(18, 19, 16, .17);
  --line-strong: rgba(18, 19, 16, .32);
  --violet: #6547e8;
  --violet-ink: #4c30ca;
  --signal: #a9de2f;
  color-scheme: light;
}

.dark {
  --background: #060707;
  --foreground: #f2f3ed;
  --surface: rgba(255, 255, 255, .025);
  --muted: #8c9188;
  --line: rgba(242, 243, 237, .105);
  --line-strong: rgba(242, 243, 237, .22);
  --violet: #8b72ff;
  --violet-ink: #a895ff;
  --signal: #c6ff45;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background-color .3s ease, color .3s ease;
}
button { font: inherit; }

.landing {
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 52px 52px;
}
.landing::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, var(--background) 0%, transparent 18%, transparent 82%, var(--background) 100%);
  opacity: .72;
}

.site-header {
  width: min(1460px, calc(100% - 64px));
  height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}
.wordmark { display: inline-flex; align-items: center; gap: 11px; font-size: 1.32rem; font-weight: 760; letter-spacing: -.045em; }
.wordmark > span:last-child { color: var(--violet-ink); }
.brand-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 5px color-mix(in srgb, var(--signal) 13%, transparent); }
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--foreground);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}
.theme-toggle:hover { transform: rotate(12deg); border-color: var(--violet); }
.theme-toggle:focus-visible { outline: 2px solid var(--signal); outline-offset: 4px; }
.theme-toggle .moon-icon, .dark .theme-toggle .sun-icon { display: none; }
.dark .theme-toggle .moon-icon { display: block; }

.hero {
  width: min(1460px, calc(100% - 64px));
  min-height: calc(100svh - 168px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(500px, .92fr);
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-copy { position: relative; z-index: 2; padding: 64px 0 82px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 30px;
  color: var(--muted);
  font: 600 .73rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--signal) 11%, transparent); }
.hero h1 { max-width: 960px; margin: 0; font-size: clamp(4.5rem, 8.15vw, 9.5rem); line-height: .86; letter-spacing: -.078em; font-weight: 620; }
.hero h1 em { color: var(--violet-ink); font-style: normal; }
.hero-lede { margin: 42px 0 0; color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.62; }

.federation-field { min-height: 680px; position: relative; margin-right: -58px; }
.federation-field svg { width: min(760px, 56vw); height: 100%; min-height: 680px; overflow: visible; }
.glow { fill: url(#coreGlow); }
.orbit { fill: none; stroke: var(--line-strong); stroke-width: 1; transform-origin: 360px 360px; }
.orbit-a { stroke-dasharray: 2 10; animation: orbit 48s linear infinite; }
.orbit-b { stroke-dasharray: 1 7; animation: orbit 28s linear reverse infinite; }
.connections path { fill: none; stroke: url(#connection); stroke-width: 1; stroke-dasharray: 5 10; opacity: .66; animation: signal 22s linear infinite; }
.nodes circle { fill: var(--background); stroke: var(--violet); stroke-width: 2; }
.nodes circle:nth-child(odd) { fill: var(--signal); stroke: var(--background); stroke-width: 5; }
.core-ring { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.core-dot { fill: var(--signal); filter: drop-shadow(0 0 16px var(--signal)); animation: pulse 2.6s ease-in-out infinite; }
.coordinate, .federation-label { position: absolute; color: var(--muted); font: 600 .65rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; }
.coordinate-a { left: 5%; top: 22%; }
.coordinate-b { right: 5%; bottom: 22%; }
.federation-label { right: 8%; top: 13%; color: var(--signal); }

footer {
  width: min(1460px, calc(100% - 64px));
  min-height: 80px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 500 .69rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .06em;
  position: relative;
  z-index: 3;
}
footer > span:nth-child(2) { text-align: center; }
.status { justify-self: end; display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--signal) 10%, transparent); }

@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes signal { to { stroke-dashoffset: -180; } }
@keyframes pulse { 50% { opacity: .5; transform: scale(.72); transform-origin: 360px 360px; } }

@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; padding-top: 74px; }
  .hero-copy { padding-bottom: 0; }
  .federation-field { min-height: 550px; margin: -80px auto -25px; opacity: .85; }
  .federation-field svg { width: min(720px, 92vw); min-height: 550px; }
}

@media (max-width: 640px) {
  .landing { background-size: 36px 36px; }
  .site-header, .hero, footer { width: calc(100% - 32px); }
  .site-header { height: 72px; }
  .hero { min-height: calc(100svh - 146px); padding-top: 54px; }
  .hero h1 { font-size: clamp(3.4rem, 17vw, 5.6rem); }
  .hero-lede { margin-top: 30px; }
  .federation-field { min-height: 390px; margin: -20px auto -15px; }
  .federation-field svg { min-height: 390px; width: 118vw; margin-left: -13vw; }
  .coordinate { display: none; }
  .federation-label { top: 7%; right: 2%; }
  footer { grid-template-columns: 1fr auto; min-height: 74px; }
  footer > span:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
