/* ==========================================================================
   Danbi Entertainment — 사이트 공통 스타일
   외부 CDN·프레임워크를 쓰지 않는 단일 스타일시트입니다.
   ========================================================================== */

:root {
    --bg: #08090d;
    --bg-muted: #0d0f16;
    --surface: #12141d;
    --surface-raised: #171a25;
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.18);

    --text: #e9ebf3;
    --text-muted: #9aa1b6;
    --text-dim: #6d7488;

    --accent: #6ee7ff;
    --accent-2: #a78bfa;
    --accent-ink: #05070c;

    --shell: 1140px;
    --radius: 14px;
    --radius-sm: 8px;

    --font-sans: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI",
                 "Noto Sans KR", "Malgun Gothic", "Hiragino Kaku Gothic ProN",
                 "Noto Sans JP", "Yu Gothic UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
}

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

html {
    scroll-behavior: smooth;
    /* 고정 헤더에 앵커 대상이 가려지지 않도록. */
    scroll-padding-top: 88px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

h1, h2, h3 {
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin: 0;
}

p {
    margin: 0;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.shell {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: 24px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 12px 20px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
    border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
    left: 0;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* --------------------------------------------------------------- header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(8, 9, 13, 0.82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 68px;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex: 0 0 auto;
}

.wordmark__mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: linear-gradient(140deg, var(--accent), var(--accent-2));
    color: var(--accent-ink);
    font-weight: 800;
    font-size: 17px;
}

.wordmark__text {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.site-nav {
    display: flex;
    gap: 26px;
    margin-inline-start: auto;
    font-size: 14px;
}

.site-nav a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

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

.lang-switch {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 999px;
    flex: 0 0 auto;
}

.lang-switch__item {
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease;
}

.lang-switch__item:hover {
    color: var(--text);
}

.lang-switch__item.is-current {
    background: var(--surface-raised);
    color: var(--text);
}

/* ----------------------------------------------------------------- hero */

.hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.hero__glow {
    position: absolute;
    inset: -40% -10% auto -10%;
    height: 620px;
    background:
        radial-gradient(48% 60% at 22% 30%, rgba(110, 231, 255, 0.20), transparent 70%),
        radial-gradient(45% 55% at 78% 22%, rgba(167, 139, 250, 0.20), transparent 70%);
    filter: blur(6px);
    pointer-events: none;
}

.hero__inner {
    position: relative;
    padding-block: clamp(80px, 13vw, 150px);
    max-width: 900px;
}

.hero__eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.24em;
    color: var(--accent);
    margin-bottom: 22px;
}

.hero__title {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800;
}

.hero__subtitle {
    margin-top: 24px;
    max-width: 620px;
    font-size: clamp(1rem, 1.6vw, 1.13rem);
    color: var(--text-muted);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 38px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn--primary {
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    color: var(--accent-ink);
}

.btn--ghost {
    border-color: var(--border-strong);
    color: var(--text);
}

.btn--ghost:hover {
    background: var(--surface);
}

/* ---------------------------------------------------------------- stats */

.stats {
    border-bottom: 1px solid var(--border);
    background: var(--bg-muted);
}

.stats__inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    padding-block: 30px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat__value {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.stat__label {
    font-size: 13px;
    color: var(--text-dim);
}

/* ------------------------------------------------------------- sections */

.section {
    padding-block: clamp(64px, 9vw, 104px);
}

.section--muted {
    background: var(--bg-muted);
    border-block: 1px solid var(--border);
}

.section__head {
    margin-bottom: 44px;
}

.section__title {
    font-size: clamp(1.6rem, 3.4vw, 2.3rem);
    font-weight: 800;
}

.section__subtitle {
    margin-top: 10px;
    color: var(--text-muted);
}

/* ------------------------------------------------------------ game grid */

.game-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 20px;
}

.game-card {
    display: flex;
    flex-direction: column;
    padding: 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.game-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.game-card__release {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--accent);
}

.game-card__title {
    margin-top: 12px;
    font-size: 1.25rem;
    font-weight: 700;
}

.game-card__summary {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 15px;
}

.game-card__meta {
    margin: 22px 0 0;
    display: grid;
    gap: 6px;
    font-size: 13px;
}

.game-card__meta > div {
    display: flex;
    gap: 10px;
}

.game-card__meta dt {
    flex: 0 0 74px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding-top: 2px;
}

.game-card__meta dd {
    margin: 0;
    color: var(--text-muted);
}

.game-card__status {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.game-card__status span {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ------------------------------------------------- 웹 미니게임 (배너 · 목록) */

.minigame-banner {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-top: 28px;
    padding: 22px 26px;
    background: linear-gradient(120deg, rgba(110, 231, 255, 0.10), rgba(167, 139, 250, 0.10));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.minigame-banner:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.minigame-banner__art {
    font-size: 2.2rem;
    line-height: 1;
    flex: 0 0 auto;
}

.minigame-banner__body {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.minigame-banner__eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--accent);
}

.minigame-banner__title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
}

.minigame-banner__text {
    font-size: 14px;
    color: var(--text-muted);
}

.minigame-banner__cta {
    margin-inline-start: auto;
    flex: 0 0 auto;
    white-space: nowrap;
}

.minigame-more {
    margin-top: 14px;
    text-align: right;
    font-size: 14px;
}

.minigame-more a {
    color: var(--text-muted);
    text-decoration: none;
}

.minigame-more a:hover {
    color: var(--accent);
}

.webgame-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* 온라인 게임 카드는 더 넓게 */
.webgame-grid--online {
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
}

@media (max-width: 480px) {
    .webgame-grid--online {
        grid-template-columns: 1fr;
    }
}

.webgame-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    transition: border-color 0.18s ease, transform 0.18s ease;
}

a.webgame-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.webgame-card__thumb {
    display: grid;
    place-items: center;
    /* 세로형 게임 화면 전체가 보이도록 고정 높이 상자에 통째로 축소해 담는다.
       (aspect-ratio + max-height 조합은 img 의 height:100% 가 확정 높이로
        해석되지 않아 원본 크기로 그려지고 위쪽만 잘려 보였다 — 고정 높이가 답이다.) */
    height: 190px;
    overflow: hidden;
    background:
        radial-gradient(60% 90% at 30% 20%, rgba(110, 231, 255, 0.28), transparent 65%),
        radial-gradient(60% 90% at 75% 75%, rgba(167, 139, 250, 0.28), transparent 65%),
        var(--surface-raised);
    border-bottom: 1px solid var(--border);
}

.webgame-card__thumb--soon {
    filter: grayscale(1);
    opacity: 0.55;
}

.webgame-card__emoji {
    font-size: 3rem;
    line-height: 1;
}

/* 게임 스크린샷 썸네일 — 화면 전체가 보여야 게임을 알아볼 수 있다.
   이미지 요소 자체를 썸네일 높이에 맞춰 세로형 비율 그대로 축소하고(가로는 자동),
   남는 좌우는 썸네일 배경 그라데이션이 채운다. */
.webgame-card__shot {
    /* 썸네일 상자의 고정 높이(190px)를 그대로 받는다.
       height:100% 는 그리드 auto 행에서 무효가 되어 원본 크기로 그려졌다. */
    height: inherit;
    width: auto;
    max-width: 100%;
    /* 가로형 스크린샷(퇴근 런)이 max-width 에 걸려도 비율을 유지하게 한다 */
    object-fit: contain;
    display: block;
}

.webgame-card__body {
    display: grid;
    gap: 8px;
    padding: 20px 22px 22px;
    position: relative;
}

.webgame-card__badge {
    position: absolute;
    top: -13px;
    right: 18px;
    padding: 3px 12px;
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    color: var(--accent-ink);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    border-radius: 999px;
}

.webgame-card__title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
}

.webgame-card__title--soon {
    color: var(--text-dim);
    font-size: 1rem;
}

.webgame-card__subtitle {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--accent);
}

.webgame-card__tagline {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.65;
}

.webgame-card__cta {
    justify-self: start;
    margin-top: 8px;
}

.webgame-card--soon {
    pointer-events: none;
    border-style: dashed;
}

@media (max-width: 640px) {
    .minigame-banner {
        flex-wrap: wrap;
    }

    .minigame-banner__cta {
        margin-inline-start: 0;
    }
}

/* ------------------------------------------------------------ news list */

.news-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border);
}

