/*
 * Vibe — website styles.
 *
 * Deliberately built from the Activity's own design tokens (activity/src/player.css and
 * theme.ts) rather than a generic landing-page look: near-black ground, Outfit, a flat
 * vertical accent fade instead of a radial glow, and the accent kept for small focal
 * elements only. The site should read as the same product as the thing it is selling.
 */

@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ground: #0b0b0d;
  --raise: #131317;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --ink: #f5f2f3;
  --ink-2: #a8a2a6;
  --ink-3: #6f696d;
  --accent: #e05570;
  --accent-hover: #ec6a83;
  --max: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* The Activity's own background treatment: a flat vertical fade, not a radial glow. The
   glow was removed there for reading as a light source; repeating it here would be
   reintroducing the exact thing that got cut. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(
      to bottom,
      color-mix(in srgb, var(--accent) 9%, transparent) 0%,
      color-mix(in srgb, var(--accent) 3%, transparent) 18%,
      transparent 42%
    ),
    color-mix(in srgb, var(--accent) 2%, transparent);
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

a {
  color: inherit;
}

/* --- nav ------------------------------------------------------------------------ */

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 26px 0 0;
}
.mark {
  width: 26px;
  height: 26px;
  flex: none;
}
.mark path {
  fill: var(--accent);
}
.wordmark {
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.nav-links {
  margin-left: auto;
  display: flex;
  gap: 26px;
  font-size: 15px;
  color: var(--ink-2);
}
.nav-links a {
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover {
  color: var(--ink);
}

/* --- hero ----------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  gap: 64px;
  align-items: center;
  padding: 92px 0 104px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 22px;
}

h1 {
  font-size: clamp(38px, 5.6vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0 0 24px;
  max-width: 15ch;
}

.lede {
  font-size: 19px;
  color: var(--ink-2);
  margin: 0 0 34px;
  max-width: 52ch;
}
.lede strong {
  color: var(--ink);
  font-weight: 500;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: #14090c;
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--accent-hover);
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink-2);
}
.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--ink);
}

.hero-note {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--ink-3);
}

/* --- the player replica --------------------------------------------------------- */
/* A real reproduction of the Activity rather than a screenshot or an icon card: it is the
   product, it renders crisply at any size, and it stays honest because it is built from the
   same tokens the app uses. */

.player {
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 24px 22px;
  box-shadow: 0 28px 70px -30px rgba(0, 0, 0, 0.9);
}
.player-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.art {
  aspect-ratio: 1;
  border-radius: 12px;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.14), transparent 58%),
    linear-gradient(148deg, color-mix(in srgb, var(--accent) 34%, #1a1a20), #101015);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.art svg {
  width: 34%;
  opacity: 0.28;
}
.art svg path {
  fill: #fff;
}
.track {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 3px;
}
.artist {
  font-size: 14px;
  color: var(--ink-3);
  margin: 0 0 18px;
}
.seek {
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-bottom: 8px;
}
.seek span {
  display: block;
  width: 41%;
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
}
.times {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 18px;
  font-variant-numeric: tabular-nums;
}
.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}
.ctl {
  width: 20px;
  height: 20px;
  opacity: 0.5;
  fill: var(--ink);
}
.play {
  width: 48px;
  height: 48px;
  border-radius: 99px;
  background: var(--accent);
  display: grid;
  place-items: center;
}
.play svg {
  width: 17px;
  fill: #14090c;
  margin-left: 2px;
}

/* --- sections ------------------------------------------------------------------- */

section {
  padding: 80px 0;
  border-top: 1px solid var(--line);
}
h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0 0 14px;
  max-width: 20ch;
}
.section-lede {
  color: var(--ink-2);
  margin: 0 0 44px;
  max-width: 62ch;
}

/* Asymmetric on purpose — an even grid of equal cards is the shape this page is trying
   not to be. */
.features {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
.feature {
  grid-column: span 2;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 22px;
  background: rgba(255, 255, 255, 0.015);
}
.feature:nth-child(1) {
  grid-column: span 3;
}
.feature:nth-child(2) {
  grid-column: span 3;
}
.feature h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.feature p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
}
.feature code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  padding: 1px 6px;
  border-radius: 5px;
}

