/* ============================================
   Quasar Jam Studios - Main Stylesheet
   ============================================
   Table of Contents:
   1. CSS Custom Properties
   2. Reset & Base Styles
   3. Typography
   4. Layout & Utilities
   5. Components
      5.1 Buttons
      5.2 Navigation
      5.3 Cards
   6. Sections
      6.1 Hero
      6.2 Games
      6.3 About
      6.4 Contact
   7. Footer
   8. Animations
   9. Media Queries
   ============================================ */

/* ============================================
   1. CSS Custom Properties
   ============================================ */
:root {
    /* Colors - Primary */
    --color-orange-primary: #FF6B2C;
    --color-orange-glow: #FF8A50;
    --color-orange-deep: #E55A1B;
    
    /* Colors - Dark Theme */
    --color-bg: #0A0A0C;
    --color-surface: #12121A;
    --color-elevated: #1A1A24;
    
    /* Colors - Text */
    --color-text-primary: #FAFAFA;
    --color-text-secondary: #A0A0A8;
    --color-text-muted: #606068;
    
    /* Colors - Geometric */
    --color-geo-stroke: #3A3A48;
    --color-geo-accent: #4A4A58;
    --color-geo-fill: #2A2A35;
    
    /* Typography */
    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'Outfit', sans-serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-full: 50px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* Shadows */
    --shadow-orange: 0 4px 20px rgba(255, 107, 44, 0.3);
    --shadow-orange-lg: 0 8px 30px rgba(255, 107, 44, 0.4);
    --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.4);
    
    /* Z-Index Scale */
    --z-base: 1;
    --z-elevated: 10;
    --z-nav: 100;
    --z-overlay: 1000;
}

/* ============================================
   2. Reset & Base Styles
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 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)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: var(--z-overlay);
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

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

ul,
ol {
    list-style: none;
}

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

/* Focus Styles for Accessibility */
:focus-visible {
    outline: 2px solid var(--color-orange-primary);
    outline-offset: 2px;
}

/* Reduced Motion */
@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;
    }
}

/* ============================================
   3. Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0.1em;
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-orange-primary), var(--color-orange-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

strong {
    color: var(--color-text-primary);
    font-weight: 500;
}

/* ============================================
   4. Layout & Utilities
   ============================================ */
.section {
    padding: var(--space-5xl) var(--space-3xl);
}

.section__header {
    text-align: center;
    margin-bottom: var(--space-4xl);
}

.section__label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-orange-primary);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: var(--space-md);
}

.section__title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: 0.1em;
}

/* ============================================
   5. Components
   ============================================ */

/* 5.1 Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-base);
}

.btn--outline {
    background: transparent;
    border: 1px solid var(--color-orange-primary);
    color: var(--color-orange-primary);
}

.btn--outline:hover {
    background: var(--color-orange-primary);
    color: var(--color-bg);
    box-shadow: var(--shadow-orange);
}

.btn--primary {
    background: linear-gradient(135deg, var(--color-orange-primary), var(--color-orange-deep));
    color: white;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    box-shadow: var(--shadow-orange);
}

.btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-orange-lg);
}

.btn--primary svg {
    transition: transform var(--transition-base);
}

.btn--primary:hover svg {
    transform: translateX(4px);
}

/* 5.2 Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--space-lg) var(--space-3xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2xl);
    z-index: var(--z-nav);
    background: linear-gradient(to bottom, rgba(10, 10, 12, 0.95) 0%, transparent 100%);
    backdrop-filter: blur(10px);
}

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

.logo__icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-orange-primary), var(--color-orange-deep));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: white;
    box-shadow: var(--shadow-orange);
}

.logo__text {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 0.1em;
    color: var(--color-text-primary);
}

.logo__image {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav__links {
    display: flex;
    gap: var(--space-xl);
    margin-left: auto;
    margin-right: var(--space-xl);
}

.nav__links a {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: color var(--transition-base);
}

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

.nav__mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-sm);
    background: none;
    border: none;
    cursor: pointer;
    z-index: calc(var(--z-nav) + 2);
}

.nav__mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    transition: all var(--transition-base);
}

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

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

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

/* 5.3 Cards */
.game-card {
    background: var(--color-surface);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 107, 44, 0.3);
    box-shadow: var(--shadow-card), 0 0 40px rgba(255, 107, 44, 0.1);
}

.game-card__visual {
    height: 280px;
    position: relative;
    overflow: hidden;
}

.game-card__bg {
    position: absolute;
    inset: 0;
}

.game-card__pattern {
    position: absolute;
    inset: 0;
    opacity: 0.5;
}

