/* ==========================================================================
   Amiark — site vitrine
   ========================================================================== */

:root {
  --bg: #050a12;
  --bg-2: #07101b;
  --panel: #08121e;
  --ink: #e8f4ff;
  --ink-2: #c4d5e6;
  --muted: #8fa6bd;
  --dim: #5d7389;
  --line: rgba(232, 244, 255, 0.1);
  --line-accent: rgba(56, 217, 255, 0.24);
  --accent: #38d9ff;
  --accent-hi: #9becff;
  --accent-ink: #04121c;
  --lava: #ff8a3d;
  --ok: #45f0a0;
  --ko: #e5534b;

  --f-display: 'Big Shoulders Display', Impact, 'Arial Narrow', sans-serif;
  --f-hud: 'Chakra Petch', ui-monospace, monospace;
  --f-body: 'Manrope', system-ui, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --nav-h: 72px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); background: var(--bg); }

body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.hud { font-family: var(--f-hud); letter-spacing: 0.14em; text-transform: uppercase; }
.accent { color: var(--accent); }
.ok { color: var(--ok); }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--accent); color: var(--accent-ink); font-weight: 700;
}
.skip:focus { top: 16px; }

/* ---------- site-wide backdrop (ARK: Survival Ascended key art) ---------- */

.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.backdrop__img {
  position: absolute; inset: -3%;
  background: url('../img/backdrop.webp') 70% 45% / cover no-repeat;
  filter: saturate(1.2) contrast(1.05);
  animation: backdrop-drift 48s ease-in-out infinite alternate;
}
@keyframes backdrop-drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); }
}
.backdrop__veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 70% 40%, transparent 0%, rgba(5, 10, 18, 0.4) 80%),
    rgba(5, 10, 18, var(--veil, 0.2));
  transition: background-color 0.2s linear;
}
@media (max-width: 700px) {
  .backdrop__img { background-image: url('../img/backdrop-mobile.webp'); background-position: 50% 40%; }
}

/* ---------- progress + nav ---------- */

.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; pointer-events: none; }
.progress span {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--lava));
  transform-origin: 0 50%; transform: scaleX(0);
  box-shadow: 0 0 12px var(--accent);
}

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(5, 10, 18, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-color: rgba(56, 217, 255, 0.12);
}
.nav__inner { display: flex; align-items: center; gap: 28px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand img {
  width: 44px; height: 44px; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(56, 217, 255, 0.5), 0 0 24px rgba(56, 217, 255, 0.45);
  transition: transform 0.6s var(--ease);
}
.brand:hover img { transform: rotate(-12deg) scale(1.06); }
.brand span { font-family: var(--f-display); font-size: 28px; font-weight: 900; letter-spacing: 0.04em; }

.nav__links { display: flex; gap: 28px; }
.nav__links a {
  position: relative;
  font-family: var(--f-hud); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #b9ccdd; padding: 6px 0;
}
.nav__links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform 0.35s var(--ease);
}
.nav__links a:hover,
.nav__links a.is-active { color: var(--ink); }
.nav__links a:hover::after,
.nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }

.nav__toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line-accent); background: transparent;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
}
.nav__toggle span { display: block; width: 18px; height: 2px; background: var(--ink); transition: transform 0.3s var(--ease); }
.nav__toggle[aria-expanded='true'] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded='true'] span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav__toggle { display: flex; }
  .nav__inner { gap: 12px; }
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; gap: 0; padding: 12px var(--gutter) 24px;
    background: rgba(5, 10, 18, 0.96); border-bottom: 1px solid var(--line-accent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: opacity 0.3s, transform 0.3s var(--ease), visibility 0.3s;
  }
  .nav__links.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__links a { padding: 14px 0; font-size: 15px; border-bottom: 1px solid var(--line); }
}