.news-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    padding-block: 26px;
    border-bottom: 1px solid var(--border);
}

.news-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
    color: var(--text-dim);
    font-size: 13px;
}

.news-item__meta time {
    font-family: var(--font-mono);
}

.news-item__category {
    padding: 2px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 11px;
}

.news-item__title {
    font-size: 1.05rem;
    font-weight: 700;
}

.news-item__summary {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 15px;
}

/* ---------------------------------------------------------------- about */

.about__body {
    max-width: 760px;
    display: grid;
    gap: 18px;
    color: var(--text-muted);
    font-size: 1.02rem;
}

/* --------------------------------------------------------------- history */

.history__title {
    margin-top: 56px;
    font-size: 1.1rem;
    font-weight: 700;
}

.history {
    list-style: none;
    margin: 22px 0 0;
    padding: 0 0 0 22px;
    max-width: 760px;
    border-inline-start: 1px solid var(--border);
}

.history__item {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    padding-block: 11px;
}

.history__item::before {
    content: "";
    position: absolute;
    left: -26px;
    top: 20px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.history__date {
    flex: 0 0 84px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent);
}

.history__text {
    color: var(--text-muted);
    font-size: 15px;
}

/* -------------------------------------------------------------- contact */

.contact__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.contact__action {
    margin: 0;
}