/* Starlight Garden Theme */
.game-card--starlight .game-card__bg {
    background: 
        radial-gradient(ellipse 100% 100% at 30% 20%, rgba(139, 92, 246, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse 80% 80% at 70% 80%, rgba(255, 107, 44, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #0D0D1A 0%, #1A1A2E 100%);
}

.game-card--starlight .game-card__pattern {
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.8) 1px, transparent 1px),
        radial-gradient(circle at 60% 70%, rgba(255, 255, 255, 0.6) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.4) 2px, transparent 2px),
        radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.5) 1px, transparent 1px),
        radial-gradient(circle at 90% 50%, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
        radial-gradient(circle at 10% 80%, rgba(255, 255, 255, 0.6) 1px, transparent 1px);
    background-size: 200px 200px;
}

/* Maid Cafe Tycoon Theme */
.game-card--maid .game-card__bg {
    background:
        radial-gradient(ellipse 100% 100% at 30% 20%, rgba(255, 182, 193, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse 80% 80% at 70% 80%, rgba(255, 107, 44, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #1A0D1A 0%, #2E1A2E 100%);
}

.game-card--maid .game-card__pattern {
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255, 182, 193, 0.03) 20px, rgba(255, 182, 193, 0.03) 40px),
        repeating-linear-gradient(-45deg, transparent, transparent 20px, rgba(255, 182, 193, 0.02) 20px, rgba(255, 182, 193, 0.02) 40px);
    background-size: 80px 80px;
}

/* I Apologize Theme */
.game-card--apologize .game-card__bg {
    background:
        linear-gradient(180deg, transparent 0%, rgba(255, 107, 44, 0.15) 100%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 215, 0, 0.04) 2px, rgba(255, 215, 0, 0.04) 4px),
        linear-gradient(135deg, #1A0A0A 0%, #2A1010 100%);
}

.game-card--apologize .game-card__pattern {
    background:
        linear-gradient(90deg, transparent 49.5%, rgba(255, 215, 0, 0.1) 49.5%, rgba(255, 215, 0, 0.1) 50.5%, transparent 50.5%),
        linear-gradient(0deg, transparent 49.5%, rgba(255, 107, 44, 0.05) 49.5%, rgba(255, 107, 44, 0.05) 50.5%, transparent 50.5%);
    background-size: 30px 30px;
}

/* The Lights in the Sky Theme */
.game-card--lights .game-card__bg {
    background:
        radial-gradient(ellipse 100% 100% at 50% 20%, rgba(74, 144, 226, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse 80% 80% at 30% 80%, rgba(155, 89, 182, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse 60% 60% at 70% 60%, rgba(74, 144, 226, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, #0A0A1A 0%, #141428 100%);
}

.game-card--lights .game-card__pattern {
    background-image:
        radial-gradient(circle at 15% 25%, rgba(255, 255, 255, 0.9) 1px, transparent 1px),
        radial-gradient(circle at 45% 15%, rgba(255, 255, 255, 0.7) 1px, transparent 1px),
        radial-gradient(circle at 75% 35%, rgba(255, 255, 255, 0.6) 2px, transparent 2px),
        radial-gradient(circle at 25% 65%, rgba(255, 255, 255, 0.8) 1px, transparent 1px),
        radial-gradient(circle at 85% 70%, rgba(255, 255, 255, 0.5) 1px, transparent 1px),
        radial-gradient(circle at 55% 80%, rgba(255, 255, 255, 0.6) 1px, transparent 1px),
        radial-gradient(circle at 10% 50%, rgba(74, 144, 226, 0.4) 2px, transparent 2px),
        radial-gradient(circle at 90% 30%, rgba(155, 89, 182, 0.4) 2px, transparent 2px);
    background-size: 250px 250px;
}

.game-card__icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.game-card--starlight .game-card__icon {
    background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
}

.game-card--snack .game-card__icon {
    background: linear-gradient(135deg, var(--color-orange-primary) 0%, var(--color-orange-deep) 100%);
}

.game-card--maid .game-card__icon {
    background: linear-gradient(135deg, #FFB6C1 0%, #FF69B4 100%);
}

.game-card--apologize .game-card__icon {
    background: linear-gradient(135deg, #FFD700 0%, var(--color-orange-primary) 100%);
}

.game-card--lights .game-card__icon {
    background: linear-gradient(135deg, #4A90E2 0%, #9B59B6 100%);
}

.game-card__status {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(255, 107, 44, 0.3);
    color: var(--color-orange-primary);
}

.game-card__content {
    padding: var(--space-xl);
}

.game-card__genre {
    display: block;
    font-size: 0.8rem;
    color: var(--color-orange-primary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: var(--space-sm);
}

.game-card__title {
    font-size: 2rem;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

.game-card__description {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}

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

.game-card__feature {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Value Cards */
.value-card {
    padding: var(--space-lg);
    background: var(--color-elevated);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-base);
}

.value-card:hover {
    border-color: rgba(255, 107, 44, 0.2);
    transform: translateY(-4px);
}

.value-card__icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-orange-primary), var(--color-orange-deep));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
}

.value-card__title {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: normal;
    margin-bottom: var(--space-sm);
}

.value-card__description {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* ============================================
   6. Sections
   ============================================ */

/* 6.1 Hero */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--space-4xl) var(--space-xl) var(--space-3xl);
    position: relative;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 107, 44, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(255, 107, 44, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 20% 80%, rgba(255, 138, 80, 0.04) 0%, transparent 50%);
}

.hero__grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 107, 44, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 107, 44, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 0%, transparent 70%);
}

.hero__geometric {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 900px;
    height: 900px;
    opacity: 0.4;
    pointer-events: none;
}

.hero__geometric svg {
    width: 100%;
    height: 100%;
}

/* Geometric SVG Styles */
.geo-shape {
    fill: none;
    stroke: var(--color-geo-stroke);
    stroke-width: 1.5;
}

.geo-shape--accent {
    fill: none;
    stroke: var(--color-geo-accent);
    stroke-width: 1;
}

.geo-fill {
    fill: var(--color-geo-fill);
    stroke: none;
}

.hero__content {
    position: relative;
    z-index: var(--z-base);
    max-width: 900px;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 107, 44, 0.1);
    border: 1px solid rgba(255, 107, 44, 0.2);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--color-orange-primary);
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.8s ease forwards;
}

.hero__badge-dot {
    width: 8px;
    height: 8px;
    background: var(--color-orange-primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero__title {
    font-size: clamp(3.5rem, 10vw, 7rem);
    letter-spacing: 0.1em;
    line-height: 1;
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.8s ease 0.1s forwards;
    opacity: 0;
}

.hero__subtitle {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
    font-weight: 300;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero__stats {
    display: flex;
    justify-content: center;
    gap: var(--space-3xl);
    animation: fadeInUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.stat {
    text-align: center;
}

.stat__value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--color-orange-primary);
    line-height: 1;
}

.stat__label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: var(--space-xs);
}

.hero__scroll {
    position: absolute;
    bottom: var(--space-2xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    animation: fadeInUp 0.8s ease 0.5s forwards;
    opacity: 0;
    padding-right: 0.15em;
}

.hero__scroll::after {
    content: '';
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-orange-primary), transparent);
    animation: scrollPulse 2s infinite;
}

/* 6.2 Games */
.games__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl);
    max-width: 1200px;
    margin: 0 auto;
}

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

