/* SPDX-License-Identifier: LicenseRef-Proprietary
 * Copyright 2026 Firelock, LLC
 *
 * KinLab Radio public watch page. Every colour, gradient and type stack here is
 * a value from the issued brand kit at docs/brand (v1.2). Where the kit names a
 * font it does not ship the file, so the display and mono stacks fall back the
 * way the kit's own web fallback stack says they should.
 */

:root {
  /* Core palette, docs/brand/tokens/tokens.json */
  --void: #0F1117;
  --surface: #14161D;
  --raised: #1C1F27;
  --line: #262A33;
  --line-strong: #3A3F4B;
  --text: #E6E8EC;
  --text-secondary: #9BA1AC;
  --text-tertiary: #6B7280;
  --ultraviolet: #7C5CFF;
  --ultraviolet-600: #644CCC;
  --signal: #4A9BFF;
  --ion: #00E5FF;
  --lilac: #A993FF;

  /* Momentum gradient, UI and marketing use, from the brand guide */
  --momentum: linear-gradient(120deg, #7C5CFF, #4A9BFF 62%, #00E5FF 110%);

  --font-display: 'Satoshi', Inter, -apple-system, BlinkMacSystemFont,
    'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, SFMono-Regular,
    Menlo, monospace;

  --page-max: 1180px;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 0.68, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--text);
  text-decoration-color: rgb(124 92 255 / 0.55);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--ultraviolet);
}

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

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 24px;
}

.label {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 14px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-tertiary);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--raised);
  color: var(--text);
  padding: 12px 18px;
  z-index: 50;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

/* ---------------------------------------------------------------- masthead */

.masthead {
  position: relative;
  z-index: 3;
  padding: 22px 0;
}

.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* The kit reserves one clearspace unit, a quarter of the mark's height, on
   every side of the lockup, and forbids letting UI enter it. */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
}

.brand span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.masthead nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.masthead nav a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
}

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

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

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin-top: -84px;
  padding: 150px 0 76px;
}

/* Signal Room is the room the network broadcasts from, so its render is the
   backdrop. Held far back: heavily blurred, heavily darkened, never legible
   enough to compete with the type in front of it. */
.hero-backdrop {
  position: absolute;
  inset: -12% -6% auto -6%;
  height: 132%;
  z-index: -3;
  background-image: url('/img/hero-backdrop.webp');
  background-size: cover;
  background-position: 50% 42%;
  filter: blur(46px) saturate(122%);
  opacity: 0.6;
  transform: scale(1.08);
}

.hero-glow {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(700px 420px at 26% 30%, rgb(124 92 255 / 0.16), transparent 62%),
    radial-gradient(560px 380px at 70% 80%, rgb(74 155 255 / 0.10), transparent 60%);
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgb(15 17 23 / 0.5) 0%, rgb(15 17 23 / 0.72) 48%, var(--void) 100%);
}

.hero .label {
  margin: 0 0 20px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 6.2vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.026em;
  font-weight: 700;
  max-width: 19ch;
}

.hero h1 .gradient {
  background: var(--momentum);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 24px 0 0;
  max-width: 54ch;
  font-size: clamp(17px, 2.1vw, 20px);
  line-height: 1.6;
  color: var(--text-secondary);
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease),
    transform 0.18s var(--ease);
}

/* UV-600 is the accessible button fill in the kit, and UV-500 is display
   only. The label stays pure white rather than the Fog text token because the
   kit's own 6.09:1 figure for this fill is computed against white; Fog would
   still clear AA but at a lower ratio, so this is the one place a non-token
   colour is the more correct choice. */
.btn-primary {
  background: var(--ultraviolet-600);
  color: #fff;
}

.btn-primary:hover {
  box-shadow: 0 0 0 4px rgb(124 92 255 / 0.22);
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgb(28 31 39 / 0.5);
}

