/* ── 라이트 모드 ── */
:root, [data-theme="light"] {
    --bg: #f0f9fb;
    --bg2: #e4f4f7;
    --fg: #0d2b30;
    --muted: #5a8a92;
    --brand: #00b4c8;
    --brand-dark: #007a8a;
    --line: rgba(0,180,200,0.15);
    --nav-blur: rgba(240,249,251,0.92);
    --hero-grad: linear-gradient(160deg, #e8f7fa 0%, #f0f9fb 50%, #d8f2f7 100%);
    --hero-radial: rgba(0,180,200,0.12);
    --circle-color: rgba(0,180,200,0.12);
    --shadow: rgba(0,180,200,0.12);
    --btn-shadow: rgba(0,180,200,0.3);
    --btn-shadow-hover: rgba(0,180,200,0.4);
    --thumb-empty: rgba(0,180,200,0.08);
    --thumb-border: rgba(0,180,200,0.2);
    --tag-bg: rgba(0,180,200,0.06);
    --marquee-bg: rgba(0,180,200,0.04);
    --award-hover: rgba(0,180,200,0.06);
    --toggle-bg: rgba(0,180,200,0.1);
    --toggle-border: rgba(0,180,200,0.3);
}

/* ── 다크 모드 ── */
[data-theme="dark"] {
    --bg: #1a1a1e;
    --bg2: #222228;
    --fg: #f5f2ee;
    --muted: #aaa;
    --brand: #dfc9a8;
    --brand-dark: #c8b89a;
    --line: rgba(255,255,255,0.14);
    --nav-blur: rgba(26,26,30,0.92);
    --hero-grad: linear-gradient(160deg, #1a1a1e 0%, #1e1e24 50%, #1a1a1e 100%);
    --hero-radial: rgba(223,201,168,0.08);
    --circle-color: rgba(223,201,168,0.08);
    --shadow: rgba(0,0,0,0.3);
    --btn-shadow: rgba(223,201,168,0.15);
    --btn-shadow-hover: rgba(223,201,168,0.25);
    --thumb-empty: rgba(255,255,255,0.05);
    --thumb-border: rgba(255,255,255,0.08);
    --tag-bg: rgba(255,255,255,0.04);
    --marquee-bg: rgba(255,255,255,0.02);
    --award-hover: rgba(223,201,168,0.05);
    --toggle-bg: rgba(255,255,255,0.06);
    --toggle-border: rgba(255,255,255,0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; cursor: none !important; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--fg);
    font-family: 'Noto Sans KR', sans-serif;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

/* 터치 기기에서 커서 숨김 */
@media (pointer: coarse) {
    .cursor, .cursor-ring { display: none; }
    * { cursor: auto !important; }
}

/* ── 커스텀 커서 ── */
.cursor {
    position: fixed; width: 8px; height: 8px;
    background: var(--brand); border-radius: 50%;
    pointer-events: none; z-index: 9999;
    transform: translate(-50%, -50%);
    transition: background 0.3s;
}
.cursor-ring {
    position: fixed; width: 36px; height: 36px;
    border: 1px solid color-mix(in srgb, var(--brand) 50%, transparent);
    border-radius: 50%;
    pointer-events: none; z-index: 9998;
    transform: translate(-50%, -50%);
    transition: all 0.15s ease;
}

/* ── NAV ── */
nav {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 1000; padding: 20px 40px;
    display: flex; align-items: center; justify-content: space-between;
    transition: background 0.4s ease, padding 0.4s ease;
}
nav.scrolled {
    background: var(--nav-blur);
    backdrop-filter: blur(12px);
    padding: 14px 40px;
    border-bottom: 1px solid var(--line);
}
.nav-brand {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--fg);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px; letter-spacing: 3px;
    transition: color 0.3s;
}
.nav-brand img { width: 32px; height: 32px; object-fit: contain; }
.nav-right { display: flex; align-items: center; gap: 36px; }
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
    color: var(--muted); text-decoration: none;
    font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--brand-dark); }

