/* 1GRAM 회사 홈페이지 공통 스타일 — "스티커 팝" (2026-09-22 확정)
   흰 박스 + 3px 잉크 테두리 + 컬러 오프셋 그림자. 팀 소개 이미지의 언어를 사이트 전체로.
   기존 style.css / css/common.css 는 정책·랜딩 페이지 전용이므로 건드리지 않는다. */

:root {
  --paper: #fffdf5;
  --dot: #e8e3d5;
  --ink: #1f3358;        /* 로고 게임패드의 남색 */
  --blue: #1e93c1;        /* logo.png 의 블루 */
  --blue-btn: #11698b;    /* 흰 글자 대비 6:1 (버튼·밴드·링크) */
  --yellow: #ffd23f;
  --coral: #ff6b6b;
  --mint: #2ec4b6;
  --violet: #b892ff;
  --muted: #4a5568;
  --white: #ffffff;
  --radius: 20px;
  --radius-sm: 12px;
  --bw: 3px;              /* 테두리 굵기 */
  --max: 1120px;
  --gutter: 20px;
  --display: "Black Han Sans", "Noto Sans KR", sans-serif;
  --font: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.7; color: var(--ink);
  background: var(--paper) radial-gradient(var(--dot) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  word-break: keep-all; overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-btn); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 0.5em; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: 0.01em; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.15rem; font-weight: 900; }