/* 6.3 About */
.about {
    background: var(--color-surface);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 44, 0.3), transparent);
}

.about__content {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

.about__title {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 0.1em;
    margin-bottom: var(--space-lg);
}

.about__text p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
    font-size: 1.05rem;
}

.values {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

/* 6.4 Contact */
.contact {
    text-align: center;
    position: relative;
}

.contact__bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 100%, rgba(255, 107, 44, 0.08) 0%, transparent 60%);
}

.contact__content {
    position: relative;
    z-index: var(--z-base);
    max-width: 600px;
    margin: 0 auto;
}

.contact__title {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

.contact__text {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
    font-size: 1.1rem;
}

.contact__cta {
    margin-bottom: var(--space-xl);
}

.contact__email {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.contact__email a {
    color: var(--color-orange-primary);
    transition: opacity var(--transition-base);
}

.contact__email a:hover {
    opacity: 0.8;
}

/* ============================================
   7. Footer
   ============================================ */
.footer {
    padding: var(--space-2xl) var(--space-3xl);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.footer__logo-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--color-orange-primary), var(--color-orange-deep));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1rem;
    color: white;
}

.footer__logo-text {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.05em;
}

.footer__logo-image {
    height: 28px;
    width: auto;
    object-fit: contain;
}

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

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

.footer__links a {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    transition: color var(--transition-base);
}

.footer__links a:hover {
    color: var(--color-orange-primary);
}

/* ============================================
   8. Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scrollPulse {
    0%, 100% { opacity: 1; height: 40px; }
    50% { opacity: 0.5; height: 30px; }
}

/* Geometric Animations */
.geo-rotate {
    animation: geoRotate 120s linear infinite;
    transform-origin: center;
}

.geo-rotate--reverse {
    animation: geoRotateReverse 90s linear infinite;
    transform-origin: center;
}