/* --- instances ------------------------------------------------------------------ */

.instances {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.instance {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: var(--ground);
  text-decoration: none;
  transition: background 0.15s;
}
.instance:hover {
  background: var(--raise);
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  flex: none;
  background: var(--i);
}
.instance-name {
  font-weight: 600;
  font-size: 16px;
}
.instance-desc {
  color: var(--ink-3);
  font-size: 14px;
  margin-left: auto;
  text-align: right;
}
.instance-add {
  color: var(--i);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* --- soon ----------------------------------------------------------------------- */

.soon {
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 26px 24px;
  color: var(--ink-2);
  font-size: 15px;
}
.soon h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}
.soon ul {
  margin: 12px 0 0;
  padding-left: 20px;
}
.soon li {
  margin-bottom: 5px;
}

/* --- footer --------------------------------------------------------------------- */

footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  color: var(--ink-3);
  font-size: 14px;
}
footer nav {
  margin-left: auto;
  display: flex;
  gap: 22px;
}
footer a {
  text-decoration: none;
  transition: color 0.15s;
}
footer a:hover {
  color: var(--ink);
}
.disclaimer {
  flex-basis: 100%;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.5;
  max-width: 68ch;
}

/* --- legal pages ---------------------------------------------------------------- */

.legal {
  padding: 64px 0 40px;
  max-width: 74ch;
}
.legal h1 {
  font-size: 38px;
  margin-bottom: 8px;
  max-width: none;
}
.legal .updated {
  color: var(--ink-3);
  font-size: 14px;
  margin: 0 0 12px;
}
.legal .callout {
  border-left: 2px solid var(--accent);
  padding: 12px 0 12px 18px;
  color: var(--ink-2);
  font-size: 15px;
  margin: 26px 0 40px;
}
.legal h2 {
  font-size: 20px;
  margin: 40px 0 12px;
  max-width: none;
}
.legal p,
.legal li {
  color: var(--ink-2);
  font-size: 16px;
}
.legal strong {
  color: var(--ink);
  font-weight: 500;
}
.legal ul {
  padding-left: 22px;
}
.legal li {
  margin-bottom: 7px;
}
.legal a {
  color: var(--accent);
}
.back {
  display: inline-block;
  margin-top: 48px;
  color: var(--ink-3);
  text-decoration: none;
  font-size: 15px;
}
.back:hover {
  color: var(--ink);
}

/* --- responsive ----------------------------------------------------------------- */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 64px 0 76px;
  }
  .player {
    max-width: 360px;
  }
  .features {
    grid-template-columns: 1fr;
  }
  .feature,
  .feature:nth-child(1),
  .feature:nth-child(2) {
    grid-column: span 1;
  }
  .instance {
    flex-wrap: wrap;
    gap: 10px;
  }
  .instance-desc {
    margin-left: 0;
    flex-basis: 100%;
    text-align: left;
  }
  .nav-links {
    gap: 18px;
  }
}

/* --- dashboard ------------------------------------------------------------------- */
/* The signed-in page. Deliberately reuses the landing page's tokens and .btn/.soon rules
   rather than introducing a second visual language for the same product — the only new
   shapes here are the ones the landing page has no equivalent of. */

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.dash {
  padding: 56px 0 40px;
  min-height: 50vh;
}
/* The landing page's `section { padding: 80px 0; border-top: … }` exists to separate its
   full-width bands. The dashboard's sections are stacked cards inside one column, so they
   space themselves with margins instead — without this reset every one of them inherits
   160px of vertical padding and a rule it was never meant to have. */
.dash section {
  padding: 0;
  border-top: 0;
}
.dash-status {
  color: var(--ink-2);
  font-size: 15px;
  margin: 0 0 24px;
}
.dash-error {
  border-left: 2px solid var(--accent);
  padding: 10px 0 10px 16px;
  margin: 0 0 24px;
  color: var(--ink-2);
  font-size: 15px;
}

