/* =============================================
   gamelicensor.com - Isometric Game Licensing
   ============================================= */

/* --- CSS Custom Properties --- */
:root {
    --midnight-dark: #0C0C14;
    --bright-white: #F5F5F0;
    --optimist-blue: #4A9BD9;
    --success-green: #4CAF50;
    --alert-amber: #E8A840;
    --coral-highlight: #D46B6B;
    --grid-gray: #3A3A48;

    --font-display: 'Archivo', sans-serif;
    --font-body: 'Rubik', sans-serif;
    --font-code: 'Source Code Pro', monospace;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--midnight-dark);
    color: var(--bright-white);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.7;
    overflow-x: hidden;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
    background: var(--midnight-dark);
}

/* Isometric Grid Background */
.iso-grid-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    perspective: 1000px;
    overflow: hidden;
}

.iso-grid-svg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160%;
    height: 160%;
    transform: translate(-50%, -50%) rotateX(60deg) rotateZ(-45deg);
    transform-origin: center center;
    transition: transform 0.1s ease-out;
}

.grid-line {
    stroke: var(--grid-gray);
    stroke-width: 1;
    opacity: 0.1;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
}

/* Grid line draw animation */
.grid-line.animate {
    animation: gridDraw 500ms ease-out forwards;
}

@keyframes gridDraw {
    to {
        stroke-dashoffset: 0;
    }
}

/* Cultural Gaming Icons */
.cultural-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.culture-icon {
    position: absolute;
    opacity: 0;
    transform: scale(0);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease-out;
}

.culture-icon.visible {
    opacity: 0.6;
    transform: scale(1);
}

.icon-retro {
    top: 18%;
    left: 12%;
}

.icon-modern {
    top: 72%;
    right: 10%;
}

.icon-vr {
    top: 25%;
    right: 18%;
}

/* Hero Title */
.hero-title-container {
    position: relative;
    z-index: 10;
    text-align: center;
    transform-style: preserve-3d;
    perspective: 800px;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(36px, 8vw, 100px);
    letter-spacing: -0.01em;
    color: var(--bright-white);
    line-height: 1;
    transform: rotateX(8deg) translateZ(20px);
    display: inline-block;
}

.title-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px) rotateX(-20deg);
    transition: opacity 0.4s ease-out, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.title-letter.landed {
    opacity: 1;
    transform: translateY(0) rotateX(0);
}

.title-spacer {
    display: inline-block;
    width: 0.3em;
}

.hero-dot-com {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(18px, 3vw, 40px);
    color: var(--optimist-blue);
    opacity: 0;
    transform: translateY(-10px) translateZ(40px);
    transition: opacity 0.4s ease-out, transform 0.5s ease-out;
    margin-top: 0.2em;
}

