/* ============================================================
   하트코드 — Crafted with Heart
   황혼(dusk)의 로맨스 : 웜 로즈 화이트 + 딥 플럼 잉크 + 석양 그라데이션
   ============================================================ */

:root {
  /* 색 — 4~6개 명명 팔레트 */
  --bg:        #FFF9F5;   /* 웜 로즈 화이트 (크림 아님) */
  --bg-warm:   #FBEAE3;   /* 섹션 대비용 옅은 피치 */
  --ink:       #34222E;   /* 딥 플럼 잉크 */
  --ink-soft:  #7A6069;   /* 보조 텍스트 */
  --rose:      #E15D80;   /* 메인 액센트 로즈 */
  --coral:     #FF9E7A;   /* 석양 코랄 */
  --lilac:     #9E86C9;   /* 황혼 라일락 */
  --gold:      #D99A38;   /* 따뜻한 골드 포인트 */
  --line:      rgba(52, 34, 46, .12);
  --line-soft: rgba(52, 34, 46, .07);

  --sunset: linear-gradient(118deg, var(--coral) 0%, var(--rose) 48%, var(--lilac) 100%);

  --font-display: "Gowun Batang", "Fraunces", "Nanum Myeongjo", serif;
  --font-body: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", sans-serif;

  --wrap: 1120px;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --radius: 20px;
}

/* ---------- reset & base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
em { font-style: italic; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

.skip-link {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: .6rem 1.2rem; border-radius: 0 0 12px 12px;
  z-index: 200; transition: top .2s;
}
.skip-link:focus { top: 0; }

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

/* ---------- 공통 eyebrow ---------- */
.section-eyebrow, .hero-eyebrow {
  font-family: var(--font-body);
  font-size: .74rem; font-weight: 700;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--rose);
  margin: 0 0 1.1rem;
}

/* ============================================================
   헤더
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .5rem; }
.brand-mark { color: var(--rose); font-size: 1.15rem; transform: translateY(1px); }
.brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.28rem;
  letter-spacing: -.01em;
}
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.2rem); }
.site-nav a { font-size: .95rem; font-weight: 500; color: var(--ink-soft); transition: color .18s; }
.site-nav a:hover { color: var(--ink); }
.nav-mail {
  padding: .42rem 1rem; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink) !important;
}
.nav-mail:hover { border-color: var(--rose); color: var(--rose) !important; }

/* ============================================================
   히어로
   ============================================================ */
.hero { position: relative; overflow: hidden; padding: clamp(4.5rem, 13vh, 9rem) 0 clamp(4rem, 9vh, 7rem); }
.hero-glow {
  position: absolute; inset: -30% -10% auto -10%; height: 130%;
  background:
    radial-gradient(46% 55% at 22% 20%, color-mix(in srgb, var(--coral) 42%, transparent), transparent 70%),
    radial-gradient(50% 55% at 82% 18%, color-mix(in srgb, var(--lilac) 40%, transparent), transparent 72%),
    radial-gradient(60% 60% at 60% 78%, color-mix(in srgb, var(--rose) 26%, transparent), transparent 74%);
  filter: blur(8px);
  pointer-events: none; z-index: 0;
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.hero-title {
  font-size: clamp(3.2rem, 12vw, 7rem);
  line-height: .98; letter-spacing: -.025em; margin: 0 0 1.6rem;
}
.hero-title span { display: block; }
.hero-title em {
  font-family: "Fraunces", var(--font-display); font-style: italic; font-weight: 400;
  background: var(--sunset); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.6vw, 1.6rem); line-height: 1.6; color: var(--ink-soft);
  margin-bottom: clamp(2.4rem, 5vw, 3.4rem);
}