/* ── 테마 토글 ── */
.theme-toggle-wrap { display: flex; align-items: center; gap: 8px; }
.theme-toggle-wrap svg { color: var(--muted); transition: color 0.3s; flex-shrink: 0; }
.theme-toggle {
    width: 44px; height: 24px;
    background: var(--toggle-bg);
    border: 1px solid var(--toggle-border);
    border-radius: 40px;
    position: relative;
    transition: background 0.3s, border-color 0.3s;
    flex-shrink: 0;
}
.theme-toggle::before {
    content: '';
    position: absolute; top: 3px; left: 3px;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--brand);
    transition: transform 0.3s ease, background 0.3s;
}
[data-theme="dark"] .theme-toggle::before { transform: translateX(20px); }

@media (max-width: 768px) {
    nav { padding: 16px 20px; }
    .nav-links { display: none; }
}

/* ── HERO ── */
#hero {
    min-height: 100dvh;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    text-align: center; position: relative; overflow: hidden;
    background: var(--hero-grad);
    transition: background 0.4s ease;
}
.hero-bg {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 60%, var(--hero-radial) 0%, transparent 70%);
    transition: background 0.4s;
}
.hero-circles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-circles::before {
    content: '';
    position: absolute; top: -200px; right: -200px;
    width: 600px; height: 600px; border-radius: 50%;
    border: 1px solid var(--circle-color); transition: border-color 0.4s;
}
.hero-circles::after {
    content: '';
    position: absolute; bottom: -150px; left: -150px;
    width: 500px; height: 500px; border-radius: 50%;
    border: 1px solid var(--circle-color); transition: border-color 0.4s;
}
.hero-content {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: center;
    padding-bottom: 100px;
}
.hero-eyebrow {
    font-size: 11px; letter-spacing: 6px; text-transform: uppercase;
    color: var(--brand); margin-bottom: 20px;
    opacity: 0; transform: translateY(20px);
    animation: fadeUp 0.8s ease 0.3s forwards;
}
.hero-logo {
    width: clamp(100px, 20vw, 180px); margin-bottom: 32px;
    opacity: 0; transform: translateY(20px);
    animation: fadeUp 0.8s ease 0.5s forwards;
    filter: drop-shadow(0 4px 20px var(--shadow));
    transition: filter 0.3s;
}
.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(80px, 14vw, 200px);
    line-height: 0.9; letter-spacing: 2px; color: var(--fg);
    opacity: 0; transform: translateY(30px);
    animation: fadeUp 1s ease 0.6s forwards;
    transition: color 0.3s;
}
.hero-desc {
    margin-top: 36px;
    font-size: clamp(13px, 1.3vw, 15px);
    color: var(--muted); font-weight: 300; line-height: 2; max-width: 520px;
    opacity: 0; transform: translateY(20px);
    animation: fadeUp 0.8s ease 0.9s forwards;
    transition: color 0.3s;
}
.hero-badge {
    margin-top: 28px;
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 20px; border: 1px solid var(--line);
    border-radius: 40px; font-size: 12px; color: var(--brand); letter-spacing: 2px;
    background: var(--tag-bg);
    opacity: 0; transform: translateY(20px);
    animation: fadeUp 0.8s ease 1.1s forwards;
    transition: border-color 0.3s, background 0.3s;
}
.hero-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); transition: background 0.3s; }

/* ── MARQUEE ── */
.marquee-wrap {
    overflow: hidden;
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    padding: 18px 0; background: var(--marquee-bg);
    transition: background 0.4s, border-color 0.4s;
}
.marquee-track { display: flex; gap: 60px; width: max-content; animation: marquee 20s linear infinite; }
.marquee-track.reverse { animation-direction: reverse; }
.marquee-item {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 13px; letter-spacing: 6px; color: var(--muted);
    white-space: nowrap; display: flex; align-items: center; gap: 60px;
    transition: color 0.3s;
}
.marquee-item::after { content: '✦'; color: var(--brand); font-size: 10px; transition: color 0.3s; }
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── 공통 섹션 ── */
.section-label {
    font-size: 10px; letter-spacing: 6px; text-transform: uppercase;
    color: var(--brand); margin-bottom: 60px;
    display: flex; align-items: center; gap: 16px; transition: color 0.3s;
}
.section-label::before { content: ''; width: 40px; height: 1px; background: var(--brand); transition: background 0.3s; }
.section-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(48px, 8vw, 100px);
    line-height: 1; letter-spacing: 1px; margin-bottom: 60px;
    color: var(--fg); transition: color 0.3s;
}
.wrap { max-width: 1100px; margin: 0 auto; width: 100%; }

