/* ==========================================================================
   Rikzu Games — Main Stylesheet
   ========================================================================== */

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

:root {
    --bg-base: #0f172a;
    --bg-frame: #020617;
    --text-primary: #ffffff;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --accent-cyan: #22d3ee;
    --border-subtle: rgba(255, 255, 255, 0.1);
}

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

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

::selection {
    background-color: rgba(34, 211, 238, 0.3);
    color: #a5f3fc;
}

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

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

/* Focus & Skip Link */
.skip-link {
    position: fixed;
    top: -100%;
    left: 1rem;
    z-index: 100;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    background-color: #06b6d4;
    color: #020617;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 1rem;
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

:is(a, button, iframe):focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 3px;
    border-radius: 0.5rem;
}

/* ==========================================================================
   Ambient Background (Radial Gradients — zero filter:blur GPU overhead)
   ========================================================================== */
.ambient-light {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--bg-base);
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    animation: floatOrb 20s infinite alternate ease-in-out;
    will-change: transform;
}

.orb-1 {
    width: 65vw;
    height: 65vw;
    top: -18%;
    left: -15%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.42) 0%, rgba(79, 70, 229, 0) 70%);
    animation-delay: 0s;
}

.orb-2 {
    width: 55vw;
    height: 55vw;
    bottom: -18%;
    right: -10%;
    background: radial-gradient(circle, rgba(192, 38, 211, 0.36) 0%, rgba(192, 38, 211, 0) 70%);
    animation-delay: -5s;
}

.orb-3 {
    width: 45vw;
    height: 45vw;
    top: 35%;
    left: 35%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.34) 0%, rgba(6, 182, 212, 0) 70%);
    animation-delay: -10s;
}

