/* =============================================================
   SKIPPY SWAGS — base.css
   Design tokens, reset, typography, and the video "desktop" backdrop.

   Direction: anachro-futurism. 90s graphic language (chrome type,
   pixel labels, CRT scanlines, pinstripe title bars) rendered with a
   modern UI: frosted glass panels, soft radii, spring easing.
   ============================================================= */

:root {
  color-scheme: dark;

  /* -- surfaces: thin midnight glass so the video reads through -- */
  --bg: #07080f;
  --surface: rgba(10, 12, 24, 0.22);
  --surface-solid: #10121e;
  --surface-raised: rgba(22, 26, 44, 0.55);
  --surface-sunken: rgba(6, 8, 16, 0.28);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --surface-press: rgba(255, 255, 255, 0.04);

  --line: rgba(200, 222, 255, 0.12);
  --line-strong: rgba(200, 222, 255, 0.2);
  --line-hi: rgba(255, 255, 255, 0.08);

  /* -- accent: cornflower blue -- */
  --accent: #6ea8ff;
  --accent-hi: #93bfff;
  --accent-soft: rgba(110, 168, 255, 0.14);
  --accent-ink: #06142e;

  --pink: #ff8fc8;
  --cyan: #6ea8ff;
  --mint: #9cf0c9;
  --amber: #ffd49a;
  --live: #ff4d5e;
  --coral: #ff6b7d;
  --coral-deep: #c42b4a;

  --chrome: linear-gradient(
    180deg,
    #ffffff 0%,
    #e6f3ff 38%,
    #7d8aa0 50%,
    #f2f8ff 64%,
    #c2d0e2 100%
  );

  /* -- text -- */
  --text: #f2f5fb;
  --text-2: #b6bfd0;
  --text-3: #7c8599;

  --focus-ring: var(--accent);

  /* -- type -- */
  --font-ui: "Space Grotesk", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", "Lucida Console", monospace;
  --font-pixel: "Silkscreen", "JetBrains Mono", monospace;

  /* -- motion -- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 160ms;
  --dur-med: 280ms;
  --dur-slow: 520ms;

  /* -- shape & space -- */
  --space-unit: 8px;
  --gap: 10px;
  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --panel-radius: var(--radius-lg);

  --shadow-panel: 0 24px 60px -24px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-pop: 0 28px 70px -18px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--line-strong);
  --glass-blur: blur(3px) saturate(130%);

  --content-max: 1760px;

  /* -- theater layout rails (>=1200px) -- */
  --chat-rail-width: clamp(330px, 22vw, 380px);
  --socials-rail-width: clamp(300px, 19vw, 340px);
}

/* ---- reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100%;
}

::selection {
  background: rgba(110, 168, 255, 0.45);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font-family: inherit;
  color: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 100px var(--surface-solid) inset;
  caret-color: var(--text);
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

/* Page-level scrollbar (stacked layouts below 1200px scroll the page). */
html {
  scrollbar-color: rgba(110, 168, 255, 0.28) transparent;
  scrollbar-width: thin;
}
html::-webkit-scrollbar {
  width: 10px;
}
html::-webkit-scrollbar-track {
  background: var(--bg);
}
html::-webkit-scrollbar-thumb {
  background: rgba(110, 168, 255, 0.24);
  border: 3px solid var(--bg);
  border-radius: var(--radius-pill);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

html[data-fx="off"] *,
html[data-fx="off"] *::before,
html[data-fx="off"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
}

/* ---- desktop backdrop (video + tint + scanlines) ---- */
.desktop {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  padding: var(--gap);
  background: var(--bg);
  overflow-x: hidden;
}

.desktop__video {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  filter: brightness(0.56) saturate(0.78) contrast(1.08);
}

.desktop::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% -12%, rgba(50, 84, 112, 0.2) 0%, transparent 48%),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.015) 0px,
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px,
      transparent 3px
    ),
    linear-gradient(180deg, rgba(9, 13, 17, 0.34) 0%, rgba(6, 8, 11, 0.48) 48%, rgba(3, 5, 6, 0.62) 100%);
}

.desktop__scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.025;
  background: repeating-linear-gradient(0deg, #91b5d2 0px, #91b5d2 1px, transparent 1px, transparent 3px);
  animation: scanDrift 9s linear infinite;
}

@keyframes scanDrift {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(3px);
  }
}

html[data-fx="off"] .desktop__scanlines {
  display: none;
}

.desktop-frame {
  position: relative;
  z-index: 3;
  max-width: var(--content-max);
  margin: 0 auto;
}

/* ---- shared entrance motion ---- */
@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Specular glint that sweeps across chrome type. */
@keyframes chromeGlint {
  0%,
  70% {
    background-position: 160% 0, 0 0;
  }
  100% {
    background-position: -60% 0, 0 0;
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
