/* Graatii website — v0.1 draft (2026-11-20)
   Every value below comes from the tokens in :root (see design/TOKENS.md).
   No inline styles anywhere (CSP style-src 'self'). Light theme only. */

@font-face {
  font-family: "Pretendard Variable";
  font-style: normal;
  font-weight: 45 920;
  font-display: swap;
  src: url("../fonts/PretendardVariable.woff2") format("woff2-variations"),
       url("../fonts/PretendardVariable.woff2") format("woff2");
}

:root {
  color-scheme: light;

  /* colour */
  --c-bg: #ffffff;
  --c-surface: #f6f7f9;
  --c-surface-2: #eef0f3;
  --c-line: #e4e7ec;
  --c-line-strong: #c9ced6;
  --c-line-ink: #8b939e;
  --c-ink: #111418;
  --c-ink-2: #3d434c;
  --c-ink-3: #5b636e;
  --c-accent: #0a7468;
  --c-accent-strong: #08665d;
  --c-accent-wash: #e9f3f1;
  --c-on-accent: #ffffff;
  --c-deny: #b42318;
  --c-hold: #8a5a00;

  /* type */
  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
               "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --fs-display: clamp(2.125rem, 1.521rem + 2.476vw, 3.75rem);
  --fs-h2: clamp(1.6875rem, 1.339rem + 1.429vw, 2.625rem);
  --fs-h3-lg: clamp(1.25rem, 1.134rem + 0.4762vw, 1.5625rem);
  --fs-h3: clamp(1.125rem, 1.102rem + 0.09524vw, 1.1875rem);
  --fs-lead: clamp(1.0625rem, 0.9929rem + 0.2857vw, 1.25rem);
  --fs-body: clamp(1rem, 0.9768rem + 0.09524vw, 1.0625rem);
  --fs-small: 0.875rem;
  --fs-nav: 0.9375rem;
  --fs-label: 0.8125rem;
  --fs-brand: 1.25rem;
  --fs-contact: clamp(1.125rem, 1.0786rem + 0.1905vw, 1.25rem);
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 650;
  --fw-bold: 700;
  --lh-display: 1.26;
  --lh-h2: 1.32;
  --lh-h3-lg: 1.44;
  --lh-h3: 1.5;
  --lh-lead: 1.7;
  --lh-body: 1.75;
  --lh-small: 1.6;
  --lh-label: 1.4;
  --lh-contact: 1.5;
  --ls-display: -0.032em;
  --ls-h2: -0.028em;
  --ls-h3-lg: -0.02em;
  --ls-h3: -0.015em;
  --ls-lead: -0.012em;
  --ls-body: -0.006em;
  --ls-label: 0.02em;
  --ls-contact: -0.005em;
  --ls-brand: -0.03em;

  /* figure type (SVG user units; scale with the drawing) */
  --fig-fs-title: 17px;
  --fig-fs-title-s: 14.5px;
  --fig-fs-item: 15px;
  --fig-fs-small: 13px;
  --fig-fs-num: 12px;

  /* space */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-section: clamp(4.5rem, 3.386rem + 4.571vw, 7.5rem);

  /* layout */
  --container: 1200px;
  --gutter: 40px;
  --grid-gap: 32px;
  --measure: 38em;
  --header-h: 64px;

  /* shape */
  --r-s: 4px;
  --r-m: 8px;
  --r-pill: 999px;
  --shadow: none;
  --dot: 6px;
  --marker: 14px;
  --icon: 24px;
  --track: 2px;

  /* motion */
  --dur-fast: 120ms;
  --dur: 180ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

@media (max-width: 959px) {
  :root { --gutter: 32px; --grid-gap: 24px; }
}
@media (max-width: 639px) {
  :root { --gutter: 20px; }
}

/* ---------- base ---------- */

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

html {
  background: var(--c-bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink-2);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { color: var(--c-ink); text-wrap: balance; }
p { text-wrap: pretty; }
svg { display: block; }

a { color: inherit; }

a:focus-visible {
  outline: var(--track) solid var(--c-accent);
  outline-offset: 3px;
  border-radius: var(--r-s);
}

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

.skip {
  position: absolute;
  left: var(--sp-4);
  top: var(--sp-3);
  z-index: 20;
  padding: var(--sp-2) var(--sp-4);
  background: var(--c-ink);
  color: var(--c-on-accent);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  border-radius: var(--r-s);
  transform: translateY(-300%);
}
.skip:focus { transform: none; }

.link {
  color: var(--c-ink);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--c-line-ink);
  text-underline-offset: 0.22em;
  transition: color var(--dur-fast) var(--ease), text-decoration-color var(--dur-fast) var(--ease);
}
.link:hover { color: var(--c-accent-strong); text-decoration-color: currentColor; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--c-ink);
  text-decoration: none;
  font-size: var(--fs-brand);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-brand);
  line-height: 1;
}
.brand__mark { width: var(--icon); height: var(--icon); }
.brand__bg { fill: var(--c-ink); }
.brand__post { stroke: var(--c-on-accent); stroke-width: 2.4; stroke-linecap: round; fill: none; }

