/* ============================================================
   TOMCAM TV STREAM PACK - THE TC WORLD (v5.1)
   Matches ~/Sites/tomcamtv/DESIGN-SYSTEM.md exactly: deep royal
   blue world lit by the TC monogram itself, sparkle dust, glass
   panels, white type. Michroma = display, Exo 2 = everything
   else. Orbitron/Inter are retired (HARD VETO). Color lives in
   the WORLD and the content, never in the chrome.
   Fonts self-hosted, relative paths, works from file:// in OBS.
   ============================================================ */

@font-face {
  font-family: 'Michroma';
  src: url('./fonts/michroma-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'Exo 2';
  src: url('./fonts/exo-2-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
}

:root {
  /* World / palette (DESIGN-SYSTEM.md values, verbatim) */
  --tc-ink: #041233;
  --tc-ink-deep: #030b22;
  --tc-panel: #0a2050;
  --tc-panel-2: #0e2a66;
  --tc-line: #1c3d85;

  /* Glass: blue-lit, hairline border, blur 22 */
  /* every box tints to the session's theme: --glass-rgb is overridden per theme below */
  --glass-rgb: 150, 190, 255;
  --glass-bg: rgba(var(--glass-rgb), 0.09);
  --glass-bg-strong: rgba(6, 20, 54, 0.62);
  --glass-edge: rgba(var(--glass-rgb), 0.55);
  --glass-brd: rgba(var(--glass-rgb), 0.30);
  --glass-hi: rgba(255, 255, 255, 0.45);
  --glass-blur: 22px;

  /* Brand spectrum (real asset hexes; lockups + heat ONLY) */
  --tc-blue: #0044ff;
  --tc-purple: #6600cc;
  --tc-magenta: #cc00ff;
  --tc-red: #ff1a2e;
  --tc-orange: #ff4500;
  --tc-violet: #8b00ff;

  /* Interface accent + host accents */
  --tc-accent: #4c8dff;
  --p1-accent: #8b00ff; /* Tom / PLAYER 1 */
  --p2-accent: #ff1a2e; /* Cam / PLAYER 2 */

  /* Console light */
  --tc-ice: #dbe7ff;
  --tc-sky: #9db9f0;

  /* Text */
  --tc-text: #f4f7ff;
  --tc-text-dim: #b6c6ec;
  --tc-text-faint: #7e93c4;

  /* Gradients: brand lockups + heat only, never chrome */
  --grad-nexus: linear-gradient(135deg, #0044ff 0%, #6600cc 55%, #cc00ff 100%);
  --grad-nexus-h: linear-gradient(90deg, #0044ff 0%, #6600cc 55%, #cc00ff 100%);
  --grad-blaze: linear-gradient(135deg, #ff4500 0%, #ff1a2e 45%, #8b00ff 100%);

  /* Soft light */
  --glow-light: 0 0 10px rgba(219, 231, 255, 0.5), 0 0 30px rgba(157, 185, 240, 0.25);
  --glow-nexus: 0 0 26px rgba(140, 80, 255, 0.55), 0 0 60px rgba(40, 100, 255, 0.35);
  --glow-live: 0 0 8px rgba(255, 26, 46, 0.8), 0 0 24px rgba(255, 26, 46, 0.4);

  --font-display: 'Michroma', 'Avenir Next', sans-serif;
  --font-tech: 'Exo 2', 'Helvetica Neue', Arial, sans-serif; /* label voice */
  --font-ui: 'Exo 2', 'Helvetica Neue', Arial, sans-serif;

  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 10px;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-ui);
  color: var(--tc-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
  user-select: none;
}

/* The royal-blue depth field (AmbientWaves ground, verbatim).
   The monogram light canvas renders on top of it (tc.js). */
body.scene {
  background:
    radial-gradient(120% 90% at 50% 118%, rgba(26, 84, 214, 0.5), transparent 62%),
    radial-gradient(90% 60% at 85% -12%, rgba(64, 120, 240, 0.26), transparent 58%),
    linear-gradient(180deg, #061a4a 0%, #082257 46%, #041233 100%);
  background-color: var(--tc-ink);
}
body.transparent { background: rgba(0, 0, 0, 0); }

/* ---- Stage: fixed-design-size canvas that scales to the window. ---- */
.stage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
}

/* ---- Monogram light canvas (injected by tc.js on scenes):
   the background signature IS the TC mark as breathing light. ---- */
canvas.monogram-light {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
html[data-art="1"] canvas.monogram-light { display: none; }

/* ---- Ambient depth masses: faint royal-blue only (the color
   of the world lives in the monogram light + content, so these
   stay quiet). Class names kept for the existing files. ---- */
.aurora {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  will-change: transform;
}
.aurora.a-blue    { background: radial-gradient(closest-side, rgba(38, 92, 220, 0.30),  rgba(38, 92, 220, 0) 70%); }
.aurora.a-violet  { background: radial-gradient(closest-side, rgba(64, 120, 240, 0.22), rgba(64, 120, 240, 0) 70%); }
.aurora.a-magenta { background: radial-gradient(closest-side, rgba(26, 84, 214, 0.24),  rgba(26, 84, 214, 0) 70%); }
.aurora.a-ice     { background: radial-gradient(closest-side, rgba(157, 185, 240, 0.16), rgba(157, 185, 240, 0) 70%); }

@keyframes aurora-drift-1 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(90px, -60px) scale(1.12); }
  66%  { transform: translate(-70px, 50px) scale(0.94); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes aurora-drift-2 {
  0%   { transform: translate(0, 0) scale(1); }
  40%  { transform: translate(-110px, 70px) scale(1.08); }
  75%  { transform: translate(60px, -80px) scale(0.9); }
  100% { transform: translate(0, 0) scale(1); }
}
.aurora.drift-1 { animation: aurora-drift-1 26s ease-in-out infinite; }
.aurora.drift-2 { animation: aurora-drift-2 34s ease-in-out infinite; }
.aurora.drift-3 { animation: aurora-drift-1 42s ease-in-out infinite reverse; }

/* ---- Glass panel: blue-lit, hairline, quiet. No shine sweep
   (vetoed); .sweep is kept as a dead class for old markup. ---- */
.glass {
  position: relative;
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-lg);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  box-shadow: 0 18px 50px rgba(2, 8, 24, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(var(--glass-rgb), 0.16) 0%, rgba(var(--glass-rgb), 0) 38%);
  box-shadow: inset 0 0 0 1px rgba(var(--glass-rgb), 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.glass .sweep { display: none; }
.glass-strong { background: var(--glass-bg-strong); }

/* ---- White ring: focus / selection light, breathing ---- */
.ring {
  box-shadow: 0 0 0 2.5px rgba(255, 255, 255, 0.92), 0 0 28px rgba(180, 205, 255, 0.45);
}
@keyframes ring-breathe {
  0%, 100% { box-shadow: 0 0 0 2.5px rgba(255, 255, 255, 0.92), 0 0 28px rgba(180, 205, 255, 0.45); }
  50%      { box-shadow: 0 0 0 2.5px rgba(255, 255, 255, 0.65), 0 0 16px rgba(180, 205, 255, 0.25); }
}
.ring.breathe { animation: ring-breathe 2.2s ease-in-out infinite; }

/* ---- Hairline frame: white glass ring for open cam cutouts.
   (Brand gradients belong to lockups + heat, not frames.) ---- */
.hairline {
  position: relative;
  border-radius: var(--r-lg);
  padding: 1.5px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 22px rgba(150, 190, 255, 0.22);
}
.hairline > .hairline-inner {
  border-radius: calc(var(--r-lg) - 1.5px);
  background: var(--tc-ink-deep);
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ---- Type. Chrome stays white: no gradient headline fills. ---- */
.chrome {
  font-family: var(--font-display);
  color: #fff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.nexus-text {
  font-family: var(--font-display);
  color: #fff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tech {
  font-family: var(--font-tech);
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tc-text-dim);
}
.ui { font-family: var(--font-ui); }

/* ---- White pill: the primary CTA shape ---- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: 999px;
  background: #fff;
  color: #041233;
  font-family: var(--font-tech);
  font-weight: 780;
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---- LIVE pill: red, always ---- */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--glass-brd);
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  font-family: var(--font-tech);
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 19px;
  text-transform: uppercase;
  color: #fff;
}
.live-pill .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--tc-red);
  box-shadow: var(--glow-live);
  animation: live-pulse 1.8s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(0.72); opacity: 0.65; }
}

/* ---- Platform badge + host tag ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--glass-brd);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  font-family: var(--font-tech);
  font-weight: 750;
  letter-spacing: 0.12em;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--tc-ice);
}
.badge .b-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tc-accent); }

.host-tag {
  font-family: var(--font-display);
  text-transform: lowercase;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: var(--glow-light);
}

/* ---- Socials row ---- */
.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--glass-brd);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 20px;
  color: var(--tc-text);
}
.social-chip .s-net {
  font-family: var(--font-tech);
  font-weight: 780;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tc-sky);
}