/* ---------- buttons ---------- */

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 4px; border: 1px solid transparent;
  font-family: var(--f-hud); font-size: 14px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; overflow: hidden; isolation: isolate;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, color 0.25s, border-color 0.25s;
}
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 13px; }
.btn--lg { min-height: 56px; padding: 0 28px; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { color: var(--accent-ink); box-shadow: 0 12px 44px -10px rgba(56, 217, 255, 0.75); }
.btn--primary::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.7s var(--ease);
}
.btn--primary:hover::before { transform: translateX(120%); }
.btn--ghost { background: rgba(5, 10, 18, 0.5); border-color: rgba(232, 244, 255, 0.3); color: var(--ink); }
.btn--ghost:hover { color: var(--ink); border-color: var(--accent); background: rgba(56, 217, 255, 0.08); }
.btn .icon { transition: transform 0.3s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn[aria-disabled='true'] { background: rgba(232, 244, 255, 0.07); color: var(--muted); box-shadow: none; }

/* ---------- hero ---------- */

.hero {
  position: relative; min-height: max(760px, 100svh);
  display: flex; align-items: center; overflow: hidden;
  padding: calc(var(--nav-h) + 40px) 0 120px;
}
.hero__grid {
  position: absolute; inset: 0; opacity: 0.6;
  background-image:
    linear-gradient(rgba(56, 217, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 217, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 65% 50%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 65% 50%, #000 20%, transparent 75%);
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__scan {
  position: absolute; inset: 0 0 auto 0; height: 120px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(56, 217, 255, 0.07), transparent);
  animation: scan 8s linear infinite;
}
@keyframes scan { from { transform: translateY(-120px); } to { transform: translateY(110vh); } }
.hero__vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 10, 18, 0.82) 0%, rgba(5, 10, 18, 0.5) 38%, transparent 62%),
    linear-gradient(180deg, transparent 70%, rgba(5, 10, 18, 0.55) 100%);
}
.hero__inner { position: relative; z-index: 2; pointer-events: none; }
.hero__content { max-width: 680px; display: flex; flex-direction: column; gap: 28px; pointer-events: auto; }

.chip {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 12px;
  margin: 0; padding: 8px 14px; font-size: 12px; color: var(--accent-hi);
  border: 1px solid rgba(56, 217, 255, 0.35); border-radius: 2px; background: rgba(5, 10, 18, 0.6);
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.pulse::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--ok);
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: 0.7; } 80%, 100% { transform: scale(2.8); opacity: 0; } }