/* ── GAMES ── */
#games { padding: 120px 40px; background: var(--bg); transition: background 0.4s; }
.game-viewer {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 60px; align-items: center; margin-bottom: 60px;
}
.game-image-wrap {
    aspect-ratio: 16/9; border-radius: 6px;
    overflow: hidden; position: relative; background: var(--line);
    box-shadow: 0 20px 60px var(--shadow); transition: box-shadow 0.3s;
}
.game-image-wrap img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease, opacity 0.4s ease;
}
.game-image-wrap:hover img { transform: scale(1.04); }
.game-info { display: flex; flex-direction: column; gap: 20px; }
.game-index { font-family: 'Bebas Neue', sans-serif; font-size: 13px; letter-spacing: 4px; color: var(--muted); transition: color 0.3s; }
.game-title { font-family: 'Bebas Neue', sans-serif; font-size: clamp(36px, 5vw, 64px); line-height: 1; letter-spacing: 1px; color: var(--fg); transition: color 0.3s; }
.game-desc { font-size: 14px; color: var(--muted); line-height: 1.9; font-weight: 300; transition: color 0.3s; }
.game-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.game-tag {
    padding: 5px 14px; border: 1px solid var(--line); border-radius: 40px;
    font-size: 11px; letter-spacing: 2px; color: var(--brand);
    text-transform: uppercase; background: var(--tag-bg);
    transition: border-color 0.3s, background 0.3s, color 0.3s;
}
.game-play-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 28px; background: var(--brand); color: #fff;
    border-radius: 4px; text-decoration: none;
    font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    align-self: flex-start; box-shadow: 0 8px 24px var(--btn-shadow);
}
[data-theme="dark"] .game-play-btn { color: #1a1a1e; }
.game-play-btn:hover { background: var(--brand-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 32px var(--btn-shadow-hover); }
[data-theme="dark"] .game-play-btn:hover { color: #1a1a1e; }
.game-play-btn.disabled { background: var(--line); color: var(--muted); pointer-events: none; box-shadow: none; }
.game-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 40px; border-top: 1px solid var(--line); transition: border-color 0.3s;
}
.game-nav-btn {
    display: flex; align-items: center; gap: 10px;
    background: none; border: 1px solid var(--line);
    color: var(--fg); padding: 12px 24px; border-radius: 4px;
    font-size: 13px; letter-spacing: 2px;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    font-family: 'Noto Sans KR', sans-serif;
}
.game-nav-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--tag-bg); }
.game-nav-btn:disabled { opacity: 0.2; pointer-events: none; }
.game-progress { display: flex; gap: 6px; align-items: center; }
.game-progress-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: background 0.3s, transform 0.3s; }
.game-progress-dot.active { background: var(--brand); transform: scale(1.4); }
.games-count {
    text-align: center; padding: 60px 0;
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    margin-top: 60px; transition: border-color 0.3s;
}
.games-count-num { font-family: 'Bebas Neue', sans-serif; font-size: clamp(80px, 15vw, 160px); line-height: 1; color: var(--brand); display: block; transition: color 0.3s; }
.games-count-label { font-size: 13px; letter-spacing: 4px; color: var(--muted); margin-top: 8px; transition: color 0.3s; }

@media (max-width: 768px) { .game-viewer { grid-template-columns: 1fr; gap: 32px; } }

/* ── 전체 프레임 그리드 ── */
.frames-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 60px;
    margin-bottom: 60px;
}
.frame-thumb {
    aspect-ratio: 16/9;
    overflow: hidden; border-radius: 4px;
    background: var(--line);
}
.frame-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease, filter 0.3s ease;
    filter: brightness(0.85) grayscale(15%);
}
.frame-thumb:hover img {
    transform: scale(1.06);
    filter: brightness(1) grayscale(0%);
}

