/* ============================================
   THE FOX AWAKENS — Cinematic Design System
   ============================================ */

:root {
    /* Core Palette */
    --black: #050505;
    --charcoal: #0a0a0a;
    --dark: #111111;
    --dark-mid: #1a1a1a;
    --gray: #888;
    --light: #e8e0d4;
    --white: #f5f0e8;

    /* Accent */
    --amber: #d4842a;
    --amber-glow: #f4a93b;
    --ember: #c25a1a;
    --gold: #c9a84c;

    /* Typography */
    --font-display: 'Cinzel', serif;
    --font-sans: 'Inter', sans-serif;

    /* Spacing */
    --gap-sm: 1rem;
    --gap-md: 2rem;
    --gap-lg: 3.5rem;
    --gap-xl: 5rem;
}

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

body {
    background-color: var(--black);
    color: var(--white);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

/* Hide system cursor */
body, a, button { cursor: none !important; }

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }

/* ── Typography ───────────────────────────── */
.font-display { font-family: var(--font-display); }
.font-sans { font-family: var(--font-sans); }
.text-center { text-align: center; }
.text-muted { color: var(--gray); }
.accent { color: var(--amber); }

.eyebrow {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: var(--amber);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

/* ── Lenis ────────────────────────────────── */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ── Container ────────────────────────────── */
.container { max-width: 1400px; margin: 0 auto; padding: 0 5%; }

/* ── Ghost Cursor ────────────────────────── */
canvas#ghost {
    position: fixed;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    z-index: 10000;
    pointer-events: none;
}

/* ── Particles Canvas ─────────────────────── */
#particles {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 5;
    pointer-events: none;
}

/* ── Navigation ───────────────────────────── */
.nav {
    position: fixed; top: 0; left: 0; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    padding: 2rem 5%;
    z-index: 1000;
    mix-blend-mode: difference;
}
.nav-logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 3px;
    font-weight: 700;
}
.nav-toggle {
    background: none; border: none;
    display: flex; flex-direction: column; gap: 7px;
    z-index: 1001;
    padding: 5px;
}
.nav-toggle span {
    display: block; width: 32px; height: 1.5px;
    background: var(--white);
    transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    transform-origin: center;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* ── Menu Overlay ─────────────────────────── */
.menu-overlay {
    position: fixed; inset: 0;
    background: rgba(5, 5, 5, 0.96);
    z-index: 999;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.6s ease;
}
.menu-overlay.open { opacity: 1; pointer-events: all; }
.menu-overlay nav { display: flex; flex-direction: column; gap: 2rem; text-align: center; }
.menu-link {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 6vw, 3.5rem);
    color: var(--gray);
    transition: color 0.3s, transform 0.3s;
    letter-spacing: 2px;
}
.menu-link:hover { color: var(--amber); transform: translateX(10px); }

/* ══════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════ */
.sec-hero {
    position: relative;
    height: 100vh;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.hero-depth-bg {
    position: absolute; inset: 0;
    z-index: 0;
}
.hero-bg-img {
    position: absolute; inset: -10%;
    width: 120%; height: 120%;
}
.hero-fog {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at center bottom, rgba(212,132,42,0.08) 0%, transparent 60%);
}
.hero-gradient {
    position: absolute; inset: 0;
    background: linear-gradient(to top, var(--black) 0%, rgba(5,5,5,0.3) 40%, rgba(5,5,5,0.6) 100%);
}
.hero-content {
    position: relative; z-index: 10;
    text-align: center;
}
.hero-pre {
    font-size: 0.75rem;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 2rem;
}
.hero-title {
    font-size: clamp(2.8rem, 15vw, 12rem);
    line-height: 0.95;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
    font-weight: 900;
}
.title-line {
    display: block;
    overflow: hidden;
}
.title-inner {
    display: block;
}
.hero-tagline {
    font-size: 1rem;
    letter-spacing: 4px;
    color: var(--gray);
    text-transform: uppercase;
    font-weight: 300;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute; bottom: 3rem;
    left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 0.8rem;
    z-index: 10;
}
.scroll-line {
    width: 1px; height: 60px;
    background: linear-gradient(to bottom, var(--amber), transparent);
    animation: scrollPulse 2s infinite;
}
@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.3; transform: scaleY(0.6); }
}
.scroll-indicator span {
    font-size: 0.65rem;
    letter-spacing: 4px;
    color: var(--gray);
}

