/* Prismatik Studio — Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ─── Variables ──────────────────────────────────── */
:root {
    --bg:          #06060a;
    --surface:     #0c0c10;
    --surface-alt: #101014;
    --text:        #e8e8ec;
    --text-muted:  #78787f;
    --accent:      #a8a8b0;
    --border:      rgba(255, 255, 255, 0.05);
    --shadow:      rgba(0, 0, 0, 0.6);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Loader ─────────────────────────────────────── */
.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-icon {
    position: relative;
    width: 64px;
    height: 64px;
}

.loader-icon img {
    width: 100%;
    height: 100%;
    opacity: 0.85;
    /* Prevent broken image icon from showing */
    object-fit: contain;
}

/* Fallback dot when icon fails to load */
.loader-icon img[style*="display: none"] ~ .loader-ring {
    border-color: rgba(255, 255, 255, 0.15);
}

.loader-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: ring-pulse 2.5s ease-in-out infinite;
}

@keyframes ring-pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(1.05); }
}

/* ─── Page Transition ────────────────────────────── */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9998;
    pointer-events: none;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
}

.page-transition.active { transform: scaleY(1); }

/* ─── Particles ──────────────────────────────────── */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

/* ─── Navigation ─────────────────────────────────── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(6, 6, 10, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-logo-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* ─── Hamburger ──────────────────────────────────── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    cursor: pointer;
}

.nav-hamburger span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--text);
    transition: all 0.3s ease;
}

.nav-hamburger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ─── Buttons ────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--surface-alt);
    border-color: rgba(255, 255, 255, 0.1);
}

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

.btn-outline:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.1);
}

/* ─── Scroll Animations ──────────────────────────── */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Hero ───────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 8rem 2rem 5rem;
    position: relative;
    overflow: hidden;
}



.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease forwards 0.4s;
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
    font-size: clamp(2.6rem, 6vw, 4.4rem);
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

.hero h1 span { display: block; }

.hero h1 .thin {
    font-weight: 300;
    color: var(--text-muted);
}

.hero p {
    font-size: 1.05rem;
    color: var(--text-muted);
    font-weight: 400;
    max-width: 380px;
    margin-bottom: 3rem;
    letter-spacing: 0.01em;
    line-height: 1.75;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

/* ─── Featured Section ───────────────────────────── */
.games {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem 7rem;
}

.games h2 {
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-muted);
}

/* ─── Games Grid ─────────────────────────────────── */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* ─── Game Card ──────────────────────────────────── */
.game-card {
    background: var(--surface);
    border-radius: 8px;
    aspect-ratio: 16 / 10;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: border-color 0.4s ease;
    text-decoration: none;
    display: block;
}

.game-card:hover { border-color: rgba(255, 255, 255, 0.08); }

/* Radial light follows cursor — driven by JS custom properties */
.game-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(99, 102, 241, 0.08) 0%,
        transparent 55%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.game-card:hover::before { opacity: 1; }

.game-bg {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f0f14 0%, #0a0a0e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-bg::after {
    content: '';
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.game-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
    z-index: 2;
}

.game-name {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: var(--text);
}

.game-stats {
    display: flex;
    gap: 1.25rem;
    font-size: 0.8rem;
}

.stat-players,
.stat-visits {
    color: var(--text-muted);
    font-weight: 400;
}

/* ─── Games Page ─────────────────────────────────── */
.games-page {
    padding: 8rem 3rem 6rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ─── Page Header ────────────────────────────────── */
.page-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.page-header p {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ─── Careers Page ───────────────────────────────── */
.careers-page {
    padding: 8rem 3rem 6rem;
    max-width: 700px;
    margin: 0 auto;
}

.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.job-card {
    background: var(--surface);
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid var(--border);
    transition: border-color 0.3s ease;
}

.job-card:hover { border-color: rgba(255, 255, 255, 0.08); }

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.job-title {
    font-size: 1.05rem;
    font-weight: 500;
}

.job-type {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    flex-shrink: 0;
}

.job-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

.job-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.job-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.job-tag {
    background: rgba(255, 255, 255, 0.02);
    padding: 0.28rem 0.65rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.job-apply {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.job-apply:hover { color: var(--text); }

.job-apply svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    transition: transform 0.2s ease;
}

.job-apply:hover svg { transform: translate(2px, -2px); }

/* ─── Partners Page ──────────────────────────────── */
.partners-page {
    padding: 8rem 3rem 6rem;
    max-width: 900px;
    margin: 0 auto;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3.5rem;
}

.benefit-card {
    background: var(--surface);
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid var(--border);
    transition: border-color 0.3s ease;
}

.benefit-card:hover { border-color: rgba(255, 255, 255, 0.08); }

.benefit-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.benefit-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
}

.benefit-card h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.benefit-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.65;
}

.partnership-cta {
    background: var(--surface);
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    border: 1px solid var(--border);
}

.partnership-cta h2 {
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.partnership-cta p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ─── Partners List ──────────────────────────────── */
.partners-list {
    margin-top: 4rem;
}

.partners-list > h2 {
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.partner-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.25s, background 0.25s;
}

.partner-card:hover {
    background: var(--surface-alt);
    border-color: rgba(255,255,255,0.1);
}

.partner-card-top {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.partner-logo {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.partner-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.partner-info h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.partner-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 400;
}

.partner-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.partner-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-decoration: none;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.25rem 0.55rem;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.partner-link:hover {
    color: var(--text);
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.07);
}

.partner-link svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

/* ─── Contact Page ───────────────────────────────── */
.contact-page {
    padding: 8rem 3rem 4rem;
    max-width: 550px;
    margin: 0 auto;
}

.contact-card {
    background: var(--surface);
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid var(--border);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
}

.contact-item:first-child { padding-top: 0; }

.contact-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
}

.contact-info h3 {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.contact-info p {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 400;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

/* ─── Footer ─────────────────────────────────────── */
.footer {
    padding: 5rem 3rem 3rem;
    border-top: 1px solid var(--border);
}

.footer-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
}

.footer-brand h3 {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.7;
}

.footer h4 {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.footer ul { list-style: none; }

.footer li { margin-bottom: 0.75rem; }

.footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    transition: color 0.2s;
}

.footer a:hover { color: var(--text); }

.footer-bottom {
    max-width: 1000px;
    margin: 4rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.04em;
}

.footer-credit {
    margin-top: 0.5rem;
    font-size: 0.72rem;
    opacity: 0.5;
}

.footer-credit a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s, opacity 0.2s;
}

.footer-credit a:hover {
    color: var(--text);
    opacity: 1;
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
    .nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        align-items: center;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border);
        transform: translateY(-120%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.35s ease;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-hamburger { display: flex; }

    .hero {
        padding: 7rem 1.5rem 4rem;
    }

    .hero h1 {
        font-size: clamp(2.2rem, 10vw, 3rem);
    }

    .hero p {
        font-size: 1rem;
        padding: 0;
        max-width: 340px;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
    }

    .btn { width: 100%; }

    .games {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        padding-bottom: 4rem;
    }

    .games-page,
    .partners-page {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        padding-bottom: 4rem;
    }

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

    .careers-page,
    .contact-page {
        padding: 7rem 1.5rem 4rem;
    }

    .job-header {
        flex-direction: column;
        gap: 0.6rem;
    }

    .job-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .contact-item {
        flex-direction: column;
        gap: 0.75rem;
    }

    .partnership-cta {
        padding: 2rem 1.5rem;
    }

    .footer {
        padding: 3rem 1.5rem 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}
