/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #1331F5;
    --color-primary-light: #4A5BFF;
    --color-gradient-start: #1331F5;
    --color-gradient-end: #A855F7;
    --color-text: #1D1D1F;
    --color-text-secondary: #6E6E73;
    --color-background: #FFFFFF;
    --color-surface: #F5F5F7;
    --color-border: #D2D2D7;
    --spacing-unit: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    color: var(--color-text);
    background: var(--color-background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 3);
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark nav variant for dark pages (when NOT scrolled) */
body.dark-page .nav:not(.scrolled) {
    color: white;
}

body.dark-page .nav:not(.scrolled) .nav-link {
    color: rgba(255, 255, 255, 0.9);
}

body.dark-page .nav:not(.scrolled) .nav-link:hover,
body.dark-page .nav:not(.scrolled) .nav-link.active {
    color: white;
}

body.dark-page .nav:not(.scrolled) .nav-logo img {
    filter: brightness(0) invert(1);
}

body.dark-page .nav:not(.scrolled) .nav-toggle span {
    background: white;
}

/* Scrolled state - ALWAYS light background with dark text - MAXIMUM SPECIFICITY */
/* Nav - always transparent with fixed dark colors */
.nav {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.nav-link {
    color: var(--color-text) !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary) !important;
}

.nav-logo img {
    filter: brightness(0);
}

.nav-toggle span {
    background: var(--color-text);
}


.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: calc(var(--spacing-unit) * 2.5) calc(var(--spacing-unit) * 3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: translateY(-2px);
}

.nav-logo img {
    height: 100px;
    filter: brightness(0);
    transition: all 0.3s ease;
}

.nav-logo:hover img {
    opacity: 0.7;
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    gap: calc(var(--spacing-unit) * 4);
    list-style: none;
}

.nav-link {
    color: var(--color-text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
}

@keyframes slideIn {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 7px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.nav-toggle span {
    width: 28px;
    height: 2px;
    background: var(--color-text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 4px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(9px, -7px);
}

/* Hero Section - Glassmorphism Edition */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: calc(var(--spacing-unit) * 10);
    overflow: hidden;
    background: linear-gradient(135deg, #FAFBFC 0%, #F5F6F8 100%);
}

/* Animated ambient background system */
.hero-background{
    position:absolute;
    inset:0;
    z-index:0;
    pointer-events:none;
}

/* Dynamic animated blobs - more movement */
.hero-background .hero-blobs{
    position:absolute;
    inset:-30%;
    filter: blur(40px);
    opacity: 1;
    transform: translateZ(0);
}

.hero-background .hero-blobs span{
    position:absolute;
    width: 60vmax;
    height: 60vmax;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, rgba(19,49,245,0.35), rgba(19,49,245,0.08) 50%, transparent 65%);
    animation: blobFloat 12s ease-in-out infinite;
    will-change: transform;
}

.hero-background .hero-blobs span:nth-child(2){
    width: 70vmax;
    height: 70vmax;
    background: radial-gradient(circle at 70% 70%, rgba(168,85,247,0.30), rgba(168,85,247,0.08) 50%, transparent 65%);
    animation-duration: 16s;
    animation-delay: -4s;
}

.hero-background .hero-blobs span:nth-child(3){
    width: 55vmax;
    height: 55vmax;
    background: radial-gradient(circle at 50% 50%, rgba(19,49,245,0.25), rgba(168,85,247,0.06) 50%, transparent 65%);
    animation-duration: 20s;
    animation-delay: -10s;
}

.hero-background .hero-blobs .b1{ left: -5%; top: -5%; }
.hero-background .hero-blobs .b2{ right: -10%; top: 10%; }
.hero-background .hero-blobs .b3{ left: 15%; bottom: -15%; }

@keyframes blobFloat{
    0%   { transform: translate3d(0,0,0) scale(1) rotate(0deg); }
    33%  { transform: translate3d(8%, -6%, 0) scale(1.1) rotate(5deg); }
    66%  { transform: translate3d(-6%, 8%, 0) scale(0.95) rotate(-5deg); }
    100% { transform: translate3d(0,0,0) scale(1) rotate(0deg); }
}

/* Floating glass panels */
.hero-background::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 500px;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 
        0 8px 32px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.8);
    top: 15%;
    right: 18%;
    animation: floatGlass1 15s ease-in-out infinite;
    transform-style: preserve-3d;
}

