/* 오픈독스 소개 페이지
 *
 * Direction: the product opens Korean government forms, so the page is built
 * from that world — a cool paper field, a document serif for display type, and
 * one hard-ruled ledger carrying the accuracy claim. Everything else stays
 * quiet and rounded so the ledger is the thing you remember.
 */

:root {
  --ink:        #0b1b34;
  --ink-2:      #23364f;
  --muted:      #5c6e8a;
  --faint:      #8496ae;

  --paper:      #ffffff;
  --field:      #eef3f9;
  --field-deep: #e3ebf5;

  --line:       #dce4ef;
  --rule:       #a9b8ce;

  --blue:       #1b5bd7;
  --blue-deep:  #0c3a96;
  --cyan:       #38b4e8;
  --ember:      #e2512a;

  --f-display: 'Noto Serif KR', 'Apple SD Gothic Neo', serif;
  --f-body: Pretendard, 'Pretendard Variable', 'Apple SD Gothic Neo', system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--field);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  /* Korean breaks between characters by default, which splits words mid-way.
     Break at spaces instead, the way Korean text is meant to wrap. */
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, p, ul, figure, table { margin: 0; }

ul { padding: 0; list-style: none; }

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

.wrap {
  width: min(var(--wrap), 100% - 48px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
.skip:focus { left: 12px; top: 12px; }

/* ── Shared type ─────────────────────────────────────── */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.005em;
  color: var(--blue);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: currentColor;
}
.eyebrow-ember { color: var(--ember); }

h1, h2 {
  font-family: var(--f-display);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.16;
  text-wrap: balance;
}

h1 { font-size: clamp(32px, 4.2vw, 52px); }
h2 { font-size: clamp(28px, 3.6vw, 46px); }

h1 em, h2 em {
  font-style: normal;
  color: var(--blue);
}

.accuracy h2 em { color: var(--ember); }

/* ── Buttons ─────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-family: var(--f-body);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}
.btn svg { width: 22px; height: 22px; flex: none; }
.btn span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.btn small {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  opacity: .72;
}
.btn b { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 12px 30px -12px rgba(27, 91, 215, .7);
}
.btn-primary:hover { background: var(--blue-deep); transform: translateY(-2px); }

.btn-line {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}
.btn-line:hover { border-color: var(--rule); transform: translateY(-2px); }

.btn-on-dark {
  background: transparent;
  border-color: rgba(255, 255, 255, .3);
  color: #fff;
}
.btn-on-dark:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .55); }

.btn-sm {
  min-height: 40px;
  padding: 0 18px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.btn-sm:hover { background: var(--blue-deep); }

.get { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Nav ─────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(238, 243, 249, .86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}
.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.brand img { border-radius: 9px; }
.brand-tx { display: flex; flex-direction: column; line-height: 1.15; }
.brand-tx b { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.brand-tx small {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--faint);
}
.nav-links { display: flex; gap: 26px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.nav-links a:hover { color: var(--blue); }

/* ── Hero ────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0 96px;
  background:
    radial-gradient(120% 90% at 88% 4%, rgba(56, 180, 232, .16), transparent 58%),
    radial-gradient(80% 70% at 6% 0%, rgba(27, 91, 215, .1), transparent 60%),
    var(--field);
}
.hero-in {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: 56px;
}
.hero h1 { margin-bottom: 26px; }

.lede {
  max-width: 30em;
  margin-bottom: 32px;
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.75;
  color: var(--ink-2);
}

.note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--faint);
}

.hero-shot {
  position: relative;
  border-radius: 14px 0 0 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-right: 0;
  box-shadow: 0 40px 80px -34px rgba(11, 27, 52, .42);
  margin-right: calc((100vw - min(var(--wrap), 100vw - 48px)) / -2);
}

/* ── Accuracy — the signature ────────────────────────── */

.accuracy {
  padding: 104px 0 110px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.acc-head { max-width: 780px; margin-bottom: 52px; }
.acc-head h2 { margin-bottom: 24px; }
.acc-lede {
  max-width: 44em;
  font-size: clamp(15.5px, 1.3vw, 17px);
  line-height: 1.8;
  color: var(--ink-2);
}

.ledger { border-top: 2px solid var(--ink); }

.ledger-cap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: baseline;
  padding: 13px 2px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.005em;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}
.ledger-src {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--faint);
}

