/* Shared styles for the long-form static pages: /services/* and /journal/*.
   Tokens, header, language pill and footer mirror public/about.html.
   Korean headings use the system Korean font, not LeferiPointSpecial: the Leferi
   file is subset to the characters in src/ and public/*.html only (see
   scripts/subset-font.mjs), and these pages live in subfolders on purpose so
   their long text doesn't grow the font every home-page visitor downloads. */
@font-face {
  font-family: "Pirulen";
  src: url("/fonts/Pirulen.otf") format("opentype");
  font-weight: normal; font-style: normal; font-display: swap;
}
:root {
  --bg: #000000;
  --ink: #ffffff;
  --mute: #a1a1aa;
  --faint: #71717a;
  --border: rgba(255,255,255,0.14);
  --surface: rgba(255,255,255,0.04);
  --serif: "Instrument Serif", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --kor-head: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --brand: "Pirulen", sans-serif;
  --accent: #f6c453;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.75;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
a { color: var(--ink); }
a:hover { opacity: 0.75; }
img { max-width: 100%; }

.wrap { max-width: 780px; margin: 0 auto; padding: 28px 22px 88px; }

/* header (same as about.html) */
header.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 8px 0 48px; }
header.nav .brand { font-family: var(--brand); font-size: 19px; letter-spacing: -0.01em; white-space: nowrap; text-decoration: none; }
header.nav .nav-right { display: flex; align-items: center; gap: 20px; }
header.nav nav a { color: var(--mute); margin-left: 22px; font-size: 14px; white-space: nowrap; text-decoration: none; }
header.nav nav a:first-child { margin-left: 0; }
header.nav nav a:hover, header.nav nav a[aria-current="page"] { color: var(--ink); opacity: 1; }
@media (max-width: 430px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  header.nav { gap: 10px; }
  header.nav .brand { font-size: 16px; }
  header.nav .nav-right { gap: 12px; }
  header.nav nav a { font-size: 13px; margin-left: 14px; }
}
@media (max-width: 430px) { body.has-toggle header.nav nav { display: none; } }

