:root {
  color-scheme: dark;
  --bg: #03070c;
  --bg-soft: #07111b;
  --panel: rgba(8, 22, 34, 0.78);
  --panel-strong: rgba(7, 18, 29, 0.95);
  --line: rgba(119, 213, 255, 0.18);
  --line-bright: rgba(138, 225, 255, 0.5);
  --ice: #c6f3ff;
  --ice-bright: #73dcff;
  --blue: #20aeea;
  --blue-deep: #0876a7;
  --text: #e8f7ff;
  --muted: #91aab8;
  --ok: #54edc0;
  --warn: #f0bf67;
  --danger: #ff6f80;
  --max: 1180px;
  --radius: 22px;
  --font-display: "Arial Narrow", "Bahnschrift SemiCondensed", "Segoe UI", sans-serif;
  --font-body: Inter, "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
img { display: block; max-width: 100%; }
::selection { background: rgba(115, 220, 255, 0.28); color: #fff; }
:focus-visible { outline: 2px solid var(--ice-bright); outline-offset: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: 100;
  transform: translateY(-160%); padding: 0.65rem 1rem; border-radius: 8px;
  background: var(--ice-bright); color: #031018; font-weight: 800; text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }
.ambient {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(circle at 75% 28%, rgba(19, 128, 180, 0.1), transparent 25rem),
    radial-gradient(circle at 18% 72%, rgba(40, 174, 231, 0.08), transparent 30rem),
    linear-gradient(rgba(255,255,255,0.013) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.013) 1px, transparent 1px);
  background-size: auto, auto, 52px 52px, 52px 52px;
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 85%, transparent);
}

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: 76px;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding: 0 max(1.25rem, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, height .3s ease;
}
.site-header.is-scrolled {
  height: 66px; background: rgba(3, 9, 15, 0.88); border-color: var(--line);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.brand, .footer-brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand span, .footer-brand span {
  font-family: var(--font-display); font-weight: 900; letter-spacing: .18em; font-size: .95rem;
}
.site-header nav { display: flex; align-items: center; gap: 2rem; }
.site-header nav a {
  color: var(--muted); font-size: .9rem; font-weight: 650; text-decoration: none;
  transition: color .2s ease;
}
.site-header nav a:hover { color: var(--ice); }
.header-join {
  padding: .5rem 1rem; border: 1px solid var(--line-bright); border-radius: 999px;
  color: var(--ice); text-decoration: none; text-transform: uppercase; letter-spacing: .12em;
  font-size: .78rem; font-weight: 850;
}

.hero {
  position: relative; display: grid; place-items: center; padding: 6rem 1rem 2.5rem;
  border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 50% 20%, #0c202e, var(--bg) 72%);
}
.hero-content {
  width: min(100%, 768px); min-width: 0; text-align: center;
}
.hero-banner {
  width: 100%; height: auto; margin: 0 auto 1rem;
  /* Fade the outer edges while keeping the artwork and lettering clear. */
  mask-image:
    linear-gradient(to right, transparent, #000 14%, #000 86%, transparent),
    linear-gradient(to bottom, transparent, #000 9%, #000 95%, transparent);
  mask-composite: intersect;
}
.hero-copy { max-width: 650px; margin: .4rem auto 1.9rem; color: #d7e9f2; font-size: clamp(1.05rem, 2vw, 1.3rem); text-shadow: 0 2px 18px rgba(0,0,0,.9); }
.eyebrow {
  margin: 0 0 .75rem; color: var(--ice-bright); font-size: .76rem; font-weight: 850;
  letter-spacing: .25em; line-height: 1.4; text-transform: uppercase;
}
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .9rem; }
.button {
  min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  padding: .85rem 1.55rem; border: 1px solid transparent; border-radius: 8px;
  font-family: var(--font-display); font-size: .92rem; font-weight: 900; letter-spacing: .12em;
  text-decoration: none; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary {
  position: relative; color: #03111a; background: linear-gradient(135deg, #d6f8ff, #57c9f5);
  box-shadow: 0 0 0 1px rgba(217, 249, 255, .18), 0 12px 36px rgba(19, 161, 218, .24);
}
.button-primary:hover { box-shadow: 0 0 0 1px rgba(217, 249, 255, .45), 0 16px 42px rgba(19, 161, 218, .32); }
.button-ghost { border-color: var(--line-bright); background: rgba(2, 12, 19, .45); color: var(--ice); backdrop-filter: blur(8px); }
.button-ghost:hover { border-color: var(--ice-bright); background: rgba(16, 62, 83, .4); }
.button-pulse { width: 8px; height: 8px; border-radius: 50%; background: #0a6e92; box-shadow: 0 0 0 0 rgba(5, 92, 126, .5); animation: pulse 2.2s infinite; }
.section { width: min(var(--max), calc(100% - 2.5rem)); margin: 0 auto; padding: 4rem 0; }
.section-heading { max-width: 680px; margin-bottom: 2.4rem; }
.section-heading h2, .connect-copy h2 {
  margin: 0 0 .8rem; font-family: var(--font-display); font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.02; letter-spacing: -.025em; text-transform: uppercase;
}
.section-heading > p:last-child { margin: 0; color: var(--muted); font-size: 1.05rem; }

.status-section { padding-top: 4.5rem; }
.status-panel {
  overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(11, 31, 47, .83), rgba(5, 14, 23, .86));
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28), inset 0 1px rgba(255,255,255,.025);
}
.status-primary {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem;
  min-height: 105px; padding: 1.5rem 1.8rem; border-bottom: 1px solid var(--line);
}
.status-orb { width: 17px; height: 17px; border-radius: 50%; background: #78909c; box-shadow: 0 0 0 7px rgba(145, 170, 184, .08); }
.status-orb.is-online { background: var(--ok); box-shadow: 0 0 0 7px rgba(84, 237, 192, .09), 0 0 23px rgba(84, 237, 192, .45); }
.status-orb.is-offline { background: var(--danger); box-shadow: 0 0 0 7px rgba(255, 111, 128, .09); }
.status-orb.is-stale { background: var(--warn); box-shadow: 0 0 0 7px rgba(240, 191, 103, .09); }
.status-label { display: block; color: var(--muted); font-size: .78rem; letter-spacing: .13em; text-transform: uppercase; }
.status-value { display: block; font-size: 1.35rem; line-height: 1.3; }
.status-freshness { color: var(--muted); font-size: .8rem; text-align: right; }
.telemetry-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.telemetry-grid:has(.telemetry-item:not(.is-hidden):nth-child(4)) { grid-template-columns: repeat(4, 1fr); }
.telemetry-item { min-width: 0; padding: 1.5rem 1.8rem 1.7rem; border-right: 1px solid var(--line); }
.telemetry-item:last-child { border-right: 0; }
.telemetry-item > span { display: block; color: var(--muted); font-size: .78rem; letter-spacing: .11em; text-transform: uppercase; }
.telemetry-item strong { display: block; margin: .35rem 0 .05rem; overflow-wrap: anywhere; font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.15; }
.telemetry-item small { color: #6f8998; font-size: .77rem; }
.is-hidden { display: none !important; }
.status-note { padding: 0 1.8rem 1.4rem; color: var(--muted); }

.channel-section { position: relative; }
.channel-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.channel-card {
  position: relative; min-height: 118px; display: grid; grid-template-columns: auto 1fr; gap: 1.25rem;
  padding: 1.6rem; overflow: hidden; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(145deg, rgba(9, 23, 36, .86), rgba(5, 13, 21, .74));
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.channel-card::after { content: ""; position: absolute; inset: auto -20% -80% 25%; height: 180px; background: radial-gradient(ellipse, rgba(43, 175, 228, .12), transparent 65%); pointer-events: none; }
.channel-card:hover { transform: translateY(-3px); border-color: var(--line-bright); background: linear-gradient(145deg, rgba(12, 34, 51, .92), rgba(5, 13, 21, .8)); }
.channel-icon { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line-bright); border-radius: 50%; color: var(--ice-bright); font-size: 1.5rem; }
.channel-card h3 { margin: .1rem 0 .35rem; font-size: 1.25rem; }
.channel-card p { margin: 0; color: var(--muted); }
.channel-tag { position: absolute; right: 1.2rem; top: 1rem; color: rgba(159, 213, 235, .38); font-size: .65rem; font-weight: 800; letter-spacing: .2em; }

.connect-section { width: 100%; max-width: none; padding: 2rem max(1.25rem, calc((100vw - var(--max)) / 2)) 4rem; }
.connect-card {
  position: relative; display: grid; grid-template-columns: 1.35fr .65fr; gap: 4rem; align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem); overflow: hidden; border: 1px solid var(--line-bright); border-radius: var(--radius);
  background:
    linear-gradient(115deg, rgba(8, 28, 43, .95), rgba(3, 12, 20, .92)),
    radial-gradient(circle at 82% 30%, rgba(55, 188, 240, .24), transparent 22rem);
  box-shadow: 0 32px 100px rgba(0,0,0,.32);
}
.connect-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 45%, rgba(121, 218, 255, .035) 45.1%, transparent 46%); }
.connect-copy h2 { font-size: clamp(1.75rem, 4vw, 3rem); }
.connect-copy > p:not(.eyebrow) { max-width: 650px; color: var(--muted); }
.address-box { width: min(100%, 520px); display: flex; align-items: center; margin-top: 1.4rem; border: 1px solid var(--line-bright); border-radius: 10px; background: rgba(1, 8, 13, .58); }
.address-box code { min-width: 0; flex: 1; padding: .82rem 1rem; overflow: hidden; color: var(--ice); font-family: "Cascadia Mono", Consolas, monospace; font-size: 1rem; text-overflow: ellipsis; }
.copy-button { align-self: stretch; padding: 0 1rem; border: 0; border-left: 1px solid var(--line); border-radius: 0 9px 9px 0; background: rgba(39, 139, 180, .16); color: var(--ice-bright); cursor: pointer; font-size: .82rem; font-weight: 800; }
.copy-button:hover { background: rgba(50, 173, 222, .25); }
.copy-feedback { min-height: 1.5em; margin: .4rem 0 0 !important; color: var(--ok) !important; font-size: .82rem; }
.connect-actions { display: grid; gap: .8rem; }
.button-wide { width: 100%; }
.connect-actions small { color: var(--muted); text-align: center; font-size: .76rem; }

.site-footer {
  min-height: 88px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.25rem;
  padding: 1rem max(1.25rem, calc((100vw - var(--max)) / 2)); border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem;
}
.footer-brand img { width: 36px; height: 36px; object-fit: contain; }
.site-footer p { margin: 0; }

.reveal.is-visible { animation: rise-in .45s ease both; }
@keyframes rise-in { from { opacity: .8; transform: translateY(8px); } }


@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(5, 92, 126, 0); } 100% { box-shadow: 0 0 0 0 rgba(5, 92, 126, 0); } }


@media (max-width: 860px) {
  .site-header nav { display: none; }

  .telemetry-grid, .telemetry-grid:has(.telemetry-item:not(.is-hidden):nth-child(4)) { grid-template-columns: repeat(2, 1fr); }
  .telemetry-item:nth-child(2) { border-right: 0; }
  .telemetry-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .connect-card { grid-template-columns: 1fr; gap: 2rem; }
  .connect-actions { grid-template-columns: repeat(2, 1fr); }
  .connect-actions small { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .site-header { height: 66px; padding-inline: 1rem; }
  .brand span { font-size: .85rem; }
  .brand img { width: 34px; height: 34px; }
  .header-join { padding: .45rem .85rem; }

  .hero-copy { font-size: 1rem; }
  .hero-actions { width: 100%; flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .hero { padding-top: 5rem; }
  .section { width: min(100% - 1.5rem, var(--max)); padding-block: 3rem; }
  .status-section { padding-top: 3rem; }
  .status-primary { grid-template-columns: auto 1fr; padding: 1.2rem; }
  .status-freshness { grid-column: 2; text-align: left; }
  .telemetry-item { padding: 1.2rem; }
  .telemetry-item strong { font-size: 1.45rem; }
  .channel-grid { grid-template-columns: 1fr; }
  .channel-card { min-height: 105px; padding: 1.3rem; }
  .connect-section { padding: 1rem .75rem 3rem; }
  .connect-card { padding: 2rem 1.2rem; border-radius: 16px; }
  .connect-actions { grid-template-columns: 1fr; }
  .connect-actions small { grid-column: auto; }
  .address-box code { font-size: .9rem; }
  .footer-brand span { font-size: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
