/* ==========================================================================
   4th May Games — 포스메이게임즈 (단일 페이지)
   ========================================================================== */

:root {
  --ink: #191817;
  --ink-2: #45403c;
  --muted: #7b746e;
  --line: #e9e4dd;
  --bg: #ffffff;
  --soft: #faf7f3;
  --accent: #3FB5B5;   /* 로고 청록 */
  --brand-navy: #5A5F86; /* 로고 남보라 */
  --wrap: 1060px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow: 0 2px 6px rgba(25,24,23,.05), 0 20px 44px rgba(25,24,23,.10);
  --gap-block: clamp(44px, 6vw, 72px);   /* 로고↔아이콘, 아이콘↔푸터 간격 */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Segoe UI", Roboto, "Malgun Gothic", sans-serif;
  font-size: 16px; line-height: 1.75; color: var(--ink);
  min-height: 100vh;
  background:
    radial-gradient(60% 60% at 12% 0%, #e9f7f7 0%, rgba(233,247,247,0) 62%),
    radial-gradient(55% 55% at 90% 4%, #eeeff8 0%, rgba(238,239,248,0) 60%),
    var(--bg);
  background-attachment: fixed;
  word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 64px; display: flex; align-items: center; }
.logo img { height: 30px; width: auto; }
.logo-text { font-weight: 800; font-size: 15px; letter-spacing: .14em; }

/* ---------- 메인 스테이지 ---------- */
/* 홈에서는 큰 타이틀이 곧 로고이므로 상단 헤더를 숨깁니다 */
.home .site-header { display: none; }


.stage {
  padding: clamp(48px, 7vw, 80px) 0 var(--gap-block);
  text-align: center;
}
.brand { margin: 0; line-height: 0; }
.brand img {
  width: 100%; height: auto;
  max-width: min(100%, 420px);
  margin-inline: auto;
}

.icon-grid {
  list-style: none; padding: 0;
  margin: var(--gap-block) auto 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 4vw, 48px);
  max-width: 720px;
}
.icon-btn {
  display: grid; justify-items: center; gap: 14px; width: 100%;
  padding: 0; background: none; border: 0; cursor: pointer;
}
.icon-img {
  display: block; width: 100%; aspect-ratio: 1/1;
  border-radius: 24%; overflow: hidden;
  box-shadow: 0 2px 5px rgba(25,24,23,.06), 0 14px 30px rgba(25,24,23,.13);
  background: linear-gradient(135deg, #f4efe8 0%, #ece5db 100%);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease);
}
.icon-img img { width: 100%; height: 100%; object-fit: cover; }
.icon-btn:hover .icon-img,
.icon-btn:focus-visible .icon-img { transform: translateY(-6px); box-shadow: 0 4px 8px rgba(25,24,23,.07), 0 22px 44px rgba(25,24,23,.18); }
.icon-btn:active .icon-img { transform: translateY(-2px); }
.icon-name { font-size: clamp(13.5px, 1.6vw, 15.5px); font-weight: 700; color: var(--brand-navy); letter-spacing: -.01em; }

/* ---------- 게임 설명 모달 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 20px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(25,24,23,.55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: fade .22s var(--ease);
}
.modal-panel {
  position: relative; width: min(100%, 560px); max-height: calc(100vh - 40px);
  overflow-y: auto; background: #fff; border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,.32);
  animation: pop .28s var(--ease);
}
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255,255,255,.9); cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.modal-close svg { width: 17px; height: 17px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.modal-close:hover { background: #fff; transform: scale(1.06); }

.modal-art {
  position: relative; overflow: hidden; aspect-ratio: 1024 / 500;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(135deg, #f4efe8 0%, #ece5db 100%);
}
.modal-art img { width: 100%; height: 100%; object-fit: cover; }
.modal-art.is-missing::after {
  content: attr(data-label) " 이미지";
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 13px; font-weight: 600; color: #b6aa9c;
}

.modal-body { padding: 26px 28px 30px; text-align: left; }
.modal-body h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; color: var(--brand-navy); }
.modal-en { margin-top: 4px; font-size: 12.5px; color: var(--muted); letter-spacing: .06em; }
.modal-tagline { margin-top: 16px; font-size: 16px; font-weight: 600; }
.modal-desc { margin-top: 10px; font-size: 15px; line-height: 1.85; color: var(--ink-2); }
.modal-award {
  margin-top: 16px; padding: 9px 13px; border-radius: 11px;
  background: #fdf6ec; border: 1px solid #f3e3cc;
  font-size: 12.5px; font-weight: 600; color: #8a6428; line-height: 1.6;
}
.store-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.store-badge { display: inline-block; border-radius: 10px; transition: transform .18s var(--ease); }
.store-badge img { height: 44px; width: auto; }
.store-badge:hover { transform: translateY(-2px); }

@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98) } to { opacity: 1; transform: none } }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 28px;
  padding: 13px 24px; border-radius: 999px; background: var(--ink); color: #fff;
  font-size: 15px; font-weight: 600; line-height: 1;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* ---------- 푸터 ---------- */
.site-footer { background: transparent; }
.footer-bottom {
  display: grid; justify-items: center; gap: 6px;
  padding: 0 0 clamp(18px, 2.5vw, 28px);
  text-align: center;
}
.footer-bottom p { margin: 0; }
.footer-bottom .copy { font-size: 12.5px; color: #a49c94; }
.footer-bottom a { color: inherit; }
.footer-bottom a:hover { color: var(--accent); }

/* ---------- 모션 / 반응형 ---------- */
@media (max-width: 560px) {
  .brand img { max-width: 250px; }
  .icon-grid { gap: 16px; }
  .icon-name { font-size: 13px; }
  .modal { padding: 12px; }
  .modal-panel { border-radius: 18px; }
  .modal-art { border-radius: 18px 18px 0 0; }
  .modal-body { padding: 22px 20px 26px; }
  .store-badge img { height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 개인정보처리방침 ---------- */
.legal { padding: clamp(52px, 7vw, 84px) 0 clamp(64px, 8vw, 96px); }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(28px, 4.2vw, 40px); font-weight: 800; letter-spacing: -.025em; line-height: 1.3; }
.legal-date { margin-top: 10px; font-size: 14px; color: var(--muted); }
.legal h2 {
  margin: 42px 0 12px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 18px; font-weight: 700; letter-spacing: -.01em; line-height: 1.5;
}
.legal p { margin-bottom: 14px; font-size: 15.5px; line-height: 1.9; color: var(--ink-2); }
.legal ul { margin: 0 0 16px; padding: 0; list-style: none; }
.legal ul li {
  position: relative; padding-left: 18px; margin-bottom: 8px;
  font-size: 15.5px; line-height: 1.85; color: var(--ink-2);
}
.legal ul li::before {
  content: ""; position: absolute; left: 2px; top: 13px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal-back { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.legal-back a { color: var(--muted); text-decoration: none; font-weight: 600; }
.legal-back a:hover { color: var(--ink); }