/* ══════════════════════════════════════════════
   ORIGIN
   ══════════════════════════════════════════════ */
.sec-origin {
    position: relative;
    padding: var(--gap-xl) 0;
    display: flex; align-items: center;
    overflow: hidden;
}
.origin-bg-wrap {
    position: absolute; inset: -20%;
    opacity: 0.15;
}
.origin-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-lg);
    align-items: center;
}
.origin-text h2 {
    font-size: clamp(2.5rem, 5vw, 5rem);
    line-height: 1.15;
    margin-bottom: 2.5rem;
}
.story-lines { display: flex; flex-direction: column; gap: 1.2rem; }
.story-line {
    font-size: 1.1rem;
    color: var(--gray);
    font-weight: 300;
    line-height: 1.7;
    border-left: 2px solid var(--amber);
    padding-left: 1.5rem;
}
.origin-visual { position: relative; display: flex; justify-content: center; }
.origin-img-mask {
    width: 400px; height: 550px;
    border-radius: 200px 200px 8px 8px;
    overflow: hidden;
    position: relative; z-index: 2;
}
.origin-glow {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(212,132,42,0.15), transparent 70%);
    border-radius: 50%;
    z-index: 1;
    animation: glowPulse 4s ease-in-out infinite;
}
@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

/* ══════════════════════════════════════════════
   WORLD — Horizontal Scroll
   ══════════════════════════════════════════════ */
.sec-world {
    height: 300vh;
    background: var(--charcoal);
}
.world-pin-wrapper {
    position: sticky; top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex; align-items: center;
}
.world-horizontal {
    display: flex;
    width: max-content;
}
.world-panel {
    position: relative;
    width: 100vw; height: 100vh;
    overflow: hidden;
    flex-shrink: 0;
}
.world-panel-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    filter: brightness(0.4);
    transition: filter 0.6s;
}
.world-panel:hover .world-panel-bg { filter: brightness(0.55); }

/* Standard Content Layout */
.world-panel-content {
    position: absolute;
    bottom: 15%; left: 8%;
    z-index: 2;
    max-width: 500px;
}
.world-panel-content h3 {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}
.world-panel-content p {
    font-size: 1.1rem;
    color: var(--light);
}

/* Split Layout (Realm I) */
.world-panel-split {
    position: relative;
    z-index: 2;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--gap-lg);
}
.world-split-visual {
    display: flex;
    justify-content: flex-end;
    padding-right: 2rem;
}
.world-split-mask {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4/5;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
}
.world-split-content {
    max-width: 500px;
}
.world-split-content h3 {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}
.world-split-content p {
    font-size: 1.1rem;
    color: var(--light);
}

/* ══════════════════════════════════════════════
   GAMEPLAY
   ══════════════════════════════════════════════ */
.sec-gameplay {
    padding: var(--gap-xl) 0;
    background: var(--black);
    position: relative;
}
.sec-gameplay > .container {
    position: relative; /* to sit above light-lines canvas */
    z-index: 2;
}
canvas.light-lines {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
}
.gameplay-header {
    margin-bottom: var(--gap-md);
}
.gameplay-header h2 {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1.1;
}
.gameplay-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

/* Glow Border Card Wrapper */
.glow-card-wrap {
    position: relative;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, var(--amber), var(--ember), var(--gold), #2dd4bf, var(--amber));
    background-size: 300% 300%;
    animation: auroraShift 4s ease infinite;
    overflow: hidden;
}
@keyframes auroraShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.glow-card-wrap::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: 12px;
    padding: 2px;
    background: inherit;
    filter: blur(16px);
    opacity: 0.4;
    z-index: -1;
}

