/* ============================================
   PIXELZ GAMES - Game Studio Website
   Modern, dynamic, dark theme
   ============================================ */

:root {
  /* Palette - warm coffee + electric accents */
  --bg-deep: #0a0a0c;
  --bg-dark: #111114;
  --bg-card: #16161a;
  --bg-elevated: #1c1c22;
  
  --text-primary: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-muted: #6e6e73;
  
  --accent-primary: #d4a574;
  --accent-secondary: #8b5e3c;
  --accent-glow: rgba(212, 165, 116, 0.4);
  --accent-electric: #6dd3ce;
  
  --border-subtle: rgba(255, 255, 255, 0.06);
  
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Outfit', sans-serif;
  
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  font-weight: 400;
}

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

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

ul {
  list-style: none;
}

/* Noise overlay for texture */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  z-index: 1000;
  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");
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-lg) var(--space-xl);
  background: linear-gradient(to bottom, var(--bg-deep) 0%, transparent 100%);
  transition: background var(--transition-base);
}

.site-header.scrolled {
  background: rgba(10, 10, 12, 0.9);
  backdrop-filter: blur(12px);
}

.nav {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img,
img.logo {
  height: 48px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: var(--space-xl);
}

.nav-links a {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a:hover {
  color: var(--accent-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-primary);
  transition: width var(--transition-base);
}

.nav-links a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ============================================
   HERO
   ============================================ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 6rem var(--space-xl) 7rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  animation: heroZoom 20s ease-out forwards;
}

@keyframes heroZoom {
  from { transform: scale(1.15); }
  to { transform: scale(1.05); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 12, 0.3) 0%,
    rgba(10, 10, 12, 0.6) 40%,
    rgba(10, 10, 12, 0.95) 100%
  );
}

.hero-content {
  text-align: center;
  max-width: 720px;
  animation: heroFadeUp 1s ease-out 0.3s both;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: var(--accent-primary);
  color: var(--bg-deep);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-lg);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  letter-spacing: 0.05em;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.hero-game-logo {
  max-width: clamp(280px, 50vw, 500px);
  height: auto;
  margin: 0 auto var(--space-lg);
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.5));
}

.hero-tagline {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--bg-deep);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  background: #e0b888;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.hero-scroll {
  margin-top: auto;
  padding-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-muted);
  font-size: 0.8rem;
  animation: heroFadeUp 0.8s ease-out 0.8s both;
}

.scroll-indicator {
  width: 24px;
  height: 40px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}

.scroll-indicator::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 2px;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { opacity: 1; top: 6px; }
  50% { opacity: 0.5; top: 16px; }
}

/* ============================================
   SECTIONS
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: var(--space-2xl);
}

/* ============================================
   GAMES GRID
   ============================================ */

.games-section {
  padding: var(--space-3xl) 0;
  background: var(--bg-dark);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--space-xl);
}

.game-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-slow);
}

.game-card:hover {
  transform: translateY(-8px);
  border-color: rgba(212, 165, 116, 0.2);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.game-card-featured {
  grid-column: 1 / -1;
}

.game-card-featured .game-card-link {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: 280px;
}

@media (min-width: 900px) {
  .game-card-featured .game-card-image {
    min-height: 280px;
  }
  
  .game-card-featured .game-card-content {
    padding: var(--space-2xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.game-card-link {
  display: block;
  height: 100%;
}

.game-card-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.game-card-featured .game-card-image {
  aspect-ratio: auto;
}

.game-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.game-card:hover .game-card-image img {
  transform: scale(1.06);
}

.game-status {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  padding: var(--space-xs) var(--space-md);
  background: rgba(0, 0, 0, 0.7);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
}

.game-card[data-status="development"] .game-status {
  background: var(--accent-primary);
  color: var(--bg-deep);
}

.game-card-content {
  padding: var(--space-lg);
}

.game-card-content h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.game-card-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.game-tags span {
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-elevated);
  font-size: 0.75rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}

/* ============================================
   STUDIO SECTION
   ============================================ */

.studio-section {
  padding: var(--space-3xl) 0;
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-deep) 100%);
}

.studio-content {
  max-width: 700px;
}

.studio-text {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  line-height: 1.8;
}

.studio-cta {
  display: inline-block;
  margin-bottom: var(--space-2xl);
}

.studio-stats {
  display: flex;
  gap: var(--space-2xl);
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 3.5rem;
  letter-spacing: 0.05em;
  color: var(--accent-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  padding: var(--space-3xl) 0 var(--space-xl);
  background: var(--bg-dark);
  border-top: 1px solid var(--border-subtle);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand .logo {
  margin-bottom: var(--space-sm);
}

.footer-brand img.logo {
  height: 42px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: var(--space-sm);
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
}

.footer-links a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-subtle);
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    flex-direction: column;
    justify-content: center;
    padding: var(--space-2xl);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    border-left: 1px solid var(--border-subtle);
    z-index: 99;
  }
  
  .nav-links.open {
    transform: translateX(0);
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .game-card-featured .game-card-link {
    grid-template-columns: 1fr;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .hero-game-logo {
    max-width: 70vw;
  }

  .hero-tagline {
    font-size: 1rem;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: var(--space-md);
  }

  .studio-stats {
    gap: var(--space-xl);
  }

  .stat-number {
    font-size: 2.5rem;
  }
}

@media (max-height: 600px) {
  .hero {
    min-height: auto;
    padding: 5rem var(--space-xl) 3rem;
  }

  .hero-scroll {
    display: none;
  }
}

/* Scroll-triggered animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

body.menu-open {
  overflow: hidden;
}