/* 프레임 팝인 애니메이션 */
.frame-hidden {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.frame-visible {
    opacity: 1;
    transform: scale(1);
}

@media (max-width: 600px) {
    .frames-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
}

/* ── AWARDS ── */
#awards { padding: 120px 40px; background: var(--bg2); transition: background 0.4s; }
.award-item {
    display: flex; align-items: center; gap: 32px;
    padding: 28px 0; border-bottom: 1px solid var(--line);
    color: var(--fg); position: relative;
    border-radius: 8px;
    transform: translateX(0) scale(1);
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.award-item:hover {
    transform: translateX(6px) scale(1.005) !important;
    background: var(--award-hover);
    box-shadow: 0 2px 16px var(--shadow);
}
.award-thumb { width: 140px; height: 90px; object-fit: cover; border-radius: 2px; flex-shrink: 0; filter: grayscale(20%); transition: filter 0.4s ease; }
.award-item:hover .award-thumb { filter: grayscale(0%); }
.award-thumb-empty { width: 140px; height: 90px; border-radius: 2px; flex-shrink: 0; background: var(--thumb-empty); border: 1px solid var(--thumb-border); transition: background 0.3s, border-color 0.3s; }
.award-num { font-family: 'Bebas Neue', sans-serif; font-size: 13px; color: var(--brand); letter-spacing: 2px; min-width: 32px; transition: color 0.3s; }
.award-body { flex: 1; text-align: left; }
.award-rank {
    display: inline-block;
    padding: 3px 10px; border-radius: 40px;
    font-size: 11px; letter-spacing: 2px; font-weight: 700;
    background: var(--tag-bg); color: var(--brand);
    border: 1px solid var(--line); margin-bottom: 6px;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.award-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; color: var(--fg); transition: color 0.3s; }
.award-info { font-size: 13px; color: var(--muted); line-height: 1.6; transition: color 0.3s; }

/* ── Q&A ── */
#qna { padding: 120px 40px; background: var(--bg); transition: background 0.4s; }
.accordion-item { background: transparent !important; border: none !important; border-bottom: 1px solid var(--line) !important; transition: border-color 0.3s; }
.accordion-button {
    background: transparent !important; color: var(--fg) !important;
    font-size: clamp(15px, 2vw, 19px); font-weight: 400;
    padding: 28px 0; box-shadow: none !important; letter-spacing: 0.5px;
    transition: color 0.3s !important;
}
.accordion-button:not(.collapsed) { color: var(--brand-dark) !important; }
.accordion-button::after { opacity: 0.5; }
.accordion-button:not(.collapsed)::after { opacity: 1; }
[data-theme="dark"] .accordion-button::after { filter: invert(1); }
.accordion-body { color: var(--muted); font-size: 14px; line-height: 1.9; padding: 0 0 28px 0; transition: color 0.3s; }

/* ── FOOTER ── */
footer { padding: 80px 40px 60px; border-top: 1px solid var(--line); background: var(--bg2); transition: background 0.4s, border-color 0.3s; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 40px; }
.footer-logo { width: 60px; margin-bottom: 16px; }
.footer-name { font-family: 'Bebas Neue', sans-serif; font-size: 28px; letter-spacing: 6px; color: var(--fg); transition: color 0.3s; }
.footer-tagline { font-size: 12px; color: var(--muted); margin-top: 6px; letter-spacing: 2px; transition: color 0.3s; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links-imgs { display: flex; gap: 16px; align-items: center; }
.footer-links-imgs a { display: flex; align-items: center; justify-content: center; width: 60px; }
.footer-links-imgs img {
    width: 36px; height: 36px; object-fit: contain;
    filter: grayscale(0) opacity(1);
    transition: transform 0.2s ease, filter 0.2s ease;
}
.footer-links-imgs a:hover img { transform: scale(1.15); }
.footer-links-labels { display: flex; gap: 16px; }
.footer-link-label {
    width: 60px; text-align: center;
    font-size: 10px; letter-spacing: 1px;
    color: var(--muted); text-transform: uppercase;
    transition: color 0.2s; white-space: nowrap;
}
.footer-copy { font-size: 12px; color: var(--muted); opacity: 0.5; letter-spacing: 1px; margin-top: 40px; transition: color 0.3s; }

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

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

@media (max-width: 600px) {
    #games, #awards, #qna { padding: 80px 20px; }
    footer { padding: 60px 20px 40px; }
    .award-item { gap: 16px; }
    .award-thumb, .award-thumb-empty { width: 80px; height: 55px; }
}