.hero.hero--refraction .hero-background::after {
    width: 450px;
    height: 450px;
    border-radius: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.5) 100%);
}

.hero-background::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 450px;
    background: linear-gradient(135deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0.08) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 
        0 8px 32px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.7);
    bottom: 10%;
    left: 15%;
    animation: floatGlass2 18s ease-in-out infinite;
    transform-style: preserve-3d;
}

@keyframes floatGlass1 {
    0%, 100% { 
        transform: translate3d(0, 0, 0) rotateY(0deg) rotateX(0deg);
        opacity: 0.6;
    }
    50% { 
        transform: translate3d(-30px, -40px, 20px) rotateY(5deg) rotateX(2deg);
        opacity: 0.9;
    }
}

@keyframes floatGlass2 {
    0%, 100% { 
        transform: translate3d(0, 0, 0) rotateY(0deg) rotateX(0deg);
        opacity: 0.5;
    }
    50% { 
        transform: translate3d(40px, 30px, 15px) rotateY(-5deg) rotateX(-2deg);
        opacity: 0.85;
    }
}

/* Dynamic grid with perspective */
.hero-background .hero-grid{
    position:absolute;
    inset:-40%;
    opacity: 0.4;
    background-image:
        linear-gradient(to right, rgba(19,49,245,0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(19,49,245,0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: translate3d(0,0,0) perspective(1000px) rotateX(60deg);
    mask-image: radial-gradient(circle at 50% 40%, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 50%, transparent 70%);
    animation: gridPerspective 25s ease-in-out infinite;
    will-change: transform;
    transform-origin: 50% 50%;
}

@keyframes gridPerspective{
    0%,100% { 
        transform: translate3d(0,0,0) perspective(1000px) rotateX(60deg);
        opacity: 0.4;
    }
    50% { 
        transform: translate3d(-20px, 15px, 0) perspective(1000px) rotateX(58deg);
        opacity: 0.6;
    }
}

/* Gradient layer with glow */
.hero-background .hero-gradient{
    position:absolute;
    inset:-20%;
    background:
      radial-gradient(circle at 20% 20%, rgba(19,49,245,0.15) 0%, rgba(19,49,245,0.04) 40%, transparent 60%),
      radial-gradient(circle at 80% 80%, rgba(168,85,247,0.12) 0%, rgba(168,85,247,0.04) 45%, transparent 65%),
      conic-gradient(from 90deg at 50% 50%, rgba(19,49,245,0.10), rgba(168,85,247,0.08), rgba(19,49,245,0.10));
    filter: blur(60px);
    opacity: 0.8;
    animation: gradientPulse 20s ease-in-out infinite;
    will-change: opacity;
}

@keyframes gradientPulse{
    0%,100% { opacity: 0.6; filter: blur(60px); }
    50%     { opacity: 1; filter: blur(80px); }
}

/* Animated particles */
.hero-background .hero-noise{
  position:absolute;
  inset:0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.15'/%3E%3C/svg%3E");
  opacity: .08;
  mix-blend-mode: overlay;
  animation: noiseDrift 6s linear infinite;
}

@keyframes noiseDrift{
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(5%, 5%, 0); }
}

/* Edge lighting effect */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(19,49,245,0.5) 50%, 
        transparent 100%);
    animation: edgeScan 8s ease-in-out infinite;
}

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

/* Content on top - transparent, no glass card */
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0;
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.04em;
    margin-bottom: calc(var(--spacing-unit) * 4);
    color: var(--color-text);
    max-width: 900px;
}

/* Better readability on large screens */
@media (min-width: 1200px) {
    .hero-title {
        font-size: 4.5rem;
        line-height: 1.1;
    }
}

/* Title effects intentionally minimal */

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

.hero-description {
    font-size: clamp(1.125rem, 2.2vw, 1.5rem);
    color: var(--color-text-secondary);
    margin-bottom: calc(var(--spacing-unit) * 6);
    line-height: 1.65;
    max-width: 650px;
    font-weight: 400;
}

