/* Atmos Retakes — the CS2 retakes server page, played straight.
   Roles: CT-blue = connect / primary · T-gold = VIP / reserved, nothing else · green = live only. */

:root {
  --ink: #0A0F12;
  --s1: #10181C;
  --s2: #16222A;
  --line: #22333C;
  --line-2: #2D424D;
  --text: #E8EFF2;
  --muted: #93A7B0;

  --ct: #5BA4F5;
  --ct-hi: #7DB9FA;
  --ct-ink: #06121C;
  --gold: #F0B64A;
  --gold-hi: #F6C86F;
  --gold-ink: #1A1204;
  --gold-dim: #33270E;
  --live: #3DDC97;
  --bad: #FF7468;

  --f-display: 'Chakra Petch', 'Barlow', system-ui, sans-serif;
  --f-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --r: 14px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; scrollbar-color: var(--line-2) var(--ink); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 1.0625rem/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
::selection { background: var(--ct); color: var(--ct-ink); }
:focus-visible { outline: 2px solid var(--ct-hi); outline-offset: 3px; border-radius: 6px; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; border: 3px solid var(--ink); }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ct); color: var(--ct-ink); padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 30; background: var(--ink); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 32px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.35rem/1 var(--f-display); letter-spacing: 0.14em; }
.mark { width: 30px; height: 30px; color: var(--text); }
.nav-links { display: flex; gap: 6px; margin-right: auto; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 500; padding: 8px 12px; border-radius: 8px; display: inline-flex; align-items: center; gap: 4px; transition: color 0.2s, background 0.2s; }
.nav-links a:hover { color: var(--text); background: var(--s2); }
.nav-links .ic { width: 15px; height: 15px; }
.nav-end { display: flex; align-items: center; }
.account { display: flex; align-items: center; gap: 12px; }
.account img { border-radius: 50%; border: 1px solid var(--line-2); }
.acc-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.acc-text #acc-name { font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-text #acc-vip { font-size: 0.8125rem; color: var(--muted); }
.acc-text #acc-vip.vip { color: var(--gold); }
.link-btn { background: none; border: 0; color: var(--muted); font: inherit; font-size: 0.875rem; cursor: pointer; padding: 6px 4px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--text); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 10px; border: 1px solid transparent;
  font: 700 1rem/1 var(--f-body); letter-spacing: 0.02em; text-decoration: none; cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s, transform 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--ct); color: var(--ct-ink); }