.nav { display: flex; align-items: center; gap: var(--sp-6); }
.nav__list { display: flex; gap: var(--sp-5); }
.nav__list a {
  color: var(--c-ink-2);
  font-size: var(--fs-nav);
  font-weight: var(--fw-medium);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
.nav__list a:hover { color: var(--c-ink); }

.lang {
  display: inline-flex;
  align-items: center;
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-pill);
  color: var(--c-ink);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-small);
  text-decoration: none;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.lang:hover { background: var(--c-surface); border-color: var(--c-line-ink); }

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

.hero {
  padding-block: var(--sp-9) var(--sp-8);
  border-bottom: 1px solid var(--c-line);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-6);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-pill);
  background: var(--c-accent-wash);
  color: var(--c-accent-strong);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
  line-height: var(--lh-label);
}
.status::before {
  content: "";
  width: var(--dot);
  height: var(--dot);
  border-radius: var(--r-pill);
  background: var(--c-accent);
}

.hero__kind {
  color: var(--c-ink-3);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
  line-height: var(--lh-label);
}

.hero__title {
  max-width: 18em;
  font-size: var(--fs-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
}

.hero__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--grid-gap);
  align-items: start;
  margin-top: var(--sp-8);
}

.hero__sub {
  grid-column: 1 / span 6;
  max-width: 30em;
  color: var(--c-ink-2);
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  letter-spacing: var(--ls-lead);
}

.facts {
  grid-column: 8 / span 5;
  border-top: 1px solid var(--c-ink);
}
.facts__caption {
  padding-block: var(--sp-3);
  border-bottom: 1px solid var(--c-line);
  color: var(--c-ink);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
  line-height: var(--lh-label);
}
.facts__row {
  display: grid;
  grid-template-columns: 6.5em minmax(0, 1fr);
  gap: var(--sp-4);
  padding-block: var(--sp-3);
  border-bottom: 1px solid var(--c-line);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}
.facts dt { color: var(--c-ink-3); font-weight: var(--fw-medium); }
.facts dd { color: var(--c-ink); }

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

.section { padding-block: var(--sp-section); }
.section + .section { border-top: 1px solid var(--c-line); }

.eyebrow {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  color: var(--c-ink-3);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
  line-height: var(--lh-label);
}
.eyebrow__num { color: var(--c-accent); font-variant-numeric: tabular-nums; }

.section__title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
}

.section__lead {
  max-width: var(--measure);
  color: var(--c-ink-2);
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  letter-spacing: var(--ls-lead);
}

.section__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0 var(--grid-gap);
  align-items: end;
  margin-bottom: var(--sp-8);
}
.section__head .eyebrow { grid-column: 1 / -1; }
.section__head .section__title { grid-column: 1 / span 7; }
.section__head .section__lead { grid-column: 8 / span 5; }

/* split layout (problem) */
.split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--grid-gap);
  align-items: start;
}
.split__head {
  grid-column: 1 / span 5;
  position: sticky;
  top: calc(var(--header-h) + var(--sp-6));
}
.split__head .section__lead { margin-top: var(--sp-5); }
.split__body { grid-column: 7 / span 6; }

.rows { border-top: 1px solid var(--c-ink); }
.row {
  display: grid;
  grid-template-columns: var(--sp-7) minmax(0, 1fr);
  gap: var(--sp-4);
  padding-block: var(--sp-6);
  border-bottom: 1px solid var(--c-line);
}
.row__num {
  color: var(--c-accent);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
  line-height: var(--lh-h3);
  font-variant-numeric: tabular-nums;
  padding-top: var(--sp-1);
}
.row__title,
.function__title,
.stage__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-h3);
  letter-spacing: var(--ls-h3);
}
.row__title + p { margin-top: var(--sp-2); }