.langtoggle { position: relative; display: inline-flex; align-items: center; padding: 3px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.langtoggle .pill { position: absolute; top: 3px; left: 3px; height: 28px; width: 50px;
  border-radius: 999px; background: #fff; transition: transform .3s cubic-bezier(.22,1,.36,1); }
.langtoggle button { position: relative; z-index: 1; height: 28px; width: 50px; border: 0;
  background: transparent; cursor: pointer; font: inherit; font-size: 11px; font-weight: 600;
  letter-spacing: .1em; color: var(--mute); transition: color .3s; }
body[data-lang="ENG"] .langtoggle .pill { transform: translateX(50px); }
body[data-lang="KOR"] .langtoggle button[data-lang-btn="KOR"],
body[data-lang="ENG"] .langtoggle button[data-lang-btn="ENG"] { color: #000; }

/* type */
.crumbs { font-size: 13px; color: var(--faint); margin: 0 0 18px; }
.crumbs a { color: var(--mute); text-decoration: none; }
h1 { font-weight: 700; font-size: 34px; line-height: 1.3; margin: 0 0 14px; letter-spacing: -0.01em; }
h1:lang(ko), [lang="ko"] h1 { font-family: var(--kor-head); }
[lang="en"] h1 { font-family: var(--serif); font-weight: 400; font-size: 42px; line-height: 1.15; letter-spacing: 0; }
h2 { font-family: var(--kor-head); font-weight: 700; font-size: 23px; line-height: 1.4; margin: 56px 0 14px; }
[lang="en"] h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.2; }
h3 { font-size: 16.5px; font-weight: 600; margin: 28px 0 8px; }
p, li, dd { font-size: 16px; }
p { margin: 0 0 16px; }
.lead { font-size: 18px; color: #e4e4e7; }
.muted { color: var(--mute); font-size: 14.5px; }
strong { font-weight: 600; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.92em;
  background: rgba(255,255,255,0.08); border-radius: 5px; padding: 1px 5px; }
pre { overflow-x: auto; background: #0d0d0f; border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; font-size: 13.5px; line-height: 1.6; margin: 0 0 18px; }
pre code { background: none; padding: 0; font-size: inherit; }
blockquote { margin: 0 0 18px; padding: 4px 0 4px 16px; border-left: 3px solid var(--accent); color: #e4e4e7; }
ul, ol { padding-left: 22px; margin: 0 0 16px; }
li { margin: 4px 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 48px 0; }
a.inline { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,0.35); }

/* service hero */
.svc-hero { display: grid; grid-template-columns: 112px 1fr; gap: 22px; align-items: center; margin: 0 0 8px; }
.svc-hero .logo { width: 112px; height: 112px; border-radius: 26px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.svc-hero .logo img { max-width: 78%; max-height: 78%; object-fit: contain; }
.svc-hero .logo .mark { font-family: var(--kor-head); font-weight: 800; font-size: 26px; color: #fff; }
.svc-hero h1 { margin: 0 0 6px; }
.svc-hero .names { color: var(--faint); font-family: var(--serif); font-size: 18px; margin: 0 0 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills span { font-size: 12px; color: #d4d4d8; border: 1px solid var(--border); border-radius: 999px; padding: 3px 11px; }
@media (max-width: 520px) {
  .svc-hero { grid-template-columns: 1fr; gap: 16px; }
  .svc-hero .logo { width: 88px; height: 88px; border-radius: 22px; }
}
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px;
  padding: 0 clamp(14px, 4vw, 20px); border-radius: 999px; font-size: clamp(13.5px, 3.6vw, 15px); font-weight: 500;
  line-height: 1.25; text-align: center; text-decoration: none; border: 1px solid var(--border); background: var(--surface); }
.btn.primary { background: #fff; color: #000; border-color: #fff; }
.btn:hover { opacity: 0.85; }
/* Phones: buttons share each row evenly, two to a row, and a lone (or odd last) button
   takes the whole row, so a row of buttons always lines up instead of wrapping ragged. */
@media (max-width: 560px) {
  .cta-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cta-row .btn { width: 100%; min-width: 0; padding: 10px 12px; }
  .cta-row .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* other services: app-icon tiles */
.apps { list-style: none; padding: 0; margin: 18px 0 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 20px 10px; }
.apps li { margin: 0; }
.apps a { display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; text-decoration: none; }
.apps a:hover { opacity: 1; }
.apps .icon { width: 72px; height: 72px; border-radius: 19px; display: flex; align-items: center; justify-content: center;
  gap: 1px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); transition: transform .2s ease; }
.apps a:hover .icon { transform: translateY(-3px); }
.apps .icon img { max-width: 70%; max-height: 70%; object-fit: contain; }
.apps .icon.pair img { max-width: 46%; }
.apps .n { font-size: 13px; line-height: 1.35; color: #d4d4d8; word-break: keep-all; }
@media (max-width: 430px) {
  .apps { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 16px 6px; }
  .apps .icon { width: 58px; height: 58px; border-radius: 15px; }
  .apps .n { font-size: 12px; }
}

/* screenshots: a horizontal strip */
.shots { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 0 12px; margin: 26px 0 8px;
  scrollbar-width: thin; }
.shots figure { flex: 0 0 auto; width: min(62vw, 240px); margin: 0; scroll-snap-align: start; }
.shots img { display: block; width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--border); background: #111; }
.shots figcaption { font-size: 12.5px; color: var(--faint); margin-top: 8px; line-height: 1.5; }

/* facts table */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 22px 0 8px; padding: 18px 20px;
  border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.facts dt { color: var(--faint); font-size: 14px; }
.facts dd { margin: 0; font-size: 14.5px; }
@media (max-width: 430px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 8px; } }

/* features */
.features { list-style: none; padding: 0; display: grid; gap: 12px; }
.features li { margin: 0; padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.features li strong { display: block; font-size: 16px; margin-bottom: 4px; }
.features li span { color: #d4d4d8; font-size: 15px; }

ol.steps { counter-reset: s; list-style: none; padding: 0; }
ol.steps > li { counter-increment: s; position: relative; padding-left: 40px; margin: 12px 0; }
ol.steps > li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; color: #000; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

.faq dt { font-weight: 600; margin-top: 20px; font-size: 16px; }
.faq dd { margin: 6px 0 0; color: #d4d4d8; }

/* game table (1분게임) */
.games { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 14.5px; }
.games th, .games td { text-align: left; vertical-align: top; padding: 9px 8px; border-top: 1px solid var(--border); }
.games th { white-space: nowrap; font-weight: 600; }
.games td.en { color: var(--faint); white-space: nowrap; }
@media (max-width: 520px) { .games td.en { display: none; } }

/* cards: related posts, other services, journal index */
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cards li { margin: 0; }
.cards a { display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); text-decoration: none; }
.cards a:hover { opacity: 1; border-color: rgba(255,255,255,0.35); }
.cards .k { display: block; font-size: 12px; color: var(--faint); margin-bottom: 4px; }
.cards .t { display: block; font-weight: 600; line-height: 1.45; }
.cards .d { display: block; font-size: 14px; color: var(--mute); margin-top: 6px; line-height: 1.6; }

.posts { list-style: none; padding: 0; margin: 0; }
.posts li { margin: 0; border-top: 1px solid var(--border); }
.posts li:last-child { border-bottom: 1px solid var(--border); }
.posts a { display: block; padding: 22px 0; text-decoration: none; }
.posts a:hover { opacity: 1; }
.posts a:hover .t { text-decoration: underline; text-underline-offset: 4px; }
.posts .k { font-size: 13px; color: var(--faint); }
.posts .t { display: block; font-family: var(--kor-head); font-size: 20px; font-weight: 700; line-height: 1.45; margin: 4px 0 6px; }
.posts .d { display: block; color: var(--mute); font-size: 15px; }

/* journal article */
.post-meta { color: var(--faint); font-size: 14px; margin: 0 0 30px; }
.post-meta a { color: var(--mute); }
article.post p, article.post li { font-size: 16.5px; line-height: 1.85; }
article.post h2 { margin-top: 48px; }
.post-end { margin-top: 56px; padding: 20px 22px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.post-end p { margin: 0 0 10px; color: #d4d4d8; font-size: 15px; }
.post-end p:last-child { margin: 0; }
.lang-note { font-size: 13.5px; color: var(--mute); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin: 0 0 28px; }

/* footer (same as about.html) */
footer.site { border-top: 1px solid var(--border); margin-top: 72px; padding-top: 26px; color: var(--faint); font-size: 13px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer.site nav a { margin-right: 18px; color: var(--mute); text-decoration: none; white-space: nowrap; line-height: 2; }
footer.site nav a:hover { color: var(--ink); opacity: 1; }
