:root {
  --bg: #07090c;
  --text: #eef2f7;
  --muted: #8b95a5;
  --steel: #c5cedb;
  --accent: #8eb6ef;
  --live: #6fcf97;
  --idle: #7f8a99;
  --line: rgba(70, 86, 108, 0.55);
  --font-display: "Syne", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(1rem, 4vw, 1.5rem);
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(900px 520px at 78% -5%, rgba(142, 182, 239, 0.12), transparent 58%),
    radial-gradient(700px 460px at -10% 20%, rgba(197, 206, 219, 0.05), transparent 52%),
    linear-gradient(168deg, #0d1218 0%, var(--bg) 46%, #050607 100%);
  line-height: 1.55;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.top,
main,
.foot {
  position: relative;
  z-index: 1;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: min(var(--max), calc(100% - (var(--pad) * 2)));
  margin: 0 auto;
  padding:
    max(0.9rem, env(safe-area-inset-top))
    0
    0.75rem;
  background: linear-gradient(180deg, rgba(7, 9, 12, 0.92), rgba(7, 9, 12, 0.72) 70%, transparent);
  backdrop-filter: blur(10px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  min-width: 0;
}

.brand-mark img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex: 0 0 auto;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  transition: color 160ms var(--ease);
}

.top-nav a:hover {
  color: var(--text);
}

.nav-cta {
  color: var(--text) !important;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(16, 21, 28, 0.55);
}

.hero {
  width: min(var(--max), calc(100% - (var(--pad) * 2)));
  margin: 0 auto;
  padding: 1.25rem 0 3.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  min-height: calc(100dvh - 5rem);
}

.hero-copy {
  min-width: 0;
  animation: copyIn 800ms var(--ease) both;
}

.brand-kicker {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.92;
  color: var(--text);
  overflow-wrap: anywhere;
}

.brand-lockup {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--steel);
}

.lede {
  margin: 1rem 0 0;
  max-width: 32rem;
  color: #aeb7c5;
  font-size: clamp(0.95rem, 2.4vw, 1.05rem);
  font-weight: 500;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.45rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.15rem;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 160ms var(--ease), background 160ms var(--ease), border-color 160ms var(--ease), filter 160ms var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: #f2f5f8;
  color: #10141a;
}

.btn.primary:hover {
  background: #ffffff;
}

.btn.ghost {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
  background: rgba(16, 21, 28, 0.45);
}

.btn.ghost:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.hero-stage {
  min-width: 0;
  animation: deskIn 900ms var(--ease) both;
}

.hero-desk {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(14, 19, 26, 0.92);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.desk-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: rgba(18, 24, 32, 0.95);
}

.desk-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a4554;
  flex: 0 0 auto;
}

.desk-dot:nth-child(1) { background: #cf6679; }
.desk-dot:nth-child(2) { background: #d7b15c; }
.desk-dot:nth-child(3) { background: #6fcf97; }

.desk-title {
  margin-left: 0.45rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--steel);
}

.desk-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.78rem 0.85rem;
  border-bottom: 1px solid rgba(70, 86, 108, 0.35);
  animation: rowIn 650ms var(--ease) both;
}

.desk-row:last-child {
  border-bottom: 0;
}

.desk-row:nth-child(2) { animation-delay: 80ms; }
.desk-row:nth-child(3) { animation-delay: 140ms; }
.desk-row:nth-child(4) { animation-delay: 200ms; }
.desk-row:nth-child(5) { animation-delay: 260ms; }
.desk-row:nth-child(6) { animation-delay: 320ms; }

.desk-row.is-live {
  background: rgba(30, 48, 72, 0.45);
  box-shadow: inset 2px 0 0 #6ea8fe;
}

.desk-av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #dfe7f2;
  background: linear-gradient(135deg, #4a657a, #243746);
  flex: 0 0 auto;
}

.desk-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.desk-name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desk-status {
  color: var(--idle);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desk-status.live {
  color: var(--accent);
}

.band {
  border-block: 1px solid rgba(36, 48, 65, 0.9);
  background: rgba(12, 16, 22, 0.72);
}

.band-inner {
  width: min(720px, calc(100% - (var(--pad) * 2)));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 4.75rem) 0;
  text-align: center;
}

.band h2,
.feature h2,
.download h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 5vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-weight: 700;
  overflow-wrap: break-word;
}

