:root {
  --void: #05040a;
  --void-2: #0a0a14;
  --cyan: #7af6ff;
  --cyan-dim: rgba(122, 246, 255, 0.55);
  --magenta: #ff4fd8;
  --text: #e8f7ff;
  --muted: rgba(200, 247, 255, 0.72);
  --line: rgba(122, 246, 255, 0.18);
  --panel: rgba(8, 10, 22, 0.72);
  --font-display: "Oxanium", "Segoe UI", sans-serif;
  --font-body: "Exo 2", "Segoe UI", sans-serif;
  --pad: clamp(1rem, 3vw, 1.75rem);
  --max: 1280px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text);
  background:
    radial-gradient(90% 60% at 85% 8%, rgba(255, 79, 216, 0.14), transparent 55%),
    radial-gradient(70% 50% at 8% 70%, rgba(122, 246, 255, 0.1), transparent 50%),
    linear-gradient(165deg, var(--void) 0%, var(--void-2) 55%, #07061a 100%);
  overflow-x: hidden;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: var(--cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.atmosphere {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(122, 246, 255, 0.014) 3px,
    rgba(122, 246, 255, 0.014) 4px
  );
  animation: haze-drift 22s linear infinite;
  opacity: 0.65;
}

.hero-glow {
  pointer-events: none;
  position: absolute;
  top: 0;
  right: 0;
  width: min(70vw, 720px);
  height: min(90dvh, 820px);
  z-index: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(122, 246, 255, 0.16), transparent 55%),
    radial-gradient(circle at 40% 70%, rgba(255, 79, 216, 0.1), transparent 50%);
  filter: blur(8px);
}

@keyframes haze-drift {
  from { transform: translateY(0); }
  to { transform: translateY(-36px); }
}

.topbar {
  position: relative;
  z-index: 3;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem var(--pad);
}

.topbar-brand {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.95rem;
}

.lang-switch,
.diff-switch {
  display: flex;
  gap: 0.35rem;
}

.lang-btn,
.diff-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.lang-btn.is-active,
.lang-btn[aria-pressed="true"],
.diff-btn.is-active,
.diff-btn[aria-selected="true"] {
  color: var(--void);
  background: var(--cyan);
  border-color: var(--cyan);
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 280px);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.35rem var(--pad) 1.75rem;
}

.brand {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  letter-spacing: 0.08em;
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 42px rgba(122, 246, 255, 0.28);
  animation: rise 0.75s ease both;
}

.headline {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 2.4vw, 1.65rem);
  letter-spacing: 0.02em;
  line-height: 1.15;
  animation: rise 0.85s ease 0.06s both;
}

.lead {
  margin: 0 0 1rem;
  max-width: 40ch;
  font-size: clamp(0.95rem, 1.8vw, 1.08rem);
  line-height: 1.45;
  color: var(--muted);
  animation: rise 0.95s ease 0.12s both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  animation: rise 1s ease 0.18s both;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--void);
  background: linear-gradient(120deg, var(--cyan), #b8fbff 55%, var(--cyan));
  border: none;
  box-shadow: 0 0 0 1px rgba(122, 246, 255, 0.35), 0 12px 40px rgba(122, 246, 255, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.cta-primary--sm {
  min-height: 2.6rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.82rem;
}

.cta-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 0 0 1px rgba(122, 246, 255, 0.5), 0 16px 48px rgba(122, 246, 255, 0.28);
}

.cta-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.65rem 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cyan);
  border: 1px solid var(--line);
  background: rgba(122, 246, 255, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.cta-ghost:hover {
  border-color: var(--cyan-dim);
  background: rgba(122, 246, 255, 0.08);
}

.hero-note {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--cyan-dim);
  animation: rise 1.05s ease 0.22s both;
}

.hero-stage {
  display: flex;
  justify-content: flex-end;
  animation: visual-in 1s ease 0.1s both;
}

