/* JamRun IPTV — tokens, type, nav and shared controls.
   Colours come from the app icon (blue, orange, violet) and the app UI (navy, gold, live red). */

@property --c1 { syntax: "<color>"; inherits: true; initial-value: #2fa8f0; }
@property --c2 { syntax: "<color>"; inherits: true; initial-value: #6a3bc9; }
@property --c3 { syntax: "<color>"; inherits: true; initial-value: #f28a2e; }

:root {
  --navy: #0a1226;
  --deep: #050913;
  --raised: #121d38;
  --blue: #2fa8f0;
  --aqua: #5ce0e6;
  --orange: #f28a2e;
  --violet: #6a3bc9;
  --gold: #d1b88a;
  --live: #f24d4d;
  --ok: #31d159;
  --ink: #eef2ff;
  --mist: #a3afcc;
  --paper: #eef2f9;
  --paper-ink: #0c1530;

  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --text: "Figtree", system-ui, -apple-system, sans-serif;

  --r-panel: 34px;
  --r-card: 22px;
  --r-pill: 999px;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--deep);
  color: var(--ink);
  font: 400 17px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; }
button { font: inherit; color: inherit; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Type */
.display {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(46px, 7.4vw, 108px);
  line-height: .95;
  letter-spacing: -.035em;
}
.display .line { display: block; }
.display .dim { color: color-mix(in oklab, var(--ink) 52%, transparent); }
.h2 {
  font-family: var(--display);
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1;
  letter-spacing: -.03em;
  max-width: 16ch;
}
.h2.center, .body.center { margin-inline: auto; text-align: center; }
.lede { font-size: clamp(17px, 1.35vw, 19px); color: color-mix(in oklab, var(--ink) 78%, transparent); max-width: 46ch; }
.body { color: var(--mist); max-width: 52ch; margin-top: 18px; }

/* Nav: one glass pill, centred, always on top */
.nav-wrap {
  position: fixed; inset: 18px 0 auto; z-index: 50;
  display: flex; justify-content: center; pointer-events: none;
  padding-inline: 12px;
}
.nav {
  pointer-events: auto;
  display: flex; align-items: center; gap: 2px;
  padding: 6px;
  border-radius: var(--r-pill);
  background: rgba(8, 14, 32, .55);
  border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.nav a {
  text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 8px 13px; border-radius: var(--r-pill);
  color: color-mix(in oklab, currentColor 80%, transparent);
}
.nav a:hover { background: rgba(255, 255, 255, .09); }
.nav .brand { padding: 4px 8px 4px 4px; }
.nav .brand img { border-radius: 8px; }
.nav .nav-cta { background: var(--ink); color: var(--navy); font-weight: 600; margin-left: 4px; }
.nav .nav-cta:hover { background: #fff; }
.nav-wrap.on-light .nav { background: rgba(255, 255, 255, .7); color: var(--paper-ink); border-color: rgba(12, 21, 48, .08); }
.nav-wrap.on-light .nav a:hover { background: rgba(12, 21, 48, .06); }
.nav-wrap.on-light .nav .nav-cta { background: var(--paper-ink); color: #fff; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border-radius: 14px; font-weight: 600; font-size: 16px; text-decoration: none;
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-light { background: var(--ink); color: var(--navy); }
.btn-light:hover { background: #fff; }
.btn-glass { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(10px); }
.btn-glass:hover { background: rgba(255, 255, 255, .16); }
.btn-dark { background: var(--paper-ink); color: #fff; }

/* Pills */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600;
  background: rgba(242, 77, 77, .16); color: #ffb3b3;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 10px var(--live); animation: pulse 1.6s ease-in-out infinite; }
.pill-sm { padding: 3px 9px; font-size: 11px; }
.pill-ok { background: rgba(49, 209, 89, .16); color: #8ff0a8; }
@keyframes pulse { 50% { opacity: .35; } }

.grain {
  position: absolute; inset: 0; opacity: .14; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (max-width: 760px) {
  .nav a:not(.brand):not(.nav-cta) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