/* ---- Particle canvas: the sparkle dust field ---- */
canvas.particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---- Slogan: exact string "Not Just Tv. TOMCAM TV." in the
   site's splash presentation (Exo 2, uppercase presentation). ---- */
.slogan {
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tc-text-dim);
}

/* ---- Splash DNA pieces (hold screens share the site boot) ---- */
.splash-line {
  display: block;
  height: 2px;
  width: 130px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0044ff, #6600cc 55%, #cc00ff);
  transform-origin: center;
}
@keyframes splash-bloom {
  0%   { opacity: 0; transform: scale(0.82); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes splash-line-in {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}
@keyframes splash-hint {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 0.3; }
}
.splash-mark {
  animation: splash-bloom 1.1s cubic-bezier(0.2, 0.9, 0.25, 1.15) both;
  filter: drop-shadow(0 0 26px rgba(140, 80, 255, 0.55)) drop-shadow(0 0 60px rgba(40, 100, 255, 0.35));
}
.splash-line.in { animation: splash-line-in 0.8s cubic-bezier(0.2, 0.9, 0.25, 1) 0.75s both; }
/* The 3D mark (tc.js upgrade3D) floats gently after its bloom */
@keyframes mark3d-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.splash-mark.mark3d {
  animation:
    splash-bloom 1.1s cubic-bezier(0.2, 0.9, 0.25, 1.15) both,
    mark3d-float 7.5s ease-in-out 1.4s infinite;
}
.splash-hint {
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tc-text-faint);
  animation: splash-hint 2.4s ease-in-out 1.3s infinite both;
}

