/* corsa.lol: same palette and type as the app */
:root {
  --bg: #0c0c0d;
  --bg-2: #111113;
  --card: #151517;
  --card-2: #1a1a1d;
  --line: #222225;
  --line-2: #2e2e33;
  --text: #f4f4f5;
  --text-2: #a1a1a8;
  --text-3: #6b6b73;
  --good: #34d27b;
  --warn: #f5b83d;
  --bad: #f2555a;
  --blue: #5aa9ff;
  --radius: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --max: 1180px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: rgba(255, 255, 255, .18); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.mono { font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; }
.num { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- nav */
.nav-wrap { position: sticky; top: 0; z-index: 50; background: rgba(12, 12, 13, .78); backdrop-filter: blur(16px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav-wrap.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; text-decoration: none; letter-spacing: -.01em; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { text-decoration: none; color: var(--text-2); font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 9px; transition: color .15s, background .15s; }
.nav-links a:hover, .nav-links a[aria-current='page'] { color: var(--text); background: #18181b; }
.nav .spacer { flex: 1; }
.nav-live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); text-decoration: none; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); flex-shrink: 0; }
.dot.live { box-shadow: 0 0 0 0 rgba(52, 210, 123, .5); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(52, 210, 123, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 210, 123, 0); } }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); color: var(--text); border-radius: 9px; height: 36px; width: 40px; cursor: pointer; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text);
  font: 600 14.5px Inter, system-ui, sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .15s var(--ease);
}
.btn:hover { background: #18181b; border-color: #3a3a40; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover { background: #fff; transform: translateY(-1px); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn.lg { height: 52px; padding: 0 26px; font-size: 15.5px; }

/* ---------------------------------------------------------------- type */
.eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 0 0 14px; }
h1, h2, h3 { margin: 0; letter-spacing: -.025em; line-height: 1.08; }
.display { font-size: clamp(42px, 7vw, 80px); font-weight: 800; letter-spacing: -.04em; }
.h2 { font-size: clamp(30px, 4.2vw, 46px); font-weight: 800; }
.h3 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--text-2); max-width: 620px; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; padding: 76px 0 40px; text-align: center; overflow: hidden; }
.hero .display { max-width: 900px; margin: 0 auto; }
.hero .lead { margin: 22px auto 0; }
.hero-cta { display: flex; gap: 10px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.hero-meta { margin-top: 16px; font-size: 13px; color: var(--text-3); }
.pills { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 26px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; color: var(--text-2); text-decoration: none; }
.pill b { color: var(--text); font-weight: 600; }
a.pill:hover { border-color: #3a3a40; color: var(--text); }

.shot-frame {
  position: relative; margin: 56px auto 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2);
  background: var(--card); box-shadow: 0 40px 120px rgba(0, 0, 0, .6);
}
.shot-frame img { width: 100%; height: auto; }
.hero .shot-frame { max-width: 1120px; }
.hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 160px; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }

/* live strip under the hero */
.live-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.live-strip > div { padding: 22px 24px; border-left: 1px solid var(--line); }
.live-strip > div:first-child { border-left: 0; }
.live-strip .k { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.live-strip .v { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.live-strip .s { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

/* ---------------------------------------------------------------- sections */
section { padding: 110px 0; }
.section-head { max-width: 680px; margin-bottom: 52px; }
.section-head .lead { margin-top: 16px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lead { margin-inline: auto; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* communities row */
.communities { display: flex; flex-wrap: wrap; gap: 10px 34px; justify-content: center; align-items: center; color: var(--text-3); font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.communities span { display: inline-flex; align-items: center; gap: 10px; }
.communities small { font-weight: 500; font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* feature grid */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feature { background: var(--bg-2); padding: 30px 28px 32px; transition: background .2s; }
.feature:hover { background: var(--card); }
.feature .ic { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line-2); display: grid; place-items: center; margin-bottom: 20px; color: var(--text); }
.feature h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 8px; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.6; }

/* split sections */
.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: center; }
.split.flip { grid-template-columns: 1.25fr 1fr; }
.split.flip .split-copy { order: 2; }
.split-copy .h2 { font-size: clamp(28px, 3.4vw, 40px); }
.split-copy .lead { margin-top: 16px; font-size: 17px; }
.checks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; color: var(--text-2); font-size: 15px; }
.checks li::before { content: ''; flex-shrink: 0; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: rgba(52, 210, 123, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d27b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat; }
.checks b { color: var(--text); font-weight: 600; }
.split .shot-frame { margin: 0; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: var(--bg-2); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--text); color: var(--bg); font-weight: 800; font-size: 14px; margin-bottom: 18px; }
.step h3 { font-size: 16.5px; margin-bottom: 6px; }
.step p { margin: 0; color: var(--text-2); font-size: 14.5px; }

/* security band */
.band { border: 1px solid var(--line); border-radius: 22px; background: var(--card); padding: 52px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; }
.band .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 30px; }
.band .grid-2 h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.band .grid-2 p { margin: 0; color: var(--text-2); font-size: 14px; }

/* dashboard teaser */
.teaser { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 22px 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.panel-head h3 { font-size: 15px; font-weight: 700; letter-spacing: 0; }
.panel-head .dim { font-size: 12.5px; }

/* bar list (communities, tracks, countries) */
.bars { display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; font-size: 14px; }
.bar .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .val { color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 13px; }
.bar .track { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: #202024; overflow: hidden; }
.bar .track i { display: block; height: 100%; border-radius: 3px; background: var(--text); transform-origin: 0 50%; animation: grow .9s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 4px; font-weight: 600; font-size: 16.5px; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--text-3); font-weight: 400; font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 4px 22px; color: var(--text-2); }

/* CTA */
.cta { text-align: center; border: 1px solid var(--line); border-radius: 24px; padding: 70px 24px; background: var(--card); }
.cta .lead { margin: 14px auto 30px; }

/* footer */
footer { border-top: 1px solid var(--line); padding: 48px 0 56px; margin-top: 40px; }
.foot { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 30px; }
.foot h4 { margin: 0 0 12px; font-size: 13px; color: var(--text-3); font-weight: 600; }
.foot a { display: block; text-decoration: none; color: var(--text-2); font-size: 14px; padding: 4px 0; }
.foot a:hover { color: var(--text); }
.legal { margin-top: 36px; font-size: 12.5px; color: var(--text-3); line-height: 1.7; }

/* ---------------------------------------------------------------- dashboard */
.page-head { padding: 54px 0 30px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.page-head .h2 { font-size: clamp(32px, 4vw, 44px); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.status.err .dot { background: var(--warn); }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.kpi { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 18px 20px; }
.kpi .k { font-size: 12.5px; color: var(--text-3); }
.kpi .v { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.dash-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
.dash-grid.three { grid-template-columns: repeat(3, 1fr); }

.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.search { flex: 1; min-width: 220px; position: relative; }
.search input {
  width: 100%; height: 42px; padding: 0 14px 0 40px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--bg-2);
  color: var(--text); font: 14px Inter, system-ui, sans-serif; outline: none;
}
.search input:focus { border-color: #4a4a50; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 34px; padding: 0 13px; border-radius: 9px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font: 600 13px Inter, system-ui, sans-serif; cursor: pointer; transition: all .15s; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }

.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
table.servers { width: 100%; border-collapse: collapse; font-size: 14px; }
table.servers th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); white-space: nowrap; }
table.servers td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.servers tr:last-child td { border-bottom: 0; }
table.servers tbody tr { transition: background .12s; }
table.servers tbody tr:hover { background: #19191c; }
.srv-name { font-weight: 600; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 600; background: #222226; color: var(--text-2); margin-left: 6px; vertical-align: 1px; }
.fill { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.fill .meter { flex: 1; height: 6px; border-radius: 3px; background: #222226; overflow: hidden; }
.fill .meter i { display: block; height: 100%; border-radius: 3px; }
.fill b { font-variant-numeric: tabular-nums; font-size: 13.5px; min-width: 52px; text-align: right; }
.more { display: flex; justify-content: center; padding: 16px; }
.skel { border-radius: 8px; background: linear-gradient(90deg, #17171a, #202024, #17171a); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* releases chart */
.spark { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.spark i { flex: 1; min-width: 6px; border-radius: 4px 4px 1px 1px; background: #2a2a2f; position: relative; transition: background .15s; animation: rise-bar .8s var(--ease) both; transform-origin: 50% 100%; }
.spark i:hover { background: var(--text); }
.spark i:last-child { background: var(--text); }
@keyframes rise-bar { from { transform: scaleY(0); } }

/* ---------------------------------------------------------------- changelog */
.timeline { max-width: 760px; position: relative; }
.release { display: grid; grid-template-columns: 130px 1fr; gap: 28px; padding: 30px 0; border-top: 1px solid var(--line); }
.release:first-child { border-top: 0; }
.release .ver { font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.release .date { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.release h3 { font-size: 19px; margin-bottom: 10px; }
.release ul { margin: 0; padding-left: 18px; color: var(--text-2); display: grid; gap: 6px; }
.release .latest { display: inline-flex; margin-top: 8px; font-size: 11.5px; font-weight: 700; color: var(--good); }

/* ---------------------------------------------------------------- reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .grid-3, .steps { grid-template-columns: 1fr 1fr; }
  .split, .split.flip { grid-template-columns: 1fr; gap: 36px; }
  .split.flip .split-copy { order: 0; }
  .band { grid-template-columns: 1fr; padding: 36px 28px; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .dash-grid, .dash-grid.three, .teaser { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  section { padding: 76px 0; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; padding: 10px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav .nav-live { display: none; }
  .grid-3, .steps, .band .grid-2 { grid-template-columns: 1fr; }
  .live-strip { grid-template-columns: 1fr 1fr; }
  .live-strip > div:nth-child(3) { border-left: 0; }
  .live-strip > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .kpis { grid-template-columns: 1fr 1fr; }
  .release { grid-template-columns: 1fr; gap: 10px; }
  .hide-sm { display: none; }
  table.servers td, table.servers th { padding: 11px 12px; }
  .srv-name { max-width: 200px; }
  .wrap { width: calc(100% - 32px); }
}