/* 시그니처 — 오토메 선택지 */
.choicebox { max-width: 520px; }
.choicebox-cue {
  font-family: var(--font-display); font-size: .98rem; color: var(--ink-soft);
  margin-bottom: .9rem; padding-left: .3rem;
}
.choice {
  display: flex; align-items: center; gap: .85rem;
  padding: 1.05rem 1.4rem; margin-bottom: .8rem;
  background: color-mix(in srgb, #fff 62%, transparent);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  font-size: 1.04rem; font-weight: 500;
  transition: transform .22s cubic-bezier(.2,.7,.3,1), border-color .22s, box-shadow .22s, background .22s;
}
.choice-mark { color: var(--rose); font-size: .95rem; transition: transform .22s; }
.choice:hover, .choice:focus-visible {
  transform: translateX(8px);
  border-color: transparent;
  background: #fff;
  box-shadow: -6px 0 0 0 var(--rose), 0 14px 30px -18px rgba(225,93,128,.65);
}
.choice:hover .choice-mark, .choice:focus-visible .choice-mark { transform: translateX(2px) scale(1.15); }

/* ============================================================
   ABOUT
   ============================================================ */
.about { padding: clamp(4.5rem, 11vh, 8rem) 0; border-top: 1px solid var(--line-soft); }
.about-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about-title { font-size: clamp(1.9rem, 4.6vw, 3.1rem); line-height: 1.18; }
.about-body p { color: var(--ink-soft); margin-bottom: 1.4rem; font-size: 1.06rem; }
.about-body strong { color: var(--ink); font-weight: 600; }
.about-body em { font-family: var(--font-display); font-style: italic; color: var(--rose); }
.about-values { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .1rem; }
.about-values li {
  display: flex; align-items: baseline; gap: 1rem;
  padding: 1rem 0; border-top: 1px solid var(--line);
  color: var(--ink-soft); font-size: .98rem;
}
.about-values li:last-child { border-bottom: 1px solid var(--line); }
.v-key {
  font-family: "Fraunces", serif; font-style: italic; font-size: 1.05rem;
  color: var(--ink); min-width: 116px; flex-shrink: 0;
}

/* ============================================================
   GAMES
   ============================================================ */
.games { padding: clamp(4.5rem, 11vh, 8rem) 0 clamp(5rem, 12vh, 9rem); background: var(--bg-warm); }
.games-head { text-align: center; margin-bottom: clamp(3rem, 7vw, 5rem); }
.games-title { font-size: clamp(2rem, 5vw, 3.2rem); }

.game {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(1.8rem, 4vw, 3rem);
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -45px rgba(52,34,46,.4);
  margin-bottom: clamp(1.6rem, 3.5vw, 2.6rem);
}
.game:last-child { margin-bottom: 0; }

/* 그리드 아이템의 기본 min-width:auto 때문에 내부 가로 스크롤 갤러리가
   부모를 넘치는 것을 막는다 */
.game-key, .game-main { min-width: 0; }
.game-key { display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem; }
.game-icon {
  width: 112px; height: 112px; border-radius: 26px;
  box-shadow: 0 16px 30px -16px rgba(52,34,46,.5);
  border: 1px solid var(--line-soft);
}
.game-id { display: flex; flex-direction: column; gap: .55rem; }
.game-rating {
  display: inline-flex; align-items: center; justify-content: center;
  align-self: flex-start;
  font-size: .78rem; font-weight: 700; letter-spacing: .02em;
  padding: .18rem .55rem; border-radius: 7px;
  color: var(--ink); background: color-mix(in srgb, var(--gold) 26%, transparent);
}
.game-genre { font-size: .84rem; letter-spacing: .04em; color: var(--ink-soft); }

.game-name {
  font-size: clamp(1.7rem, 3.6vw, 2.3rem); display: flex; align-items: baseline;
  flex-wrap: wrap; gap: .7rem;
}
.game-name-en {
  font-family: "Fraunces", serif; font-style: italic; font-weight: 400;
  font-size: .58em; color: var(--rose);
}
.game-tagline { font-family: var(--font-display); font-size: 1.12rem; color: var(--ink); margin: .7rem 0 1rem; }
.game-desc { color: var(--ink-soft); font-size: 1.02rem; max-width: 60ch; }

/* 스크린샷 가로 스크롤 갤러리 */
.game-shots {
  display: flex; gap: .8rem; margin: 1.6rem 0;
  overflow-x: auto; padding-bottom: .6rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin; scrollbar-color: var(--rose) transparent;
}
.game-shots::-webkit-scrollbar { height: 7px; }
.game-shots::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--rose) 55%, transparent); border-radius: 99px; }
.shot {
  flex: 0 0 auto; scroll-snap-align: start;
  width: 128px; padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 10px 22px -14px rgba(52,34,46,.55);
  transition: transform .22s, box-shadow .22s;
}
.shot img { width: 128px; height: 277px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line-soft); }
.shot:hover, .shot:focus-visible { transform: translateY(-4px); box-shadow: 0 18px 30px -14px rgba(225,93,128,.6); }

/* 스토어 배지 */
.game-stores { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .4rem; }
.store {
  display: inline-flex; flex-direction: column; line-height: 1.25;
  padding: .62rem 1.3rem; border-radius: 12px;
  border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--bg);
  transition: transform .18s, box-shadow .18s, opacity .18s;
}
.store-tag { font-size: .7rem; letter-spacing: .06em; opacity: .72; text-transform: uppercase; }
.store-sub { font-size: 1rem; font-weight: 600; }
.store:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(52,34,46,.6); }
.store-soon {
  background: transparent; color: var(--ink-soft); border-style: dashed; border-color: var(--line);
  cursor: default;
}
.store-soon:hover { transform: none; box-shadow: none; }

