/* 어썸게임즈 포털 — 색은 모두 아래 토큰으로만 쓴다 */
@font-face {
  font-family: 'Pretendard';
  src: url('fonts/pretendard.woff2') format('woff2-variations'), url('fonts/pretendard.woff2') format('woff2');
  font-weight: 45 920;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #fbfaff;
  --bg-subtle: #f3f1fb;
  --surface: #ffffff;
  --surface-2: #f6f5fc;
  --border: #e6e3f2;
  --border-strong: #cfcae4;
  --text: #1d1a2e;
  --text-muted: #5d5878;
  --text-subtle: #8a85a3;
  --brand: #5b4bff;
  --brand-hover: #4a39f0;
  --brand-subtle: #ece9ff;
  --brand-ink: #ffffff;
  --live: #17a35a;
  --live-subtle: #e1f6ea;
  --soon: #c26a00;
  --soon-subtle: #fff1dc;
  --pc: #2a6fdb;
  --pc-subtle: #e2edff;
  --focus: #ff7a3d;
  --scrim: rgba(18, 14, 40, .62);
  --on-scrim: #ffffff;
  --on-scrim-muted: rgba(255, 255, 255, .84);
  --shadow-sm: 0 1px 2px rgba(29, 26, 46, .06), 0 2px 6px rgba(29, 26, 46, .05);
  --shadow-md: 0 4px 12px rgba(29, 26, 46, .08), 0 12px 32px rgba(29, 26, 46, .08);
  --shadow-lg: 0 12px 24px rgba(29, 26, 46, .12), 0 24px 64px rgba(29, 26, 46, .14);
  /* 표지 그림이 없는 게임의 바탕 */
  --tone-sky-1: #8fd6ff; --tone-sky-2: #a3df7f;
  --tone-night-1: #141a33; --tone-night-2: #3a2c55;
  --tone-space-1: #0d1030; --tone-space-2: #3b2a7a;
  --tone-dusk-1: #241a14; --tone-dusk-2: #5b3a22;
  --tone-stars-1: #0f2347; --tone-stars-2: #ff5d8f;
  --tone-teal-1: #0e1f24; --tone-teal-2: #2a7f78;
  --tone-ink: #0b0e19;
  --tone-wood-1: #5a3417; --tone-wood-2: #c98f4e;
  --star-dot: rgba(255, 255, 255, .85);
  --radius: 20px;
  --radius-sm: 12px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --font: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #110f1c;
    --bg-subtle: #171427;
    --surface: #1c1930;
    --surface-2: #231f3a;
    --border: #2e2a48;
    --border-strong: #423c66;
    --text: #f2f0ff;
    --text-muted: #b8b3d6;
    --text-subtle: #8a85a8;
    --brand: #8b80ff;
    --brand-hover: #a39aff;
    --brand-subtle: #2a2552;
    --brand-ink: #110f1c;
    --live: #4fd88a; --live-subtle: #133524;
    --soon: #ffb357; --soon-subtle: #3a2a12;
    --pc: #7fb0ff; --pc-subtle: #172a4a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, .45);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.6; letter-spacing: -0.01em; word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left)); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: 16px; top: -64px; z-index: 50; padding: 8px 16px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* ───────── 머리 ───────── */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding-top: env(safe-area-inset-top); }
.top__in { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* 회사 워드마크(img/awesomedev-logo.png — 회사 홈페이지의 336×80 스프라이트, 위: 흰 글자 · 아래: 검은 글자)의
   아래 절반을 마스크로 써서 색은 토큰을 따른다 */
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; }
.brand__logo, .foot__logo {
  display: block; aspect-ratio: 336 / 40; background: var(--text);
  -webkit-mask: url('img/awesomedev-logo.png') no-repeat 0 100% / 100% 200%; mask: url('img/awesomedev-logo.png') no-repeat 0 100% / 100% 200%;
}
.brand__logo { height: 20px; }
.brand__name { padding-left: 12px; border-left: 1px solid var(--border-strong); font-size: 18px; font-weight: 700; line-height: 20px; letter-spacing: -0.02em; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 8px 12px; border-radius: 999px; color: var(--text-muted); font-size: 15px; font-weight: 600; text-decoration: none; transition: background 160ms, color 160ms; }
.nav a:hover { background: var(--brand-subtle); color: var(--brand); }
.nav__ext svg { width: 14px; height: 14px; opacity: .7; }
.menu-btn { display: none; width: 44px; height: 44px; margin-left: auto; place-items: center; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--text); cursor: pointer; transition: background 160ms; }
.menu-btn:hover { background: var(--surface-2); }
.menu-btn svg { width: 24px; height: 24px; }
.menu-btn__close, .menu-btn[aria-expanded="true"] .menu-btn__open { display: none; }
.menu-btn[aria-expanded="true"] .menu-btn__close { display: inline; }