@media (min-width: 1200px) {
    .hero-description {
        font-size: 1.5rem;
        line-height: 1.7;
    }
}

.hero-actions {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    margin-bottom: calc(var(--spacing-unit) * 8);
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-actions .btn {
    animation: gentleFloat 3s ease-in-out infinite;
}

.hero-actions .btn:nth-child(1) {
    animation-delay: 0s;
}

.hero-actions .btn:nth-child(2) {
    animation-delay: 0.5s;
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

.hero-actions .btn:hover {
    animation-play-state: paused;
}

.hero-stats {
    display: flex;
    gap: calc(var(--spacing-unit) * 6);
    padding-top: calc(var(--spacing-unit) * 4);
    border-top: 1px solid var(--color-border);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.stat-item {
    display: flex;
    flex-direction: column;
    position: relative;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    position: relative;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(19, 49, 245, 0.25);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
}

.btn-secondary:hover {
    background: #E8E8ED;
    transform: translateY(-2px);
}

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

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

/* Sections */
section {
    padding: calc(var(--spacing-unit) * 15) 0;
}

.section-header {
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 8);
}

.section-tag {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: calc(var(--spacing-unit) * 2);
    line-height: 1.2;
}

.section-description {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Featured Section */
.featured {
    background: var(--color-surface);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: calc(var(--spacing-unit) * 4);
}

.featured-card {
    background: white;
    padding: calc(var(--spacing-unit) * 5);
    border-radius: 16px;
    border: 1px solid var(--color-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.featured-card:nth-child(1) { animation-delay: 0.1s; }
.featured-card:nth-child(2) { animation-delay: 0.2s; }
.featured-card:nth-child(3) { animation-delay: 0.3s; }

.featured-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border-color: rgba(19, 49, 245, 0.3);
}

.featured-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(19, 49, 245, 0.08), rgba(168, 85, 247, 0.08));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: calc(var(--spacing-unit) * 3);
    color: var(--color-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.featured-icon::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.6), transparent);
    transform: translateX(-100%) rotate(45deg);
    transition: transform 0.6s ease;
}

.featured-card:hover .featured-icon {
    transform: scale(1.1) rotate(-3deg);
    background: linear-gradient(135deg, rgba(19, 49, 245, 0.15), rgba(168, 85, 247, 0.15));
}

.featured-card:hover .featured-icon::before {
    transform: translateX(100%) rotate(45deg);
}

.featured-card:hover .featured-icon {
    background: var(--color-primary);
    color: white;
}

.featured-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.featured-card p {
    color: var(--color-text-secondary);
    margin-bottom: calc(var(--spacing-unit) * 3);
    line-height: 1.7;
}

.featured-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.featured-link:hover {
    gap: 12px;
}

/* Games Preview */
.games-preview {
    background: white;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: calc(var(--spacing-unit) * 4);
    margin-bottom: calc(var(--spacing-unit) * 6);
}

.game-card {
    background: var(--color-surface);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--color-border);
    position: relative;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.2s; }
.game-card:nth-child(3) { animation-delay: 0.3s; }
.game-card:nth-child(4) { animation-delay: 0.4s; }

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(19, 49, 245, 0.08);
    border-color: rgba(19, 49, 245, 0.3);
}

.game-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-gradient-start) 0%, var(--color-gradient-end) 100%);
    position: relative;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.game-info {
    padding: calc(var(--spacing-unit) * 4);
}

.game-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: calc(var(--spacing-unit) * 1);
}