.gp-card {
    background: var(--dark);
    border-radius: 10px;
    padding: 3rem 2.5rem;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s;
    position: relative;
    overflow: hidden;
}
.gp-card::after {
    content: '';
    position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212,132,42,0.04), transparent);
    transition: left 0.8s ease;
}
.glow-card-wrap:hover .gp-card::after { left: 100%; }
.glow-card-wrap:hover .gp-card {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(212,132,42,0.1);
}
.gp-card-icon {
    width: 48px; height: 48px;
    color: var(--amber);
    margin-bottom: 2rem;
}

/* Animated Hero Title inside card */
.gp-card-title-wrap {
    overflow: hidden;
    margin-bottom: 1rem;
}
.gp-card h4 {
    font-size: 1.8rem;
    letter-spacing: 1px;
}
.gp-card p {
    color: var(--gray);
    font-weight: 300;
    line-height: 1.8;
}

/* ══════════════════════════════════════════════
   CHARACTER
   ══════════════════════════════════════════════ */
.sec-character {
    position: relative;
    padding: var(--gap-xl) 0;
    display: flex; align-items: center;
    overflow: hidden;
}
.char-bg-wrap {
    position: absolute; inset: -20%;
    opacity: 0.1;
}
.char-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-lg);
    align-items: center;
}
.char-image-wrap { position: relative; display: flex; justify-content: center; }
.char-img-frame {
    width: 380px; height: 380px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(212,132,42,0.3);
    position: relative; z-index: 2;
}
.char-ring {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 440px; height: 440px;
    border: 1px solid rgba(212,132,42,0.15);
    border-radius: 50%;
    animation: ringRotate 20s linear infinite;
}
@keyframes ringRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
.char-info h2 {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}
.char-desc {
    color: var(--gray);
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}
.char-stats { display: flex; flex-direction: column; gap: 1.5rem; }
.stat { display: flex; align-items: center; gap: 1.5rem; }
.stat-label {
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--gray);
    width: 80px;
    flex-shrink: 0;
}
.stat-bar {
    flex: 1;
    height: 3px;
    background: var(--dark-mid);
    border-radius: 2px;
    overflow: hidden;
}
.stat-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--amber), var(--amber-glow));
    border-radius: 2px;
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ══════════════════════════════════════════════
   TRAILER
   ══════════════════════════════════════════════ */
.sec-trailer {
    padding: var(--gap-xl) 0;
    background: var(--charcoal);
    position: relative;
}
.sec-trailer > .container {
    position: relative;
    z-index: 2;
}
.sec-trailer h2 {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1.1;
    margin-bottom: var(--gap-lg);
}
.trailer-video-wrap {
    max-width: 1100px;
    margin: 0 auto;
}
.trailer-frame {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}
.trailer-thumb {
    transition: transform 0.8s ease, filter 0.8s ease;
}
.trailer-frame:hover .trailer-thumb {
    transform: scale(1.05);
    filter: brightness(0.6);
}
.play-btn {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 80px; height: 80px;
    background: none; border: none;
    color: var(--white);
    transition: transform 0.4s, color 0.3s;
}
.play-btn:hover { transform: translate(-50%, -50%) scale(1.15); color: var(--amber); }

/* ══════════════════════════════════════════════
   CTA
   ══════════════════════════════════════════════ */
.sec-cta {
    position: relative;
    padding: var(--gap-xl) 0;
    min-height: 50vh;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.sec-cta > .container, .cta-bg-glow {
    position: relative;
    z-index: 2;
}
.cta-bg-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(212,132,42,0.12), transparent 70%);
    border-radius: 50%;
    animation: glowPulse 5s ease-in-out infinite;
}
.cta-title {
    font-size: clamp(4rem, 8vw, 8rem);
    line-height: 1;
    margin-bottom: 2rem;
}
.cta-sub {
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    font-weight: 300;
}
.btn-cta {
    display: inline-block;
    padding: 1.2rem 4rem;
    border: 1px solid var(--amber);
    color: var(--white);
    font-size: 0.85rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}