/* ───────── 버튼·배지 ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px;
  border: 0; border-radius: 999px; font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), background 160ms, box-shadow 160ms;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn--primary:hover { background: var(--brand-hover); transform: translateY(-2px); }
.btn--primary:active { transform: translateY(0); }
.btn--soft { background: var(--brand-subtle); color: var(--brand); }
.btn--soft:hover { background: color-mix(in srgb, var(--brand-subtle) 70%, var(--brand) 12%); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn[aria-disabled="true"] { background: var(--surface-2); color: var(--text-subtle); box-shadow: none; cursor: default; transform: none; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-muted); cursor: pointer; }
.icon-btn:hover { color: var(--brand); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.2; }
.badge svg { width: 14px; height: 14px; }
.badge--live { background: var(--live-subtle); color: var(--live); }
.badge--soon { background: var(--soon-subtle); color: var(--soon); }
.badge--pc { background: var(--pc-subtle); color: var(--pc); }
.badge--plat { background: var(--surface-2); color: var(--text-muted); }

/* ───────── 표지 그림 ───────── */
.cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover--art { display: grid; place-items: center; }
.cover--art .cover__icon { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: auto; height: 60%; aspect-ratio: 1; object-fit: contain; border-radius: 24%; box-shadow: var(--shadow-lg); }
.cover--art .cover__word { padding-inline: 16px; text-align: center; font-size: clamp(20px, 2.6vw, 32px); font-weight: 900; letter-spacing: 0.04em; color: var(--on-scrim); text-shadow: 0 4px 16px rgba(0, 0, 0, .4); }
.tone-sky { background: linear-gradient(160deg, var(--tone-sky-1), var(--tone-sky-2)); }
.tone-night { background: linear-gradient(160deg, var(--tone-night-1), var(--tone-night-2)); }
.tone-space { background: radial-gradient(circle at 30% 30%, var(--tone-space-2), var(--tone-space-1) 70%); }
.tone-dusk { background: linear-gradient(160deg, var(--tone-dusk-1), var(--tone-dusk-2)); }
.tone-stars { background: radial-gradient(circle at 80% 110%, var(--tone-stars-2), transparent 55%), linear-gradient(160deg, var(--tone-stars-1), var(--tone-space-1)); }
.tone-teal { background: linear-gradient(160deg, var(--tone-teal-1), var(--tone-teal-2)); }
.tone-space::before, .tone-stars::before {
  content: ''; position: absolute; inset: 0; opacity: .7;
  background-image: radial-gradient(var(--star-dot) 1px, transparent 1.5px), radial-gradient(var(--star-dot) 1px, transparent 1.5px);
  background-size: 48px 48px, 76px 76px; background-position: 0 0, 24px 36px;
}

/* ───────── 대표 배너 ───────── */
.hero { padding-block: 24px 8px; }
.hero__stage { position: relative; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 21 / 9; background: var(--surface-2); }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 500ms var(--ease-out), visibility 500ms; }
.slide.on { opacity: 1; visibility: visible; }
.slide .cover { position: absolute; inset: 0; aspect-ratio: auto; }
.slide .cover img { object-position: 50% 0; }
.slide.on .cover img, .slide.on .cover__icon { animation: kenburns 9s ease-out both; }
@keyframes kenburns { from { transform: scale(1.06); } to { transform: scale(1); } }
.slide__body {
  position: absolute; inset: auto 0 0 0; display: grid; gap: 8px; justify-items: start; padding: 48px 32px 32px;
  background: linear-gradient(to top, var(--scrim), transparent); color: var(--on-scrim);
}
.slide__body .badges { display: flex; gap: 8px; flex-wrap: wrap; }
.slide__title { font-size: clamp(28px, 4.4vw, 48px); font-weight: 900; line-height: 1.15; letter-spacing: -0.03em; }
.slide__line { max-width: 40ch; color: var(--on-scrim-muted); font-size: clamp(15px, 1.6vw, 18px); }
.slide__body .btn { margin-top: 8px; }
.hero__ctrl { display: flex; align-items: center; justify-content: center; gap: 16px; padding-top: 16px; }
.hero__dots { display: flex; gap: 8px; }
.dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; background: var(--border-strong); cursor: pointer; transition: width 300ms var(--ease-out), background 300ms; }
.dot[aria-selected="true"] { width: 32px; background: var(--brand); }
.dot:hover { background: var(--text-subtle); }

/* ───────── 구역 ───────── */
.sec { padding-block: 48px; }
.sec--tint { background: var(--bg-subtle); }
.sec__head { display: grid; gap: 4px; margin-bottom: 24px; }
.sec__head h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.3; }
.sec__sub { color: var(--text-muted); max-width: 68ch; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chip { min-height: 40px; padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-muted); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: background 160ms, color 160ms, border-color 160ms; }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }

/* ───────── 게임 카드 ───────── */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid--wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; height: 100%; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform 240ms var(--ease-out), box-shadow 240ms var(--ease-out), border-color 240ms;
}
.card--live:hover, .card--live:focus-within { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card--live:hover .cover img, .card--live:hover .cover__icon { transform: scale(1.04); }
.card .cover img, .card .cover__icon { transition: transform 400ms var(--ease-out); }
.card__state { position: absolute; left: 12px; top: 12px; }
.card__body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 16px 20px 20px; }
.card__title { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; }
.card__line { color: var(--text-muted); font-size: 15px; }
.card__desc { color: var(--text-subtle); font-size: 14px; max-width: 68ch; }
.card__meta { display: flex; gap: 4px; flex-wrap: wrap; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; }
.card__genre { color: var(--text-subtle); font-size: 13px; font-weight: 600; }
/* 카드 전체를 눌러도 게임이 열린다 (버튼 링크를 카드 크기로 늘림) */
.card--live .stretch::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); }
.card--soon .cover, .card--pc .cover { filter: saturate(.9); }

.empty { display: grid; justify-items: center; gap: 16px; padding: 48px 16px; text-align: center; color: var(--text-muted); border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.empty b { color: var(--text); }

/* ───────── 정책 문서 (privacy.html) ───────── */
.doc { display: grid; gap: 16px; max-width: 800px; padding-block: 48px 64px; }
.doc h1 { font-size: clamp(26px, 3.4vw, 32px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.3; }
.doc h2 { margin-top: 24px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.4; }
.doc__lead, .doc p, .doc li { color: var(--text-muted); max-width: 68ch; }
.doc ul { display: grid; gap: 8px; margin: 0; padding-left: 20px; }
.doc li b { color: var(--text); font-weight: 600; }
.doc a:not(.btn) { color: var(--brand); text-underline-offset: 3px; }
.doc .btn { margin-top: 24px; }

/* ───────── 광고 ───────── */
.ad { padding-block: 24px; }
.ad .wrap { display: grid; gap: 8px; }
.ad__label { color: var(--text-subtle); font-size: 12px; letter-spacing: 0.04em; }
.ad .adsbygoogle { display: block; min-height: 96px; border-radius: var(--radius-sm); background: var(--surface-2); overflow: hidden; }
/* 채울 광고가 없으면 자리째 숨긴다 (애드센스가 data-ad-status 를 붙인다) */
.ad:has(.adsbygoogle[data-ad-status="unfilled"]) { display: none; }

/* ───────── 바닥 (회사 홈페이지와 같은 구성) ───────── */
.foot { padding-block: 48px calc(48px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface); color: var(--text-subtle); font-size: 13px; }
.foot__in { display: grid; gap: 16px; justify-items: start; }
.foot__logo { height: 16px; background: var(--text-muted); }
.foot__logo:hover { background: var(--text); }
.foot__nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot__nav a { display: inline-flex; align-items: center; min-height: 32px; color: var(--text-muted); font-size: 14px; text-decoration: none; }
.foot__nav a strong { color: var(--text); font-weight: 600; }
.foot__nav a:hover, .foot__nav a:hover strong { color: var(--brand); text-decoration: underline; text-underline-offset: 4px; }
.foot__info { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; max-width: 960px; }
.foot__info li + li::before { content: ''; display: inline-block; width: 1px; height: 10px; margin-inline: 12px; background: var(--border-strong); vertical-align: -1px; }
.foot__info a, .foot__fine a { color: var(--text-muted); }
.foot__info a:hover, .foot__fine a:hover { color: var(--brand); }
.foot__fine { max-width: 68ch; }
.foot__copy { color: var(--text-subtle); }

/* ───────── 작은 화면 ───────── */
@media (max-width: 720px) {
  .top__in { gap: 12px; }
  /* 작은 화면은 회사 홈페이지처럼 메뉴 버튼 → 펼침 목록 */
  .menu-btn { display: grid; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px max(16px, env(safe-area-inset-left)) 16px; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md);
  }
  .nav:not(.open) { display: none; }
  .nav a { min-height: 48px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 16px; }
  .brand__logo { height: 18px; }
  .brand__name { font-size: 16px; }
  .hero { padding-top: 16px; }
  .hero__stage { aspect-ratio: 4 / 5; border-radius: 24px; }
  .slide__body { padding: 32px 20px 24px; }
  .sec { padding-block: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* 로고형 표지(부검·INQUEST)는 세로 배너에서 잘리지 않게 통째로 */
.tone-ink { background: var(--tone-ink); }
@media (max-width: 720px) {
  .slide .cover--contain img { object-fit: contain; object-position: 50% 28%; }
}
.tone-wood { background: radial-gradient(circle at 70% 20%, var(--tone-wood-2), var(--tone-wood-1) 70%); }
