/* ==========================================
   LyCo Studio — Portal
   ========================================== */

:root {
    --bg-deep: #0c0e14;
    --bg-mid: #111320;
    --bg-card: #1a1d2e;
    --bg-card-hover: #1f2338;

    --gold: #e8c47c;
    --gold-light: #f5dca8;
    --gold-dim: #a08550;
    --silver: #a0aec0;
    --silver-dim: #5a6577;

    --text: #e8e8ee;
    --text-secondary: #8890a4;
    --text-muted: #4e5468;

    --border: rgba(255, 255, 255, 0.06);

    --font-display: 'Sora', 'Noto Sans SC', sans-serif;
    --font-body: 'Noto Sans SC', 'Sora', sans-serif;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dim) var(--bg-deep);
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg-deep);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--gold-light); }
img { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }

/* ========================================
   HERO
   ======================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Ambient glow orbs */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(700px 500px at 20% 35%, rgba(232, 196, 124, 0.06) 0%, transparent 70%),
        radial-gradient(600px 600px at 80% 55%, rgba(160, 174, 192, 0.04) 0%, transparent 60%),
        radial-gradient(500px 400px at 50% 90%, rgba(232, 196, 124, 0.03) 0%, transparent 50%);
    animation: breathe 12s ease-in-out infinite alternate;
}

@keyframes breathe {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.7; transform: scale(1.05); }
}

/* Star particles — layer 1 (small, subtle) */
.hero-particles::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    top: 0; left: 0;
    z-index: 1;
    box-shadow:
        182px 103px 0 0 rgba(255,255,255,0.35),
        492px 271px 0 0 rgba(255,255,255,0.25),
        830px 68px 0 0 rgba(255,255,255,0.4),
        1177px 304px 0 0 rgba(255,255,255,0.25),
        1489px 150px 0 0 rgba(255,255,255,0.35),
        70px 480px 0 0 rgba(255,255,255,0.25),
        410px 612px 0 0 rgba(255,255,255,0.4),
        751px 530px 0 0 rgba(255,255,255,0.25),
        1090px 670px 0 0 rgba(255,255,255,0.35),
        1420px 510px 0 0 rgba(255,255,255,0.25),
        240px 820px 0 0 rgba(255,255,255,0.3),
        580px 950px 0 0 rgba(255,255,255,0.4),
        920px 810px 0 0 rgba(255,255,255,0.25),
        1280px 900px 0 0 rgba(255,255,255,0.35),
        130px 1120px 0 0 rgba(255,255,255,0.3),
        460px 1290px 0 0 rgba(255,255,255,0.25),
        810px 1160px 0 0 rgba(255,255,255,0.4),
        1150px 1300px 0 0 rgba(255,255,255,0.25),
        1510px 1180px 0 0 rgba(255,255,255,0.35),
        1800px 200px 0 0 rgba(255,255,255,0.25);
    animation: twinkle 5s ease-in-out infinite alternate;
}

/* Star particles — layer 2 (colored accents) */
.hero-particles::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    top: 0; left: 0;
    z-index: 1;
    box-shadow:
        350px 200px 1px 0 rgba(232,196,124,0.25),
        890px 380px 1px 0 rgba(160,174,192,0.2),
        1350px 180px 1px 0 rgba(232,196,124,0.25),
        200px 700px 1px 0 rgba(160,174,192,0.2),
        700px 850px 1px 0 rgba(232,196,124,0.2),
        1200px 650px 1px 0 rgba(160,174,192,0.25),
        500px 1100px 1px 0 rgba(232,196,124,0.2),
        1000px 1250px 1px 0 rgba(160,174,192,0.2),
        1500px 1050px 1px 0 rgba(232,196,124,0.25);
    animation: twinkle 7s ease-in-out 1s infinite alternate;
}

.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

@keyframes twinkle {
    0% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 2rem;
}

.hero-content > * {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 0.9s var(--ease-out) forwards;
}

.hero-label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.4em;
    color: var(--silver);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    animation-delay: 0.2s;
}

.hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-bottom: 1.5rem;
    animation-delay: 0.5s;
}

.title-main {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 9rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    background: linear-gradient(
        120deg,
        var(--gold) 0%,
        var(--gold-light) 35%,
        var(--gold) 50%,
        var(--gold-light) 65%,
        var(--gold) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeUp 0.9s var(--ease-out) 0.5s forwards, shimmer 6s ease-in-out 1.5s infinite;
    opacity: 0;
    transform: translateY(24px);
}

.title-sub {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 3.5vw, 2.4rem);
    font-weight: 300;
    letter-spacing: 0.35em;
    color: var(--silver);
    margin-top: -0.2em;
}

@keyframes shimmer {
    0%, 100% { background-position: 100% center; }
    50% { background-position: 0% center; }
}

.hero-tagline {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--text-secondary);
    letter-spacing: 0.15em;
    animation-delay: 0.8s;
}

.hero-rule {
    width: 40px;
    height: 1px;
    background: var(--gold-dim);
    margin: 2rem auto 0;
    animation-delay: 1s;
}

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

/* Scroll Cue */
.scroll-cue {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    z-index: 2;
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-decoration: none;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) 1.4s forwards;
    transition: color 0.3s;
}

.scroll-cue:hover { color: var(--gold); }

.scroll-line {
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, var(--silver-dim), transparent);
    animation: scrollDrift 2s ease-in-out infinite;
}

@keyframes scrollDrift {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50% { opacity: 0.8; transform: scaleY(1.15); }
}

/* ========================================
   SHOWCASE SECTION
   ======================================== */

.showcase {
    max-width: 1100px;
    margin: 0 auto;
    padding: 6rem 2rem 8rem;
}

.showcase-intro {
    text-align: center;
    margin-bottom: 4rem;
}

.showcase-eyebrow {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.4em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.showcase-heading {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--text);
    letter-spacing: 0.05em;
}

/* Game Cards Grid */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.showcase-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 1rem;
}

/* ========================================
   GAME CARD
   ======================================== */

.game-card {
    --accent: var(--gold);
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    position: relative;
    transition:
        transform 0.4s var(--ease-out),
        box-shadow 0.4s var(--ease-out),
        border-color 0.4s;
    opacity: 0;
    transform: translateY(30px);
}

.game-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 0.6s var(--ease-out),
        transform 0.6s var(--ease-out),
        box-shadow 0.4s var(--ease-out),
        border-color 0.4s;
}

/* Accent glow on hover */
.game-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 12px;
    background: var(--accent);
    opacity: 0;
    filter: blur(40px);
    z-index: -1;
    transition: opacity 0.4s;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.5);
}

.game-card:hover::after {
    opacity: 0.12;
}

/* Card Visual */
.card-visual {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-mid);
}

.card-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.5s var(--ease-out);
}

.game-card:hover .card-cover-img {
    transform: scale(1.05);
}

.card-emoji {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    z-index: 0;
}

.card-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to top, var(--bg-card) 0%, transparent 50%);
    pointer-events: none;
}

/* Accent bar at top of card */
.card-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    z-index: 3;
    opacity: 0.7;
    transition: opacity 0.3s;
}

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

/* Card Body */
.card-body {
    padding: 1.4rem 1.6rem 1.6rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.3;
    margin-bottom: 0.3rem;
    color: var(--text);
}

.card-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin-bottom: 0.8rem;
}

.card-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1.2rem;
    flex: 1;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.card-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.68rem;
    font-weight: 400;
    padding: 3px 10px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    letter-spacing: 0.03em;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.card-team {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem;
}

.footer-row {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-admin {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: color 0.3s;
}

.footer-admin:hover {
    color: var(--gold);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 740px) {
    .showcase-grid {
        grid-template-columns: 1fr;
    }

    .showcase {
        padding: 4rem 1.2rem 5rem;
    }
}

@media (max-width: 400px) {
    .hero-label {
        font-size: 0.65rem;
        letter-spacing: 0.3em;
    }

    .footer-row {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }
}