.signin {
  max-width: 60ch;
  padding: 40px 0 0;
}
.signin h1 {
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}
.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  flex: none;
  background: var(--raise);
}
.profile-name {
  font-size: 30px;
  letter-spacing: -0.02em;
  margin: 2px 0 0;
}
.profile-head .signout {
  margin-left: auto;
  padding: 9px 16px;
  font-size: 14px;
  cursor: pointer;
  background: none;
}

.level-card {
  margin: 34px 0 0;
}
.level-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.level-badge {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.level-next {
  color: var(--ink-3);
  font-size: 14px;
}
.level-track {
  height: 6px;
  border-radius: 3px;
  /* --line, not --raise: at level 1 the fill is genuinely 0% wide, and an unfilled track
     that close to the page background reads as a missing element rather than an empty one. */
  background: var(--line);
  overflow: hidden;
}
.level-fill {
  display: block;
  height: 100%;
  /* Width is set from the level progress; 0% is a real state (a fresh level), so there is
     deliberately no minimum to make an empty bar look non-empty. */
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin: 34px 0 0;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 20px;
  background: var(--raise);
}
.stat-value {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.stat-label {
  color: var(--ink-2);
  font-size: 14px;
}
.stat-note {
  color: var(--ink-3);
  font-size: 13px;
}

.badge-section {
  margin: 44px 0 0;
}
.badge-section h2 {
  font-size: 20px;
  margin: 0 0 14px;
}
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.badge {
  --badge: var(--accent);
  display: inline-flex;
  align-items: center;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--badge);
  border: 1px solid color-mix(in srgb, var(--badge) 40%, transparent);
  background: color-mix(in srgb, var(--badge) 12%, transparent);
}
.badge-empty {
  color: var(--ink-3);
  font-size: 15px;
  margin: 0;
}

.dash .soon {
  margin-top: 52px;
}

@media (max-width: 860px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .signin h1 {
    font-size: 32px;
  }
  .profile-head {
    flex-wrap: wrap;
  }
  .profile-head .signout {
    margin-left: 0;
  }
}

/* --- dashboard: rank card colour + servers --------------------------------------- */

.card-section,
.servers-section {
  margin: 44px 0 0;
}
.card-section h2,
.servers-section h2 {
  font-size: 20px;
  margin: 0 0 6px;
}
.section-note {
  color: var(--ink-3);
  font-size: 14px;
  margin: 0 0 16px;
  max-width: 62ch;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.swatch {
  --swatch: var(--accent);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  background: var(--swatch);
  border: 2px solid transparent;
  /* The ring sits outside the fill rather than inset, so the chosen colour is never partly
     covered by the indicator that it is chosen. */
  box-shadow: 0 0 0 2px var(--ground);
  transition: box-shadow 0.15s;
}
.swatch[aria-checked="true"] {
  box-shadow:
    0 0 0 2px var(--ground),
    0 0 0 4px var(--swatch);
}
.swatch:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.swatch-reset {
  font: inherit;
  font-size: 14px;
  color: var(--ink-2);
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 7px 15px;
  cursor: pointer;
  margin-left: 4px;
}
.swatch-reset:hover:not(:disabled) {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.28);
}
.swatch-reset:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.servers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.server {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--raise);
  padding: 16px 18px;
}
.server-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.server-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex: none;
  background: var(--ground);
}
.server-initial {
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--ink-2);
}
.server-name {
  font-weight: 600;
  font-size: 16px;
}
.server-count {
  margin-left: auto;
  color: var(--ink-3);
  font-size: 13px;
}
.server-body {
  margin-top: 14px;
}
.server-body:empty {
  margin-top: 0;
}
.server-add {
  padding: 8px 16px;
  font-size: 14px;
}

.instance-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.instance-name {
  font-size: 15px;
  font-weight: 500;
  min-width: 90px;
}
.instance-state {
  color: var(--ink-3);
  font-size: 13px;
}
.instance-toggle {
  margin-left: auto;
  padding: 7px 14px;
  font-size: 13px;
  background: none;
  cursor: pointer;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .instance-row {
    flex-wrap: wrap;
  }
  .instance-toggle {
    margin-left: 0;
  }
  .instance-state {
    flex-basis: 100%;
  }
}