.ledger table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
}
.ledger thead th {
  padding: 15px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.ledger .c-doc { text-align: left; width: 46%; }

.ledger tbody th {
  padding: 22px 14px 22px 2px;
  text-align: left;
  font-weight: 400;
  border-bottom: 1px solid var(--line);
}
.ledger tbody th b {
  display: block;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.ext {
  display: inline-block;
  margin-top: 5px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--faint);
}

.ledger td {
  padding: 22px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.exact {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ember);
  white-space: nowrap;
}
.exact::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
}

.num {
  font-family: var(--f-mono);
  font-size: clamp(22px, 2.3vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.num i { font-style: normal; font-size: .5em; color: var(--faint); margin-left: 2px; }

.acc-notes {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 28px 48px;
  margin-top: 30px;
}
.acc-notes p { font-size: 14px; line-height: 1.8; color: var(--muted); }
.acc-notes b { color: var(--ink-2); font-weight: 700; }
.acc-lock {
  padding-left: 18px;
  border-left: 2px solid var(--line);
  font-size: 13px !important;
}

/* ── Editing ─────────────────────────────────────────── */

.sec-head { max-width: 720px; margin-bottom: 46px; }
.sec-head h2 { margin-bottom: 18px; }
.sec-lede { font-size: 16.5px; line-height: 1.75; color: var(--ink-2); }

.editing { padding: 100px 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
.card {
  display: flex;
  flex-direction: column;
  padding: 0 0 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 44px -28px rgba(11, 27, 52, .4);
}
.card figure {
  height: 180px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--field-deep);
}
.card figure img { height: 100%; object-fit: cover; object-position: left top; }
.card h3 {
  margin: 26px 26px 10px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.card p { margin: 0 26px; font-size: 14.5px; line-height: 1.75; color: var(--muted); }

/* ── Formats ─────────────────────────────────────────── */

.formats {
  padding: 100px 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.fmt {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.fmt li { padding: 26px 24px 28px; background: var(--paper); }
.fmt b {
  display: block;
  font-family: var(--f-mono);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.cap {
  display: inline-block;
  margin: 12px 0 14px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.cap-rw   { background: rgba(27, 91, 215, .1);  color: var(--blue-deep); }
.cap-r    { background: rgba(56, 180, 232, .16); color: #0f6b93; }
.cap-part { background: rgba(226, 81, 42, .1);   color: var(--ember); }
.fmt p { font-size: 13.5px; line-height: 1.7; color: var(--muted); }

/* ── Close ───────────────────────────────────────────── */

.close {
  padding: 96px 0 84px;
  background:
    radial-gradient(90% 120% at 82% 0%, rgba(27, 91, 215, .5), transparent 62%),
    var(--ink);
  color: #fff;
}
.close-in {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 56px;
  align-items: end;
}
.close h2 { margin-bottom: 16px; }
.close h2 em {
  font-family: var(--f-mono);
  font-size: .8em;
  font-style: normal;
  font-weight: 600;
  color: var(--cyan);
}
.close-copy > p { margin-bottom: 30px; color: rgba(255, 255, 255, .72); }

.safe {
  display: grid;
  gap: 12px;
  padding-top: 8px;
}
.safe li {
  position: relative;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .66);
}
.safe li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 8px;
  height: 1px;
  background: var(--cyan);
}

/* ── Foot ────────────────────────────────────────────── */

.foot { padding: 30px 0 40px; background: var(--ink); border-top: 1px solid rgba(255, 255, 255, .1); }
.foot-in { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
.foot p { font-size: 12.5px; color: rgba(255, 255, 255, .5); }
.attrib { max-width: 60ch; }

/* ── Reveal ──────────────────────────────────────────── */

.reveal, .row {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal-2 { transition-delay: .1s; }
.is-in { opacity: 1; transform: none; }
.row.is-in { transition-delay: calc(var(--i, 0) * .09s); }

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 940px) {
  .hero { padding: 56px 0 72px; }
  .hero-in { grid-template-columns: 1fr; gap: 44px; }
  .hero-shot { border-radius: 14px; border-right: 1px solid var(--line); margin-right: 0; }
  .cards { grid-template-columns: 1fr; }
  .card figure { height: 200px; }
  .acc-notes { grid-template-columns: 1fr; }
  .close-in { grid-template-columns: 1fr; gap: 40px; align-items: start; }
  .nav-links { display: none; }
}

@media (max-width: 620px) {
  .wrap { width: calc(100% - 32px); }
  .accuracy, .editing, .formats { padding: 72px 0; }
  .ledger { overflow-x: auto; }
  .ledger table { min-width: 520px; }
  .btn { width: 100%; }
  .get { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .row { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