.game-info p {
    color: var(--color-text-secondary);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.game-tags {
    display: flex;
    gap: calc(var(--spacing-unit) * 1);
    flex-wrap: wrap;
}

.game-tags span {
    padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
    background: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* CTA Section */
.cta-section {
    background: var(--color-primary);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: calc(var(--spacing-unit) * 15) 0;
}

/* CTA Background Animations - VISIBLE VERSION */
.cta-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.cta-background .hero-blobs {
    position: absolute;
    inset: -30%;
    filter: blur(60px);
    opacity: 1;
    transform: translateZ(0);
}

.cta-background .hero-blobs span {
    position: absolute;
    width: 65vmax;
    height: 65vmax;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, rgba(99, 179, 237, 0.4), rgba(99, 179, 237, 0.1) 50%, transparent 65%);
    animation: blobFloat 14s ease-in-out infinite;
    will-change: transform;
}

.cta-background .hero-blobs span:nth-child(2) {
    width: 75vmax;
    height: 75vmax;
    background: radial-gradient(circle at 70% 70%, rgba(168, 85, 247, 0.35), rgba(168, 85, 247, 0.08) 50%, transparent 65%);
    animation-duration: 17s;
    animation-delay: -5s;
}

.cta-background .hero-blobs span:nth-child(3) {
    width: 60vmax;
    height: 60vmax;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.05) 50%, transparent 65%);
    animation-duration: 21s;
    animation-delay: -11s;
}

.cta-background .hero-blobs .b1 { left: -10%; top: -10%; }
.cta-background .hero-blobs .b2 { right: -15%; bottom: -10%; }
.cta-background .hero-blobs .b3 { left: 20%; bottom: -15%; }

.cta-background .hero-grid {
    position: absolute;
    inset: -40%;
    opacity: 0.3;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.25) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.25) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: translate3d(0,0,0) perspective(1000px) rotateX(60deg);
    mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 50%, transparent 70%);
    animation: gridPerspective 25s ease-in-out infinite;
    will-change: transform;
    transform-origin: 50% 50%;
}

.cta-background .hero-gradient {
    position: absolute;
    inset: -20%;
    background:
      radial-gradient(circle at 30% 30%, rgba(99, 179, 237, 0.25) 0%, rgba(99, 179, 237, 0.05) 40%, transparent 60%),
      radial-gradient(circle at 70% 70%, rgba(168, 85, 247, 0.30) 0%, rgba(168, 85, 247, 0.08) 45%, transparent 65%);
    filter: blur(80px);
    opacity: 0.9;
    animation: gradientPulse 22s ease-in-out infinite;
    will-change: opacity;
}

.cta-background .hero-noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.15'/%3E%3C/svg%3E");
    opacity: .12;
    mix-blend-mode: overlay;
    animation: noiseDrift 6s linear infinite;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.cta-content p {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto calc(var(--spacing-unit) * 4);
}

.cta-content .btn-primary {
    background: white;
    color: var(--color-primary);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.cta-content .btn-primary:hover {
    background: rgba(255,255,255,0.95);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
    background: white;
    color: var(--color-primary);
}

.cta-content .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer {
    background: var(--color-text);
    color: #86868B;
    padding: calc(var(--spacing-unit) * 10) 0 calc(var(--spacing-unit) * 4);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: calc(var(--spacing-unit) * 6);
    margin-bottom: calc(var(--spacing-unit) * 6);
}

.footer-logo {
    height: 100px;
    margin-bottom: calc(var(--spacing-unit) * 2);
    filter: brightness(0) invert(1);
}

.footer-col p {
    line-height: 1.8;
    font-size: 0.9375rem;
}

.footer-col h4 {
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: calc(var(--spacing-unit) * 2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.footer-col a {
    color: #86868B;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: var(--transition);
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    padding-top: calc(var(--spacing-unit) * 4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.875rem;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .featured-grid,
    .games-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Reduce hero animation complexity on tablets */
    .hero::before,
    .hero::after {
        opacity: 0.5;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .featured-grid,
    .games-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Hide desktop nav, show mobile nav */
    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        background: #FFFFFF;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: calc(var(--spacing-unit) * 8) calc(var(--spacing-unit) * 4);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 9999;
    }

    .nav-menu.active {
        display: flex;
        opacity: 1;
        visibility: visible;
    }
    
    /* Mobile menu links */
    .nav-menu .nav-link {
        padding-top: calc(var(--spacing-unit) * 3) 0;
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--color-text) !important;
        text-align: center;
        width: 100%;
        transition: color 0.2s ease;
    }
    
    .nav-menu .nav-link:hover {
        color: var(--color-primary) !important;
    }
    
    .nav-menu .nav-link.active {
        color: var(--color-primary) !important;
    }
    
    /* Show hamburger on mobile */
    .nav-toggle {
        display: flex;
        z-index: 10000;
    }

    /* Better mobile spacing */
    .container {
        padding-left: calc(var(--spacing-unit) * 3);
        padding-right: calc(var(--spacing-unit) * 3);
    }

    .hero {
        min-height: 85vh;
        padding: calc(var(--spacing-unit) * 12) 0 calc(var(--spacing-unit) * 8);
    }

    .hero-title {
        margin: calc(var(--spacing-unit) * 5) 0;
    }

    .hero-description {
        margin-bottom: calc(var(--spacing-unit) * 6);
    }

    .hero-actions {
        flex-direction: column;
        gap: calc(var(--spacing-unit) * 3);
        margin-bottom: calc(var(--spacing-unit) * 2);
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 320px;
    }

    .hero-stats {
        flex-direction: row;
        gap: calc(var(--spacing-unit) * 4);
        padding-top: calc(var(--spacing-unit) * 2);
    }

    .featured-grid,
    .games-grid {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing-unit) * 4);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing-unit) * 5);
    }

    .game-image {
        height: 240px;
    }

    section {
        padding: calc(var(--spacing-unit) * 12) 0;
    }

    .section-header {
        margin-bottom: calc(var(--spacing-unit) * 8);
    }
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html:not(.force-motion) *, 
    html:not(.force-motion) *::before, 
    html:not(.force-motion) *::after { 
        animation: none !important; 
        transition: none !important; 
        scroll-behavior: auto !important; 
    }
}

