/* khclabs.com: 회사 사이트 (index·support·privacy가 같이 쓴다) */
:root {
  color-scheme: dark;
  --bg: #0c0d10;
  --bg-2: #13151a;
  --card: #16181e;
  --card-2: #1c1f27;
  --line: #ffffff14;
  --line-2: #ffffff24;
  --ink: #f2efe6;
  --muted: #a4a29a;
  --dim: #74726b;
  --gold: #e8c77a;
  --violet: #a78bfa;
  --pink: #f472b6;
  --radius: 22px;
  --wrap: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.7 "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-x: hidden;
}
a { color: var(--gold); }
img { display: block; max-width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* ---- header ---- */
.top { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: #0c0d10b8; border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: 0.01em; font-size: 1.08rem; }
.brand-mark { width: 28px; height: 28px; border-radius: 9px; background: conic-gradient(from 200deg, var(--gold), var(--pink), var(--violet), var(--gold)); box-shadow: 0 0 18px #e8c77a55; position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 7px; border-radius: 4px; background: var(--bg); }
.top nav { display: flex; gap: 4px; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 0.92rem; padding: 6px 10px; border-radius: 999px; }
.top nav a:hover { color: var(--ink); background: #ffffff0d; }
@media (max-width: 480px) { .top nav a.hide-sm { display: none; } }

/* ---- hero ---- */
.hero { position: relative; padding: 72px 0 40px; overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; pointer-events: none; }
.hero::before { width: 520px; height: 520px; left: -160px; top: -120px; background: radial-gradient(circle, #e8c77a55, transparent 65%); animation: drift 18s ease-in-out infinite alternate; }
.hero::after { width: 600px; height: 600px; right: -200px; top: 40px; background: radial-gradient(circle, #a78bfa55, transparent 65%); animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.1); } }
.hero .wrap { position: relative; z-index: 1; display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.05fr 1fr; } .hero { padding: 96px 0 72px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 600; color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 12px; border: 1px solid #e8c77a40; border-radius: 999px; background: #e8c77a10; }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
h1.display { font-size: clamp(2.3rem, 6.5vw, 4rem); line-height: 1.15; letter-spacing: -0.03em; margin: 18px 0 18px; font-weight: 800; }
.grad { background: linear-gradient(100deg, var(--gold) 10%, var(--pink) 55%, var(--violet) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1.02rem, 2.2vw, 1.18rem); color: var(--muted); margin: 0 0 30px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 0.98rem; text-decoration: none; transition: transform .15s ease, box-shadow .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(100deg, #f3d48b, #e8b8c8); color: #1a1408; box-shadow: 0 8px 28px #e8c77a33; }
.btn-primary:hover { box-shadow: 0 10px 34px #e8c77a55; }
.btn-ghost { color: var(--ink); border: 1px solid var(--line-2); background: #ffffff08; }
.btn-ghost:hover { background: #ffffff12; }

/* phones */
.phones { position: relative; height: 460px; display: flex; justify-content: center; align-items: center; }
@media (min-width: 900px) { .phones { height: 560px; } }
.phone { position: absolute; width: 200px; aspect-ratio: 1320 / 2868; border-radius: 30px; padding: 7px; background: linear-gradient(160deg, #3a3d46, #15161b); box-shadow: 0 30px 80px #000a, 0 0 0 1px #ffffff1c inset; }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 24px; }
@media (min-width: 900px) { .phone { width: 236px; } }
.phone.p1 { transform: translateX(-62%) rotate(-9deg) scale(0.88); opacity: 0.85; }
.phone.p2 { z-index: 2; transform: translateY(-4%); }
.phone.p3 { transform: translateX(62%) rotate(9deg) scale(0.88); opacity: 0.85; }
@media (prefers-reduced-motion: no-preference) {
  .phone.p2 { animation: float 7s ease-in-out infinite; }
  @keyframes float { 50% { transform: translateY(-7%); } }
}

/* ---- sections ---- */
section.block { padding: 56px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); letter-spacing: -0.02em; margin: 0; line-height: 1.25; }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.kicker { font-size: 0.8rem; font-weight: 700; color: var(--violet); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; }

/* featured game */
.feature { display: grid; overflow: hidden; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
@media (min-width: 900px) { .feature { grid-template-columns: 1.25fr 1fr; } }
.feature-media { position: relative; min-height: 240px; background: #000; }
.feature-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #16181e 0%, transparent 35%); }
@media (min-width: 900px) { .feature-media::after { background: linear-gradient(270deg, #16181e 0%, transparent 30%); } }
.feature-body { padding: 26px 22px 28px; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 900px) { .feature-body { padding: 40px 38px; } }
.game-title { display: flex; align-items: center; gap: 14px; }
.game-title img { width: 56px; height: 56px; border-radius: 15px; background: #eeece3; padding: 6px; }
.game-title h3 { margin: 0; font-size: 1.7rem; letter-spacing: -0.02em; }
.game-title .sub { color: var(--muted); font-size: 0.92rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 0.78rem; font-weight: 600; color: var(--muted); padding: 4px 10px; border-radius: 999px; background: #ffffff0a; border: 1px solid var(--line); }
.tag.live { color: #86efac; border-color: #86efac40; background: #86efac12; }
.feature-body p { margin: 0; color: var(--muted); }
.stores { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.store { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2); color: var(--muted); font-size: 0.86rem; font-weight: 600; text-decoration: none; }
.store svg { width: 18px; height: 18px; fill: currentColor; }
.store.soon { opacity: 0.7; }
a.store { color: var(--ink); }
a.store:hover { border-color: var(--muted); }

/* realms */
.realms { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
@media (min-width: 900px) { .realms { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.realm { position: relative; display: block; padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; overflow: hidden; transition: border-color .2s ease, transform .15s ease; }
.realm:hover { border-color: var(--line-2); transform: translateY(-2px); }
.realm::before { content: ""; position: absolute; inset: auto -30% -60% auto; width: 160px; height: 160px; border-radius: 50%; background: var(--glow); filter: blur(40px); opacity: 0.45; }
.realm .emoji { font-size: 1.6rem; }
.realm b { display: block; margin-top: 8px; font-size: 1.05rem; }
.realm span { display: block; color: var(--muted); font-size: 0.86rem; line-height: 1.5; margin-top: 2px; }

/* games grid (more to come) */
.games { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .games { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .games { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.game-card { border-radius: 20px; overflow: hidden; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; display: flex; flex-direction: column; transition: transform .15s ease, border-color .2s ease; }
a.game-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.game-card .cover { aspect-ratio: 1200 / 630; background: #000; }
.game-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.game-card .info { padding: 16px 18px 18px; }
.game-card h3 { margin: 0 0 4px; font-size: 1.12rem; }
.game-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.game-card.soon { border-style: dashed; border-color: var(--line-2); background: transparent; align-items: center; justify-content: center; text-align: center; min-height: 220px; padding: 24px; }
.game-card.soon .mark { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; background: #ffffff0a; margin: 0 auto 12px; }

/* about */
.about { display: grid; gap: 14px; }
@media (min-width: 900px) { .about { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.about div { padding: 22px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line); }
.about b { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.about p { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* contact band */
.band { margin: 24px 0 8px; padding: 32px 24px; border-radius: var(--radius); background: radial-gradient(120% 140% at 0% 0%, #e8c77a22, transparent 55%), radial-gradient(120% 140% at 100% 100%, #a78bfa22, transparent 55%), var(--card); border: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.band h2 { margin: 0; font-size: 1.4rem; }
.band p { margin: 4px 0 0; color: var(--muted); }

/* ---- plain pages (support, privacy) ---- */
.doc { max-width: 760px; padding-top: 48px; padding-bottom: 32px; }
.doc h1 { font-size: 2rem; line-height: 1.3; margin: 0 0 12px; letter-spacing: -0.02em; }
.doc h2 { font-size: 1.2rem; margin: 36px 0 10px; }
.doc p { margin: 0 0 12px; }
.doc ul { padding-left: 1.2rem; }
.muted { color: var(--muted); }

/* ---- footer (사업자 정보) ---- */
footer.site { margin-top: 56px; border-top: 1px solid var(--line); background: #08090b; }
footer.site .wrap { padding-top: 28px; padding-bottom: 40px; }
footer.site .links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 16px; }
footer.site .links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
footer.site .links a:hover { color: var(--ink); }
footer.site .biz { color: var(--dim); font-size: 0.8rem; line-height: 1.85; margin: 0; }
footer.site .biz span { white-space: nowrap; }
footer.site .biz span + span::before { content: "|"; margin: 0 8px; color: #ffffff22; }
footer.site .biz a { color: var(--dim); }
footer.site .copy { margin-top: 12px; color: var(--dim); font-size: 0.8rem; }
@media (max-width: 640px) { footer.site .biz span { white-space: normal; } footer.site .biz span + span::before { content: ""; margin: 0; } footer.site .biz span { display: block; } footer.site .biz br { display: none; } }

/* ---- 서비스 영역 (home.js가 games.js로 그린다) ---- */
/* 지금 만날 수 있는 곳: 옆으로 넘어가는 슬라이드. 게임마다 --accent 색 */
.showcase-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: var(--radius); }
.showcase-track::-webkit-scrollbar { display: none; }
.showcase .slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; position: relative; }
.showcase .slide::before { content: ""; position: absolute; inset: auto -10% -45% auto; width: 420px; height: 420px; border-radius: 50%; background: var(--accent, var(--gold)); filter: blur(120px); opacity: 0.12; pointer-events: none; }
a.feature-media { display: block; }
.feature-media img { transition: transform .8s ease; }
.slide:hover .feature-media img { transform: scale(1.03); }
.slide .btn-primary { background: linear-gradient(100deg, var(--accent, #f3d48b), color-mix(in srgb, var(--accent, #f3d48b) 55%, #f6d6e2)); box-shadow: 0 8px 28px color-mix(in srgb, var(--accent, #e8c77a) 25%, transparent); }

.showcase-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; }
.showcase-dots { display: flex; gap: 6px; }
.showcase-dots button { width: 48px; padding: 10px 0; border: 0; background: none; cursor: pointer; }
.showcase-dots button span { display: block; position: relative; height: 5px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.showcase-dots button span::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--accent, var(--ink)); transform: scaleX(0); transform-origin: left; }
.showcase-dots button[aria-current="true"] span::after { transform: scaleX(1); }
.showcase-dots button:hover span { background: var(--muted); }
.showcase-arrow { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: #ffffff08; color: var(--ink); font-size: 1.2rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding-bottom: 2px; }
.showcase-arrow:hover { border-color: var(--muted); }
@media (max-width: 640px) { .showcase-arrow { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  /* 막대가 차는 애니메이션이 끝나면(showcase-wait의 animationend) home.js가 다음 슬라이드로 넘긴다 */
  .showcase-dots button[aria-current="true"] span { animation: showcase-wait 6s linear forwards; }
  .showcase-dots button[aria-current="true"] span::after { animation: showcase-fill 6s linear forwards; }
  :is(.hover, .focus, .touch, .hidden-tab, .offscreen).showcase .showcase-dots span,
  :is(.hover, .focus, .touch, .hidden-tab, .offscreen).showcase .showcase-dots span::after { animation-play-state: paused; }
}
@keyframes showcase-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes showcase-wait { from { opacity: 1; } to { opacity: 1; } }

.tag.event { color: #ffb3cf; border-color: #ff7aa640; background: #ff7aa614; }
.realms-head { margin: 32px 0 0; font-size: 0.86rem; font-weight: 700; color: var(--muted); letter-spacing: 0.02em; }

/* 서비스 카드: 상태 표시, 아이콘, 게임 색 빛 */
.game-card { position: relative; }
.game-card .cover { position: relative; overflow: hidden; }
.game-card .cover img { transition: transform .6s ease; }
a.game-card:hover .cover img { transform: scale(1.04); }
a.game-card:hover { border-color: color-mix(in srgb, var(--accent, #ffffff) 45%, transparent); box-shadow: 0 14px 40px color-mix(in srgb, var(--accent, #000000) 18%, transparent); }
.card-badge { position: absolute; top: 12px; left: 12px; font-size: 0.74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #0c0d10cc; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--muted); border: 1px solid var(--line-2); }
.card-badge.live { color: #86efac; }
.card-badge.event { color: #ffb3cf; }
.card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.card-title img { width: 28px; height: 28px; border-radius: 8px; background: #eeece3; padding: 3px; }
.card-title h3 { margin: 0; }
.game-card.ended { opacity: 0.6; }
.game-card.soon .mark img { width: 34px; height: 34px; }
[data-showcase]:empty { min-height: 460px; }   /* home.js가 그리기 전 자리 (아래 내용이 밀려 올라왔다 내려가지 않게) */
/* 좁은 화면: 슬라이드 높이가 가장 긴 것에 맞춰지므로, 커버는 원래 비율(1200×630) 그대로 두고 남는 높이는 글 쪽이 받는다 */
@media (max-width: 899px) {
  .showcase .feature { grid-template-rows: auto 1fr; }
  .showcase .feature-media { aspect-ratio: 1200 / 630; min-height: 0; }
}
