/* Protostar: deep field. Near-black space, ice blue from the logo as the one accent. */
:root {
  color-scheme: dark;
  --space: #05070C;
  --panel: #0B0F18;
  --raised: #131A28;
  --line: rgba(166, 212, 255, 0.10);
  --line-strong: rgba(166, 212, 255, 0.18);
  --text: #EEF3FB;
  --soft: #CBD3E2;
  --muted: #9AA4B8;
  --ice: #9AD1FF;
  --ice-ink: #04121F;
  --on: #63DBA6;
  --display: "Michroma", "Eurostile", "Segoe UI", sans-serif;   /* titles only: wide, one weight */
  --sans: "Work Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --wrap: 1200px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--space); color: var(--text); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--ice); }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; padding: 8px 14px; background: var(--ice); color: var(--ice-ink); border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px;
  border-radius: 999px; font: 600 16px var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ice); color: var(--ice-ink); border: 0; }
.btn-primary:hover { box-shadow: 0 10px 30px rgba(154, 209, 255, 0.28); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: rgba(154, 209, 255, 0.08); border-color: rgba(166, 212, 255, 0.34); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }

/* ---------- nav ---------- */
.nav { max-width: var(--wrap); margin: 0 auto; padding: 20px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.nav nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 400 15px/1 var(--display); letter-spacing: 0.02em; }
.brand img { display: block; border-radius: 50%; }
.brand-sm { font-size: 12px; color: var(--soft); }
.nav-link { color: var(--muted); text-decoration: none; font-size: 15px; transition: color .15s; }
.nav-link:hover { color: var(--text); }
.nav-donate { display: inline-flex; align-items: center; gap: 6px; color: var(--ice); font-weight: 500; }
.nav-donate svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }

/* ---------- hero: the one orchestrated moment ---------- */
.hero { max-width: var(--wrap); margin: 0 auto; padding: 8px 32px 32px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-art { width: min(560px, 90vw); margin-bottom: -28px; }
.hero-float { position: relative; animation: arrive 1.4s cubic-bezier(.2, .7, .2, 1) both, drift 9s ease-in-out 1.4s infinite; }
.hero-art img {
  display: block; width: 100%; height: auto;
  /* fully bright out to the ring's tips, then the background space melts into the page */
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}
.hero-title { max-width: 17em; font: 400 clamp(26px, 4vw, 50px)/1.22 var(--display); letter-spacing: 0; overflow-wrap: break-word; animation: rise .8s cubic-bezier(.2, .7, .2, 1) .35s both; }
.hero-lede { max-width: 46ch; margin-top: 22px; font-size: 19px; color: var(--muted); animation: rise .8s cubic-bezier(.2, .7, .2, 1) .5s both; }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; animation: rise .8s cubic-bezier(.2, .7, .2, 1) .65s both; }
.hero-fine { margin-top: 18px; font-size: 14px; color: var(--muted); animation: rise .8s cubic-bezier(.2, .7, .2, 1) .75s both; }
/* the star breathes, and a few distant stars twinkle */
.hero-glow {
  position: absolute; left: 50%; top: 50%; width: 38%; aspect-ratio: 1; border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(240, 249, 255, 0.85) 0%, rgba(154, 209, 255, 0.32) 34%, rgba(154, 209, 255, 0) 70%);
  transform: translate(-50%, -50%); animation: breathe 5.5s ease-in-out 1.4s infinite;
}
.twinkle {
  position: absolute; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: #F6FAFF; pointer-events: none;
  box-shadow: 0 0 8px 2px rgba(200, 230, 255, 0.9), 0 0 18px 4px rgba(154, 209, 255, 0.35); opacity: 0.15; animation: twinkle var(--t, 4s) ease-in-out var(--d, 0s) infinite;
}
@keyframes breathe { 0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(0.85); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); } }
@keyframes breathe-soft { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes twinkle-soft { 0%, 100% { opacity: 0.1; } 45% { opacity: 1; } }
@keyframes blink { 0%, 60%, 100% { opacity: 0.35; } 30% { opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes twinkle { 0%, 100% { opacity: 0.1; transform: scale(0.5); } 45% { opacity: 1; transform: scale(1.5); } 55% { opacity: 0.85; transform: scale(1.1); } }
@keyframes arrive { from { opacity: 0; transform: scale(.94); filter: brightness(.4); } to { opacity: 1; transform: none; filter: none; } }
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- chat showcase ---------- */
.chat-wrap { max-width: var(--wrap); margin: 0 auto; padding: 40px 32px 104px; display: flex; justify-content: center; }
.chat { width: 100%; max-width: 820px; border-radius: 18px; background: var(--panel); border: 1px solid rgba(166, 212, 255, 0.12); box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid rgba(166, 212, 255, 0.08); font-weight: 600; color: #DDE6F5; }
.hash { color: #6E7891; }
.chat-server { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--muted); }
.chat-body { display: flex; flex-direction: column; gap: 18px; padding: 22px 20px 26px; }
.msg { display: flex; gap: 14px; text-align: left; }
.msg p { color: var(--soft); }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--space); }
.initial { display: flex; align-items: center; justify-content: center; background: #3B2A55; color: #E3D4FF; font-weight: 600; }
.who { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.tag { font-size: 10px; font-weight: 600; line-height: 1; padding: 4px 6px; border-radius: 4px; background: rgba(154, 209, 255, 0.16); color: var(--ice); }
.mention { color: var(--ice); background: rgba(154, 209, 255, 0.1); border-radius: 4px; padding: 0 3px; }
.msg-system { align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: rgba(154, 209, 255, 0.06); border: 1px solid rgba(154, 209, 255, 0.12); font-size: 15px; }
.msg-system svg { flex: none; fill: none; stroke: var(--ice); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.msg-system strong { color: var(--text); font-weight: 500; }
.msg-card { min-width: 0; flex: 1; }
.used { font-size: 14px; color: var(--muted); margin-bottom: 8px !important; }
.used span { color: var(--soft); }
.used code { font-family: var(--mono); font-size: 13px; color: var(--ice); }
.chat.is-waiting .msg { opacity: 0; transform: translateY(10px); }
.chat.is-waiting .msg.is-shown { animation: rise .45s ease-out both; }
.typing { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 20px 12px; font-size: 13px; color: var(--muted); opacity: 0; transition: opacity .2s; }
.typing b { color: var(--soft); font-weight: 600; }
.typing.is-on { opacity: 1; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--soft); animation: hop 1.1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

/* the rank card, built in the page so its XP bar can fill */
.rank { display: flex; align-items: center; gap: 20px; max-width: 520px; padding: 18px 22px; border-radius: 16px; background: #1A1D2C; border: 6px solid #141725; }
.rank-avatar { width: 76px; height: 76px; flex: none; border-radius: 50%; border: 3px solid var(--ice); background: radial-gradient(circle, #ECF7FF 0%, #9AD1FF 22%, #3C6EAA 46%, #182C4E 70%, #0A101C 100%); }
.rank-main { flex: 1; min-width: 0; }
.rank-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rank-name { font-size: 20px; font-weight: 600; color: var(--text); }
.rank-stats { display: inline-flex; align-items: baseline; gap: 6px; font-size: 12px; color: var(--muted); }
.rank-stats b { font-size: 22px; font-weight: 600; color: var(--text); margin-right: 8px; }
.rank-stats b.rank-level { color: var(--ice); margin-right: 0; }
.rank-xp { margin: 6px 0 8px; text-align: right; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rank-bar { height: 14px; border-radius: 7px; background: #33384F; overflow: hidden; }
.rank-fill { display: block; height: 100%; width: 55.4%; border-radius: 7px; background: linear-gradient(90deg, #7DBEF5, var(--ice)); }
.chat.is-waiting .rank-fill { width: 0; transition: width 1.3s cubic-bezier(.2, .7, .2, 1); }
.chat.is-waiting .rank.is-filled .rank-fill { width: 55.4%; }

/* ---------- two-column sections ---------- */
.split { max-width: var(--wrap); margin: 0 auto; padding: 88px 32px; border-top: 1px solid rgba(166, 212, 255, 0.08); display: flex; flex-wrap: wrap; align-items: flex-start; gap: 56px; }
.split-intro { flex: 1 1 300px; max-width: 400px; }
.split-intro h2, .free h2 { font: 400 clamp(21px, 2.4vw, 28px)/1.3 var(--display); letter-spacing: 0; }
.split-intro p { margin-top: 18px; color: var(--muted); }
.split-intro .btn { margin-top: 28px; }
.q-inline { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(166, 212, 255, 0.4); color: var(--ice); font-size: 11px; font-weight: 600; vertical-align: 2px; }

.features { flex: 999 1 560px; min-width: 0; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.features li { display: flex; gap: 16px; padding: 22px 0; border-bottom: 1px solid rgba(166, 212, 255, 0.08); }
.features h3 { font-size: 17px; }
.features p { margin-top: 4px; font-size: 15px; color: var(--muted); }
.icon { width: 40px; height: 40px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(154, 209, 255, 0.08); }
.icon svg { width: 20px; height: 20px; fill: none; stroke: var(--ice); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* dashboard preview */
.preview { padding: 8px 26px 12px; }
.preview-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid rgba(166, 212, 255, 0.08); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.pill-on { font-size: 13px; font-weight: 500; padding: 5px 10px; border-radius: 999px; background: rgba(99, 219, 166, 0.12); color: var(--on); letter-spacing: 0; }
.preview-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; border-bottom: 1px solid rgba(166, 212, 255, 0.06); }
.preview-row:last-child { border-bottom: 0; }
.label { display: inline-flex; align-items: center; gap: 10px; }

/* ---------- example framing: showcases read as screenshots, not as the real thing ---------- */
.shot { flex: 999 1 520px; min-width: 0; margin: 0; border-radius: 16px; overflow: visible; background: #080B12;
  border: 1px solid rgba(166, 212, 255, 0.14); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5); }
.shot-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid rgba(166, 212, 255, 0.08);
  background: #0D111B; border-radius: 16px 16px 0 0; font-size: 13px; color: var(--muted); }
.shot-dots { display: inline-flex; gap: 6px; }
.shot-dots i { width: 10px; height: 10px; border-radius: 50%; background: #2A3245; }
.shot-url { flex: 1; min-width: 0; padding: 4px 10px; border-radius: 6px; background: #121826; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.example-tag { flex: none; margin-left: auto; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  color: #FFD9A3; background: rgba(255, 180, 92, 0.12); border: 1px solid rgba(255, 180, 92, 0.35); }
.caption { margin: 12px 4px 0; font-size: 13px; color: var(--muted); text-align: center; }
.shot .caption { margin: 0; padding: 10px 14px 12px; border-top: 1px solid rgba(166, 212, 255, 0.06); }
.chat-wrap { flex-direction: column; align-items: center; }
.chat-wrap .caption { max-width: 820px; }
/* pictures of switches: they look like the real thing but can't be flipped */
.switch-pic { position: relative; width: 42px; height: 24px; flex: none; border-radius: 12px; background: #1A2233; border: 1px solid rgba(166, 212, 255, 0.14); }
.switch-pic::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #6B7590; }
.switch-pic.is-on { background: rgba(154, 209, 255, 0.22); border-color: rgba(154, 209, 255, 0.6); }
.switch-pic.is-on::after { transform: translateX(18px); background: var(--ice); }

/* live alert example */
.alert-example { display: flex; gap: 14px; padding: 20px; text-align: left; }
.alert-body { min-width: 0; flex: 1; }
.alert-body > p { color: var(--soft); margin-top: 2px; }
.embed { margin-top: 10px; max-width: 440px; padding: 12px 14px 14px; border-radius: 6px; background: #10141F; border-left: 4px solid var(--pc); }
.embed-author { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--soft); }
.embed-avatar { width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle, #ECF7FF 0%, #9AD1FF 30%, #3C6EAA 60%, #182C4E 100%); }
.embed-title { margin-top: 8px; font-weight: 600; color: var(--ice); }
.embed-fields { display: flex; gap: 28px; margin-top: 10px; font-size: 14px; color: var(--soft); }
.embed-fields span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.embed-thumb { position: relative; margin-top: 12px; aspect-ratio: 16 / 9; border-radius: 6px;
  background: radial-gradient(120% 90% at 30% 20%, #4B2D7F 0%, #1E1838 45%, #0C0F1C 100%); }
.live-badge { position: absolute; left: 10px; top: 10px; padding: 2px 8px; border-radius: 4px; background: #E3304B; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; }

/* help bubbles */
.tip { position: relative; display: inline-flex; }
.tip-btn { width: 44px; height: 44px; margin: -12px -10px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; padding: 0; cursor: help; }
.tip-dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(166, 212, 255, 0.3); color: #AEB7C9; font: 600 11px/16px var(--sans); text-align: center; transition: border-color .15s, color .15s, background-color .15s; }
.tip-btn:hover .tip-dot, .tip-btn:focus-visible .tip-dot { border-color: var(--ice); color: var(--ice); background: rgba(154, 209, 255, 0.08); }
.bubble {
  position: absolute; left: 50%; bottom: calc(100% + 12px); width: 250px; max-width: calc(100vw - 24px); padding: 10px 12px; border-radius: 10px;
  background: #151C2C; border: 1px solid rgba(166, 212, 255, 0.2); color: #DDE6F5; font: 400 13px/1.45 var(--sans); text-align: left;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45); z-index: 5; pointer-events: none;
  display: none; transform: translate(calc(-50% + var(--shift, 0px)), 0);
}
.tip:hover .bubble, .tip:focus-within .bubble, .tip.is-open .bubble { display: block; animation: tip-in .16s ease-out both; }
@keyframes tip-in { from { opacity: 0; transform: translate(calc(-50% + var(--shift, 0px)), 4px); } to { opacity: 1; transform: translate(calc(-50% + var(--shift, 0px)), 0); } }

/* switches */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.track { position: absolute; inset: 0; border-radius: 12px; background: #1A2233; border: 1px solid rgba(166, 212, 255, 0.14); transition: background-color .2s, border-color .2s; }
.track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #6B7590; transition: transform .2s cubic-bezier(.3, .7, .3, 1), background-color .2s; }
.switch input:checked + .track { background: rgba(154, 209, 255, 0.22); border-color: rgba(154, 209, 255, 0.6); }
.switch input:checked + .track::after { transform: translateX(18px); background: var(--ice); }
.switch input:focus-visible + .track { outline: 2px solid var(--ice); outline-offset: 2px; }

/* ---------- steps ---------- */
.steps { flex: 999 1 520px; min-width: 0; list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 22px; padding: 22px 0; border-bottom: 1px solid rgba(166, 212, 255, 0.08); }
.steps li:last-child { border-bottom: 0; }
.steps .n { font: 500 14px/28px var(--mono); color: var(--ice); }
.steps h3 { font-size: 19px; }
.steps p { margin-top: 4px; color: var(--muted); }

/* ---------- support ---------- */
.support { max-width: var(--wrap); margin: 0 auto; padding: 56px 32px; border-top: 1px solid rgba(166, 212, 255, 0.08);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.support h2 { font: 400 clamp(19px, 2.1vw, 24px)/1.3 var(--display); }
.support p { margin-top: 10px; max-width: 58ch; color: var(--muted); }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }

/* ---------- footer ---------- */
.foot { max-width: var(--wrap); margin: 0 auto; padding: 28px 32px 44px; border-top: 1px solid rgba(166, 212, 255, 0.08); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--muted); }

@media (max-width: 760px) {
  .nav { padding: 16px 20px; }
  .nav nav { gap: 18px; }
  .nav-link:not(.nav-donate) { display: none; }
  .hero, .chat-wrap, .split, .free, .support, .foot { padding-left: 20px; padding-right: 20px; }
  .split, .free { padding-top: 64px; padding-bottom: 64px; }
  .features { grid-template-columns: 1fr; }
  .rank { gap: 14px; padding: 14px; }
  .rank-avatar { width: 56px; height: 56px; }
  .bubble { width: 220px; }
}
/* With motion reduced, nothing slides or floats, but gentle fades, twinkles and the typing dots stay. */
@media (prefers-reduced-motion: reduce) {
  .hero-float, .hero-title, .hero-lede, .hero-ctas, .hero-fine { animation: fade-in .9s ease-out both; }
  .hero-glow { animation-name: breathe-soft; }
  .twinkle { animation-name: twinkle-soft; }
  .dots i { animation-name: blink; }
  .chat.is-waiting .msg { transform: none; }
  .chat.is-waiting .msg.is-shown { animation: fade-in .4s ease-out both; }
  .btn:hover { transform: none; }
  .tip:hover .bubble, .tip:focus-within .bubble, .tip.is-open .bubble { animation: fade-in .15s ease-out both; }
}