.band p,
.feature p,
.download p {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  font-weight: 500;
}

.feature {
  width: min(var(--max), calc(100% - (var(--pad) * 2)));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.feature-copy,
.feature-visual {
  min-width: 0;
}

.feature-visual {
  display: grid;
  gap: 0.2rem;
}

.feature-visual.meters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.queue-line,
.game-line,
.meter {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(36, 48, 65, 0.85);
  font-size: 0.95rem;
  min-width: 0;
}

.queue-line:last-child,
.game-line:last-child {
  border-bottom: 0;
}

.queue-line i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--idle);
  flex: 0 0 auto;
}

.queue-line i.pulse {
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(111, 207, 151, 0.45);
  animation: blink 2.2s ease-out infinite;
}

.queue-line span,
.game-line span:last-child {
  flex: 1;
  min-width: 0;
  font-weight: 600;
}

.queue-line b,
.meter span {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.86rem;
  flex: 0 0 auto;
}

.meter {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.2rem 0;
  border-bottom: 0;
}

.meter strong {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  letter-spacing: -0.02em;
}

.tag {
  display: inline-flex;
  min-width: 4.4rem;
  justify-content: center;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.tag.fav {
  color: var(--accent);
  background: rgba(142, 182, 239, 0.12);
}

.tag.vip {
  color: var(--live);
  background: rgba(111, 207, 151, 0.12);
}

.tag.recent {
  color: var(--steel);
  background: rgba(197, 206, 219, 0.1);
}

.download {
  padding: 0 var(--pad) max(3.5rem, env(safe-area-inset-bottom));
}

.download-inner {
  width: min(860px, 100%);
  margin: 0 auto;
  text-align: center;
  padding: clamp(2.75rem, 7vw, 4rem) 0 0;
  border-top: 1px solid rgba(36, 48, 65, 0.9);
  background:
    radial-gradient(640px 200px at 50% 0%, rgba(142, 182, 239, 0.1), transparent 62%);
}

.download .cta-row {
  justify-content: center;
}

.foot {
  width: min(var(--max), calc(100% - (var(--pad) * 2)));
  margin: 0 auto;
  padding: 0 0 max(1.75rem, env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
}

.muted {
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@keyframes deskIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes rowIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes copyIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes blink {
  0% { box-shadow: 0 0 0 0 rgba(111, 207, 151, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(111, 207, 151, 0); }
  100% { box-shadow: 0 0 0 0 rgba(111, 207, 151, 0); }
}

/* Tablet and below */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 0.75rem 0 2.75rem;
    gap: 1.5rem;
  }

  .hero-stage {
    order: 2;
  }

  .feature {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .feature-visual.meters {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .top-nav a:not(.nav-cta):not(#nav-auth) {
    display: none;
  }
}

/* Phones (iPhone 6 / SE and up) */
@media (max-width: 640px) {
  .top {
    width: calc(100% - 1.5rem);
    padding-top: max(0.75rem, env(safe-area-inset-top));
  }

  .top-nav {
    gap: 0.35rem;
  }

  .top-nav a {
    font-size: 0.8rem;
    padding: 0.4rem 0.5rem;
  }

  .brand-mark span {
    font-size: 0.95rem;
  }

  .hero,
  .feature,
  .foot,
  .band-inner {
    width: calc(100% - 1.5rem);
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .download .cta-row {
    width: min(100%, 22rem);
    margin-left: auto;
    margin-right: auto;
  }

  .queue-line,
  .game-line {
    font-size: 0.9rem;
  }

  .foot {
    flex-direction: column;
    gap: 0.35rem;
  }
}

/* Very small phones */
@media (max-width: 360px) {
  .brand-kicker {
    font-size: 2.15rem;
  }

  .brand-lockup {
    font-size: 1.2rem;
  }

  .top-nav a#nav-auth {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-stage,
  .desk-row,
  .hero-copy,
  .reveal,
  .queue-line i.pulse {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}
