/* =========================================================================
   NitroFuture — site styles
   Aesthetic: used-future sci-fi noir. Inky black + deep blue base,
   hot magenta/sodium-orange accents, chrome wordmark. CRT + grain texture.
   Cinematic, restrained, mood over message.
   ========================================================================= */

:root {
  /* surfaces — near-black with a blue undertone */
  --bg-base: #05060a;
  --bg-1: #080b14;
  --bg-2: #0c1120;
  --bg-card: #0e1322;
  --bg-card-hover: #131a2c;

  /* lines */
  --line: rgba(150, 170, 220, 0.08);
  --line-strong: rgba(150, 170, 220, 0.16);

  /* text */
  --text-primary: #e7ecf6;
  --text-secondary: #9aa6c0;
  --text-muted: #5c6885;

  /* chrome */
  --chrome-1: #f4f6fb;
  --chrome-2: #c6cee0;
  --chrome-3: #8b95ad;

  /* hot accents — magenta / sodium-orange, used sparingly */
  --magenta: #ff2d75;
  --magenta-soft: rgba(255, 45, 117, 0.5);
  --orange: #ff8c2e;
  --orange-soft: rgba(255, 122, 24, 0.42);
  --cyan: #5fd0ff; /* CRT phosphor, accents only */

  /* glows */
  --glow-hot: rgba(255, 60, 120, 0.35);
  --glow-warm: rgba(255, 122, 24, 0.3);

  /* sizing */
  --container: 1160px;
  --radius: 14px;
  --radius-sm: 8px;

  /* type */
  --font-display: "Chakra Petch", "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shadow-lift: 0 30px 60px -30px rgba(0, 0, 0, 0.85), 0 10px 30px -10px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* NOTE: do not set overflow-x on <html> — it kills the sticky-nav scroll
   context. Horizontal guards live on <body> and on .hero. */

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
  position: relative;
}

/* Continuous atmospheric backdrop — one cinematic stage behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(1200px 800px at 88% -5%, rgba(91, 120, 200, 0.16), transparent 60%),
    radial-gradient(1300px 900px at 6% 102%, rgba(255, 90, 60, 0.1), transparent 62%),
    radial-gradient(900px 700px at 50% 40%, rgba(40, 60, 120, 0.12), transparent 70%),
    linear-gradient(180deg, #070a12 0%, #04050a 100%);
}

/* Edge vignette */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background: radial-gradient(135% 100% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

/* Film grain */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.3' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.62 0 0 0 0 0.66 0 0 0 0 0.78 0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}

/* CRT scanlines — subtle horizontal interlace */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
  background: repeating-linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.22) 3px,
    rgba(0, 0, 0, 0) 4px
  );
  mix-blend-mode: multiply;
}

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

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ============================ Type system ============================== */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0 0 0.4em;
  color: var(--text-primary);
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  color: var(--text-muted);
  margin: 0 0 1.2em;
}

.lede {
  font-size: 1.12rem;
  color: var(--text-secondary);
}

