/* GreatJIN — www.greatjin.net
   No external fonts or scripts: everything is served from this site. */

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --surface-2: #f3efe9;
  --ink: #1d1b19;
  --ink-2: #57524c;
  --ink-3: #8a837b;
  --line: #e6e0d8;
  --accent: #b84d29;
  --accent-ink: #ffffff;
  --accent-soft: #f6e4dc;
  --ok: #2f7a4f;
  --ok-soft: #e1f1e7;
  --beta: #8a5a00;
  --beta-soft: #fbefd5;
  --lab: #4b4f9e;
  --lab-soft: #e7e8f8;
  --shadow: 0 1px 2px rgb(30 20 10 / 0.04), 0 8px 24px rgb(30 20 10 / 0.06);
  --radius: 18px;
  --max: 1160px;
  --font: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Noto Sans KR", "Malgun Gothic", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141312;
    --surface: #1c1b19;
    --surface-2: #24221f;
    --ink: #f2eee9;
    --ink-2: #bdb6ad;
    --ink-3: #8c857c;
    --line: #2f2c28;
    --accent: #e0714a;
    --accent-ink: #1a0f0a;
    --accent-soft: #3a2219;
    --ok: #7fd1a0;
    --ok-soft: #1d3326;
    --beta: #f1c46a;
    --beta-soft: #3a2f17;
    --lab: #a9adf2;
    --lab-soft: #26284a;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; letter-spacing: -0.01em; font-size: 18px; }
.brand img { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none; color: var(--ink-2); font-size: 15px; font-weight: 550;
  padding: 8px 12px; border-radius: 999px;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }

/* Type */
.eyebrow { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(34px, 6vw, 60px); font-weight: 800; }
h2 { font-size: clamp(26px, 3.6vw, 36px); font-weight: 780; }
h3 { font-size: 19px; font-weight: 720; }
.lead { font-size: clamp(17px, 2vw, 19px); color: var(--ink-2); max-width: 640px; margin: 20px 0 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font-weight: 650; font-size: 15px;
  text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--surface-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.btn svg { width: 16px; height: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }

/* Sections */
section { padding: 88px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.section-head p { color: var(--ink-2); margin: 10px 0 0; max-width: 560px; }
.band { background: var(--surface); border-block: 1px solid var(--line); }

/* Hero */
.hero { padding: 104px 0 88px; position: relative; overflow: hidden; }
.hero h1 .accent { color: var(--accent); }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; }
.hero-mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hero-mosaic a {
  aspect-ratio: 1; border-radius: 22px; background: var(--surface); border: 1px solid var(--line);
  display: grid; place-items: center; box-shadow: var(--shadow); transition: transform .2s ease;
}
.hero-mosaic a:hover { transform: translateY(-3px) rotate(-1deg); }
.hero-mosaic img { width: 54%; height: auto; border-radius: 14px; }
.hero-mosaic a:nth-child(2) { transform: translateY(18px); }
.hero-mosaic a:nth-child(5) { transform: translateY(18px); }
.hero-mosaic a:nth-child(8) { transform: translateY(18px); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 64px; border-top: 1px solid var(--line); }
.stat { padding: 22px 20px 0 0; }
.stat b { display: block; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.stat span { color: var(--ink-3); font-size: 14px; }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.principle { padding: 28px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.principle .num { font-family: var(--mono); color: var(--accent); font-size: 13px; }
.principle h3 { margin: 10px 0 8px; }
.principle p { color: var(--ink-2); margin: 0; font-size: 15px; }

/* Product cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column; gap: 16px;
  padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.card-top { display: flex; gap: 14px; align-items: center; }
.card-top img { width: 52px; height: 52px; border-radius: 14px; flex: none; }
.card-top .meta { min-width: 0; }
.card-top .cat { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.card p.desc { margin: 0; color: var(--ink-2); font-size: 15px; }
.card ul.feat { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.card ul.feat li { position: relative; padding-left: 18px; }
.card ul.feat li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); opacity: .7; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tag { font-family: var(--mono); font-size: 12px; padding: 3px 9px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px dashed var(--line); font-size: 14px; }
.card-foot .ver { font-family: var(--mono); color: var(--ink-3); font-size: 12.5px; }
.card-foot a { font-weight: 650; text-decoration: none; color: var(--accent); display: inline-flex; gap: 6px; align-items: center; }
.card-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-foot .local { color: var(--ink-3); font-weight: 550; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.live { color: var(--ok); background: var(--ok-soft); }
.badge.beta { color: var(--beta); background: var(--beta-soft); }
.badge.lab { color: var(--lab); background: var(--lab-soft); }

/* Catalog page */
.page-hero { padding: 80px 0 40px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 28px; position: sticky; top: 64px; z-index: 10; padding: 12px 0; background: var(--bg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .n { font-family: var(--mono); font-size: 12px; opacity: .6; margin-left: 4px; }
.search { position: relative; }
.search input {
  font: inherit; font-size: 14px; width: 240px; max-width: 100%;
  padding: 8px 14px 8px 36px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); }
.group { margin-bottom: 64px; }
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 20px; }
.group-head p { margin: 0; color: var(--ink-3); font-size: 15px; }
.empty { display: none; text-align: center; color: var(--ink-3); padding: 60px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; color: var(--ink-3); font-size: 13.5px; margin-top: 24px; }
.legend span { display: inline-flex; gap: 8px; align-items: center; }

/* CTA + footer */
.cta { text-align: center; }
.cta p { color: var(--ink-2); margin: 14px auto 0; max-width: 520px; }
.cta .actions { justify-content: center; }
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; color: var(--ink-3); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-mosaic { max-width: 420px; }
  .principles { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  section { padding: 64px 0; }
  .hero { padding: 64px 0; }
  .grid { grid-template-columns: 1fr; }
  .nav a { padding: 8px 9px; font-size: 14px; }
  .brand span { display: none; }
  .toolbar { position: static; }
  .search, .search input { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Layout helpers (no inline styles: CSP style-src 'self') */
.card-top .badge { margin-left: auto; }
section.group { padding: 0; }
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.notfound .code { font-family: var(--mono); color: var(--accent); font-size: 14px; letter-spacing: .1em; }

/* Language switch + card links */
.nav a.lang { font-family: var(--mono); font-size: 13px; border: 1px solid var(--line); margin-left: 6px; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card-foot .foot-links { display: inline-flex; gap: 16px; align-items: center; }
.card-foot a.more { color: var(--ink-2); }
.btn.ghost { color: var(--ink-3); cursor: default; }
.btn.ghost:hover { transform: none; background: var(--surface); }

/* Product detail */
.detail-hero { padding: 48px 20px 24px; }
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--ink-3); margin-bottom: 32px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.detail-head { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start; }
.detail-head > img { width: 88px; height: 88px; border-radius: 22px; box-shadow: var(--shadow); }
.detail-head h1 { font-size: clamp(32px, 5vw, 52px); margin-top: 10px; }
.detail-head .lead { margin-top: 12px; }
.detail-head .actions { margin-top: 24px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--ink-3); font-size: 14px; font-weight: 600; }
.detail-meta code, .specs code { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.detail-sec { padding: 56px 0; }
.detail-sec h2 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 24px; }
.muted { color: var(--ink-3); margin: -8px 0 24px; }
.prose { color: var(--ink-2); font-size: 17px; margin: 0 0 16px; max-width: 680px; }

.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.shots .lead-shot { grid-column: 1 / -1; }
.shot { margin: 0; }
.shot a { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.shot img { width: 100%; height: auto; transition: transform .3s ease; }
.shot a:hover img { transform: scale(1.01); }
.shot figcaption { font-size: 14px; color: var(--ink-3); margin-top: 10px; }

.detail-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.specs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.specs h2 { font-size: 18px; margin-bottom: 12px; }
.specs dl { margin: 0; display: grid; }
.specs dl > div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.specs dl > div:first-child { border-top: 0; }
.specs dt { color: var(--ink-3); font-weight: 600; }
.specs dd { margin: 0; color: var(--ink); }
.specs .tag { display: inline-block; margin: 0 4px 4px 0; }

.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: none; }
.flow li { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-weight: 600; }
.flow li:not(:last-child)::after { content: "→"; position: absolute; right: -13px; top: 50%; transform: translateY(-50%); color: var(--accent); font-weight: 700; z-index: 1; }
.flow .step { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-family: var(--mono); font-size: 14px; }

.rels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rel { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); text-decoration: none; transition: border-color .2s ease; }
.rel:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.rel img { width: 40px; height: 40px; border-radius: 11px; flex: none; }
.rel b { display: block; font-size: 15px; }
.rel small { display: block; color: var(--ink-3); font-size: 13px; line-height: 1.45; }

@media (max-width: 900px) {
  .detail-cols { grid-template-columns: 1fr; gap: 32px; }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow li::after { display: none; }
  .rels { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .detail-hero { padding: 32px 16px 8px; }
  .detail-head { grid-template-columns: 1fr; gap: 16px; }
  .detail-head > img { width: 64px; height: 64px; border-radius: 16px; }
  .shots { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .detail-sec { padding: 40px 0; }
  .nav a.lang { margin-left: 2px; }
}
