designpaca/apps/site/public/work/pulsegate/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

545 lines
12 KiB
CSS

@import url("./tokens.css");
/* ==========================================================================
Pulsegate — dark-instrument. 명도차로만 읽히는 계기판.
레이아웃 → 재질 → 모션 순서.
========================================================================== */
*,
*::before,
*::after {
box-sizing: border-box;
}
* {
margin: 0;
}
html {
-webkit-text-size-adjust: 100%;
scroll-behavior: smooth;
background: var(--surface);
color-scheme: dark;
}
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
}
body {
word-break: keep-all;
overflow-wrap: break-word;
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-weight: 500;
line-height: var(--leading-tight);
letter-spacing: -0.015em;
overflow-wrap: break-word;
text-wrap: balance;
}
h1 {
font-size: var(--step-3);
}
h2 {
font-size: var(--step-2);
}
h3 {
font-size: var(--step-1);
}
.lead {
color: var(--ink-muted);
max-width: 38em;
}
code {
font-family: var(--font-mono);
font-size: 0.9em;
}
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;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
border: 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) 86%, transparent);
backdrop-filter: blur(8px);
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-mono);
font-size: var(--step-1);
font-weight: 500;
text-decoration: none;
letter-spacing: -0.02em;
}
.wordmark-dot {
color: var(--accent);
}
.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-8) var(--space-7);
}
.hero-grid {
display: grid;
grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
gap: var(--space-6) var(--space-7);
align-items: start;
}
.hero-text .lead {
margin-top: var(--space-4);
}
.hero-actions {
margin-top: var(--space-5);
display: flex;
align-items: center;
gap: var(--space-4);
flex-wrap: wrap;
}
.btn-primary {
display: inline-block;
background: var(--ink);
color: var(--accent-ink);
font-weight: 500;
text-decoration: none;
padding: 0.75rem 1.375rem;
border-radius: var(--radius);
transition: background var(--dur-quick) var(--ease-soft);
}
/* 히어로에서 가장 밝은 덩어리 = CTA. 색이 아니라 명도로 2위. */
.btn-primary:hover {
background: var(--ink-bright);
}
.link-quiet {
color: var(--ink-muted);
text-decoration: none;
border-bottom: 1px solid var(--line-strong);
padding-bottom: 1px;
transition: color var(--dur-quick) var(--ease-soft),
border-color var(--dur-quick) var(--ease-soft);
}
.link-quiet:hover {
color: var(--accent);
border-color: var(--accent);
}
.command {
margin-top: var(--space-5);
display: flex;
align-items: center;
gap: var(--space-3);
background: var(--surface-frame);
border: 1px solid var(--line);
border-radius: var(--radius);
padding: var(--space-3) var(--space-4);
font-family: var(--font-mono);
font-size: var(--step--1);
max-width: 30rem;
}
.command-prompt {
color: var(--accent);
}
.command code {
display: block; /* 인라인이면 nowrap 최소폭이 그리드를 밀어낸다(320px 실패) */
min-width: 0;
color: var(--ink);
overflow-x: auto;
white-space: nowrap;
scrollbar-width: thin;
}
.hero-note {
margin-top: var(--space-3);
font-size: var(--step--1);
color: var(--ink-faint);
max-width: 34rem;
}
/* ── 계기(정적 프레임) ─────────────────────────────────────────────────── */
.instrument {
border: 1px solid var(--line);
border-radius: var(--radius-frame);
background: var(--surface-raised);
padding: var(--space-4);
}
.instrument-head {
display: flex;
justify-content: space-between;
gap: var(--space-3);
font-family: var(--font-mono);
font-size: 0.6875rem;
letter-spacing: 0.08em;
color: var(--ink-faint);
margin-bottom: var(--space-3);
}
.instrument svg {
display: block;
width: 100%;
height: auto;
}
.chart-grid line {
stroke: var(--line);
stroke-width: 1;
}
.chart-grid .chart-axis {
stroke: var(--line-strong);
}
.series {
fill: none;
stroke-width: 1.25;
stroke-linejoin: round;
}
.series-faint {
stroke: var(--line-strong);
}
.series-muted {
stroke: var(--ink-faint);
}
.series-accent {
stroke: var(--accent-stroke);
}
.instrument-rows {
margin-top: var(--space-3);
border-top: 1px solid var(--line);
}
.instrument-rows > div {
display: flex;
justify-content: space-between;
gap: var(--space-3);
padding-block: 0.5rem;
border-bottom: 1px solid var(--line);
font-size: var(--step--1);
color: var(--ink-muted);
}
.num {
font-family: var(--font-mono);
font-variant-numeric: tabular-nums;
color: var(--ink);
}
/* ── 섹션 공통 ────────────────────────────────────────────────────────── */
.section {
padding-block: var(--space-8);
}
.band {
background: var(--surface-raised);
border-block: 1px solid var(--line);
}
.section h2 + .lead {
margin-top: var(--space-3);
}
/* ── 배선 다이어그램 ──────────────────────────────────────────────────── */
.wiring-diagram {
margin-top: var(--space-6);
border: 1px solid var(--line);
border-radius: var(--radius-frame);
background: var(--surface-raised);
padding: var(--space-4) var(--space-3);
}
.wiring-diagram svg {
display: block;
width: 100%;
height: auto;
}
.trace {
fill: none;
stroke: var(--accent-stroke);
stroke-width: 1.5;
}
.station rect {
fill: none;
stroke: var(--line-strong);
stroke-width: 1;
}
.station text {
font-family: var(--font-body);
font-size: 15px;
fill: var(--ink-muted);
}
.station .mono-note {
font-family: var(--font-mono);
font-size: 12px;
fill: var(--ink-faint);
}
.flow-label text {
font-family: var(--font-mono);
font-size: 12px;
fill: var(--accent);
}
/* 스크롤 드로잉 — 이중 게이트. 폴백은 '이미 다 그어진 도면' */
@media (prefers-reduced-motion: no-preference) {
@supports (animation-timeline: view()) {
.trace {
stroke-dasharray: 2400;
stroke-dashoffset: 2400;
animation: trace-draw 1.6s var(--ease-soft) both;
animation-timeline: view();
animation-range: entry 0% entry 60%;
}
@keyframes trace-draw {
to {
stroke-dashoffset: 0;
}
}
}
}
.wiring-notes {
margin-top: var(--space-5);
display: grid;
grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
gap: var(--space-5) var(--space-6);
}
.wiring-note h3 {
font-size: var(--step-0);
font-weight: 600;
}
.wiring-note p {
margin-top: var(--space-2);
color: var(--ink-muted);
font-size: var(--step--1);
}
/* ── 수치 밴드 ────────────────────────────────────────────────────────── */
.table-wrap {
margin-top: var(--space-5);
overflow-x: auto;
}
table {
width: 100%;
border-collapse: collapse;
}
thead th {
text-align: left;
font-weight: 500;
font-size: var(--step--1);
color: var(--ink-faint);
padding: var(--space-2) var(--space-3);
border-bottom: 1px solid var(--line-strong);
}
tbody th {
font-weight: 500;
font-family: var(--font-mono);
font-size: var(--step--1);
}
tbody td,
tbody th {
padding: var(--space-2) var(--space-3);
border-bottom: 1px solid var(--line);
vertical-align: baseline;
white-space: nowrap;
}
tbody td {
color: var(--ink-muted);
}
td.num {
color: var(--ink);
}
.row-more td {
color: var(--ink-faint);
font-size: var(--step--1);
padding-block: var(--space-3);
}
.measure-note {
margin-top: var(--space-3);
font-size: var(--step--1);
color: var(--ink-faint);
}
/* ── 요금 ─────────────────────────────────────────────────────────────── */
.pricing-grid {
display: grid;
grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
gap: var(--space-6) var(--space-7);
align-items: start;
}
.pricing-text .lead {
margin-top: var(--space-3);
}
.pricing-rows {
border-top: 1px solid var(--line-strong);
}
.price-row {
display: flex;
justify-content: space-between;
align-items: center;
gap: var(--space-4);
padding-block: var(--space-4);
border-bottom: 1px solid var(--line);
flex-wrap: wrap;
}
.price-row h3 {
font-weight: 600;
}
.price-row p {
margin-top: var(--space-1);
color: var(--ink-muted);
font-size: var(--step--1);
}
.price-val {
display: flex;
align-items: center;
gap: var(--space-4);
flex-wrap: wrap;
}
.price-val > span {
font-family: var(--font-mono);
font-size: var(--step-1);
font-variant-numeric: tabular-nums;
}
.price-val em {
font-style: normal;
font-size: var(--step--1);
color: var(--ink-faint);
}
/* ── 푸터 ─────────────────────────────────────────────────────────────── */
.site-foot {
border-top: 1px solid var(--line);
padding-block: var(--space-5);
}
.foot-inner {
display: flex;
justify-content: space-between;
gap: var(--space-3) var(--space-5);
flex-wrap: wrap;
font-size: var(--step--1);
color: var(--ink-muted);
}
.foot-meta {
font-family: var(--font-mono);
font-size: 0.75rem;
color: var(--ink-faint);
}
/* ── 등장 모션 ────────────────────────────────────────────────────────── */
.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-grid,
.pricing-grid {
grid-template-columns: minmax(0, 1fr);
gap: var(--space-5);
}
.hero {
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;
}
.price-row {
align-items: flex-start;
flex-direction: column;
}
}