/* ============================================================
   푸터
   ============================================================ */
.site-footer { background: var(--ink); color: color-mix(in srgb, #fff 82%, transparent); padding: clamp(3rem, 7vw, 5rem) 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2.5rem; }
.footer-brand .brand-mark { color: var(--coral); font-size: 1.5rem; }
.footer-slogan { font-family: "Fraunces", serif; font-style: italic; font-size: 1.5rem; color: #fff; margin: .4rem 0 1rem; }
.footer-copy { font-size: .85rem; opacity: .6; }
.footer-links { display: flex; gap: clamp(2.5rem, 6vw, 5rem); }
.footer-col { display: flex; flex-direction: column; gap: .6rem; }
.footer-col-title { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; opacity: .55; margin-bottom: .3rem; }
.footer-col a { font-size: .95rem; opacity: .85; transition: opacity .18s, color .18s; }
.footer-col a:hover { opacity: 1; color: var(--coral); }

/* ============================================================
   라이트박스
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  background: rgba(30, 16, 24, .82); backdrop-filter: blur(6px);
  padding: 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox-img { max-height: 86vh; max-width: min(420px, 84vw); border-radius: 18px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.7); }
.lightbox-close { position: absolute; top: 1.4rem; right: 1.6rem; }
.lightbox-close, .lightbox-nav {
  background: rgba(255,255,255,.14); color: #fff; border: 0; cursor: pointer;
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.3rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s, transform .18s;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,.28); transform: scale(1.08); }
.lightbox-nav { flex: 0 0 auto; }

/* ============================================================
   스크롤 리빌 애니메이션
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .05s; }
.reveal.d2 { transition-delay: .15s; }
.reveal.d3 { transition-delay: .28s; }
.reveal.d4 { transition-delay: .42s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   반응형
   ============================================================ */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .about-title br { display: none; }
  .game { grid-template-columns: 1fr; }
  .game-key { flex-direction: row; align-items: center; gap: 1.2rem; }
}
@media (max-width: 560px) {
  .site-nav { gap: 1rem; }
  .site-nav a:not(.nav-mail) { display: none; }
  .hero-title { font-size: clamp(2.8rem, 17vw, 4rem); }
  .footer-inner { flex-direction: column; gap: 2rem; }
}

/* ============================================================
   정책 페이지 (privacy.html / privacy-en.html)
   ============================================================ */
.legal-header { border-bottom: 1px solid var(--line); }
.legal { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(4rem, 10vw, 7rem); }
.legal-inner { max-width: 760px; }
.legal-back { display: inline-flex; align-items: center; gap: .4rem; color: var(--ink-soft); font-size: .92rem; margin-bottom: 2rem; }
.legal-back:hover { color: var(--rose); }
.legal-title { font-size: clamp(1.9rem, 5vw, 2.8rem); margin-bottom: .6rem; }
.legal-lang { display: flex; gap: .6rem; margin: 1.4rem 0 2.6rem; }
.legal-lang a {
  font-size: .85rem; padding: .35rem .95rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-soft);
}
.legal-lang a.is-current { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.legal-lang a:hover:not(.is-current) { border-color: var(--rose); color: var(--rose); }

.legal-body { font-size: 1rem; color: var(--ink); counter-reset: legal-sec; }
.legal-body .p { margin: 0 0 1rem; color: var(--ink-soft); line-height: 1.8; }
.legal-body .h {
  counter-increment: legal-sec;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--ink);
  margin: 2.6rem 0 1rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
  display: flex; gap: .7rem; align-items: baseline;
}
.legal-body .h::before {
  content: counter(legal-sec, decimal-leading-zero);
  font-family: "Fraunces", serif; font-style: italic; font-weight: 400;
  color: var(--rose); font-size: .95rem;
}
.legal-body .sub { font-weight: 700; font-size: 1.05rem; color: var(--ink); margin: 1.4rem 0 .6rem; }
.legal-body ul { margin: .2rem 0 1.2rem; padding-left: 1.3rem; color: var(--ink-soft); }
.legal-body li { margin-bottom: .5rem; line-height: 1.7; }
.legal-body .divider { border: 0; border-top: 1px solid var(--line-soft); margin: 2rem 0; }
.legal-intro { padding: 1.4rem 1.6rem; background: var(--bg-warm); border-radius: 14px; margin-bottom: 1.5rem; }
.legal-intro .p { margin-bottom: .6rem; color: var(--ink); }
.legal-intro .p:last-child { margin-bottom: 0; }