.btn-ghost:hover {
  border-color: var(--ultraviolet);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------- statusbar */

.statusbar {
  margin-top: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(20 22 29 / 0.72);
  backdrop-filter: blur(8px);
  padding: 18px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  max-width: 720px;
}

.statusbar p {
  margin: 0;
  font-size: 15px;
  color: var(--text-secondary);
}

.statusbar .label {
  color: var(--text-tertiary);
}

/* ------------------------------------------------------------------- rooms */

.rooms {
  padding-top: 26px;
  padding-bottom: 8px;
}

.section-head {
  margin-bottom: 26px;
}

.section-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 34px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.section-head p {
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 52ch;
}

.room-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 720px) {
  .room-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.room {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease);
}

.room::after {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgb(169 147 255 / 0.28) 32%,
    rgb(74 155 255 / 0.2) 68%,
    transparent
  );
  pointer-events: none;
}

.room:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.room-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--raised);
  overflow: hidden;
}

.room-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease), filter 0.35s var(--ease);
}

/* Off air is a deliberate visual state, not a broken one: the render stays
   fully composed and simply sits back, dimmed and slightly desaturated, under
   a scrim that carries the status. */
.room[data-state='off'] .room-stage img {
  filter: saturate(0.82) brightness(0.74);
}

.room[data-state='off']:hover .room-stage img {
  filter: saturate(1) brightness(0.9);
}

.room[data-state='live']:hover .room-stage img {
  transform: scale(1.035);
}

.room-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgb(15 17 23 / 0.5) 0%,
    rgb(15 17 23 / 0.05) 38%,
    rgb(15 17 23 / 0.72) 100%
  );
  pointer-events: none;
}

.room-status {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgb(15 17 23 / 0.82);
  backdrop-filter: blur(6px);
}

.room-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-tertiary);
  flex: none;
}

/* Ion is the kit's colour for live states, and it is used nowhere else here. */
.room[data-state='live'] .room-status .dot {
  background: var(--ion);
  box-shadow: 0 0 0 3px rgb(0 229 255 / 0.18);
}

.room-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgb(15 17 23 / 0.82);
  backdrop-filter: blur(6px);
}

.room-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.room-play span {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgb(15 17 23 / 0.72);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(6px);
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}

.room-play:hover span,
.room-play:focus-visible span {
  transform: scale(1.06);
  background: var(--ultraviolet-600);
}

.room-play svg {
  width: 20px;
  height: 20px;
  margin-left: 3px;
  fill: #fff;
}

.room-stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.room-body {
  padding: 18px 20px 22px;
}

.room-body h3 {
  margin: 0;
  font-size: 20px;
  line-height: 26px;
  letter-spacing: -0.015em;
  font-weight: 700;
}

.room-promise {
  margin: 6px 0 0;
  color: var(--lilac);
  font-size: 15px;
}

.room-scene {
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.room-foot {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.room-foot a {
  margin-left: auto;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
}

.room-foot a:hover {
  color: var(--text);
}

/* ------------------------------------------------------------------ tracks */

.about {
  padding-top: 74px;
  padding-bottom: 10px;
}

.about-grid {
  display: grid;
  gap: 34px;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .about-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 52px;
  }
}

.about h2 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 34px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.about p {
  margin: 0 0 14px;
  color: var(--text-secondary);
  max-width: 58ch;
}

.about p:last-child {
  margin-bottom: 0;
}

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

.site-foot {
  margin-top: 78px;
  border-top: 1px solid var(--line);
  padding: 40px 0 60px;
}

.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  justify-content: space-between;
  align-items: flex-start;
}

.foot-kin p {
  margin: 0;
}

.foot-kin .line {
  font-size: 17px;
  letter-spacing: -0.01em;
}

.foot-kin .sub {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 14px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
}

.foot-links a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--text);
}

.foot-legal {
  margin: 26px 0 0;
  color: var(--text-tertiary);
  font-size: 13px;
  line-height: 18px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--ultraviolet);
  outline-offset: 3px;
  border-radius: 4px;
}

/* live layer */
.room-listen{font:inherit;font-size:.78rem;letter-spacing:.08em;text-transform:uppercase;background:#7B6CFF;color:#fff;border:0;border-radius:3px;padding:.55rem .9rem;cursor:pointer;margin-right:.75rem}
.room-listen:hover{filter:brightness(1.1)}
.room[data-state="listening"] .room-status .dot{background:#3FB98C}