.hero__title {
  margin: 0; font-family: var(--f-display); font-weight: 900;
  font-size: clamp(96px, 17vw, 236px); line-height: 0.8; letter-spacing: -0.01em;
  display: flex; user-select: none;
}
.hero__title .ch {
  display: inline-block; position: relative;
  background: linear-gradient(100deg, var(--ink) 0%, var(--ink) 38%, var(--accent) 50%, var(--ink) 62%, var(--ink) 100%);
  background-size: 600% 100%;
  background-position: calc(100% - var(--k) * 12%) 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation:
    letter-in 1s var(--ease) backwards calc(0.25s + var(--k) * 0.07s),
    shine 7s ease-in-out infinite calc(1.6s + var(--k) * 0.08s);
  transition: transform 0.4s var(--ease);
}
.hero__title .ch:hover { transform: translateY(-8px) skewX(-6deg); }
@keyframes letter-in {
  from { opacity: 0; transform: translateY(60%) rotateX(-80deg); filter: blur(12px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes shine {
  0% { background-position: 100% 0; }
  45%, 100% { background-position: 0 0; }
}
.hero__title { position: relative; }
.hero__title::before,
.hero__title::after {
  content: attr(data-text); position: absolute; inset: 0; opacity: 0; pointer-events: none;
}
.hero__title::before { color: var(--accent); }
.hero__title::after { color: var(--lava); }
.hero__title.is-glitching::before { animation: glitch-a 0.45s steps(3) 1; }
.hero__title.is-glitching::after { animation: glitch-b 0.45s steps(3) 1; }
@keyframes glitch-a {
  0% { opacity: 0.85; transform: translate(-6px, 0); clip-path: inset(10% 0 62% 0); }
  50% { opacity: 0.85; transform: translate(5px, 0); clip-path: inset(55% 0 20% 0); }
  100% { opacity: 0; transform: none; clip-path: inset(0); }
}
@keyframes glitch-b {
  0% { opacity: 0.8; transform: translate(6px, 0); clip-path: inset(48% 0 30% 0); }
  50% { opacity: 0.8; transform: translate(-4px, 0); clip-path: inset(5% 0 75% 0); }
  100% { opacity: 0; transform: none; clip-path: inset(0); }
}

.hero__lead { margin: 0; max-width: 560px; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.hud-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 12px 0 0;
  max-width: 620px; background: rgba(56, 217, 255, 0.2); border: 1px solid rgba(56, 217, 255, 0.2);
}
.hud-stats div { padding: 14px 18px; background: rgba(5, 10, 18, 0.84); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hud-stats dt { font-size: 11px; color: var(--muted); }
.hud-stats dd {
  margin: 0; font-family: var(--f-display); font-size: 44px; font-weight: 800; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.hud-stats small { color: var(--dim); font-size: 0.7em; }

.intro { animation: rise 1s var(--ease) both calc(0.4s + var(--i) * 0.12s); }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

.hero__tooltip {
  position: absolute; z-index: 3; pointer-events: none;
  padding: 10px 12px; font-size: 11px; line-height: 1.5; color: var(--ink);
  background: rgba(5, 10, 18, 0.92); border: 1px solid var(--line-accent);
  transform: translate(16px, -50%); white-space: nowrap;
}
.hero__tooltip strong { display: block; font-family: var(--f-display); font-size: 22px; letter-spacing: 0.02em; text-transform: none; }
.hero__tooltip-names {
  display: block; max-width: 260px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis;
  color: var(--accent-hi); letter-spacing: 0.06em; text-transform: none;
}
.hero__legend {
  position: absolute; z-index: 2; right: var(--gutter); bottom: 40px; margin: 0;
  font-size: 11px; color: var(--muted);
}
.scroll-cue {
  position: absolute; z-index: 2; left: 50%; bottom: 28px; width: 26px; height: 42px; margin-left: -13px;
  border: 1px solid rgba(232, 244, 255, 0.35); border-radius: 14px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 2px; height: 8px; margin-left: -1px;
  background: var(--accent); border-radius: 2px; animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

@media (max-width: 900px) {
  /* Leave the top of the hero to the orbit, text below it. */
  .hero { align-items: flex-start; min-height: 0; padding: calc(var(--nav-h) + 290px) 0 96px; }
  .hero__legend { display: none; }
  .hud-stats dd { font-size: 34px; }
  .hud-stats div { padding: 12px; }
}
@media (max-width: 520px) {
  .hud-stats dt { font-size: 9.5px; letter-spacing: 0.08em; }
}

/* ---------- marquee ---------- */

.marquee {
  position: relative; overflow: hidden; padding: 20px 0;
  background: rgba(7, 16, 27, 0.8); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-top: 1px solid rgba(56, 217, 255, 0.15); border-bottom: 1px solid rgba(56, 217, 255, 0.15);
}
.marquee__track {
  display: flex; width: max-content; gap: 48px; white-space: nowrap;
  font-family: var(--f-display); font-size: clamp(32px, 4vw, 48px); font-weight: 800; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(155, 236, 255, 0.55);
  will-change: transform;
}
.marquee__item { display: inline-flex; align-items: center; gap: 48px; transition: color 0.3s; }
.marquee__item i { font-style: normal; color: var(--accent); -webkit-text-stroke: 0; font-size: 0.5em; }
.marquee__item:hover { color: var(--accent); }

/* ---------- sections ---------- */

.section { position: relative; padding: clamp(80px, 11vw, 140px) 0; }
.section--alt { background: rgba(7, 16, 27, 0.72); border-top: 1px solid rgba(56, 217, 255, 0.12); border-bottom: 1px solid rgba(56, 217, 255, 0.12); }
.section__head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section__intro { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.kicker { margin: 0; font-size: 12px; color: var(--accent); }
.kicker--lava { color: var(--lava); }
.section__title {
  margin: 0; font-family: var(--f-display); font-weight: 900;
  font-size: clamp(46px, 7vw, 92px); line-height: 0.9; letter-spacing: -0.005em; text-wrap: balance;
}
.section__lead { margin: 0; color: #b9ccdd; max-width: 600px; }
.link { font-size: 13px; }

/* Revealed by main.js (Web Animations API, so it never fights hover transforms). */
.js [data-reveal]:not(.is-in) { opacity: 0; }

/* ---------- live tiles ---------- */

.sync { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.sync__ring { width: 22px; height: 22px; transform: rotate(-90deg); }
.sync__ring circle { fill: none; stroke: rgba(232, 244, 255, 0.12); stroke-width: 2.5; }
.sync__ring .sync__progress { stroke: var(--ok); stroke-dasharray: 56.55; stroke-dashoffset: 0; stroke-linecap: round; }
.sync.is-error .sync__progress { stroke: var(--ko); }
.sync.is-demo .sync__progress { stroke: var(--lava); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 16px; }
.tile {
  position: relative; margin: 0; padding: 26px 28px; overflow: hidden;
  border: 1px solid var(--line); background: var(--panel);
  display: flex; flex-direction: column; gap: 6px;
}
.tile--accent { border-color: rgba(56, 217, 255, 0.25); background: linear-gradient(160deg, rgba(56, 217, 255, 0.13), rgba(56, 217, 255, 0.02)); }
.tile p { margin: 0; }
.tile__label { font-size: 11px; color: var(--muted); }
.tile__value {
  font-family: var(--f-display); font-weight: 800; font-size: 60px; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tile--accent .tile__value { font-size: 96px; font-weight: 900; line-height: 0.9; color: var(--accent); }
.tile__value small { color: var(--dim); font-size: 0.6em; }
.tile__value--clock { font-size: clamp(40px, 4.4vw, 56px); }
.tile__meta { font-size: 14px; color: #b9ccdd; }
.tile__meta strong { color: var(--ink); }

.segments { display: flex; gap: 6px; margin-top: 10px; }
.segments span { flex: 1; height: 6px; border-radius: 1px; background: rgba(232, 244, 255, 0.1); transition: background 0.6s, box-shadow 0.6s; }
.segments span.on { background: var(--ok); box-shadow: 0 0 10px rgba(69, 240, 160, 0.6); }
.segments span.off { background: var(--ko); }

/* ---------- map cards ---------- */

.maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 16px; perspective: 1400px; }

.map {
  --c: var(--accent);
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 50%;
  position: relative; display: flex; flex-direction: column;
  border: 1px solid var(--line); background: var(--panel); overflow: hidden;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.map:hover { border-color: color-mix(in srgb, var(--c) 60%, transparent); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--c) 55%, transparent); }
.map.is-tilting { transition: border-color 0.4s, box-shadow 0.4s; }
.map.is-flash { animation: flash 1.4s var(--ease); }
@keyframes flash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 2px var(--c), 0 0 60px var(--c); } }

.map__art { position: relative; height: 184px; overflow: hidden; background: var(--bg); }
.map__topo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transform: scale(1.12); transition: transform 1.2s var(--ease), filter 0.6s;
  animation: drift 22s ease-in-out infinite alternate;
}
.map:hover .map__topo { transform: scale(1.22); filter: saturate(1.4) brightness(1.15); }

/* Map photo: tinted with the map colour, contour lines kept on top as a HUD layer. */
.map__photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.12); transition: transform 1.2s var(--ease), filter 0.6s;
  animation: drift 22s ease-in-out infinite alternate;
  filter: saturate(1.15) contrast(1.05);
}
.map:hover .map__photo { transform: scale(1.2); filter: saturate(1.35) contrast(1.08) brightness(1.08); }
.map__art.has-photo::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--c) 42%, transparent) 0%, transparent 55%),
    radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--c) 22%, transparent), transparent 45%);
  mix-blend-mode: color; opacity: 0.55; transition: opacity 0.6s;
}
.map:hover .map__art.has-photo::before { opacity: 0.3; }
.map__art.has-photo .map__topo { z-index: 1; mix-blend-mode: screen; opacity: 0.4; transition: transform 1.2s var(--ease), opacity 0.6s; }
.map:hover .map__art.has-photo .map__topo { opacity: 0.75; filter: none; }
.map__art.has-photo::after { z-index: 1; background: linear-gradient(180deg, rgba(5, 10, 18, 0.15) 0%, rgba(5, 10, 18, 0.1) 40%, rgba(5, 10, 18, 0.88) 100%); }
.map.is-offline .map__photo { filter: grayscale(1) brightness(0.55); }
.map.is-starting .map__photo { filter: saturate(0.45) brightness(0.75); }
@keyframes drift { from { translate: -3% -2%; } to { translate: 3% 2%; } }
.map__art::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5, 10, 18, 0.85));
}
.map.is-offline .map__topo { filter: grayscale(1) brightness(0.6); }

