designpaca/apps/site/public/work/font-foundry/styles/main.css
Yun Chan 123d9fc5a8 fix(showcase): 미정의 CSS 변수·한글 조판·접근성 결함 수리 및 무결성 게이트 두 겹 신설
stylelint 도 html-validate 도 "var(--x) 를 썼는데 --x 가 어디에도 없다"를 잡지
못한다. 미정의 변수는 선언 전체를 무효로 만드는데 콘솔 에러가 없어 조용히 남는다.
검사기를 심자마자 v0.9.1 의 실제 결함이 나왔다.

게이트 신설
- tools/integrity.mjs — L0 무결성. CSS 커스텀 프로퍼티 참조, 상대경로,
  한글 조판 필수 규칙(keep-all·한글 폰트 지정), 슬롭 지문, 스크롤 리스너를 검사.
  verify.mjs 체인에 편입해 실패 시 배포를 막는다.
  폴백이 있는 var(--x, 기본값) 은 선택적 주입이므로 미정의로 세지 않는다.
- tools/showcase-audit.mjs — 320/390/768/1440 실렌더 감사. 가로 스크롤·오버플로·
  컨트롤 줄바꿈·대비 AA·왼쪽 인셋·h1 개수·히어로 줄 수·깨진 이미지·콘솔 에러.
  반투명 배경을 합성해 대비를 재고, WebGL 페이지를 위해 swiftshader 로 렌더한다.
- html-validate 대상을 두 페이지에서 public/work 전체로 넓혔다.

수리한 결함
- 미정의 변수 64건: --dur-fast·--radius-xs 가 정의된 적이 없어 cask-archive,
  cheongon-care, materia-interior 의 transition 선언이 통째로 무효였다.
  새 토큰을 만들지 않고 기존 --dur-quick·--radius 로 매핑했다 — 토큰을 늘리면
  radius 어휘가 4종이 되어 하드 게이트 3에 걸린다.
- 한글 조판: lumina-optics·pulsegate·synapse-bci 가 word-break: keep-all 없이
  IBM Plex Sans 만 지정해 한글이 시스템 기본으로 떨어지고 있었다.
  같은 계열의 IBM Plex Sans KR 을 스택에 넣고 keep-all 을 추가했다.
- 슬롭 지문 19건: text-transform: uppercase 로 만든 영문 대문자 eyebrow 를
  한글 문장으로 바꾸고, 대문자용으로 잡아둔 넓은 자간과 모노 서체도 되돌렸다.
- 하드 게이트 9: materia-interior/hannam-duplex.html 의 100vh → 100dvh.
  이 파일은 어디서도 참조되지 않으면서 인라인 hex 까지 갖고 있어 토큰 기반으로 다시 썼다.
- 접근성 11건: label 하나가 output 과 input 둘에 걸리던 것 5건(font-foundry,
  lumina-optics), dl > div > div > dt 4건(muwol-coffee), div 에 붙은 aria-label
  2건(overtone-sound, pulsegate).

측정기 자체의 오류 둘도 고쳤다 — 눈에 보이지 않는 .sr-only 를 대비 실패로 잡던 것과,
overflow-x: auto 상자 안의 넓은 표를 오버플로로 잡던 것. 재는 도구가 틀리면
통과도 실패도 의미가 없다.
2026-08-24 12:50:57 +09:00

423 lines
9.8 KiB
CSS