/* ------------------------------------------------------- legal (privacy) */

.legal__inner {
    max-width: 820px;
}

.legal__back a {
    color: var(--text-dim);
    font-size: 14px;
    text-decoration: none;
}

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

.legal__title {
    margin-top: 18px;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    font-weight: 800;
}

.legal__effective {
    margin-top: 10px;
    color: var(--text-dim);
    font-size: 14px;
}

.legal__note {
    margin-top: 22px;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 14px;
}

.legal__body {
    margin-top: 40px;
    color: var(--text-muted);
    font-size: 15px;
}

.legal__body > p {
    margin-block: 14px;
}

.legal__body h2 {
    margin-top: 46px;
    margin-bottom: 14px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}

.legal__body ol,
.legal__body ul {
    margin-block: 12px;
    padding-inline-start: 22px;
    display: grid;
    gap: 10px;
}

.legal__body ul ul,
.legal__body ol ul {
    margin-top: 10px;
}

.legal__body li::marker {
    color: var(--text-dim);
}

.legal__contact {
    margin-block: 20px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: grid;
    gap: 8px;
    font-size: 14px;
}

.legal__contact > div {
    display: flex;
    gap: 14px;
}

.legal__contact dt {
    flex: 0 0 132px;
    color: var(--text-dim);
}

.legal__contact dd {
    margin: 0;
    color: var(--text);
}

/* ----------------------------------------------------------- error page */

.error-page__inner {
    max-width: 620px;
    text-align: center;
    margin-inline: auto;
    padding-block: 40px;
}

.error-page__code {
    font-family: var(--font-mono);
    font-size: 3.4rem;
    font-weight: 800;
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.error-page__action {
    margin-top: 32px;
}

/* --------------------------------------------------------------- footer */

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-muted);
    padding-top: 56px;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
    padding-bottom: 40px;
}

.site-footer__legal-name {
    font-weight: 700;
    margin-bottom: 16px;
}

.company-facts {
    margin: 0;
    display: grid;
    gap: 6px;
    font-size: 14px;
}

.company-facts > div {
    display: flex;
    gap: 14px;
}

.company-facts dt {
    flex: 0 0 76px;
    color: var(--text-dim);
}

.company-facts dd {
    margin: 0;
    color: var(--text-muted);
}

.company-facts a {
    color: var(--text-muted);
}

.site-footer__links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

.footer-privacy {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 2px;
}

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

.site-footer__langs {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
}

.site-footer__langs-label {
    color: var(--text-dim);
}

.site-footer__langs a {
    color: var(--text-muted);
    text-decoration: none;
}

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

.site-footer__copyright {
    padding-block: 22px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 12px;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 860px) {
    .site-header__inner {
        flex-wrap: wrap;
        gap: 14px;
        padding-block: 12px;
    }

    .site-nav {
        order: 3;
        width: 100%;
        margin-inline-start: 0;
        gap: 20px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .lang-switch {
        margin-inline-start: auto;
    }

    .news-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .legal__contact > div,
    .company-facts > div {
        flex-direction: column;
        gap: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
    }
}