.btn-cta::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--amber);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: -1;
}
.btn-cta:hover::before { transform: scaleX(1); }
.btn-cta:hover { color: var(--black); }

/* ══════════════════════════════════════════════
   FOOTER (Curtain Reveal)
   ══════════════════════════════════════════════ */
.site-footer {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: var(--charcoal);
    padding: 3rem 0;
    z-index: -1;
}
#smooth-content {
    position: relative;
    z-index: 2;
    background: var(--black);
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-brand h3 { font-size: 1.2rem; letter-spacing: 3px; margin-bottom: 0.5rem; }
.footer-links { display: flex; gap: 2rem; }
.footer-links a {
    font-size: 0.8rem;
    color: var(--gray);
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.3s;
}
.footer-links a:hover { color: var(--amber); }

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .container { padding: 0 7%; }
    .origin-text h2, .sec-gameplay h2, .char-info h2, .sec-trailer h2, .world-panel-content h3, .world-split-content h3 {
        font-size: clamp(2.2rem, 6vw, 4rem);
    }
}

@media (max-width: 900px) {
    :root {
        --gap-lg: 2.5rem;
        --gap-xl: 4rem;
    }
    .origin-grid { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
    .story-line { border-left: none; border-top: 1px solid var(--amber); padding: 1.5rem 0 0 0; }
    .origin-img-mask { width: 100%; max-width: 320px; height: auto; aspect-ratio: 4/5; margin: 0 auto; }
    .gameplay-cards { grid-template-columns: 1fr; gap: 1.5rem; }
    .char-layout { grid-template-columns: 1fr; text-align: center; }
    .char-image-wrap { margin-bottom: 2rem; }
    .char-img-frame { width: 280px; height: 280px; }
    .char-ring { width: 320px; height: 320px; }
    .footer-inner { flex-direction: column; gap: 1.5rem; text-align: center; }
    
    .world-panel-split { grid-template-columns: 1fr; text-align: center; justify-content: center; padding-top: 10vh; padding-bottom: 5vh; }
    .world-split-visual { justify-content: center; padding-right: 0; margin-bottom: 2rem; }
    .world-split-mask { max-width: 220px; margin: 0 auto; }
    .world-split-content { max-width: 100%; }

    .world-panel-content { left: 5%; right: 5%; bottom: 15%; width: 90%; max-width: none; text-align: center; }
    .world-panel-content h3, .world-split-content h3 { font-size: clamp(1.6rem, 7vw, 2.8rem) !important; line-height: 1.2; word-wrap: break-word; }
    .world-panel-content p, .world-split-content p { font-size: 0.95rem; line-height: 1.6; }
    .origin-glow { width: 200px; height: 200px; }
    .cta-bg-glow { width: 300px; height: 300px; }
    
    .cta-title { font-size: clamp(2.5rem, 10vw, 6rem); }

    /* Restore native touch interactions on smaller screens */
    #ghost { display: none !important; }
    body, a, button { cursor: auto !important; }
}

@media (max-width: 600px) {
    :root {
        --gap-lg: 2rem;
        --gap-xl: 3.5rem;
    }
    .nav { padding: 1.2rem 5%; }
    .nav-logo { font-size: 1.1rem; }
    .btn-cta { padding: 1rem 2rem; width: 100%; text-align: center; font-size: 0.75rem; }
    .gp-card { padding: 2.5rem 1.5rem; }
    .gp-card h4 { font-size: 1.5rem; }
    .char-img-frame { width: 240px; height: 240px; }
    .char-ring { width: 280px; height: 280px; }
    .hero-pre { letter-spacing: 5px; margin-bottom: 1.5rem; }
    .hero-tagline { font-size: 0.85rem; letter-spacing: 2px; }
    .eyebrow { letter-spacing: 3px; }
}

@media (pointer: coarse) {
    #ghost { display: none !important; }
    body, a, button { cursor: auto !important; }
}