/* ---------- figure 1 ---------- */

.figure__frame {
  padding: var(--sp-7) var(--sp-6);
  background: var(--c-surface);
  border-radius: var(--r-m);
}
.figure__cap {
  max-width: var(--measure);
  margin-top: var(--sp-4);
  color: var(--c-ink-3);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

.fig { width: 100%; height: auto; font-family: var(--font-sans); }
.fig--tall { display: none; }

.fig .box { fill: var(--c-bg); stroke: var(--c-line-strong); stroke-width: 1; }
.fig .box--gw { stroke: var(--c-accent); stroke-width: 1.5; }
.fig .box--zone { stroke: var(--c-line-ink); stroke-dasharray: 4 3; }
.fig .gw-head { fill: var(--c-accent); }
.fig .hair { stroke: var(--c-line); stroke-width: 1; }
.fig .bullet { fill: var(--c-line-ink); }

.fig .t-label { fill: var(--c-ink-3); font-size: var(--fig-fs-small); font-weight: var(--fw-semibold); letter-spacing: var(--ls-label); }
.fig .t-title { fill: var(--c-ink); font-size: var(--fig-fs-title); font-weight: var(--fw-semibold); letter-spacing: var(--ls-h3); }
.fig .t-title-s { fill: var(--c-ink); font-size: var(--fig-fs-title-s); font-weight: var(--fw-semibold); letter-spacing: var(--ls-h3); }
.fig .t-item { fill: var(--c-ink-2); font-size: var(--fig-fs-item); }
.fig .t-on { fill: var(--c-on-accent); font-size: var(--fig-fs-title); font-weight: var(--fw-semibold); letter-spacing: var(--ls-h3); }
.fig .t-small { fill: var(--c-ink-3); font-size: var(--fig-fs-small); }
.fig .t-strong { fill: var(--c-ink-2); font-size: var(--fig-fs-small); font-weight: var(--fw-semibold); }
.fig .t-allow { fill: var(--c-accent); font-size: var(--fig-fs-small); font-weight: var(--fw-semibold); }
.fig .t-hold { fill: var(--c-hold); font-size: var(--fig-fs-small); font-weight: var(--fw-semibold); }
.fig .t-deny { fill: var(--c-deny); font-size: var(--fig-fs-small); font-weight: var(--fw-semibold); }
.fig .t-mid { text-anchor: middle; }

.fig .num-c { fill: var(--c-bg); stroke: var(--c-accent); stroke-width: 1.25; }
.fig .num-t { fill: var(--c-accent); font-size: var(--fig-fs-num); font-weight: var(--fw-bold); text-anchor: middle; }

.fig .ln { fill: none; stroke: var(--c-line-ink); stroke-width: 1.25; }
.fig .ln-allow { fill: none; stroke: var(--c-accent); stroke-width: 1.75; }
.fig .ln-hold { fill: none; stroke: var(--c-hold); stroke-width: 1.5; stroke-dasharray: 5 4; }
.fig .ln-hold-bar { fill: none; stroke: var(--c-hold); stroke-width: 2; stroke-linecap: round; }
.fig .ln-deny { fill: none; stroke: var(--c-deny); stroke-width: 1.5; }
.fig .ln-deny-bar { fill: none; stroke: var(--c-deny); stroke-width: 2.5; stroke-linecap: round; }
.fig .ln-bypass { fill: none; stroke: var(--c-line-ink); stroke-width: 1.5; stroke-dasharray: 2 4; stroke-linecap: round; }
.fig .mark-c { fill: var(--c-bg); stroke: var(--c-deny); stroke-width: 1.5; }
.fig .mark-x { fill: none; stroke: var(--c-deny); stroke-width: 1.75; stroke-linecap: round; }

.fig .ah { fill: var(--c-line-ink); }
.fig .ah-allow { fill: var(--c-accent); }
.fig .ah-hold { fill: var(--c-hold); }

/* ---------- functions ---------- */

.functions {
  margin-top: var(--sp-8);
  border-top: 1px solid var(--c-ink);
}
.function {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--sp-3) var(--grid-gap);
  padding-block: var(--sp-5);
  border-bottom: 1px solid var(--c-line);
}
.function__name {
  grid-column: 1 / span 4;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
}
.function__en {
  display: block;
  margin-top: var(--sp-1);
  color: var(--c-ink-3);
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-label);
  line-height: var(--lh-label);
}
.function__text { grid-column: 5 / span 7; max-width: var(--measure); }