.geo-rotate--slow {
    animation-duration: 180s;
}

.geo-rotate--medium {
    animation-duration: 150s;
}

.geo-rotate--very-slow {
    animation-duration: 200s;
}

@keyframes geoRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes geoRotateReverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

/* ============================================
   9. Media Queries
   ============================================ */
@media (max-width: 1024px) {
    .nav {
        padding: 1.25rem var(--space-xl);
    }
    
    .section {
        padding: var(--space-4xl) var(--space-xl);
    }
    
    .games__grid {
        grid-template-columns: 1fr;
        max-width: 600px;
    }
    
    .about__content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
}

@media (max-width: 768px) {
    /* Mobile menu backdrop */
    .nav__links::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(4px);
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition-base);
        z-index: -1;
    }

    .nav__links {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        max-width: 300px;
        height: 100vh;
        background: var(--color-surface);
        border-left: 1px solid var(--color-geo-stroke);
        flex-direction: column;
        padding: var(--space-5xl) var(--space-xl) var(--space-xl);
        gap: var(--space-lg);
        margin: 0;
        transform: translateX(100%);
        transition: transform var(--transition-base);
        z-index: calc(var(--z-nav) + 1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav__links--active {
        transform: translateX(0);
    }

    .nav__links--active::before {
        opacity: 1;
        pointer-events: auto;
    }

    .nav__links a {
        font-size: 1.1rem;
        padding: var(--space-sm) 0;
    }

    .nav__cta {
        display: none;
    }

    .nav__mobile-toggle {
        display: flex;
    }

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

    .stat__value {
        font-size: 2rem;
    }

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

    .footer {
        flex-direction: column;
        gap: var(--space-lg);
        text-align: center;
    }

    /* Hide scroll indicator on mobile to prevent overlap */
    .hero__scroll {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero__stats {
        flex-direction: column;
        gap: var(--space-lg);
    }
}

/* ============================================
   Legal Pages
   ============================================ */
.legal-page {
    min-height: 100vh;
    padding-top: calc(var(--space-5xl) + var(--space-3xl));
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.legal-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
    text-align: center;
}

.legal-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: var(--space-4xl);
    font-size: 0.9rem;
}

.legal-section {
    margin-bottom: var(--space-3xl);
}

.legal-section h2 {
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: var(--space-md);
    color: var(--color-text-primary);
}

.legal-section p {
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.legal-section ul {
    list-style: disc;
    margin-left: var(--space-xl);
    margin-bottom: var(--space-md);
}

.legal-section li {
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-sm);
}

.legal-section a {
    color: var(--color-orange-primary);
    text-decoration: underline;
    transition: opacity var(--transition-base);
}

.legal-section a:hover {
    opacity: 0.8;
}

/* ============================================
   Modal Styles
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-overlay);
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    overflow-y: auto;
}

.modal.is-active {
    display: flex;
}

.modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

.modal__content {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-geo-stroke);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 800px;
    max-height: 85vh;
    overflow: hidden;
    z-index: calc(var(--z-overlay) + 1);
    animation: slideUp 0.4s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal__close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-elevated);
    border: 1px solid var(--color-geo-stroke);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    z-index: 1;
}

.modal__close:hover {
    background: var(--color-orange-primary);
    border-color: var(--color-orange-primary);
    color: white;
    transform: scale(1.1);
}

.modal__close svg {
    width: 20px;
    height: 20px;
}

.modal__body {
    padding: var(--space-3xl) var(--space-xl) var(--space-2xl);
    overflow-y: auto;
    max-height: 85vh;
}

/* Custom scrollbar for modal */
.modal__body::-webkit-scrollbar {
    width: 8px;
}

.modal__body::-webkit-scrollbar-track {
    background: var(--color-bg);
    border-radius: var(--radius-sm);
}

.modal__body::-webkit-scrollbar-thumb {
    background: var(--color-geo-stroke);
    border-radius: var(--radius-sm);
}

.modal__body::-webkit-scrollbar-thumb:hover {
    background: var(--color-orange-primary);
}

/* Adjust legal styles for modal context */
.modal .legal-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-top: 0;
}

.modal .legal-subtitle {
    margin-bottom: var(--space-2xl);
}

.modal .legal-section {
    margin-bottom: var(--space-2xl);
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Modal animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Mobile adjustments */
@media (max-width: 768px) {
    .modal {
        padding: 0;
    }

    .modal__content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        border: none;
    }

    .modal__body {
        padding: var(--space-2xl) var(--space-lg) var(--space-xl);
        max-height: 100vh;
    }

    .modal__close {
        top: var(--space-md);
        right: var(--space-md);
    }
}