.phone {
  margin: 0;
  padding: 0.35rem;
  border-radius: 1.15rem;
  background:
    linear-gradient(160deg, rgba(122, 246, 255, 0.22), rgba(255, 79, 216, 0.12) 45%, rgba(10, 10, 20, 0.95));
  box-shadow:
    0 0 0 1px rgba(122, 246, 255, 0.28),
    0 16px 40px rgba(0, 0, 0, 0.45),
    0 0 36px rgba(122, 246, 255, 0.1);
}

.phone--hero {
  width: 100%;
  max-width: 260px;
}

.phone img,
.phone video {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center top;
  border-radius: 0.9rem;
  background: #070814;
  display: block;
}

.phone--hero img {
  max-height: min(58dvh, 480px);
  width: 100%;
  object-fit: cover;
  object-position: center top;
}

.phone--hero .hero-fallback {
  display: none;
}

.phone--hero.is-fallback .hero-video {
  display: none;
}

.phone--hero.is-fallback .hero-fallback {
  display: block;
  filter: brightness(1.08) contrast(1.05) saturate(1.06);
}

.look .phone img {
  filter: brightness(1.1) contrast(1.05) saturate(1.06);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes visual-in {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.how,
.ranks,
.look,
.closer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem var(--pad);
}

.how,
.ranks,
.look {
  border-top: 1px solid var(--line);
}

.how h2,
.ranks h2,
.look h2,
.closer h2 {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
}

.how-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.how-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.how-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: var(--magenta);
}

.ranks-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.ranks-eyebrow {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--magenta);
}

.ranks-head h2 {
  margin: 0;
}

.ranks-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  min-height: 12rem;
  padding: 0.2rem 0;
}

.ranks-status {
  margin: 0;
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: var(--muted);
}

.ranks-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranks-row {
  display: grid;
  grid-template-columns: 2.75rem 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(122, 246, 255, 0.08);
  animation: rise 0.55s ease both;
}

.ranks-row:last-child {
  border-bottom: none;
}

.ranks-row:nth-child(1) { animation-delay: 0.02s; }
.ranks-row:nth-child(2) { animation-delay: 0.05s; }
.ranks-row:nth-child(3) { animation-delay: 0.08s; }
.ranks-row:nth-child(4) { animation-delay: 0.11s; }
.ranks-row:nth-child(5) { animation-delay: 0.14s; }

.ranks-rank {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--cyan-dim);
}

.ranks-row:nth-child(1) .ranks-rank { color: #ffe566; }
.ranks-row:nth-child(2) .ranks-rank { color: #d7e7ff; }
.ranks-row:nth-child(3) .ranks-rank { color: #ff9b6b; }

.ranks-nick {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranks-score {
  font-family: var(--font-display);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--cyan);
}

.ranks-foot {
  margin: 1.35rem 0 0;
  display: flex;
  justify-content: center;
}

.look-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.look-row .phone {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.look-row .phone:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 0 1px rgba(122, 246, 255, 0.4),
    0 24px 56px rgba(0, 0, 0, 0.5),
    0 0 48px rgba(122, 246, 255, 0.16);
}

.closer {
  text-align: center;
  border-top: 1px solid var(--line);
  padding-bottom: 2.5rem;
}

.closer-lead {
  margin: -0.15rem auto 1rem;
  max-width: 36ch;
  color: var(--muted);
  line-height: 1.45;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.35rem;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.35rem var(--pad) 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer a {
  color: var(--cyan-dim);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--cyan);
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding-bottom: 1.25rem;
  }

  .hero-stage {
    order: -1;
    justify-content: center;
  }

  .phone--hero {
    max-width: 200px;
  }

  .phone--hero img {
    max-height: min(42dvh, 380px);
  }

  .how-list {
    grid-template-columns: 1fr;
  }

  .look-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranks-head {
    align-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere,
  .brand,
  .headline,
  .lead,
  .cta-row,
  .hero-note,
  .hero-stage,
  .ranks-row,
  .look-row .phone {
    animation: none;
    transition: none;
  }
}