.icon {
  flex: none;
  width: var(--icon);
  height: var(--icon);
  fill: none;
  stroke: var(--c-accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.function__name .icon { margin-top: 1px; }

.note {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--sp-3) var(--grid-gap);
  margin-top: var(--sp-7);
  padding: var(--sp-6);
  background: var(--c-surface);
  border-radius: var(--r-m);
}
.note__title {
  grid-column: 1 / span 4;
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-h3);
  letter-spacing: var(--ls-h3);
}
.note__text { grid-column: 5 / span 7; max-width: var(--measure); }

/* ---------- principles ---------- */

.principles { border-top: 1px solid var(--c-ink); }
.principle {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--sp-4) var(--grid-gap);
  padding-block: var(--sp-7);
  border-bottom: 1px solid var(--c-line);
}
.principle__num {
  grid-column: 1 / span 1;
  color: var(--c-accent);
  font-size: var(--fs-h3-lg);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-h3-lg);
  letter-spacing: var(--ls-h3-lg);
  font-variant-numeric: tabular-nums;
}
.principle__title {
  grid-column: 2 / span 4;
  font-size: var(--fs-h3-lg);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-h3-lg);
  letter-spacing: var(--ls-h3-lg);
}
.principle__body { grid-column: 7 / span 6; max-width: var(--measure); }
.principle__body p + p { margin-top: var(--sp-3); }

/* figure 2: revocation states */
.states { grid-column: 2 / -1; margin-top: var(--sp-6); }
.states__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--grid-gap);
}
.state {
  position: relative;
  padding-top: var(--sp-6);
  border-top: var(--track) solid var(--c-line-strong);
}
.state::before {
  content: "";
  position: absolute;
  top: calc((var(--marker) + var(--track)) / -2);
  left: 0;
  width: var(--marker);
  height: var(--marker);
  border: var(--track) solid var(--c-line-ink);
  border-radius: var(--r-pill);
  background: var(--c-bg);
}
.state--progress { border-top-color: var(--c-hold); }
.state--progress::before { border-color: var(--c-hold); }
.state--done { border-top-color: var(--c-accent); }
.state--done::before { border-color: var(--c-accent); background: var(--c-accent); }
.state__name {
  color: var(--c-ink);
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-h3);
  letter-spacing: var(--ls-h3);
}
.state--progress .state__name { color: var(--c-hold); }
.state--done .state__name { color: var(--c-accent-strong); }
.state__note {
  margin-top: var(--sp-1);
  color: var(--c-ink-3);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}
.checks {
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-surface);
  border-radius: var(--r-m);
}
.checks__label {
  color: var(--c-ink-3);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
  line-height: var(--lh-label);
  margin-bottom: var(--sp-2);
}
.checks li {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding-block: var(--sp-1);
  color: var(--c-ink);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}
.checks li::before {
  content: "";
  flex: none;
  width: var(--sp-3);
  height: var(--sp-3);
  border: 1px solid var(--c-line-ink);
  border-radius: var(--r-s);
  background: var(--c-bg);
}
.states .figure__cap { margin-top: var(--sp-5); }

/* ---------- stages ---------- */

.stages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--grid-gap);
}
.stage {
  position: relative;
  padding-top: var(--sp-5);
  border-top: var(--track) solid var(--c-line);
}
.stage--now { border-top-color: var(--c-accent); }
.stage__top {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  min-height: var(--icon);
}
.stage__num {
  color: var(--c-ink-3);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
  font-variant-numeric: tabular-nums;
}
.stage--now .stage__num { color: var(--c-accent); }
.stage__now {
  padding: 0 var(--sp-2);
  border-radius: var(--r-pill);
  background: var(--c-accent);
  color: var(--c-on-accent);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
  line-height: var(--lh-small);
}
.stage__text {
  margin-top: var(--sp-2);
  color: var(--c-ink-2);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}
.stage:not(.stage--now) .stage__title { color: var(--c-ink-2); }

/* ---------- contact ---------- */