/* ---- Entrance motion ---- */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.rise { animation: rise-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.fade { animation: fade-in 1.2s ease both; }

@keyframes breathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.82; }
}
.breathe { animation: breathe 5s ease-in-out infinite; }

/* ---- Transparent-overlay tuning (backdrop-filter samples nothing
   over OBS layers; stronger fill keeps small text AA over bright
   gameplay). ---- */
body.transparent .glass,
body.transparent .glass-strong,
body.transparent .live-pill,
body.transparent .badge,
body.transparent .social-chip {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
body.transparent .glass-strong,
body.transparent .live-pill {
  background: rgba(4, 14, 38, 0.85);
}

/* ---- Reduced motion: calm, static, still on-brand ---- */
@media (prefers-reduced-motion: reduce) {
  .aurora, .live-pill .dot, .breathe, .rise, .fade,
  .ring.breathe, .splash-mark, .splash-mark.mark3d,
  .splash-line.in, .splash-hint {
    animation: none !important;
  }
  .rise, .fade, .splash-mark, .splash-line.in { opacity: 1; transform: none; }
}

/* Live 3D mark wrapper (tc.js liveMark): sits exactly where the img
   was, inherits its classes (bloom/float/positioning), fades in once
   the model is ready. */
.mark3d-live { display: inline-block; transition: opacity 0.4s ease; vertical-align: top; }
.mark3d-live model-viewer { pointer-events: none; }

/* ---- spinning 3D mark: a seamless 6 s alpha loop rendered from the real logo model.
   Drop-in for any <img class="logo">: same height-driven sizing, square aspect. ---- */
video.logo-spin { aspect-ratio: 1 / 1; width: auto; object-fit: contain; display: block; }


/* ---- FLOOR (Aug 24 2026): a ground plane under the scene, tinted to the
   session's theme. The hosts stand ON something instead of floating in a
   gradient, and it reads as the same world as the boxes. ---- */
.floor {
  position: absolute;
  z-index: 2;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 34%;
  pointer-events: none;
  overflow: hidden;
}
.floor .plane {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(var(--glass-rgb), 0) 0%, rgba(var(--glass-rgb), 0.16) 42%, rgba(var(--glass-rgb), 0.34) 100%),
    repeating-linear-gradient(90deg, rgba(var(--glass-rgb), 0.34) 0 2px, rgba(var(--glass-rgb), 0) 2px 104px),
    repeating-linear-gradient(0deg, rgba(var(--glass-rgb), 0.20) 0 2px, rgba(var(--glass-rgb), 0) 2px 76px);
  mask-image: linear-gradient(180deg, transparent 0%, #000 55%, #000 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 55%, #000 100%);
  transform: perspective(620px) rotateX(64deg);
  transform-origin: bottom center;
}
.floor .horizon {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(var(--glass-rgb), 0.85), transparent);
  filter: blur(0.4px);
  box-shadow: 0 0 22px rgba(var(--glass-rgb), 0.45);
}
.floor .pool {
  position: absolute;
  left: 50%;
  bottom: -32%;
  width: 78%;
  height: 90%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(var(--glass-rgb), 0.22), rgba(var(--glass-rgb), 0) 72%);
}
body.transparent .floor { display: none; }