/* Hot accent text — magenta→orange gradient, used on emphasis spans */
.hot {
  background: linear-gradient(100deg, var(--magenta) 0%, var(--orange) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============================ Wordmark ================================= */
/* Chrome-faced, technical wordmark with a layered chromatic-aberration
   glitch (the data-text duplicates render offset in magenta/cyan). */

.wordmark {
  position: relative;
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: transparent;
  background: linear-gradient(180deg, #ffffff 0%, #d3dbec 48%, #9aa6c0 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.wordmark::before,
.wordmark::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: none;
  -webkit-text-fill-color: initial;
  color: transparent;
  pointer-events: none;
  opacity: 0.55;
}

.wordmark::before {
  color: var(--magenta);
  transform: translate(-1px, 0);
  mix-blend-mode: screen;
}

.wordmark::after {
  color: var(--cyan);
  transform: translate(1px, 0);
  mix-blend-mode: screen;
}

.wordmark--sm {
  font-size: 1.12rem;
  letter-spacing: 0.14em;
}

/* glitch nudge on hover / on demand (class toggled by JS) */
.wordmark.glitch::before {
  animation: glitch-x 0.42s steps(2, end);
}
.wordmark.glitch::after {
  animation: glitch-y 0.42s steps(2, end);
}

@keyframes glitch-x {
  0% {
    transform: translate(-1px, 0);
  }
  25% {
    transform: translate(-4px, -1px);
  }
  50% {
    transform: translate(2px, 1px);
  }
  75% {
    transform: translate(-3px, 1px);
  }
  100% {
    transform: translate(-1px, 0);
  }
}

@keyframes glitch-y {
  0% {
    transform: translate(1px, 0);
  }
  25% {
    transform: translate(3px, 1px);
  }
  50% {
    transform: translate(-2px, -1px);
  }
  75% {
    transform: translate(4px, -1px);
  }
  100% {
    transform: translate(1px, 0);
  }
}

/* ============================ Layout =================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: 120px 0;
  position: relative;
}

@media (max-width: 720px) {
  .section {
    padding: 84px 0;
  }
}

.section__head {
  max-width: 740px;
  margin: 0 auto 64px;
  text-align: center;
}

.section__title {
  margin: 0 0 0.5em;
}

.section__sub {
  color: var(--text-secondary);
  font-size: 1.06rem;
}

/* ============================ Buttons ================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(100deg, var(--magenta) 0%, var(--orange) 100%);
  color: #0a0a0f;
  font-weight: 600;
  box-shadow:
    0 10px 30px -12px var(--glow-hot),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 16px 36px -12px var(--glow-hot),
    0 16px 36px -16px var(--glow-warm),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn--ghost {
  background: rgba(150, 170, 220, 0.03);
  color: var(--text-primary);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  background: rgba(150, 170, 220, 0.07);
  border-color: var(--magenta-soft);
  color: #fff;
}

.btn--lg {
  padding: 18px 34px;
  font-size: 0.98rem;
}

/* ============================ Nav ====================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 6, 10, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
  padding-top: env(safe-area-inset-top);
}

.nav.scrolled {
  background: rgba(5, 6, 10, 0.92);
  border-bottom-color: var(--line-strong);
  box-shadow: 0 12px 24px -16px rgba(0, 0, 0, 0.9);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav__links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.18s ease;
}

.nav__links a:hover {
  color: var(--text-primary);
}

.nav__links .btn {
  padding: 9px 18px;
  font-size: 0.78rem;
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-primary);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

@media (max-width: 760px) {
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 18px 28px 26px;
    gap: 16px;
    background: rgba(5, 6, 10, 0.97);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 0.2s ease,
      transform 0.2s ease;
  }
  .nav__links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav__toggle {
    display: flex;
  }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }
}

/* ============================ Hero ===================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 0 0 96px;
  overflow: hidden;
}

@media (max-width: 720px) {
  .hero {
    min-height: 86vh;
    padding: 0 0 84px;
  }
}

/* The creature is the hero backdrop — its frame swaps to track the cursor.
   The vaporwave/cyberpunk scene is baked into the frames themselves. */
.hero__creature {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: var(--bg-base);
}

.hero__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  /* swap is instantaneous (frames are preloaded); no transition on src */
}

/* Legibility + blend scrim: darken bottom for the wordmark, fade the
   top edge under the translucent nav, and vignette the sides. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 6, 10, 0.55) 0%, transparent 22%),
    linear-gradient(0deg, var(--bg-base) 2%, rgba(5, 6, 10, 0.7) 16%, transparent 48%),
    radial-gradient(120% 80% at 50% 40%, transparent 60%, rgba(5, 6, 10, 0.5) 100%);
}

.hero__inner {
  position: relative;
  text-align: center;
  width: 100%;
  max-width: 1100px;
}

.hero__wordmark {
  margin: 0;
  line-height: 0.95;
}

.hero__wordmark .wordmark {
  font-size: clamp(2.6rem, 11vw, 7.4rem);
  letter-spacing: 0.02em;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

.hero__scroll-line {
  width: 1px;
  height: 42px;
  background: linear-gradient(180deg, transparent, var(--chrome-3));
  animation: scrollpulse 2s ease-in-out infinite;
}

@keyframes scrollpulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scaleY(0.7);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

.hero__scroll-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
}

/* ============================ Tracks / slots =========================== */

.slots {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
}

.slot {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 20px 26px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    transform 0.25s ease;
}

.slot:hover {
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
  transform: translateX(2px);
}

.slot__index {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.slot__bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
}

.slot__bars i {
  display: block;
  width: 3px;
  height: 30%;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--magenta), var(--orange));
  opacity: 0.7;
  animation: eq 1.4s ease-in-out infinite;
}
.slot__bars i:nth-child(2) {
  animation-delay: 0.18s;
}
.slot__bars i:nth-child(3) {
  animation-delay: 0.36s;
}
.slot__bars i:nth-child(4) {
  animation-delay: 0.12s;
}
.slot__bars i:nth-child(5) {
  animation-delay: 0.3s;
}