/* Scroll-reveal utility classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Staggered animation delays */
.reveal:nth-child(1) { transition-delay: 0.1s; }
.reveal:nth-child(2) { transition-delay: 0.2s; }
.reveal:nth-child(3) { transition-delay: 0.3s; }
.reveal:nth-child(4) { transition-delay: 0.4s; }
.reveal:nth-child(5) { transition-delay: 0.5s; }

/* Button hover animations enhanced */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Service cards animation */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

/* Stats animation */
.stat-box {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-box:hover {
    transform: translateY(-4px);
}

.stat-value {
    font-variant-numeric: tabular-nums;
    transition: transform 0.3s ease;
}

.stat-box:hover .stat-value {
    transform: scale(1.05);
}

/* Footer link animations */
.footer-link {
    position: relative;
    transition: color 0.3s ease;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}

/* Image lazy load fade */
img {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Our Story Section with Hero Animations */
.our-story-section {
    position: relative;
    overflow: hidden;
    padding: calc(var(--spacing-unit) * 15) 0;
    background: linear-gradient(135deg, #FAFBFC 0%, #F5F6F8 100%);
}

.story-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* Reuse hero blob animations */
.story-background .hero-blobs {
    position: absolute;
    inset: -30%;
    filter: blur(40px);
    opacity: 1;
    transform: translateZ(0);
}

.story-background .hero-blobs span {
    position: absolute;
    width: 50vmax;
    height: 50vmax;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, rgba(19,49,245,0.25), rgba(19,49,245,0.06) 50%, transparent 65%);
    animation: blobFloat 15s ease-in-out infinite;
    will-change: transform;
}

.story-background .hero-blobs span:nth-child(2) {
    width: 55vmax;
    height: 55vmax;
    background: radial-gradient(circle at 70% 70%, rgba(168,85,247,0.20), rgba(168,85,247,0.06) 50%, transparent 65%);
    animation-duration: 18s;
    animation-delay: -6s;
}

.story-background .hero-blobs span:nth-child(3) {
    width: 45vmax;
    height: 45vmax;
    background: radial-gradient(circle at 50% 50%, rgba(19,49,245,0.18), rgba(168,85,247,0.05) 50%, transparent 65%);
    animation-duration: 22s;
    animation-delay: -12s;
}

.story-background .hero-blobs .b1 { right: -10%; top: 20%; }
.story-background .hero-blobs .b2 { right: 5%; bottom: 10%; }
.story-background .hero-blobs .b3 { right: -5%; top: 50%; }

.story-background .hero-grid {
    position: absolute;
    inset: -40%;
    opacity: 0.3;
    background-image:
        linear-gradient(to right, rgba(19,49,245,0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(19,49,245,0.06) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: translate3d(0,0,0) perspective(1000px) rotateX(60deg);
    mask-image: radial-gradient(circle at 80% 50%, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, transparent 70%);
    animation: gridPerspective 25s ease-in-out infinite;
    will-change: transform;
    transform-origin: 80% 50%;
}

.story-background .hero-gradient {
    position: absolute;
    inset: -20%;
    background:
      radial-gradient(circle at 80% 30%, rgba(19,49,245,0.12) 0%, rgba(19,49,245,0.03) 40%, transparent 60%),
      radial-gradient(circle at 90% 70%, rgba(168,85,247,0.10) 0%, rgba(168,85,247,0.03) 45%, transparent 65%);
    filter: blur(60px);
    opacity: 0.8;
    animation: gradientPulse 20s ease-in-out infinite;
    will-change: opacity;
}

.story-background .hero-noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.15'/%3E%3C/svg%3E");
    opacity: .06;
    mix-blend-mode: overlay;
    animation: noiseDrift 6s linear infinite;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--spacing-unit) * 8);
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Logo Showcase */
.story-visual {
    position: relative;
    height: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-showcase {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 
        0 30px 80px rgba(0,0,0,0.12),
        inset 0 1px 0 rgba(255,255,255,0.8);
    animation: logoFloat 8s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { 
        transform: translateY(0) scale(1);
        box-shadow: 
            0 30px 80px rgba(0,0,0,0.12),
            inset 0 1px 0 rgba(255,255,255,0.8);
    }
    50% { 
        transform: translateY(-20px) scale(1.02);
        box-shadow: 
            0 40px 100px rgba(0,0,0,0.15),
            inset 0 1px 0 rgba(255,255,255,0.9);
    }
}

.floating-logo {
    width: 70%;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(19,49,245,0.2));
    animation: logoGlow 4s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { 
        filter: drop-shadow(0 10px 30px rgba(19,49,245,0.2));
    }
    50% { 
        filter: drop-shadow(0 15px 40px rgba(19,49,245,0.35));
    }
}

/* Floating glass accent behind logo */
.logo-showcase::before {
    content: '';
    position: absolute;
    width: 120%;
    height: 120%;
    background: linear-gradient(135deg, rgba(19,49,245,0.08) 0%, rgba(168,85,247,0.06) 100%);
    backdrop-filter: blur(20px);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    animation: accentFloat 10s ease-in-out infinite;
    z-index: -1;
}

@keyframes accentFloat {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.5;
    }
    50% { 
        transform: translate(-10px, -10px) rotate(5deg);
        opacity: 0.8;
    }
}

/* Mobile responsive */
@media (max-width: 968px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing-unit) * 6);
    }

    .logo-showcase {
        max-width: 350px;
    }

    .story-visual {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .our-story-section {
        padding: calc(var(--spacing-unit) * 10) 0;
    }

    .logo-showcase {
        max-width: 280px;
    }
}

/* Number counting animation only - NO title animations */
.stat-value,
.stat-box-value {
    display: inline-block;
}

/* Page Hero Typography (About, Games, Services, Contact) */
.page-hero {
    padding: calc(var(--spacing-unit) * 20) 0 calc(var(--spacing-unit) * 10);
    background: var(--color-surface);
    text-align: center;
}

.page-hero h1 {
    font-size: clamp(2.25rem, 5.5vw, 3.75rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: calc(var(--spacing-unit) * 3);
    line-height: 1.2;
    color: var(--color-text);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.page-hero p {
    font-size: clamp(1.0625rem, 2vw, 1.375rem);
    color: var(--color-text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.65;
    font-weight: 400;
}

@media (min-width: 1200px) {
    .page-hero h1 {
        font-size: 3.75rem;
        line-height: 1.15;
    }
    
    .page-hero p {
        font-size: 1.375rem;
        line-height: 1.7;
    }
}

/* Section Titles Typography */
.section-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.25;
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--color-text);
}

.section-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-text-secondary);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

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

/* Ensure nav-toggle is clickable on all devices */
.nav-toggle {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