@keyframes floatOrb {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(30px, 50px, 0) scale(1.08); }
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: rgba(2, 6, 23, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-bar {
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    padding: 0.875rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.brand-accent {
    color: var(--accent-cyan);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-links a {
    transition: color 0.15s ease;
    padding: 0.25rem 0;
}

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

.nav-socials {
    display: flex;
    align-items: center;
    gap: 1.125rem;
    color: var(--text-secondary);
}

.icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    transition: color 0.15s ease, transform 0.15s ease;
}

.icon-link svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

.icon-link--x:hover { color: #22d3ee; }
.icon-link--discord:hover { color: #818cf8; }
.icon-link--instagram:hover { color: #f472b6; }
.icon-link--facebook:hover { color: #3b82f6; }

@media (max-width: 639px) {
    .nav-bar {
        padding: 0.75rem 1rem;
    }
    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 2rem;
        padding-top: 0.375rem;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }
}

@media (min-width: 768px) {
    .brand-logo {
        font-size: 1.875rem;
    }
    .nav-links {
        gap: 2rem;
    }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    text-align: center;
    padding: 2rem 1rem 1.75rem;
    max-width: 56rem;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.875rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    font-size: 0.8125rem;
    color: #67e8f9;
    margin-bottom: 0.875rem;
}

.pulse-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background-color: var(--accent-cyan);
    animation: pulseDot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.hero-title {
    font-size: 2.25rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.625rem;
    color: var(--text-primary);
    text-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.hero-gradient {
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    background-image: linear-gradient(to right, #22d3ee, #c084fc);
}

.hero-subtitle {
    font-size: 1.0625rem;
    line-height: 1.5;
    font-weight: 300;
    color: var(--text-secondary);
    max-width: 40rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .hero {
        padding: 2.25rem 1rem 2rem;
    }
    .hero-title {
        font-size: 3rem;
    }
    .hero-subtitle {
        font-size: 1.2rem;
    }
}

/* ==========================================================================
   Games Showcase & 3D Cards
   ========================================================================== */
.games-section {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1rem 6rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

@media (min-width: 768px) {
    .games-section {
        gap: 6rem;
    }
}

.game-card-container {
    perspective: 1200px;
    display: flex;
    justify-content: center;
}

.game-card {
    --card-accent: #22d3ee;
    --card-glow: rgba(34, 211, 238, 0.2);

    width: 100%;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
}

.game-card.is-tilting {
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
    will-change: transform;
}

.game-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 25px 50px -12px var(--card-glow), 0 20px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Card Accent Themes */
.game-card--orange { --card-accent: #fb923c; --card-glow: rgba(249, 115, 22, 0.22); }
.game-card--cyan   { --card-accent: #22d3ee; --card-glow: rgba(6, 182, 212, 0.22); }
.game-card--emerald{ --card-accent: #34d399; --card-glow: rgba(16, 185, 129, 0.22); }
.game-card--blue   { --card-accent: #60a5fa; --card-glow: rgba(59, 130, 246, 0.22); }
.game-card--purple { --card-accent: #c084fc; --card-glow: rgba(168, 85, 247, 0.22); }
.game-card--red    { --card-accent: #f87171; --card-glow: rgba(239, 68, 68, 0.22); }
.game-card--pink   { --card-accent: #f472b6; --card-glow: rgba(236, 72, 153, 0.22); }
.game-card--yellow { --card-accent: #facc15; --card-glow: rgba(234, 179, 8, 0.22); }
.game-card--indigo { --card-accent: #818cf8; --card-glow: rgba(99, 102, 241, 0.22); }

.game-card-info {
    text-align: center;
}

.game-platform-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(251, 146, 60, 0.35);
    color: #fdba74;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.game-platform-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--card-accent);
    margin-bottom: 0.5rem;
}

.game-title {
    font-size: 1.875rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.game-divider {
    height: 4px;
    width: 3rem;
    background-color: var(--card-accent);
    border-radius: 9999px;
    margin: 0 auto 1rem;
}

.game-desc {
    font-size: 1rem;
    line-height: 1.625;
    color: var(--text-secondary);
}

.game-card-media {
    width: 100%;
}

.game-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    padding-top: 0.25rem;
}

.store-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

@media (min-width: 640px) {
    .game-card {
        padding: 2rem;
    }
    .game-title {
        font-size: 2.25rem;
    }
    .game-desc {
        font-size: 1.125rem;
    }
}

@media (min-width: 768px) {
    .game-card {
        width: 91.666667%;
        padding: 2.5rem;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 1rem 2.5rem;
    }
    .game-card-info {
        grid-column: 1 / span 4;
        grid-row: 1;
        align-self: end;
        text-align: left;
    }
    .game-divider {
        margin: 0 0 1rem;
    }
    .game-card-media {
        grid-column: 5 / span 8;
        grid-row: 1 / span 2;
        align-self: center;
    }
    .game-card-actions {
        grid-column: 1 / span 4;
        grid-row: 2;
        align-self: start;
        align-items: flex-start;
    }
    .store-row {
        justify-content: flex-start;
    }

    /* Alternating Reversed Layout */
    .game-card--reversed .game-card-info {
        grid-column: 9 / span 4;
        text-align: right;
    }
    .game-card--reversed .game-divider {
        margin-left: auto;
        margin-right: 0;
    }
    .game-card--reversed .game-card-media {
        grid-column: 1 / span 8;
    }
    .game-card--reversed .game-card-actions {
        grid-column: 9 / span 4;
        align-items: flex-end;
    }
    .game-card--reversed .store-row {
        justify-content: flex-end;
    }
}

/* ==========================================================================
   Video Facade
   ========================================================================== */
.video-frame {
    aspect-ratio: 16 / 9;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    background: var(--bg-frame);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.video-facade {
    width: 100%;
    height: 100%;
}

.facade-btn {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.facade-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.facade-btn:hover .facade-thumb {
    transform: scale(1.05);
}

.facade-scrim {
    position: absolute;
    inset: 0;
    background-color: rgba(2, 6, 23, 0.3);
    transition: background-color 0.2s ease;
}

.facade-btn:hover .facade-scrim {
    background-color: rgba(2, 6, 23, 0.14);
}

.facade-play-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.facade-play-circle {
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    background-color: rgba(2, 6, 23, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.facade-play-circle svg {
    width: 1.375rem;
    height: 1.375rem;
    margin-left: 0.2rem;
    fill: currentColor;
}

.facade-btn:hover .facade-play-circle {
    transform: scale(1.1);
    background-color: #06b6d4;
    border-color: #67e8f9;
}

.facade-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ==========================================================================
   Store Buttons & Award Badges
   ========================================================================== */
.store-btn {
    display: inline-block;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.store-btn:hover {
    transform: translateY(-4px);
    filter: brightness(1.1);
}

.store-btn--google {
    width: 8.8rem;
    margin-inline: -0.57rem;
}

.store-btn--apple {
    width: 6.85rem;
}

.steam-badge-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    padding: 0.65rem 1.25rem;
    border-radius: 0.75rem;
    background: linear-gradient(180deg, #1b2838 0%, #101924 100%);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
    width: 100%;
    max-width: 16.55rem;
}

.steam-badge-btn svg {
    width: 2.125rem;
    height: 2.125rem;
    flex-shrink: 0;
}

.steam-badge-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.15;
}

.steam-badge-sub {
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #cbd5e1;
}

.steam-badge-main {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

@media (min-width: 768px) {
    .store-btn--google {
        width: 9.6rem;
        margin-inline: -0.625rem;
    }
    .store-btn--apple {
        width: 7.45rem;
    }
}

.store-btn img {
    width: 100%;
    height: auto;
}

.award-badge {
    display: inline-block;
    width: 11rem;
    margin-top: 0.5rem;
    transition: transform 0.2s ease;
}

.award-badge:hover {
    transform: scale(1.05) rotate(2deg);
}

.award-badge img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.4));
}

/* ==========================================================================
   Studio Info Section
   ========================================================================== */
.studio-section {
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1rem 6rem;
}

.studio-card {
    border-radius: 24px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2rem;
    text-align: center;
}

.studio-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.studio-copy {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.625;
    max-width: 42rem;
    margin: 0 auto 2rem;
}

.studio-awards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.studio-award-link {
    display: inline-block;
}

.studio-award-link img {
    opacity: 0.88;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.studio-award-link:hover img {
    opacity: 1;
    transform: scale(1.04);
}

.studio-award-img--finalist {
    height: 6rem;
    width: 6rem;
}

.studio-award-img--bip {
    height: 5rem;
    width: 5rem;
}

@media (min-width: 768px) {
    .studio-card {
        padding: 2.5rem;
    }
    .studio-title {
        font-size: 1.875rem;
    }
    .studio-copy {
        font-size: 1.125rem;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 3.5rem 1rem;
    background-color: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-align: center;
}

.footer-inner {
    max-width: 72rem;
    margin: 0 auto;
}

.footer-heading {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    margin-bottom: 1.5rem;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.footer-socials .icon-link svg {
    width: 1.75rem;
    height: 1.75rem;
}

.footer-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.footer-email {
    transition: color 0.15s ease;
}

.footer-email:hover {
    color: var(--accent-cyan);
}

.footer-privacy {
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.15s ease;
}

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

/* ==========================================================================
   Reduced Motion Preferences
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .orb,
    .pulse-dot {
        animation: none;
    }
    .game-card {
        transform: none !important;
        transition: none;
    }
    .store-btn:hover,
    .award-badge:hover,
    .studio-award-link:hover img,
    .facade-btn:hover .facade-thumb,
    .facade-btn:hover .facade-play-circle {
        transform: none;
    }
}
