/* =============================================
   PLUTONIUM INTERACTIVE — GLOBAL STYLES
   ============================================= */

/* Self-hosted. Do NOT put this back on the Google Fonts CDN — it transmits
   visitor IPs to a third party and is a GDPR liability for an EU studio.
   Files live in ../fonts/, licences alongside them. */

@font-face {
  font-family: 'Bebas Neue';
  src: url('../fonts/bebas-neue-pro-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Bebas Neue';
  src: url('../fonts/bebas-neue-pro-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IM Fell English';
  src: url('../fonts/im-fell-english-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IM Fell English';
  src: url('../fonts/im-fell-english-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --black:        #000000;
  --toxic:        #00FF00;
  --eerie:        #00D658;
  --eerie-dim:    #007a32;
  --white:        #f0ede8;
  --off-white:    #c8c4bc;
  --grey:         #2a2a2a;
  --grey-light:   #444;

  --font-display: 'Bebas Neue', 'Bebas Neue Pro', sans-serif;
  --font-body:    'IM Fell English', Baskerville, 'Baskerville Old Face', serif;

  --glow:         0 0 18px rgba(0, 255, 0, 0.55), 0 0 60px rgba(0, 255, 0, 0.18);
  --glow-sm:      0 0 8px rgba(0, 255, 0, 0.4);

  --transition:   0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* The custom cursor only replaces the system one once JS has confirmed a fine
   pointer. Without this guard a failed script leaves the page with no cursor. */
@media (hover: hover) and (pointer: fine) {
  body.has-cursor,
  body.has-cursor a,
  body.has-cursor button,
  body.has-cursor .btn,
  body.has-cursor .nav-hamburger,
  body.has-cursor .nav-mobile-close,
  body.has-cursor .game-card,
  body.has-cursor input,
  body.has-cursor textarea,
  body.has-cursor select { cursor: none; }
}

.cursor, .cursor-ring { opacity: 0; transition: opacity 0.3s ease; }
.has-cursor .cursor, .has-cursor .cursor-ring { opacity: 1; }

/* ── Custom cursor ── */
.cursor {
  position: fixed;
  width: 12px;
  height: 12px;
  background: var(--toxic);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease, width 0.2s ease, height 0.2s ease, background 0.2s ease;
  box-shadow: var(--glow-sm);
}
.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0, 255, 0, 0.45);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease, width 0.2s ease, height 0.2s ease;
}
body:hover .cursor { opacity: 1; }

/* ── Noise texture overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9998;
  opacity: 0.35;
}

/* ── Selection ── */
::selection {
  background: var(--toxic);
  color: var(--black);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: var(--eerie-dim); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--toxic); }

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 48px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}
.nav.scrolled {
  background: rgba(0,0,0,0.92);
  border-bottom-color: rgba(0,255,0,0.12);
  backdrop-filter: blur(8px);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.12em;
  color: var(--white);
  text-decoration: none;
  transition: color var(--transition);
}
.nav-logo span { color: var(--toxic); }
.nav-logo:hover { color: var(--toxic); }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  color: var(--off-white);
  text-decoration: none;
  position: relative;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--toxic);
  transition: width var(--transition);
  box-shadow: var(--glow-sm);
}
.nav-links a:hover,
.nav-links a.active { color: var(--toxic); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: none;
  background: none;
  border: none;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--white);
  transition: var(--transition);
}
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.97);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: var(--font-display);
  font-size: 3rem;
  letter-spacing: 0.15em;
  color: var(--white);
  text-decoration: none;
  transition: color var(--transition);
}
.nav-mobile a:hover { color: var(--toxic); text-shadow: var(--glow); }
.nav-mobile-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: none;
}

@media (max-width: 768px) {
  .nav { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid rgba(0,255,0,0.1);
  padding: 60px 80px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  margin-top: auto;
}
.footer-brand .footer-logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.12em;
  color: var(--white);
  text-decoration: none;
  display: block;
  margin-bottom: 12px;
}
.footer-brand .footer-logo span { color: var(--toxic); }
.footer-tagline {
  font-style: italic;
  color: var(--off-white);
  font-size: 0.95rem;
  opacity: 0.7;
}
.footer-col h4 {
  font-family: var(--font-display);
  letter-spacing: 0.18em;
  color: var(--eerie);
  font-size: 0.8rem;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a {
  color: var(--off-white);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-col ul a:hover { color: var(--toxic); }
.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
}

@media (max-width: 768px) {
  .footer {
    grid-template-columns: 1fr;
    padding: 40px 24px 30px;
  }
}

/* ===== SHARED COMPONENTS ===== */

/* Page hero */
.page-hero {
  padding: 160px 80px 80px;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--toxic), transparent);
  opacity: 0.25;
}
.page-hero-tag {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--eerie);
  display: block;
  margin-bottom: 16px;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  letter-spacing: 0.06em;
  line-height: 0.95;
  color: var(--white);
}
.page-hero h1 .accent { color: var(--toxic); }

/* Section */
.section {
  padding: 80px 80px;
}
.section-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  color: var(--eerie);
  display: block;
  margin-bottom: 12px;
}
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: 0.06em;
  line-height: 1;
  margin-bottom: 32px;
}

@media (max-width: 768px) {
  .page-hero, .section { padding-left: 24px; padding-right: 24px; }
  .page-hero { padding-top: 120px; }
}

/* Button styles */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  padding: 14px 36px;
  text-decoration: none;
  border: 1px solid var(--toxic);
  color: var(--toxic);
  background: transparent;
  cursor: none;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--toxic);
  transform: translateY(100%);
  transition: transform var(--transition);
  z-index: 0;
}
.btn:hover::before { transform: translateY(0); }
.btn:hover { color: var(--black); box-shadow: var(--glow); }
.btn span { position: relative; z-index: 1; }

.btn-ghost {
  border-color: rgba(255,255,255,0.2);
  color: var(--off-white);
}
.btn-ghost::before { background: rgba(255,255,255,0.08); }
.btn-ghost:hover { color: var(--white); box-shadow: none; }

/* Divider */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,255,0,0.2), transparent);
  margin: 0 80px;
}

/* Fade-in animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Logo images ─────────────────────────────────────────── */
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo-img {
  height: 36px;
  width: auto;
  display: block;
  /* Preserve SVG rendering at any scale */
  image-rendering: crisp-edges;
}

.footer-logo-img {
  height: 48px;
  width: auto;
  display: block;
  opacity: 0.75;
  transition: opacity 0.3s ease;
}

.footer-logo a:hover .footer-logo-img,
a.footer-logo:hover .footer-logo-img {
  opacity: 1;
}


/* ===== ACCESSIBILITY ADDITIONS ===== */

/* Keyboard users need to see where they are. The design has no focus style
   at all, which makes it unusable without a mouse. */
:focus-visible {
  outline: 2px solid var(--toxic);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10001;
  padding: 12px 20px;
  background: var(--toxic);
  color: var(--black);
  font-family: var(--font-display);
  letter-spacing: 0.16em;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 16px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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

/* No JS: reveals must not leave the page invisible. */
.no-js .reveal { opacity: 1; transform: none; }
