:root {
  --bg: #0b0e13;
  --surface: #12161d;
  --surface2: #0e1520;
  --ink: #f2e8c9;
  --muted: #a39877;
  --accent: #f4d96c;
  --accent-ink: #0b0e13;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --margin: clamp(16px, 4vw, 48px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Work Sans", system-ui, sans-serif;
  font-weight: 400;
  font-size: var(--step-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* film grain: the static in the name */

.grain {
  position: absolute;
  inset: -50px;
  pointer-events: none;
  opacity: 0.1;
  will-change: transform;
  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.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.6s steps(3) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-25px, 18px); }
  66% { transform: translate(18px, -25px); }
  100% { transform: translate(0, 0); }
}

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

.hero {
  position: relative;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  background: var(--bg);
}

.signal {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  width: 100%;
  height: 120px;
  transform: translateY(-50%);
  opacity: 0.35;
}

.signal path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
}

#signal-echo {
  stroke: var(--muted);
  stroke-width: 1;
  opacity: 0.4;
}

.tuner {
  position: absolute;
  left: 50%;
  top: calc(50% + 110px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: var(--step-small);
}

.tuner label { white-space: nowrap; }

.tuner input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: clamp(120px, 20vw, 220px);
  height: 2px;
  background: var(--muted);
  outline: none;
  cursor: pointer;
}

.tuner input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.tuner input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.tune-state {
  min-width: 52px;
  color: var(--accent);
  font-weight: 500;
}

.topnav {
  position: absolute;
  top: 24px;
  right: var(--margin);
  font-size: 14px;
  color: var(--ink);
  display: flex;
  gap: 24px;
}

.topnav a { text-decoration: none; }
.topnav a:hover { text-decoration: underline; text-underline-offset: 3px; }

.hero-title {
  position: absolute;
  left: var(--margin);
  bottom: 32px;
  font-weight: 300;
  font-size: clamp(56px, 7vw, 110px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.hero-cta {
  position: absolute;
  right: var(--margin);
  bottom: 32px;
  max-width: 32ch;
  text-align: right;
}

.hero-cta p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 12px;
}

.join-link {
  font-size: var(--step-body);
  font-weight: 500;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

.join-link:hover { text-decoration-thickness: 2.5px; }

.hero-mobile-join.button {
  display: none;
  position: absolute;
  left: var(--margin);
  bottom: 32px;
}

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

main { display: block; }

section { padding: clamp(120px, 16vw, 220px) var(--margin); }

section:nth-of-type(even) { background: var(--surface); }

section.faq { background: var(--surface2); }

h2 {
  font-weight: 300;
  font-size: var(--step-head);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 32px;
}

/* intro */

.intro { max-width: 1400px; margin: 0 auto; }

.intro-inner {
  max-width: 52ch;
  margin-left: auto;
  text-align: right;
}

.intro-inner p + p { margin-top: 1em; }

.intro-inner p { font-size: var(--step-lead); line-height: 1.5; }

/* about */

.about { max-width: 1400px; margin: 0 auto; }

.about-inner { max-width: 720px; }

.facts > div { padding: 20px 0; }

.facts > div + div { margin-top: 8px; }

.facts dt { font-weight: 500; font-size: var(--step-body); margin-bottom: 4px; }

.facts dd { color: var(--muted); font-size: var(--step-body); }

/* rules */

.rules { max-width: 1400px; margin: 0 auto; }

.rules-inner {
  max-width: 640px;
  margin-left: auto;
  text-align: right;
}

.rules ol {
  list-style: none;
}

.rules li {
  font-size: var(--step-lead);
  padding: 24px 0;
}

.rules li + li { margin-top: 8px; }

/* faq */

.faq { max-width: 1400px; margin: 0 auto; }

.faq-inner { max-width: 640px; }

.faq-inner dl > div { padding: 20px 0; }

.faq-inner dl > div + div { margin-top: 8px; }

.faq-inner dt { font-weight: 500; margin-bottom: 4px; }

.faq-inner dd { color: var(--muted); }

/* cta */

.cta { max-width: 1400px; margin: 0 auto; }

.cta-field { max-width: 640px; }

.cta-field p { color: var(--muted); margin-bottom: 32px; font-size: var(--step-lead); }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
  font-size: var(--step-body);
  padding: 16px 36px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.button:hover { transform: translateY(-2px); }

/* footer */

footer {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  padding: clamp(80px, 10vw, 140px) var(--margin) 48px;
}

footer .grain { opacity: 0.08; }

.foot-title {
  position: relative;
  font-weight: 300;
  font-size: clamp(3rem, 12vw, 10rem);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 32px;
}

.privacy { position: relative; color: var(--muted); font-size: var(--step-small); }

/* live */

.live { max-width: 1400px; margin: 0 auto; }

.live-inner { max-width: 720px; }

.live-copy h2 { margin-bottom: 24px; }

.live-panel {
  background: var(--surface2);
  border: 1px solid rgba(242, 232, 201, 0.09); /* taste-skill-ignore: real interface fragment (data-ui), borders are its own convention */
  border-radius: 10px;
  overflow: hidden;
}

.live-panel-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 14px 16px;
  background: rgba(242, 232, 201, 0.04);
}

.live-panel-online {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: var(--step-small);
  white-space: nowrap;
}

.live-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #43b581;
  animation: live-pulse 2.4s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.live-members {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 8px;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(242, 232, 201, 0.18) transparent;
}

.live-members::-webkit-scrollbar { width: 8px; }

.live-members::-webkit-scrollbar-thumb {
  background: rgba(242, 232, 201, 0.18);
  border-radius: 4px;
}

.live-member {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 10px;
  border-radius: 8px;
  min-width: 0;
}

.live-member:hover { background: rgba(242, 232, 201, 0.04); }

.live-pic {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(242, 232, 201, 0.07);
}

.live-pic img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: block;
}

.live-status {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--surface2);
  background: #43b581;
}

.live-status-idle { background: #faa61a; }
.live-status-dnd { background: #f04747; }
.live-status-offline { background: #747f8d; }

.live-member-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.live-member-name {
  font-weight: 500;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-member-game {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-more {
  display: block;
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: var(--step-small);
  padding: 10px;
}

.live-more:hover { background: none; }

.live-panel-foot { padding: 12px; }

.live-join-btn {
  display: block;
  text-align: center;
  padding: 12px 20px;
  font-size: 15px;
}

@media (max-width: 760px) {
  .live-members {
    grid-template-columns: 1fr;
    max-height: 430px;
    overflow-y: auto;
  }
}

/* ---------- phone ---------- */

@media (max-width: 760px) {
  .hero-cta { display: none; }

  .hero-title {
    font-size: clamp(56px, 17vw, 96px);
    bottom: 120px;
  }

  .topnav { display: none; }

  .hero-mobile-join.button {
    display: inline-block;
    bottom: 32px;
  }

  .tuner {
    top: calc(50% + 80px);
    left: var(--margin);
    transform: none;
  }

  .signal { height: 80px; }

  .grain { animation: none; opacity: 0.08; }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .live-dot { animation: none; }
  html { scroll-behavior: auto; }
}