@import url("./tokens.css");
/* ==========================================================================
한성활자연구소 — editorial-archival. 글자가 상품.
========================================================================== */
*,
*::before,
*::after {
box-sizing: border-box;
}
* {
margin: 0;
}
html {
-webkit-text-size-adjust: 100%;
scroll-behavior: smooth;
background: var(--surface);
}
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
}
body {
background: var(--surface);
color: var(--ink);
font-family: var(--font-body);
font-size: var(--step-0);
line-height: var(--leading-normal);
-webkit-font-smoothing: antialiased;
}
:where(h1, h2, h3) {
font-family: var(--font-display);
font-weight: 600;
line-height: var(--leading-tight);
word-break: keep-all;
overflow-wrap: break-word;
text-wrap: balance;
}
h2 {
font-size: var(--step-2);
}
h3 {
font-family: var(--font-body);
font-weight: 600;
font-size: var(--step-1);
}
:where(p, li, dd, dt, th, td, figcaption) {
word-break: keep-all;
overflow-wrap: break-word;
line-height: var(--leading-normal);
text-wrap: pretty;
}
.muted {
color: var(--ink-muted);
}
a {
color: inherit;
}
:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 3px;
}
.skip {
position: absolute;
left: -9999px;
top: 0;
background: var(--ink);
color: var(--surface);
padding: var(--space-3) var(--space-4);
z-index: 100;
}
.skip:focus {
left: 0;
}
.wrap {
width: min(100% - 2 * var(--pad-inline), var(--container));
margin-inline: auto;
}
/* ── 헤더 ─────────────────────────────────────────────────────────────── */
.site-head {
position: sticky;
top: 0;
z-index: 50;
background: color-mix(in srgb, var(--surface) 90%, transparent);
backdrop-filter: blur(6px);
border-bottom: 1px solid var(--line);
}
.head-inner {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: var(--space-4);
padding-block: var(--space-3);
}
.wordmark {
font-family: var(--font-display);
font-size: var(--step-1);
font-weight: 600;
text-decoration: none;
}
.nav {
display: flex;
gap: clamp(var(--space-3), 2vw, var(--space-5));
font-size: var(--step--1);
}
.nav a {
text-decoration: none;
color: var(--ink-muted);
padding-block: 2px;
border-bottom: 1px solid transparent;
transition: color var(--dur-quick) var(--ease-soft),
border-color var(--dur-quick) var(--ease-soft);
}
.nav a:hover {
color: var(--ink);
border-color: var(--accent);
}
/* ── 스페시멘 히어로 ──────────────────────────────────────────────────── */
.hero {
padding-block: var(--space-7) var(--space-8);
}
.hero-kicker {
font-size: var(--step--1);
color: var(--ink-muted);
letter-spacing: 0.06em;
}
.hero-glyph {
font-size: clamp(11rem, 24vw, 22rem);
line-height: 0.95;
margin-top: var(--space-4);
position: relative;
}
/* 인주각 — 글리프 옆에 찍히는 도장 */
.hero-glyph::after {
content: "";
position: absolute;
right: 0.12em;
bottom: 0.18em;
width: 0.11em;
height: 0.11em;
background: var(--accent);
}
.hero-side {
margin-top: var(--space-5);
display: grid;
grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
gap: var(--space-5) var(--space-7);
align-items: start;
}
.hero-statement {
max-width: 32em;
}
.hero-facts {
display: grid;
gap: var(--space-3);
border-left: 1px solid var(--line);
padding-left: var(--space-5);
}
.hero-facts dt {
font-size: var(--step--1);
color: var(--ink-faint);
}
.hero-facts dd {
margin-top: 2px;
font-weight: 500;
}
/* ── 섹션 공통 ────────────────────────────────────────────────────────── */
.section {
padding-block: var(--space-8);
}
.band {
background: var(--surface-raised);
border-block: 1px solid var(--line);
}
/* ── 활자 두 종 ───────────────────────────────────────────────────────── */
.typeface + .typeface {
margin-top: var(--space-6);
}
.typeface-head {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: var(--space-4);
flex-wrap: wrap;
border-top: 1px solid var(--line);
padding-top: var(--space-3);
}
.typeface-head .muted {
font-size: var(--step--1);
}
.specimen {
margin-top: var(--space-4);
font-size: 1.1875rem;
line-height: 1.9;
max-width: 46em;
}
.specimen-display {
font-size: clamp(1.75rem, 1.2rem + 3vw, 3.25rem);
line-height: 1.45;
max-width: 22em;
font-weight: 600;
}
/* ── 조판 시험대 ──────────────────────────────────────────────────────── */
.bench-lead {
max-width: 36em;
margin-top: var(--space-3);
}
.bench {
margin-top: var(--space-5);
display: grid;
grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
gap: var(--space-5) var(--space-7);
align-items: start;
}
.bench-controls {
display: grid;
gap: var(--space-4);
}
.control-head {
display: flex;
justify-content: space-between;
align-items: baseline;
}
.control label {
font-size: var(--step--1);
color: var(--ink-muted);
}
.control output {
font-variant-numeric: tabular-nums;
color: var(--ink);
}
input[type="range"] {
width: 100%;
accent-color: var(--accent);
}
.btn-reset {
justify-self: start;
background: none;
border: 1px solid var(--line);
border-radius: var(--radius);
color: var(--ink-muted);
font-size: var(--step--1);
padding: 0.4rem 0.9rem;
cursor: pointer;
transition: border-color var(--dur-quick) var(--ease-soft),
color var(--dur-quick) var(--ease-soft);
}
.btn-reset:hover {
border-color: var(--accent);
color: var(--ink);
}
.bench-sample {
border: 1px solid var(--line);
background: var(--surface);
border-radius: var(--radius);
padding: var(--space-5);
max-width: 46em;
}
/* ── 활자 케이스 ──────────────────────────────────────────────────────── */
.case-grid {
display: grid;
grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
gap: var(--space-6) var(--space-7);
align-items: start;
}
.case-photo img,
.case-photo-b img {
display: block;
width: 100%;
height: auto;
border-radius: var(--radius);
}
.case-photo figcaption,
.case-photo-b figcaption {
font-size: var(--step--1);
color: var(--ink-faint);
margin-top: var(--space-2);
}
.case-text h2 {
margin-bottom: var(--space-4);
}
.case-photo-b {
margin-top: var(--space-5);
max-width: 34rem;
}
/* ── 구입 ─────────────────────────────────────────────────────────────── */
.order-grid {
display: grid;
grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto;
gap: var(--space-5) var(--space-7);
align-items: start;
}
.order-grid .muted {
margin-top: var(--space-3);
max-width: 26em;
}
.order-rows {
border-top: 1px solid var(--line);
}
.order-row {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: var(--space-4);
padding-block: var(--space-3);
border-bottom: 1px solid var(--line);
}
.order-row p {
font-size: var(--step--1);
color: var(--ink-muted);
margin-top: 2px;
}
.order-price {
font-family: var(--font-display);
font-size: var(--step-1);
white-space: nowrap;
}
.btn {
display: inline-block;
background: var(--accent);
color: var(--accent-ink);
font-weight: 500;
text-decoration: none;
padding: 0.75rem 1.5rem;
border-radius: var(--radius);
transition: background var(--dur-quick) var(--ease-soft);
}
.btn:hover {
background: var(--accent-hover);
}
/* ── 푸터 ─────────────────────────────────────────────────────────────── */
.site-foot {
border-top: 1px solid var(--line);
padding-block: var(--space-5);
font-size: var(--step--1);
}
.foot-inner {
display: flex;
justify-content: space-between;
gap: var(--space-3) var(--space-5);
flex-wrap: wrap;
}
/* ── 등장 모션 ────────────────────────────────────────────────────────── */
.reveal {
opacity: 0;
translate: 0 12px;
transition: opacity var(--dur-normal) var(--ease-soft),
translate var(--dur-normal) var(--ease-soft);
transition-delay: var(--delay, 0ms);
}
.reveal.is-in {
opacity: 1;
translate: 0 0;
}
@media (prefers-reduced-motion: reduce) {
.reveal {
opacity: 1;
translate: 0 0;
transition: none;
}
}
/* ── 반응형 ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
.hero-side,
.bench,
.case-grid,
.order-grid {
grid-template-columns: 1fr;
gap: var(--space-5);
}
.case-photo {
max-width: 24rem;
}
.hero,
.section {
padding-block: var(--space-6);
}
}
@media (max-width: 560px) {
.head-inner {
flex-direction: column;
align-items: flex-start;
gap: var(--space-1);
}
.nav {
width: 100%;
justify-content: space-between;
}
.order-row {
flex-direction: column;
align-items: flex-start;
gap: var(--space-1);
}
}