@import url("/fonts/gowun-batang.css");

:root {
  --paper: #ffffff;
  --ink: #1e2230;
  --ink-soft: #5b6170;
  --rule: #e6e3df;
  --omija: #b8324a;
  --butter: #e9b949;
  --sage: #6f927a;
  --indigo: #3e5a8c;

  --serif: "Gowun Batang", "Nanum Myeongjo", "AppleMyungjo", serif;
  --sans: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR",
    system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 68rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --label-col: 11rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
}

:lang(en) body,
body:lang(en) {
  line-height: 1.6;
}

a {
  color: var(--omija);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
  background: var(--paper);
  padding: 0.25rem 0.5rem;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- header ---------- */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
}

.wordmark svg {
  width: 1.75rem;
  height: 1.75rem;
}

.lang-switch {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.lang-switch a {
  color: var(--ink);
}

/* ---------- hero ---------- */

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(12rem, 20rem) 1fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding-block: clamp(2.5rem, 8vw, 6.5rem) clamp(3rem, 8vw, 6rem);
}

.hero-mark {
  width: 100%;
  height: auto;
  display: block;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 15em;
}

.hero h1:lang(en) {
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.hero .lead {
  margin: 0;
  max-width: 32em;
  color: var(--ink-soft);
  font-size: 1.125rem;
}

/* ---------- sections ---------- */

.section .wrap {
  display: grid;
  grid-template-columns: var(--label-col) 1fr;
  gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--rule);
}

.section h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.4;
}

.section-body {
  max-width: 44rem;
}

.section-body > p {
  margin: 0;
}

/* ---------- apps ---------- */

.app + .app {
  margin-top: 2.75rem;
  padding-top: 2.75rem;
  border-top: 1px dashed var(--rule);
}

.app-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  margin-bottom: 0.75rem;
}

.app h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.3;
}

.app .alt-name {
  font-family: var(--serif);
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--butter);
}

.app p {
  margin: 0 0 0.75rem;
}

.app .note {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

/* ---------- unfilled fields ---------- */

.todo {
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--ink-soft);
}

/* ---------- footer ---------- */

.site-footer .wrap {
  border-top: 1px solid var(--rule);
  padding-block: 2.5rem 3rem;
  display: grid;
  grid-template-columns: var(--label-col) 1fr;
  gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.site-footer h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 0.9375rem;
  color: var(--ink);
}

.biz {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.15rem 1.5rem;
  margin: 0;
}

.biz dt {
  color: var(--ink);
}

.biz dd {
  margin: 0;
}

.copyright {
  margin: 1.25rem 0 0;
}

/* ---------- simple pages (404, placeholder) ---------- */

.plain .wrap {
  padding-block: clamp(3rem, 10vw, 7rem);
  max-width: 44rem;
  margin-inline: auto;
}

.plain h1 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  line-height: 1.35;
}

.plain p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

/* ---------- petal mark motion (once, on load) ---------- */

.petal {
  transform-box: view-box;
  transform-origin: 100px 100px;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-mark .petal {
    animation: unfold 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .hero-mark .petal:nth-of-type(2) { animation-delay: 90ms; }
  .hero-mark .petal:nth-of-type(3) { animation-delay: 180ms; }
  .hero-mark .petal:nth-of-type(4) { animation-delay: 270ms; }
}

@keyframes unfold {
  from {
    opacity: 0;
    scale: 0.55;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

/* ---------- small screens ---------- */

@media (max-width: 720px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }
  .hero-mark {
    width: 9rem;
  }
  .section .wrap,
  .site-footer .wrap {
    grid-template-columns: 1fr;
  }
  .biz {
    grid-template-columns: 1fr;
  }
  .biz dd {
    margin-bottom: 0.4rem;
  }
}
