:root {
  --paper: #f2efe9;
  --black: #141414;
  --white: #ffffff;
  --red: #e8402a;
  --blue: #2645e0;
  --yellow: #ffc917;
  --stone: #d9d6d1;
  --dim: #59544b;
}

* { box-sizing: border-box; }

html { overflow-x: hidden; background: var(--paper); color: var(--black); }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:focus-visible { outline: 4px solid var(--blue); outline-offset: 4px; }

.page {
  width: min(100% - 40px, 720px);
  margin: 0 auto;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 3px solid var(--black);
}

.site-footer {
  align-items: flex-start;
  margin-top: 80px;
  border-top: 3px solid var(--black);
  border-bottom: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.wordmark { display: block; width: 132px; height: auto; }
.wordmark--dark { width: 170px; }

.nav { display: flex; flex-wrap: wrap; gap: 16px; font-weight: 800; }
.nav .active { background: var(--yellow); text-decoration: none; }
.language-nav a { padding: 2px 7px; border: 2px solid var(--black); }

.hero { padding: 88px 0 72px; }

.eyebrow,
.tag,
.ledger,
.meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 800;
}

.eyebrow { margin: 0 0 16px; font-size: 13px; }

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

h1 { max-width: 640px; font-size: clamp(46px, 10vw, 82px); }
h2 { margin-bottom: 28px; font-size: clamp(32px, 7vw, 52px); }
h3 { margin-top: 40px; font-size: 24px; }

.hero-copy { max-width: 540px; margin: 28px 0 0; font-size: 19px; }

.tag {
  display: inline-block;
  margin-top: 32px;
  padding: 12px 16px;
  border: 3px solid var(--black);
  background: var(--yellow);
  box-shadow: 6px 6px 0 var(--black);
}

.section { padding: 72px 0; border-top: 3px solid var(--black); }

.flip-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding: 32px;
  background: var(--black);
}

.card {
  min-height: 430px;
  border: 4px solid var(--black);
  background: var(--white);
  box-shadow: 10px 10px 0 var(--red);
}

.card-front {
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--blue);
  font-size: 28px;
}

.card-back { padding: 24px; }
.stamp { width: 104px; height: 104px; border: 5px solid var(--black); background: var(--stone); }
.memo { min-height: 170px; margin: 24px 0; font-size: 25px; font-weight: 800; }

.ledger { width: 100%; border-collapse: collapse; font-size: 12px; }
.ledger th, .ledger td { padding: 9px 0; border-top: 3px solid var(--black); text-align: left; }

.facts { border: 4px solid var(--black); box-shadow: 10px 10px 0 var(--black); }
.fact { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 22px; border-bottom: 3px solid var(--black); }
.fact:last-child { border-bottom: 0; }
.fact dt, .fact dd { margin: 0; }
.fact dt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; }

.legal { padding: 64px 0; }
.legal h1 { font-size: clamp(40px, 8vw, 64px); }
.legal .meta { margin: 20px 0 48px; color: var(--dim); }
.legal section { margin: 48px 0; }
.legal li + li { margin-top: 10px; }
.notice { padding: 20px; border: 3px solid var(--black); background: var(--yellow); box-shadow: 6px 6px 0 var(--black); }

.language-gate {
  width: min(100% - 40px, 680px);
  min-height: 100svh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0;
}

.gate-icon {
  width: 112px;
  height: 112px;
  margin-bottom: 32px;
  border: 4px solid var(--black);
  box-shadow: 8px 8px 0 var(--black);
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.language-grid a {
  display: flex;
  min-height: 110px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 3px solid var(--black);
  background: var(--white);
  box-shadow: 7px 7px 0 var(--black);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-decoration: none;
}

.language-grid a:hover,
.language-grid a:focus-visible { background: var(--yellow); transform: translate(3px, 3px); box-shadow: 4px 4px 0 var(--black); }
.language-grid strong { font-size: 18px; }
.language-grid span { color: var(--blue); font-weight: 800; }

@media (max-width: 620px) {
  .site-header, .site-footer { align-items: flex-start; flex-direction: column; }
  .hero { padding-top: 56px; }
  .flip-stage { grid-template-columns: 1fr; padding: 22px; }
  .fact { grid-template-columns: 1fr; gap: 4px; }
  .language-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