h4 { font-size: 0.95rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: 0.35em; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- 언어 전환 (translations.js 와 연동) ---------- */
.content-en { display: none; }
html.lang-en .content-en { display: block; }
html.lang-en .content-ko { display: none; }
.lang-switch { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: #fff; box-shadow: 3px 3px 0 var(--ink); }
.lang-btn { appearance: none; border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 0.82rem; font-weight: 700; color: var(--muted); min-height: 36px; padding: 0 14px; }
.lang-btn.active { background: var(--ink); color: #fff; }
.lang-btn:not(.active):hover { background: var(--yellow); color: var(--ink); }

/* ---------- 헤더 / 내비게이션 ---------- */
.site-header { position: relative; z-index: 50; background: #fff; border-bottom: var(--bw) solid var(--ink); }
.site-header .container { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; min-height: 68px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-family: "Oswald", var(--display); font-weight: 700; font-size: 1.7rem; letter-spacing: 0.01em; min-height: 44px; }
.brand:hover { text-decoration: none; }
.brand img { width: 46px; height: auto; }
.site-footer .brand img { width: 38px; height: 38px; border-radius: 9px; }
.site-header .lang-switch { margin-left: auto; }
.site-nav { order: 3; width: 100%; }
.nav-toggle { display: none; }
@media (max-width: 799px) {
  html.js .nav-toggle { display: inline-flex; align-items: center; justify-content: center; order: 2; width: 44px; height: 44px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; box-shadow: 3px 3px 0 var(--ink); cursor: pointer; padding: 0; }
  html.js .nav-toggle span:first-child, html.js .nav-toggle span:first-child::before, html.js .nav-toggle span:first-child::after { display: block; width: 18px; height: 2.5px; background: var(--ink); border-radius: 2px; position: relative; content: ""; }
  html.js .nav-toggle span:first-child::before { position: absolute; top: -6px; }
  html.js .nav-toggle span:first-child::after { position: absolute; top: 6px; }
  html.js .site-header.nav-open .nav-toggle { background: var(--yellow); }
  html.js .site-nav { display: none; }
  html.js .site-header.nav-open .site-nav { display: block; }
  html.js .nav-toggle { margin-left: auto; }
  html.js .site-header .lang-switch { display: none; order: 4; margin-left: 0; }
  html.js .site-header.nav-open .lang-switch { display: inline-flex; margin-bottom: 6px; }
}
.site-nav ul { list-style: none; margin: 0; padding: 2px 4px 6px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 13px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 700; font-size: 0.88rem; white-space: nowrap; box-shadow: 3px 3px 0 var(--ink); }
.site-nav a:hover { background: var(--yellow); text-decoration: none; }
.site-nav a[aria-current="page"] { background: var(--yellow); }
@media (min-width: 800px) {
  .site-header { position: sticky; top: 0; }
  .site-nav { order: 0; width: auto; margin-left: 24px; }
  .site-nav ul { flex-wrap: nowrap; }
  .site-nav a { padding: 0 15px; font-size: 0.92rem; min-height: 42px; }
  .site-header .container { flex-wrap: nowrap; }
}

/* ---------- 섹션 공통 ---------- */
main { min-height: 50vh; }
.section { padding: 56px 0; }
.section-head { margin-bottom: 28px; }
.section-head h2 { margin-bottom: 0.2em; }
.section-head p { color: var(--muted); margin: 0; }
.eyebrow { display: inline-block; font-size: 0.78rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue-btn); margin-bottom: 10px; }
.lead { font-size: 1.1rem; color: var(--muted); }
mark { background: linear-gradient(transparent 55%, var(--yellow) 55%); color: inherit; padding: 0 2px; }

.page-hero { padding: 56px 0 36px; }
.page-hero h1 { margin-bottom: 0.3em; }
.page-hero p { color: var(--muted); font-size: 1.05rem; max-width: 60ch; margin: 0; }

.grid { display: grid; gap: 22px; }
.grid-2, .grid-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card { background: #fff; border: var(--bw) solid var(--ink); border-radius: var(--radius); padding: 24px; box-shadow: 7px 7px 0 var(--yellow); }
.card:nth-child(3n+2) { box-shadow: 7px 7px 0 var(--mint); }
.card:nth-child(3n) { box-shadow: 7px 7px 0 var(--coral); }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px; border: var(--bw) solid var(--ink); border-radius: 14px; font-weight: 900; font-size: 0.95rem; box-shadow: 5px 5px 0 var(--ink); background: #fff; color: var(--ink); transition: transform .08s, box-shadow .08s; }
.btn:hover { text-decoration: none; transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); }
.btn-primary { background: var(--blue-btn); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.tag { display: inline-block; background: var(--yellow); color: var(--ink); font-size: 0.76rem; font-weight: 700; padding: 2px 10px; border: 2px solid var(--ink); border-radius: 999px; line-height: 1.5; }
.tag-muted { background: #fff; }

/* ---------- 홈 히어로 ---------- */
.home-hero { padding: 64px 0 56px; }
.home-hero .container { display: grid; gap: 40px; align-items: center; }
.home-hero h1 { font-size: 2.7rem; line-height: 1.12; margin-bottom: 0.5em; }
.home-hero .lead { max-width: 48ch; margin-bottom: 28px; color: var(--ink); }
.hero-showcase { position: relative; max-width: 440px; width: 100%; margin: 0 auto; padding: 16px 8px 0 56px; container-type: inline-size; }
.hero-showcase .phone { display: block; border: var(--bw) solid var(--ink); border-radius: 30px; overflow: hidden; background: #fff; box-shadow: 10px 10px 0 var(--yellow), 10px 10px 0 var(--bw) var(--ink); transform: rotate(3deg); }
.hero-showcase .phone img { width: 100%; height: auto; }
.hero-showcase .icon-sticker { position: absolute; left: 0; top: 36%; width: 30%; max-width: 124px; border: 4px solid #fff; border-radius: 26%; box-shadow: 0 0 0 var(--bw) var(--ink), 6px 6px 0 var(--bw) var(--ink); transform: rotate(-9deg); }
.hero-showcase .bubble { position: absolute; right: -4px; top: 0; background: var(--coral); color: #fff; font-family: var(--display); font-size: 1.1rem; padding: 8px 16px; border: var(--bw) solid var(--ink); border-radius: 999px; box-shadow: 4px 4px 0 var(--ink); transform: rotate(6deg); white-space: nowrap; }
/* 배지 3개를 한 줄로: 쇼케이스 전체 폭(좌우 패딩 포함)에 맞춰 높이(--bh)를 줄이고, 누르는 영역은 44px 을 유지한다 */
.hero-stores { --bh: min(44px, calc((100cqi + 60px) / 9.8)); display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; justify-content: flex-end; margin: 22px -8px 0 -56px; }
.hero-stores a { position: relative; display: flex; align-items: center; min-height: 44px; flex: none; }
.hero-stores img { height: var(--bh); width: auto; border-radius: 9px; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.stat-note { font-size: 0.78rem; color: var(--muted); margin: 10px 0 0; }
@media (min-width: 900px) {
  .home-hero { padding: 96px 0 80px; }
  .home-hero .container { grid-template-columns: 1.1fr 0.9fr; gap: 48px; }
  .home-hero h1 { font-size: 4rem; }
}

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 32px; }
.stat { background: #fff; border: 2px solid var(--ink); border-radius: var(--radius-sm); padding: 12px; min-width: 0; box-shadow: 4px 4px 0 var(--ink); }
.stat strong { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(1.1rem, 4.2vw, 1.5rem); line-height: 1.2; white-space: nowrap; }
.stat span { display: block; font-size: 0.8rem; line-height: 1.35; color: var(--muted); word-break: keep-all; }
@media (min-width: 900px) { .stat { padding: 14px 16px; } }

/* ---------- 게임 카드 ---------- */
.game-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .game-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .game-grid { grid-template-columns: repeat(3, 1fr); } }
.game-card { display: flex; gap: 16px; align-items: flex-start; color: inherit; transition: transform .08s; }
.game-card:hover { text-decoration: none; transform: translate(-2px, -2px); }
.game-card:nth-child(4) { box-shadow: 7px 7px 0 var(--blue); }
.game-card:nth-child(5) { box-shadow: 7px 7px 0 var(--violet); }
.game-card img { width: 84px; height: 84px; border-radius: 22px; flex: 0 0 84px; border: var(--bw) solid var(--ink); }
.game-card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.game-card .tag { margin-bottom: 8px; }
.game-card p { margin: 0; font-size: 0.92rem; color: var(--muted); }
.game-card .more { display: inline-block; margin-top: 10px; font-size: 0.88rem; font-weight: 900; color: var(--blue-btn); }

/* ---------- 게임 상세 ---------- */
.game-hero .container { display: grid; gap: 24px; align-items: center; grid-template-columns: 1fr; }
.game-hero img { width: 136px; height: 136px; border-radius: 32px; border: 4px solid #fff; box-shadow: 0 0 0 var(--bw) var(--ink), 8px 8px 0 var(--ink); transform: rotate(-4deg); margin: 8px 12px 12px 4px; }
.game-hero h1 { margin-bottom: 0.15em; }
.game-hero .subtitle { color: var(--muted); margin-bottom: 12px; }
.game-hero .tag { margin-right: 6px; }
@media (min-width: 700px) { .game-hero .container { grid-template-columns: auto 1fr; gap: 40px; } .game-hero img { width: 168px; height: 168px; border-radius: 38px; } }
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.store-badges a { display: inline-block; min-height: 44px; }
.store-badges img { height: 50px; width: auto; border-radius: 10px; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
a.web-badge { display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 16px 0 12px; background: #000; color: #fff; border: 2px solid var(--ink); border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); text-decoration: none; font: 600 1.15rem/1 system-ui, -apple-system, sans-serif; }
a.web-badge:hover { color: #fff; text-decoration: none; }
a.web-badge span { display: flex; flex-direction: column; gap: 3px; }
a.web-badge small { font-size: 0.55rem; font-weight: 500; letter-spacing: 0.04em; }
.game-hero a.web-badge { transform: rotate(-4deg); margin: 8px 12px 12px 4px; }
.hero-stores a.web-badge { min-height: 0; height: var(--bh); border-radius: 9px; font-size: calc(var(--bh) * 0.36); gap: calc(var(--bh) * 0.16); padding: 0 calc(var(--bh) * 0.3) 0 calc(var(--bh) * 0.24); }
.hero-stores a.web-badge svg { width: calc(var(--bh) * 0.42); height: calc(var(--bh) * 0.42); }
.hero-stores a.web-badge small { font-size: 0.55em; }
.hero-stores a.web-badge::after { content: ""; position: absolute; left: 0; right: 0; top: calc((var(--bh) - 44px) / 2); bottom: calc((var(--bh) - 44px) / 2); }

.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.feature-list li { background: #fff; border: 2px solid var(--ink); border-radius: var(--radius-sm); padding: 16px 18px; margin: 0; box-shadow: 4px 4px 0 var(--mint); }
.feature-list li:nth-child(2) { box-shadow: 4px 4px 0 var(--yellow); }
.feature-list li:nth-child(3) { box-shadow: 4px 4px 0 var(--coral); }
.feature-list li:nth-child(4) { box-shadow: 4px 4px 0 var(--violet); }
.feature-list strong { display: block; margin-bottom: 2px; font-weight: 900; }
@media (min-width: 700px) { .feature-list { grid-template-columns: repeat(2, 1fr); } }

.spec-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: #fff; border: var(--bw) solid var(--ink); border-radius: var(--radius-sm); overflow: hidden; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 14px; border-bottom: 2px solid var(--ink); vertical-align: top; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th { width: 32%; color: var(--muted); font-weight: 700; background: var(--paper); }

/* ---------- 게임 화면 ---------- */
.shots { display: flex; gap: 18px; overflow-x: auto; padding: 4px 10px 16px 2px; scroll-snap-type: x mandatory; }
.shots img { flex: 0 0 auto; width: 200px; height: auto; border: var(--bw) solid var(--ink); border-radius: 18px; box-shadow: 6px 6px 0 var(--ink); scroll-snap-align: start; }
@media (min-width: 900px) { .shots { overflow: visible; } .shots img { width: calc((100% - 54px) / 4); } }

/* ---------- 회사 소개 ---------- */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 10px; bottom: 10px; border-left: 3px dotted var(--coral); }
.timeline li { position: relative; padding-left: 40px; margin-bottom: 22px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: var(--bw) solid var(--blue); box-sizing: border-box; }
.timeline li:first-child::before { background: var(--blue); }
.timeline time { display: block; font-family: var(--display); font-size: 1.15rem; }
.timeline .note { font-size: 0.9rem; color: var(--muted); }

.value-card ul { margin-bottom: 0; }

.about-intro { max-width: 72ch; }

.team-figure { margin: 0; }
.team-figure img { border-radius: var(--radius); border: var(--bw) solid var(--ink); background: #fff; box-shadow: 8px 8px 0 var(--mint); }
.team-figure figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 16px; }

/* ---------- 채용 ---------- */
.job-card h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 1.3rem; }
.job-card h4 { font-size: 0.9rem; color: var(--blue-btn); margin: 18px 0 6px; letter-spacing: 0.04em; }
.job-card ul { margin-bottom: 0; }

/* ---------- 문의 ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 14px 0; border-bottom: 2px dotted var(--dot); margin: 0; }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .label { color: var(--muted); font-size: 0.9rem; font-weight: 700; }

/* ---------- 링크 목록 (정책) ---------- */
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.link-list li { margin: 0; }
.link-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: var(--bw) solid var(--ink); border-radius: var(--radius-sm); padding: 16px 18px; min-height: 58px; color: var(--ink); font-weight: 700; box-shadow: 5px 5px 0 var(--ink); transition: transform .08s, box-shadow .08s; }
.link-list a:hover { text-decoration: none; transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); background: var(--yellow); }
.link-list a::after { content: "→"; font-weight: 900; }
.link-list small { color: var(--muted); font-weight: 400; margin-left: 6px; }

/* ---------- 컬러 밴드 (일하는 방식) ---------- */
.band { background: var(--blue-btn); color: #fff; border-top: var(--bw) solid var(--ink); border-bottom: var(--bw) solid var(--ink); }
.band h2, .band h3, .band .eyebrow { color: #fff; }
.band p { color: #fff; }
.band .band-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .band .band-grid { grid-template-columns: repeat(3, 1fr); } }
.band a { color: #fff; font-weight: 900; }

/* ---------- 푸터 ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.85); padding: 40px 0 32px; margin-top: 48px; font-size: 0.9rem; }
.site-footer a { color: #fff; }
.site-footer .footer-top { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; margin-bottom: 20px; }
.site-footer .footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; margin: 0; padding: 0; }
.site-footer .footer-links li { margin: 0; }
.site-footer .footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer address { font-style: normal; line-height: 1.6; margin: 0 0 8px; }
.site-footer .biz-info { margin: 0 0 8px; line-height: 1.6; color: rgba(255,255,255,0.7); word-break: keep-all; }
.site-footer .copyright { color: rgba(255,255,255,0.6); margin: 0; }
.site-footer .brand { color: #fff; }
.site-footer .brand img { border: 2px solid #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 96px 0; }
.notfound h1 { font-size: 6rem; color: var(--coral); margin-bottom: 0.05em; text-shadow: 6px 6px 0 var(--ink); }

@media (prefers-reduced-motion: reduce) { .btn, .game-card, .link-list a { transition: none; } }
