/* =============================================
   THE FABRIC — STYLE
   Dark immersive game studio site
   ============================================= */

:root {
  --black: #0a0a0a;
  --dark: #111;
  --gray: #1a1a1a;
  --gray-mid: #333;
  --white: #f0f0f0;
  --red: #FF0000;
  --red-dark: #cc0000;
  --font-pixel: 'Press Start 2P', monospace;
  --font-mono: 'Space Mono', monospace;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: var(--font-mono);
  background: var(--black);
  color: var(--white);
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
  cursor: default;
}

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

button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
}

ul { list-style: none; }

/* =============================================
   HEADER
   ============================================= */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
  mix-blend-mode: difference;
}

.logo {
  position: relative;
  z-index: 101;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 54px;
  width: auto;
  transition: opacity 0.3s;
}

.logo:hover .logo-img {
  opacity: 0.8;
}

.nav {
  display: flex;
  gap: 40px;
}

.nav-link {
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--white);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width 0.4s var(--ease-out-expo);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--red);
}

.nav-link.active {
  color: var(--red);
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  z-index: 101;
  width: 28px;
  height: 20px;
  position: relative;
}

.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  transition: all 0.4s var(--ease-out-expo);
  transform-origin: center;
}

.burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--black);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out-expo);
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 32px;
  text-align: center;
}

.mobile-link {
  font-family: var(--font-pixel);
  font-size: 18px;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: color 0.3s;
  opacity: 0;
  transform: translateY(20px);
}

.mobile-menu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo), color 0.3s;
}

.mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.3s; }

.mobile-link:hover {
  color: var(--red);
}

/* =============================================
   PAGES
   ============================================= */

.page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease-out-expo);
  overflow: hidden;
}

.page.active {
  opacity: 1;
  pointer-events: all;
}

.page--about,
.page--contact {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* =============================================
   GAMES — FULL SCREEN SLIDER
   ============================================= */

.slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
  transform: scale(1.05);
  z-index: 0;
}

.slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.slide.exiting {
  opacity: 0;
  transform: scale(0.95);
  z-index: 0;
}

.slide-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.3) 0%,
    rgba(10, 10, 10, 0.1) 40%,
    rgba(10, 10, 10, 0.5) 80%,
    rgba(10, 10, 10, 0.85) 100%
  );
}

.slide-content {
  position: absolute;
  bottom: 120px;
  left: 40px;
  z-index: 2;
  max-width: 700px;
}

.slide-number {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--red);
  display: block;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.6s var(--ease-out-expo) 0.2s;
}

.slide.active .slide-number {
  opacity: 1;
  transform: translateX(0);
}

.slide-title {
  font-family: var(--font-pixel);
  font-size: clamp(24px, 4vw, 48px);
  line-height: 1.3;
  letter-spacing: 3px;
  color: var(--white);
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s var(--ease-out-expo) 0.3s;
}

.slide.active .slide-title {
  opacity: 1;
  transform: translateY(0);
}

.slide-accent {
  width: 60px;
  height: 3px;
  background: var(--red);
  margin: 20px 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out-expo) 0.5s;
}

.slide.active .slide-accent {
  transform: scaleX(1);
}

.slide-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.5vw, 16px);
  font-weight: 400;
  letter-spacing: 2px;
  color: rgba(240, 240, 240, 0.7);
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s var(--ease-out-expo) 0.6s;
}

.slide.active .slide-subtitle {
  opacity: 1;
  transform: translateY(0);
}

/* Slide dots */
.slide-nav {
  position: fixed;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  transition: opacity 0.4s;
}

.page--games.active ~ .slide-nav,
.slide-nav.visible {
  opacity: 1;
}

.slide-dot {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(240, 240, 240, 0.4);
  border-radius: 50%;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
}

.slide-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--red);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s var(--ease-out-expo);
}

.slide-dot.active {
  border-color: var(--red);
}

.slide-dot.active::before {
  width: 6px;
  height: 6px;
}

.slide-dot:hover {
  border-color: var(--red);
  transform: scale(1.3);
}

/* Scroll indicator */
.scroll-indicator {
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scroll-indicator span {
  font-family: var(--font-pixel);
  font-size: 7px;
  letter-spacing: 3px;
  color: rgba(240, 240, 240, 0.5);
  writing-mode: vertical-lr;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: rgba(240, 240, 240, 0.15);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--red);
  animation: scrollPulse 2s var(--ease-out-expo) infinite;
}

@keyframes scrollPulse {
  0% { top: -100%; }
  50% { top: 0%; }
  100% { top: 100%; }
}

/* =============================================
   ABOUT
   ============================================= */

.page--about {
  padding-top: 80px;
}