.contact {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--grid-gap);
  align-items: start;
}
.contact__head { grid-column: 1 / span 5; }
.contact__list { grid-column: 7 / span 6; border-top: 1px solid var(--c-ink); }
.contact__row {
  display: grid;
  grid-template-columns: 5em minmax(0, 1fr);
  gap: var(--sp-4);
  align-items: baseline;
  padding-block: var(--sp-5);
  border-bottom: 1px solid var(--c-line);
}
.contact__row dt {
  color: var(--c-ink-3);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
}
.contact__link {
  color: var(--c-ink);
  font-size: var(--fs-contact);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-contact);
  letter-spacing: var(--ls-contact);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--c-line-strong);
  text-underline-offset: 0.18em;
  font-variant-numeric: tabular-nums;
  transition: color var(--dur-fast) var(--ease), text-decoration-color var(--dur-fast) var(--ease);
}
.contact__link:hover { color: var(--c-accent-strong); text-decoration-color: currentColor; }

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

.site-footer {
  padding-block: var(--sp-8) var(--sp-7);
  background: var(--c-surface);
  border-top: 1px solid var(--c-line);
  color: var(--c-ink-3);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}
.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-bottom: var(--sp-5);
  margin-bottom: var(--sp-5);
  border-bottom: 1px solid var(--c-line);
}
.footer__brand {
  color: var(--c-ink);
  font-size: var(--fs-brand);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-brand);
  line-height: 1;
}
.footer__info {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-6);
}
.footer__info li { color: var(--c-ink); }
.footer__k { margin-right: var(--sp-2); color: var(--c-ink-3); }
.footer__info a {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--c-line-strong);
  text-underline-offset: 0.2em;
}
.footer__info a:hover { color: var(--c-accent-strong); text-decoration-color: currentColor; }
.footer__copy { margin-top: var(--sp-6); }

/* ---------- 404 ---------- */

.notfound { padding-block: var(--sp-section); }
.notfound__title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
}
.notfound__title + .notfound__title { margin-top: var(--sp-2); color: var(--c-ink-3); }
.notfound__links { display: flex; flex-wrap: wrap; gap: var(--sp-5); margin-top: var(--sp-7); }

/* ---------- responsive ---------- */

@media (max-width: 959px) {
  .nav__list { display: none; }

  .hero { padding-block: var(--sp-8) var(--sp-7); }
  .hero__grid,
  .section__head,
  .split,
  .function,
  .note,
  .principle,
  .contact { grid-template-columns: minmax(0, 1fr); }

  .hero__grid > *,
  .section__head > *,
  .section__head .section__title,
  .section__head .section__lead,
  .split > *,
  .function > *,
  .note > *,
  .principle > *,
  .contact > * { grid-column: 1 / -1; }

  .hero__grid { gap: var(--sp-7); margin-top: var(--sp-6); }
  .section__head { margin-bottom: var(--sp-7); }
  .section__head .section__lead { margin-top: var(--sp-4); }
  .split { gap: var(--sp-7); }
  .split__head { position: static; }

  .figure__frame { padding: var(--sp-6) var(--sp-4); }
  .fig--wide { display: none; }
  .fig--tall { display: block; max-width: 30rem; margin-inline: auto; }

  .functions { margin-top: var(--sp-7); }
  .function { gap: var(--sp-3); }
  .function__text { padding-left: calc(var(--icon) + var(--sp-3)); }
  .note { padding: var(--sp-5); }

  .principle { gap: var(--sp-3); padding-block: var(--sp-6); }
  .principle__body { margin-top: var(--sp-1); }
  .states { margin-top: var(--sp-5); }

  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--sp-7); }
  .contact { gap: var(--sp-6); }
}

@media (max-width: 639px) {
  .lang { padding: var(--sp-1) var(--sp-3); }

  .row { grid-template-columns: var(--sp-6) minmax(0, 1fr); padding-block: var(--sp-5); }

  .states__list { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .state {
    padding: 0 0 var(--sp-6) var(--sp-6);
    border-top: 0;
    border-left: var(--track) solid var(--c-line-strong);
  }
  .state:last-child { padding-bottom: 0; }
  .state::before { top: 0; left: calc((var(--marker) + var(--track)) / -2); }
  .state--progress { border-left-color: var(--c-hold); }
  .state--done { border-left-color: transparent; }

  .stages { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .stage {
    padding: 0 0 var(--sp-6) var(--sp-5);
    border-top: 0;
    border-left: var(--track) solid var(--c-line);
  }
  .stage:last-child { padding-bottom: 0; }
  .stage--now { border-left-color: var(--c-accent); }
  .stage__top { margin-bottom: var(--sp-2); }

  .contact__row { grid-template-columns: minmax(0, 1fr); gap: var(--sp-1); padding-block: var(--sp-4); }

  .footer__info { flex-direction: column; gap: var(--sp-2); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
