/* Responsive Styles */

/* Base variables */
:root {
  --container-width: 1200px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
}

/* Breakpoints:
  - Mobile: <768px
  - Tablet: 768px - 1024px
  - Desktop: >1024px
*/

/* Small devices (phones, less than 768px) */
@media (max-width: 767.98px) {
  /* Typography scaling */
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  /* Header & Navigation */
  header {
    padding: var(--space-2);
  }
  
  .logo-text {
    font-size: 1.5rem;
  }
  
  nav ul {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99;
  }
  
  nav ul.active {
    display: flex;
  }
  
  nav ul li {
    margin: var(--space-3) 0;
  }
  
  .nav-link {
    font-size: 1.5rem;
  }
  
  .menu-toggle {
    display: flex;
    z-index: 100;
  }
  
  .menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  
  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
  
  /* Hero Section */
  .hero {
    height: 90vh;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-content p {
    font-size: 1rem;
  }
  
  /* Features Section */
  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  /* About Preview */
  .art-piece {
    height: 200px;
  }
  
  /* Games Grid */
  .games-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  
  /* Footer */
  .footer-content {
    flex-direction: column;
  }
  
  .footer-links {
    flex-direction: column;
  }
  
  .footer-column {
    margin-right: 0;
    margin-bottom: var(--space-3);
  }
  
  /* Contact Page */
  .contact-container {
    flex-direction: column;
  }
  
  .contact-info, .contact-form {
    min-width: 100%;
  }
  
  /* Game Page */
  .game-frame-container iframe {
    height: 350px;
  }
  
  .game-features {
    flex-direction: column;
  }
  
  .related-games-grid {
    grid-template-columns: 1fr;
  }
  
  /* Age Verification Modal */
  .age-verification-modal {
    width: 90%;
    padding: var(--space-3);
  }
  
  /* About Page */
  .art-manifesto {
    flex-direction: column;
  }
  
  .team-abstract {
    flex-wrap: wrap;
  }
  
  .team-abstract .abstract-shape {
    margin-bottom: var(--space-2);
  }
  
  /* Values Grid */
  .values-grid {
    grid-template-columns: 1fr;
  }
}

/* Medium devices (tablets, 768px to 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Typography scaling */
  h1 {
    font-size: 3rem;
  }
  
  h2 {
    font-size: 2.2rem;
  }
  
  /* Header & Navigation */
  header {
    padding: var(--space-2) var(--space-3);
  }
  
  .logo-text {
    font-size: 1.8rem;
  }
  
  /* Features Section */
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Games Grid */
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Footer */
  .footer-content {
    flex-wrap: wrap;
  }
  
  /* Contact Page */
  .contact-info, .contact-form {
    min-width: 45%;
  }
  
  /* Game Page */
  .game-frame-container iframe {
    height: 400px;
  }
  
  .related-games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Values Grid */
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Large devices (desktops, greater than 1024px) */
@media (min-width: 1025px) {
  /* Container width */
  .container, 
  .footer-content, 
  .games-grid, 
  .feature-grid,
  .about-content,
  .contact-container,
  .about-container,
  .values-grid {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
  }
  
  /* Features Section */
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  /* Game Page */
  .game-features {
    display: flex;
    justify-content: space-between;
  }
  
  .feature {
    flex: 1;
    margin-right: var(--space-3);
  }
  
  .feature:last-child {
    margin-right: 0;
  }
}

/* XL Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .container, 
  .footer-content, 
  .games-grid, 
  .feature-grid,
  .about-content,
  .contact-container,
  .about-container,
  .values-grid {
    max-width: 1400px;
  }
  
  /* Hero Section */
  .hero-content h1 {
    font-size: 4.5rem;
  }
  
  .hero-content p {
    font-size: 1.3rem;
  }
}

/* Print styles */
@media print {
  body {
    background-color: white;
    color: black;
  }
  
  header, footer, .hero, .games-preview, .features {
    display: none;
  }
  
  .about-content, .legal-content, .contact-info {
    width: 100%;
    margin: 0;
    padding: 0;
  }
  
  a {
    text-decoration: underline;
    color: #000;
  }
}

/* Orientation specific styles */
@media (orientation: landscape) and (max-height: 500px) {
  .hero {
    height: auto;
    min-height: 500px;
  }
  
  header {
    position: absolute;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --primary: #ff007f;
    --secondary: #00b8ff;
    --accent: #ff6b00;
  }
  
  .highlight:after {
    height: 3px;
  }
  
  button, .btn-explore, .btn-more, .btn-view-all, .btn-play {
    border-width: 3px;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .cursor-follower {
    display: none !important;
  }
  
  .abstract-bg, .shape, .line {
    animation: none !important;
  }
}

/* Dark mode overrides (for systems that might override our dark theme) */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: dark;
  }
  
  body {
    background-color: var(--black);
    color: var(--white);
  }
}

/* Tall mobile devices */
@media (max-width: 767.98px) and (min-height: 800px) {
  .hero {
    height: 60vh;
  }
  
  .feature-item, .game-card {
    margin-bottom: var(--space-4);
  }
}

/* Notch handling for mobile devices */
@supports (padding: max(0px)) {
  header {
    padding-left: max(var(--space-3), env(safe-area-inset-left));
    padding-right: max(var(--space-3), env(safe-area-inset-right));
  }
  
  .hero, .page-banner {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
}