.about-hero {
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 40px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  max-width: 1100px;
  width: 100%;
}

.stat {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid rgba(240, 240, 240, 0.06);
  background: rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s var(--ease-out-expo);
}

.stat.visible {
  opacity: 1;
  transform: translateY(0);
}

.stat::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform 0.8s var(--ease-out-expo) 0.3s;
}

.stat.visible::before {
  transform: scaleX(1);
}

.stat-number {
  font-family: var(--font-pixel);
  font-size: clamp(20px, 3vw, 36px);
  display: block;
  margin-bottom: 12px;
  color: var(--white);
}

.stat-text {
  font-family: var(--font-pixel);
  font-size: clamp(14px, 2vw, 22px);
  display: block;
  margin-bottom: 12px;
  color: var(--white);
}

.stat-label {
  font-family: var(--font-pixel);
  font-size: clamp(8px, 1vw, 11px);
  letter-spacing: 3px;
  color: var(--red);
  display: block;
}

/* Pillars */
.about-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 40px 60px;
}

.pillar {
  padding: 30px 40px;
  border-left: 1px solid rgba(240, 240, 240, 0.06);
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.7s var(--ease-out-expo);
}

.pillar:first-child {
  border-left: none;
}

.pillar.visible {
  opacity: 1;
  transform: translateY(0);
}

.pillar-title {
  font-family: var(--font-pixel);
  font-size: clamp(11px, 1.3vw, 16px);
  line-height: 1.8;
  letter-spacing: 1px;
  color: var(--white);
  margin-bottom: 20px;
}

.pillar-accent {
  width: 40px;
  height: 2px;
  background: var(--red);
  margin-bottom: 24px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out-expo) 0.3s;
}

.pillar.visible .pillar-accent {
  transform: scaleX(1);
}

.pillar-list li {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1vw, 13px);
  line-height: 1.7;
  color: rgba(240, 240, 240, 0.6);
  margin-bottom: 18px;
  padding-left: 16px;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pillar-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  background: var(--red);
}

/* =============================================
   CONTACT
   ============================================= */

.page--contact {
  padding-top: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-section {
  text-align: center;
  padding: 40px;
  max-width: 1000px;
  width: 100%;
}

.contact-heading {
  font-family: var(--font-pixel);
  font-size: clamp(16px, 2.5vw, 28px);
  letter-spacing: 6px;
  margin-bottom: 60px;
  color: var(--white);
  position: relative;
  display: inline-block;
}

.contact-heading::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background: var(--red);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}

.team-card {
  padding: 40px 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(240, 240, 240, 0.06);
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-out-expo);
  opacity: 0;
  transform: translateY(30px);
}

.team-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.team-card:hover {
  border-color: rgba(255, 0, 0, 0.3);
  background: rgba(255, 0, 0, 0.03);
  transform: translateY(-4px);
}

.team-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform 0.5s var(--ease-out-expo);
}

.team-card:hover .team-accent {
  transform: scaleX(1);
}

.team-avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(240, 240, 240, 0.1);
}

.team-avatar svg,
.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 2px;
  margin-bottom: 10px;
  color: var(--white);
}

.team-role {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(240, 240, 240, 0.5);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.contact-cta {
  margin-top: 20px;
}

.contact-email {
  font-family: var(--font-pixel);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--red);
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 900px) {
  .nav { display: none; }
  .burger { display: flex; }

  .header { padding: 20px 24px; }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .about-pillars {
    grid-template-columns: 1fr;
    padding: 20px 24px 80px;
  }

  .pillar {
    border-left: none;
    border-top: 1px solid rgba(240, 240, 240, 0.06);
    padding: 40px 0;
  }

  .pillar:first-child { border-top: none; }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 0 auto 60px;
  }

  .slide-content {
    left: 24px;
    bottom: 100px;
    max-width: calc(100% - 48px);
  }

  .slide-nav { right: 20px; }
  .scroll-indicator { right: 20px; bottom: 24px; }

  .page--about { padding-top: 50px; }
  .about-hero { padding: 5px 24px; }
  .about-pillars { padding: 0 24px 40px; margin-top: -20px; }
  .pillar { padding: 20px 0; }

  .page--contact { padding-top: 80px; }
  .contact-heading { margin-bottom: 30px; }

  .about-hero { padding: 40px 24px; min-height: 50vh; }
}

@media (max-width: 500px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat { padding: 24px 12px; }

  .slide-title {
    font-size: 20px;
  }
}

/* =============================================
   NOISE OVERLAY (texture)
   ============================================= */

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  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)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

/* Page transition flash */
.page-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--red);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.page-flash.active {
  opacity: 0.08;
}