.hero-dot-com.visible {
    opacity: 1;
    transform: translateY(0) translateZ(40px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.5s ease-out;
    z-index: 10;
}

.scroll-indicator.visible {
    opacity: 1;
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-text {
    font-family: var(--font-code);
    font-size: 12px;
    color: var(--optimist-blue);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* --- Content Sections (Stacked) --- */
.content-section {
    position: relative;
    min-height: 70vh;
    padding: 80px 5vw;
    overflow: hidden;
}

.content-section:nth-child(odd) {
    background: var(--midnight-dark);
}

.content-section:nth-child(even) {
    background: linear-gradient(180deg, rgba(58, 58, 72, 0.15) 0%, var(--midnight-dark) 100%);
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 60px;
}

.section-inner.reverse {
    flex-direction: row-reverse;
}

.section-illustration {
    flex: 1;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-content {
    flex: 1;
    min-width: 280px;
}

.section-heading {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(28px, 5.5vw, 68px);
    letter-spacing: -0.01em;
    color: var(--bright-white);
    margin-bottom: 24px;
    line-height: 1.1;
}

.section-body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.7;
    color: rgba(245, 245, 240, 0.8);
    margin-bottom: 28px;
    max-width: 540px;
}

.section-tag {
    display: inline-block;
}

.tag-code {
    font-family: var(--font-code);
    font-size: 13px;
    font-weight: 600;
    color: var(--optimist-blue);
    background: rgba(74, 155, 217, 0.1);
    border: 1px solid rgba(74, 155, 217, 0.25);
    padding: 6px 16px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

/* Section reveal animation */
.content-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.content-section.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Isometric SVG elements stagger animation */
.iso-element {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.content-section.revealed .iso-element {
    opacity: 1;
    transform: translateY(0);
}

.content-section.revealed .iso-element[data-stagger="0"] { transition-delay: 0ms; }
.content-section.revealed .iso-element[data-stagger="1"] { transition-delay: 100ms; }
.content-section.revealed .iso-element[data-stagger="2"] { transition-delay: 200ms; }
.content-section.revealed .iso-element[data-stagger="3"] { transition-delay: 300ms; }
.content-section.revealed .iso-element[data-stagger="4"] { transition-delay: 400ms; }
.content-section.revealed .iso-element[data-stagger="5"] { transition-delay: 500ms; }

/* Section accent icons */
.section-accent-icon {
    position: absolute;
    bottom: 20px;
    right: 40px;
    opacity: 0.3;
}

.content-section:nth-child(even) .section-accent-icon {
    left: 40px;
    right: auto;
}

/* Cultural icon 3D rotation on scroll */
.culture-accent {
    transition: transform 0.6s ease-out;
}

/* --- Collage Section --- */
.section-collage {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, rgba(74, 155, 217, 0.06) 0%, var(--midnight-dark) 70%);
    padding: 100px 5vw;
}

.collage-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    width: 100%;
}

.collage-text {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 5;
}

.collage-heading {
    font-size: clamp(32px, 6vw, 72px);
    margin-bottom: 20px;
}

.collage-body {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.collage-elements {
    position: relative;
    width: 100%;
    height: 400px;
    max-width: 600px;
    margin: 0 auto;
}

.collage-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.collage-bg {
    filter: blur(1.5px);
    opacity: 0.6;
}

.collage-mid {
    opacity: 0.85;
}

.collage-fg {
    opacity: 1;
}

/* Parallax rates applied via JS */
.collage-bg { --parallax-rate: 0.3; }
.collage-mid { --parallax-rate: 0.6; }
.collage-fg { --parallax-rate: 1; }

/* --- ISO Scene SVGs --- */
.iso-scene {
    max-width: 100%;
    height: auto;
}

/* --- Footer --- */
.site-footer {
    position: relative;
    padding: 60px 5vw 40px;
    text-align: center;
    background: var(--midnight-dark);
    border-top: 1px solid rgba(58, 58, 72, 0.4);
    overflow: hidden;
}

.footer-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.footer-iso-grid {
    width: 100%;
    height: 100%;
}

.footer-content {
    position: relative;
    z-index: 2;
    margin-bottom: 16px;
}

.footer-brand {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(20px, 3vw, 32px);
    letter-spacing: -0.01em;
    color: var(--bright-white);
}

.footer-dot {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(14px, 2vw, 22px);
    color: var(--optimist-blue);
}

.footer-legal {
    position: relative;
    z-index: 2;
}

.footer-code {
    font-family: var(--font-code);
    font-size: 12px;
    color: var(--grid-gray);
    letter-spacing: 0.08em;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .section-inner,
    .section-inner.reverse {
        flex-direction: column;
        gap: 40px;
    }

    .section-illustration {
        min-width: unset;
        width: 100%;
    }

    .section-content {
        min-width: unset;
        width: 100%;
    }

    .hero-title {
        font-size: clamp(32px, 10vw, 60px);
    }

    .collage-elements {
        height: 300px;
    }

    .content-section {
        padding: 60px 5vw;
        min-height: 60vh;
    }

    .icon-retro {
        top: 15%;
        left: 5%;
    }

    .icon-modern {
        top: 75%;
        right: 5%;
    }

    .icon-vr {
        top: 20%;
        right: 8%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(28px, 12vw, 48px);
    }

    .section-heading {
        font-size: clamp(24px, 7vw, 40px);
    }

    .collage-heading {
        font-size: clamp(26px, 8vw, 48px);
    }

    .collage-elements {
        height: 240px;
    }
}