.map__tag,
.map__status {
  position: absolute; z-index: 2; top: 14px; padding: 4px 8px; font-size: 10px;
  background: rgba(5, 10, 18, 0.78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.map__tag { left: 14px; color: var(--c); border: 1px solid var(--c); }
.map__status { right: 14px; display: flex; align-items: center; gap: 8px; color: var(--ink); border: 1px solid var(--line); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); flex: none; }
.map.is-online .dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: blink 2.4s ease-in-out infinite; }
.map.is-offline .dot { background: var(--ko); }
.map.is-starting .dot { background: #ffb247; animation: blink 0.9s ease-in-out infinite; }
.map.is-starting .map__topo { filter: saturate(0.5) brightness(0.8); }
@keyframes blink { 50% { opacity: 0.45; } }

.map__name {
  position: absolute; z-index: 2; left: 14px; bottom: 10px; margin: 0;
  font-family: var(--f-display); font-size: 38px; font-weight: 900; line-height: 1;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
  transform: translateZ(40px);
}

.map__body { padding: 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.map__desc { margin: 0; font-size: 14px; line-height: 1.5; color: #b9ccdd; }
.map__stats { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.map__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.map__row .hud { font-size: 11px; color: var(--muted); }
.map__count { font-family: var(--f-display); font-size: 28px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.map__count small { color: var(--dim); font-size: 18px; }
.bar { height: 4px; background: rgba(232, 244, 255, 0.08); overflow: hidden; }
.bar span {
  display: block; height: 100%; width: 100%; background: var(--c); box-shadow: 0 0 12px var(--c);
  transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.2s var(--ease);
}
.spark { display: block; width: 100%; height: 36px; overflow: visible; }
.spark__area { fill: color-mix(in srgb, var(--c) 16%, transparent); }
.spark__line { fill: none; stroke: var(--c); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark__label { font-size: 10px; color: var(--dim); }
.map:not(.has-history) .spark,
.map:not(.has-history) .spark__label { display: none; }
.map__meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.map__meta .mono { color: var(--ink); font-variant-numeric: tabular-nums; font-family: var(--f-hud); letter-spacing: 0.04em; }

.map__glare {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, 0.14), transparent 45%);
  mix-blend-mode: screen;
}
.map:hover .map__glare { opacity: 1; }

.roster { display: none; flex-direction: column; gap: 6px; padding-top: 4px; }
.map.is-online .roster { display: flex; }
.roster__title { display: flex; justify-content: space-between; gap: 8px; margin: 0; font-size: 10px; color: var(--dim); }
.roster__list {
  list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px;
  max-height: 176px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--c) 45%, transparent) transparent;
}
.roster__list:empty { display: none; }
.roster__list.has-more {
  -webkit-mask-image: linear-gradient(#000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 36px), transparent);
}
.roster__item {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 5px 8px 5px 5px; background: rgba(232, 244, 255, 0.04); border: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.roster__item:hover { background: color-mix(in srgb, var(--c) 12%, transparent); border-color: color-mix(in srgb, var(--c) 35%, transparent); }
.roster__item.is-new { animation: player-join 1.2s var(--ease); }
@keyframes player-join {
  from { opacity: 0; translate: -12px 0; background: color-mix(in srgb, var(--c) 40%, transparent); }
}
.roster__avatar {
  width: 24px; height: 24px; display: grid; place-items: center;
  font-family: var(--f-display); font-size: 14px; font-weight: 800; line-height: 1;
  color: var(--accent-ink); background: var(--c);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
.roster__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--ink); }
.roster__time { font-family: var(--f-hud); font-size: 11px; letter-spacing: 0.04em; color: var(--muted); font-variant-numeric: tabular-nums; }
.roster__empty { margin: 0; font-size: 12px; color: var(--dim); }

.session {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 44px; padding: 0 12px; margin-top: 2px;
  border: 1px dashed color-mix(in srgb, var(--c) 45%, transparent); background: transparent;
  color: var(--ink-2); font-size: 11px; letter-spacing: 0.1em; cursor: pointer; text-align: left;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.session .icon { width: 16px; height: 16px; color: var(--c); }
.session:hover { background: color-mix(in srgb, var(--c) 14%, transparent); border-style: solid; color: var(--ink); }

/* ---------- join ---------- */

.join {
  margin-top: 16px; padding: clamp(24px, 4vw, 40px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto; gap: 32px; align-items: center;
  border: 1px dashed rgba(56, 217, 255, 0.35); background: rgba(56, 217, 255, 0.03);
}
.join__head { display: flex; flex-direction: column; gap: 8px; }
.join__title { margin: 0; font-family: var(--f-display); font-size: 34px; font-weight: 800; line-height: 1; }
.join__steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; color: #b9ccdd; font-size: 15px; }
.join__steps li { display: flex; gap: 14px; }
.join__steps p { margin: 0; }
.join__steps .hud { color: var(--accent); font-size: 12px; padding-top: 3px; }
.join__steps strong { color: var(--ink); font-weight: 600; }
.copy {
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 20px;
  border: 1px solid var(--accent); background: rgba(5, 10, 18, 0.6); cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.copy .hud { font-size: 10px; color: var(--muted); }
.copy strong { font-family: var(--f-display); font-size: 26px; font-weight: 800; letter-spacing: 0.04em; }
.copy:hover { background: var(--accent); color: var(--accent-ink); }
.copy:hover .hud { color: var(--accent-ink); }
@media (max-width: 960px) { .join { grid-template-columns: 1fr; } .copy { justify-self: start; } }

/* ---------- rates ---------- */

.rates { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.rate {
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px 16px 28px;
  border: 1px solid var(--line); background: var(--bg); text-align: center;
  transition: border-color 0.4s, transform 0.4s var(--ease);
}
.rate:hover { border-color: var(--line-accent); transform: translateY(-6px); }
.gauge { position: relative; width: 140px; height: 140px; }
.gauge svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 6; }
.gauge .gauge__track { stroke: rgba(232, 244, 255, 0.08); }
.gauge .gauge__ticks { stroke: rgba(232, 244, 255, 0.16); stroke-width: 10; stroke-dasharray: 1 10.74; }
.gauge .gauge__fill {
  stroke: var(--accent); stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(56, 217, 255, 0.7));
  stroke-dasharray: var(--len) var(--len); stroke-dashoffset: var(--len);
  transition: stroke-dashoffset 1.8s var(--ease);
}
.rate.is-in .gauge__fill { stroke-dashoffset: var(--off); }
.gauge__value {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-size: 48px; font-weight: 900; font-variant-numeric: tabular-nums;
}
.rate h3 { margin: 0; font-family: var(--f-hud); font-size: 14px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.rate p { margin: -8px 0 0; font-size: 13px; color: var(--muted); }
@media (max-width: 520px) {
  .rates { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rate { padding: 22px 10px 20px; }
  .rate:last-child { grid-column: 1 / -1; }
  .gauge { width: 112px; height: 112px; }
  .gauge__value { font-size: 38px; }
}

/* ---------- features ---------- */

.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.feature {
  --mx: 50%; --my: 50%;
  position: relative; padding: 34px 32px; background: var(--bg); display: flex; flex-direction: column; gap: 14px;
  overflow: hidden;
}
.feature::before {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(56, 217, 255, 0.12), transparent 60%);
}
.features:hover .feature::before { opacity: 1; }
.feature > * { position: relative; }
.feature__icon {
  width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(56, 217, 255, 0.4); color: var(--accent);
  transition: transform 0.5s var(--ease), background 0.4s, color 0.4s;
}
.feature__icon .icon { width: 24px; height: 24px; stroke-width: 1.8; }
.feature:hover .feature__icon { transform: rotate(-8deg) scale(1.08); background: var(--accent); color: var(--accent-ink); }
.feature h3 { margin: 0; font-family: var(--f-display); font-size: 30px; font-weight: 800; line-height: 1; }
.feature p { margin: 0; color: #b9ccdd; font-size: 15px; }

/* ---------- vote ---------- */

.vote { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.vote__intro { flex: 1 1 340px; display: flex; flex-direction: column; gap: 16px; }
.votes { flex: 999 1 560px; min-width: 0; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.vote-card {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 20px 24px;
  border: 1px solid rgba(232, 244, 255, 0.12); background: var(--bg); overflow: hidden;
  transition: border-color 0.4s, transform 0.4s var(--ease);
}
.vote-card:hover { border-color: rgba(255, 138, 61, 0.5); transform: translateX(6px); }
.vote-card__body { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; }
.vote-card__name { margin: 0; font-family: var(--f-display); font-size: 28px; font-weight: 800; line-height: 1.1; }
.vote-card__meta { margin: 0; font-size: 13px; color: var(--muted); }
.vote-card__state { margin: 4px 0 0; font-size: 11px; color: var(--ok); font-variant-numeric: tabular-nums; }
.vote-card.is-cooling .vote-card__state { color: var(--muted); }
.vote-card.is-pending .vote-card__state { color: var(--dim); }

.vote-ring { position: relative; width: 64px; height: 64px; flex: none; }
.vote-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.vote-ring circle { fill: none; stroke-width: 4; }
.vote-ring__track { stroke: rgba(232, 244, 255, 0.1); }
.vote-ring__fill {
  stroke: var(--ok); stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke 0.4s;
  filter: drop-shadow(0 0 6px rgba(69, 240, 160, 0.6));
}
.vote-card.is-cooling .vote-ring__fill { stroke: var(--lava); filter: drop-shadow(0 0 6px rgba(255, 138, 61, 0.5)); }
.vote-ring__label {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--f-display); font-size: 20px; font-weight: 900; color: var(--ok);
  font-variant-numeric: tabular-nums;
}
.vote-card.is-cooling .vote-ring__label { color: var(--ink-2); font-size: 15px; }
.vote-card:not(.is-cooling):not(.is-pending) .vote-ring::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ok);
  animation: ring-ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ring-ping { 0% { transform: scale(1); opacity: 0.6; } 80%, 100% { transform: scale(1.5); opacity: 0; } }

/* A single vote site gets the whole column. */
.vote:has(.votes--single) { align-items: center; }
.votes--single .vote-card {
  gap: 28px; padding: clamp(24px, 4vw, 44px);
  border-color: rgba(255, 138, 61, 0.35);
  background:
    radial-gradient(circle at 12% 50%, rgba(69, 240, 160, 0.1), transparent 45%),
    radial-gradient(circle at 100% 0%, rgba(255, 138, 61, 0.14), transparent 50%),
    var(--bg);
}
.votes--single .vote-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 138, 61, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 138, 61, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(90deg, transparent, #000 60%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
}
.votes--single .vote-card:hover { transform: none; border-color: rgba(255, 138, 61, 0.7); }
.votes--single .vote-ring { width: 104px; height: 104px; }
.votes--single .vote-ring__label { font-size: 30px; }
.votes--single .vote-card.is-cooling .vote-ring__label { font-size: 22px; }
.votes--single .vote-card__name { font-size: clamp(36px, 4.4vw, 56px); line-height: 1; }
.votes--single .vote-card__meta { font-size: 14px; margin-top: 6px; }
.votes--single .vote-card__state { font-size: 12px; margin-top: 10px; }

/* ---------- rules ---------- */

.rules {
  margin: 0; padding: 0; list-style: none; counter-reset: rule;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 0 48px;
}
.rule { display: flex; gap: 24px; padding: 28px 0; border-top: 1px solid rgba(232, 244, 255, 0.12); position: relative; }
.rule::before {
  content: ''; position: absolute; left: 0; top: -1px; height: 1px; width: 0; background: var(--accent);
  transition: width 0.8s var(--ease);
}
.rule:hover::before { width: 100%; }
.rule__n { font-size: 14px; color: var(--accent); padding-top: 6px; }
.rule h3 { margin: 0 0 8px; font-family: var(--f-display); font-size: 30px; font-weight: 800; line-height: 1; }
.rule p { margin: 0; color: #b9ccdd; font-size: 15px; }
@media (max-width: 420px) { .rules { grid-template-columns: 1fr; } }

/* ---------- discord CTA ---------- */

.cta { padding: 0 0 clamp(80px, 11vw, 140px); }
.cta__frame {
  padding: 2px;
  background: linear-gradient(90deg, var(--accent), var(--lava), #7f5bff, var(--accent));
  background-size: 300% 100%;
  animation: border-run 6s linear infinite;
}
@keyframes border-run { to { background-position: 300% 0; } }
.cta__inner {
  position: relative; overflow: hidden;
  padding: clamp(32px, 7vw, 88px);
  display: flex; flex-wrap: wrap; align-items: center; gap: 48px;
  background-color: #06101b;
  background-image:
    linear-gradient(rgba(56, 217, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 217, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
}
.cta__badge {
  width: clamp(140px, 18vw, 220px); height: auto; border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(56, 217, 255, 0.6), 0 0 80px rgba(56, 217, 255, 0.4);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-12px) rotate(-3deg); } }
.cta__content { flex: 1 1 420px; display: flex; flex-direction: column; gap: 18px; }
.cta__title { margin: 0; font-family: var(--f-display); font-size: clamp(46px, 7vw, 92px); font-weight: 900; line-height: 0.9; text-wrap: balance; }
.cta__row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.cta__count { margin: 0; font-size: 12px; color: #b9ccdd; }

/* ---------- footer / toast ---------- */

.footer { border-top: 1px solid var(--line); padding: 40px 0; background: rgba(5, 10, 18, 0.82); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; font-size: 13px; color: var(--muted); }
.footer__inner p { margin: 0; }
.footer__brand { font-family: var(--f-display); font-size: 22px; font-weight: 900; color: var(--ink); letter-spacing: 0.04em; }

.made-by {
  --g: #45f0a0;
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 18px 0 14px; border-radius: 999px;
  border: 1px solid rgba(69, 240, 160, 0.28); background: rgba(69, 240, 160, 0.06);
  color: var(--ink-2); font-size: 13px; overflow: hidden; isolation: isolate;
  transition: border-color 0.4s, background 0.4s, color 0.4s, box-shadow 0.4s;
}
.made-by::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(69, 240, 160, 0.18) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.9s var(--ease);
}
.made-by:hover { color: var(--ink); border-color: rgba(69, 240, 160, 0.7); background: rgba(69, 240, 160, 0.1); box-shadow: 0 0 32px -8px rgba(69, 240, 160, 0.6); }
.made-by:hover::before { transform: translateX(120%); }
.made-by strong {
  font-family: var(--f-hud); font-weight: 700; letter-spacing: 0.06em; color: var(--g);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.4s var(--ease);
}
.made-by:hover strong { background-size: 100% 1px; }
.made-by__heart {
  width: 18px; height: 18px; flex: none; fill: var(--g);
  filter: drop-shadow(0 0 6px rgba(69, 240, 160, 0.75));
  transform-origin: 50% 60%;
  animation: heartbeat 1.6s ease-in-out infinite;
}
.made-by:hover .made-by__heart { animation-duration: 0.8s; }
@keyframes heartbeat {
  0%, 40%, 100% { transform: scale(1); }
  10% { transform: scale(1.28); }
  20% { transform: scale(0.96); }
  30% { transform: scale(1.18); }
}

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80;
  padding: 12px 18px; font-size: 12px; color: var(--accent-ink); background: var(--accent);
  transform: translate(-50%, calc(100% + 40px)); visibility: hidden;
  transition: transform 0.4s var(--ease), visibility 0.4s;
}
.toast.is-visible { transform: translate(-50%, 0); visibility: visible; }

.noscript { margin: 0; padding: 16px; text-align: center; background: var(--panel); }

/* ---------- reduced motion ---------- */

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