.btn-primary:hover { background: var(--ct-hi); }
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { background: var(--gold-hi); }
.btn-quiet { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-quiet:hover { background: var(--s2); border-color: var(--muted); }
.btn[aria-disabled='true'], .btn:disabled { opacity: 0.45; pointer-events: none; }
.icon-btn { background: transparent; border: 1px solid var(--line-2); color: var(--muted); width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; flex: none; transition: color 0.2s, border-color 0.2s, background 0.2s; }
.icon-btn:hover { color: var(--text); background: var(--s2); }
.icon-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.icon-btn[data-copied='true'] { color: var(--live); border-color: var(--live); }

/* ---------- hero ---------- */
.hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 72px;
  align-items: center; padding-block: 88px 96px;
}
.hero::before { /* a soft smoke tint behind the server card; not a pattern */
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(52% 70% at 74% 42%, rgba(91, 164, 245, 0.08), transparent 72%);
}
h1 { font-size: clamp(2.75rem, 6.2vw, 5.25rem); line-height: 1.02; font-weight: 700; letter-spacing: -0.02em; }
.lead { margin-top: 24px; max-width: 30rem; font-size: 1.25rem; color: var(--muted); }
.hero-cta { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-facts { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 0; max-width: 30rem; color: var(--muted); font-size: 1rem; }
.hero-facts li { padding-right: 20px; margin-right: 20px; border-right: 1px solid var(--line-2); line-height: 1.2; }
.hero-facts li:last-child { border-right: 0; margin-right: 0; padding-right: 0; }

/* ---------- live server card ---------- */
.server { background: var(--s1); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; box-shadow: 0 32px 64px -32px rgba(0, 0, 0, 0.8), 0 2px 0 rgba(255, 255, 255, 0.02) inset; }
.plate { position: relative; height: 172px; background: var(--s2); border-bottom: 1px solid var(--line-2); overflow: hidden; }
.plate-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.plate::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(16, 24, 28, 0.92) 8%, rgba(16, 24, 28, 0) 62%); pointer-events: none; }
.live { position: absolute; top: 14px; left: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; background: rgba(10, 15, 18, 0.88); border: 1px solid var(--line-2); border-radius: 999px; font: 600 0.8125rem/1 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.live[data-state='online'] { color: var(--live); border-color: rgba(61, 220, 151, 0.4); }
.live[data-state='online'] i { background: var(--live); animation: ping 2.2s var(--ease) infinite; }
.live[data-state='offline'] { color: var(--bad); border-color: rgba(255, 116, 104, 0.4); }
.live[data-state='offline'] i { background: var(--bad); }
.live[data-state='unconfigured'] { color: var(--muted); } /* a neutral state, not a warning: gold is reserved for VIP */
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(61, 220, 151, 0); } }
.plate-map { position: absolute; z-index: 2; left: 20px; right: 20px; bottom: 16px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.map { font: 700 1.875rem/1 var(--f-display); letter-spacing: 0.04em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-note { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.server-body { padding: 24px 24px 22px; display: flex; flex-direction: column; gap: 0; }
.server-body h2 { font-size: 1.375rem; line-height: 1.2; font-weight: 600; }
.srv-sub { color: var(--muted); font-size: 0.9375rem; margin-top: 2px; }

.slot-row { display: flex; align-items: center; gap: 22px; margin-top: 22px; }
.slots { display: flex; gap: 6px; flex: 1; min-width: 0; }
.slots li { flex: 1; aspect-ratio: 1 / 1.45; max-height: 44px; border-radius: 5px; border: 1px solid var(--line-2); background: transparent; transition: background 0.5s var(--ease), border-color 0.5s var(--ease); transition-delay: calc(var(--i, 0) * 45ms); }
.slots li.on { background: var(--ct); border-color: var(--ct); }
.count { display: flex; align-items: baseline; gap: 2px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.count b { font: 700 2.5rem/1 var(--f-display); }
.count #s-max { font: 600 1.25rem/1 var(--f-display); color: var(--muted); }
.count-label { margin-left: 8px; font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.facts { display: flex; gap: 32px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.facts div { display: flex; flex-direction: column; gap: 2px; }
.facts dt { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.facts dd { font-weight: 600; font-variant-numeric: tabular-nums; }

.connect-line { display: flex; gap: 8px; margin-top: 20px; }
.connect-line code { flex: 1; min-width: 0; display: block; background: var(--ink); border: 1px solid var(--line-2); border-radius: 8px; padding: 0 14px; height: 40px; line-height: 38px; font: 500 0.875rem/38px var(--f-mono); color: var(--text); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.server-body .btn-block { margin-top: 12px; }
.state-note { margin-top: 14px; font-size: 0.9375rem; color: var(--muted); }
.full-hint { margin-top: 14px; font-size: 0.9375rem; color: var(--muted); }
.full-hint a { color: var(--gold); text-underline-offset: 3px; }
.players { margin-top: 16px; }
.players summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 0.9375rem; }
.players ul { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.players li { background: var(--s2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; font-size: 0.9375rem; }

/* ---------- how a retake works ---------- */
.retakes { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 72px; align-items: center; padding-block: 56px 96px; }
.art { background: var(--s1); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.art svg { display: block; width: 100%; height: auto; }
.retakes-copy h2, .vip-head h2, .sibling h2 { font-size: clamp(1.875rem, 3.4vw, 2.75rem); line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
.steps { margin-top: 36px; display: grid; gap: 28px; position: relative; }
.steps::before { content: ''; position: absolute; left: 9px; top: 12px; bottom: 12px; width: 1px; background: var(--line-2); }
.steps li { position: relative; padding-left: 44px; }
.steps li::before { content: ''; position: absolute; left: 0; top: 6px; width: 19px; height: 19px; border-radius: 50%; background: var(--ink); border: 2px solid var(--ct); }
.steps h3 { font-size: 1.1875rem; font-weight: 600; }
.steps p { margin-top: 4px; color: var(--muted); max-width: 30rem; }

/* ---------- VIP ---------- */
.vip { padding-block: 24px 96px; border-top: 1px solid var(--line); padding-top: 96px; }
.vip-head p { margin-top: 14px; font-size: 1.25rem; color: var(--muted); max-width: 32rem; }
.perks { margin-top: 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-block: 1px solid var(--line); }
.perks li { display: flex; gap: 16px; padding: 28px 28px 28px 0; }
.perks li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.perks .ic { width: 26px; height: 26px; color: var(--gold); margin-top: 2px; }
.perks strong { display: block; font: 600 1.125rem/1.3 var(--f-display); }
.perks span { display: block; margin-top: 4px; color: var(--muted); font-size: 1rem; }
.plans { margin-top: 56px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan { background: var(--s1); border: 1px solid var(--line-2); border-radius: var(--r); padding: 28px; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--gold); background: linear-gradient(180deg, var(--gold-dim), var(--s1) 55%); }
.plan h3 { font-size: 1.25rem; font-weight: 600; }
.plan .plan-sub { color: var(--muted); font-size: 0.9375rem; margin-top: 2px; }
.plan.featured .plan-sub { color: var(--gold); font-weight: 600; }
.price { margin-top: 28px; font: 700 3rem/1 var(--f-display); font-variant-numeric: tabular-nums; }
.per { margin-top: 8px; color: var(--muted); font-size: 0.9375rem; margin-bottom: 28px; font-variant-numeric: tabular-nums; }
.plan .btn { margin-top: auto; }
.fine { margin-top: 24px; color: var(--muted); font-size: 0.9375rem; }

/* ---------- FRAGGED sibling ---------- */
.sibling { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 40px 44px; margin-bottom: 72px; background: var(--s1); border: 1px solid var(--line-2); border-radius: var(--r); }
.sibling h2 { font-size: 1.625rem; }
.sibling p { margin-top: 6px; color: var(--muted); max-width: 36rem; }
.sibling .btn { flex: none; }

.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-block: 28px 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.foot span:last-child { max-width: 38rem; }
.foot-links { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px 24px; padding-bottom: 14px; }
.foot-links a { color: var(--text); text-decoration: none; font-weight: 500; padding: 4px 0; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- sticky connect (phones) ---------- */
.sticky-cta { display: none; }

/* ---------- checkout dialog ---------- */
dialog { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--s1); color: var(--text); padding: 0; width: min(460px, 100% - 32px); }
dialog::backdrop { background: rgba(4, 7, 9, 0.78); }
.co { position: relative; padding: 32px 28px 28px; display: flex; flex-direction: column; gap: 14px; }
.co h3 { font-size: 1.5rem; font-weight: 700; padding-right: 36px; }
.co-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); border-radius: 8px; cursor: pointer; }
.co-close:hover { color: var(--text); background: var(--s2); }
.co-sum { color: var(--muted); }
.co-hint { color: var(--muted); font-size: 0.9375rem; }
.who { display: flex; flex-direction: column; gap: 2px; background: var(--ink); border: 1px solid var(--line-2); border-radius: 10px; padding: 14px 16px; }
.who span { font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.who strong { font-family: var(--f-display); font-size: 1.125rem; }
.who code { font: 500 0.8125rem var(--f-mono); color: var(--muted); }
.msg { margin: 0; padding: 12px 14px; border-radius: 10px; font-size: 0.9375rem; border: 1px solid; }
.msg.error { color: var(--bad); border-color: rgba(255, 116, 104, 0.4); background: rgba(255, 116, 104, 0.08); }
.msg.notice { color: var(--ct-hi); border-color: rgba(91, 164, 245, 0.4); background: rgba(91, 164, 245, 0.08); }
.msg.success { color: var(--live); border-color: rgba(61, 220, 151, 0.4); background: rgba(61, 220, 151, 0.08); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-block: 56px 72px; }
  .lead { max-width: 36rem; }
  .retakes { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-bottom: 72px; }
  .vip { padding-top: 72px; padding-bottom: 72px; }
  .perks { grid-template-columns: minmax(0, 1fr); }
  .perks li, .perks li + li { padding: 22px 0; border-left: 0; }
  .perks li + li { border-top: 1px solid var(--line); }
  .plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
  .sibling { flex-direction: column; align-items: flex-start; padding: 32px 28px; }
}
@media (max-width: 720px) {
  .wrap { width: min(1200px, 100% - 32px); }
  .nav-in { height: 60px; gap: 12px; }
  .nav-links { display: none; }
  .nav-end { margin-left: auto; }
  .acc-text #acc-vip { display: none; }
  .acc-text #acc-name { max-width: 104px; font-size: 0.9375rem; }
  .account { gap: 8px; }
  .brand { font-size: 1.2rem; }
  .hero { padding-block: 40px 56px; }
  .hero-cta .btn { flex: 1; }
  .hero-facts { margin-top: 40px; font-size: 0.9rem; flex-wrap: nowrap; }
  .hero-facts li { padding-right: 12px; margin-right: 12px; white-space: nowrap; }
  #fact-slots { display: none; } /* two facts fit one line on a phone; the third appears from tablet width */
  .hero-facts li:nth-child(2) { border-right: 0; margin-right: 0; padding-right: 0; }
  .server-body { padding: 20px 18px 18px; }
  .slot-row { gap: 14px; }
  .count b { font-size: 2.125rem; }
  .count-label { display: none; }
  .map { font-size: 1.5rem; }
  .sibling { margin-bottom: 40px; }
  .foot { padding-bottom: 96px; }
  .sticky-cta { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--ink); border-top: 1px solid var(--line-2); }
  .sticky-cta[hidden], .sticky-cta.away { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slots li { transition: none; }
  .live[data-state='online'] i { animation: none; }
  .btn { transition: none; }
}