@keyframes eq {
  0%,
  100% {
    height: 25%;
  }
  50% {
    height: 95%;
  }
}

.slot__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.slot__status {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .slot {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    padding: 16px 18px;
  }
  .slot__bars {
    display: none;
  }
}

/* ============================ Videos / frames ========================== */

.frames {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: 980px;
  margin: 0 auto;
}

@media (max-width: 720px) {
  .frames {
    grid-template-columns: minmax(0, 1fr);
  }
}

.frame {
  margin: 0;
}

.frame__media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(91, 120, 200, 0.18), transparent 60%),
    linear-gradient(180deg, #0c1120, #070a12);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.frame:hover .frame__media {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.frame__play {
  position: relative;
  z-index: 2;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(8, 11, 20, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.frame__play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-left: 16px solid var(--chrome-1);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

.frame:hover .frame__play {
  border-color: var(--magenta-soft);
  box-shadow: 0 0 24px -6px var(--glow-hot);
}

/* faint VHS noise band drifting across the placeholder */
.frame__noise {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.5;
  background-image: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03) 0,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 50%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 50%, transparent);
  animation: drift 6s linear infinite;
}

@keyframes drift {
  from {
    background-position-y: 0;
  }
  to {
    background-position-y: 60px;
  }
}

.frame__cap {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* live embeds, once wired in */
.embed {
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  display: block;
}

.embed--video {
  aspect-ratio: 16 / 9;
  height: auto;
}

/* ============================ Contact ================================== */

.section--contact {
  padding: 140px 0 130px;
}

.contact {
  text-align: center;
  max-width: 720px;
}

.contact__title {
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  margin: 0 0 22px;
}

.contact__lede {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin: 0 auto 36px;
  max-width: 560px;
}

.social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 44px;
}

.social a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 22px;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.social a:hover {
  border-color: var(--magenta-soft);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.social__plat {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.social__handle {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--text-primary);
}

/* ============================ Footer =================================== */

.footer {
  border-top: 1px solid var(--line-strong);
  background: #04050a;
  padding: 56px 0 28px;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.footer__tag {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.94rem;
}

.footer__tag a {
  color: var(--text-primary);
  border-bottom: 1px solid var(--magenta-soft);
  transition: color 0.18s ease;
}

.footer__tag a:hover {
  color: var(--magenta);
}

.footer__base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.footer__mono {
  letter-spacing: 0.14em;
}

/* ============================ Reveal =================================== */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

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

/* ============================ Selection ================================ */

::selection {
  background: var(--magenta);
  color: #07070a;
}
