/* 세브렌 스타일 페이지 조각 — kit.css (원본: ~/.claude/skills/sebren-style-page/assets)
   쓰는 법: <body class="sb"> (또는 감쌀 요소에 class="sb") + 맨 끝에 kit.js
   "@piece 이름" ~ "@end 이름" 표시는 조각 경계예요. 공유 페이지가 이 표시로 잘라서 보여 줘요. */

/* @piece tokens */
.sb {
  /* 색: 무채색 단계 + 포인트 1색 */
  --sb-bg: #000;
  --sb-raise: #1a1a1a;
  --sb-raise-2: #1f1f1f;
  --sb-fg: #ededed;
  --sb-muted: #a0a0a0;
  --sb-guide: #292929;
  --sb-guide-strong: #454545;
  --sb-cross: #878787;
  --sb-accent: #ffae00;
  /* 글꼴: 제목 Paperlogy, 본문 Pretendard (없으면 시스템 글꼴) */
  --sb-font-display: "Paperlogy", "Pretendard Variable", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --sb-font-body: "Pretendard Variable", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --sb-font-quote: ui-serif, Georgia, "Noto Serif KR", serif;
  /* 크기: 큰 제목일수록 자간을 좁혀요 */
  --sb-fs-hero: clamp(40px, 5vw, 72px);
  --sb-fs-title: clamp(30px, 3.6vw, 52px);
  --sb-fs-turn: clamp(24px, 2.8vw, 40px);
  --sb-fs-sub: clamp(17px, 1.4vw, 20px);
  --sb-fs-body: 16px;
  --sb-track-hero: -0.06em;
  --sb-track-title: -0.03em;
  --sb-radius: 16px;
  /* 움직임: 끝에서 살짝 넘쳤다 돌아오는 곡선, 시간은 0.2초와 0.3초 두 가지 */
  --sb-ease: cubic-bezier(.175, .885, .32, 1.1);
  --sb-dur-1: .2s;
  --sb-dur-2: .3s;
  --sb-stagger: .15s;
  --sb-max: 1080px;

  background: var(--sb-bg);
  color: var(--sb-fg);
  font-family: var(--sb-font-body);
  font-size: var(--sb-fs-body);
  line-height: 1.5;
  color-scheme: dark;
}
.sb-hero {
  margin: 0;
  font-family: var(--sb-font-display);
  font-size: var(--sb-fs-hero);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: var(--sb-track-hero);
  text-wrap: balance;
}
.sb-hero strong { font-weight: 700; }
.sb-title {
  margin: 0;
  font-family: var(--sb-font-display);
  font-size: var(--sb-fs-title);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: var(--sb-track-title);
  text-wrap: balance;
}
.sb-sub {
  margin: 16px auto 0;
  max-width: 52ch;
  color: var(--sb-muted);
  font-size: var(--sb-fs-sub);
  line-height: 1.6;
}
.sb-turn {
  margin: 24px 0 0;
  font-size: var(--sb-fs-turn);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}
.sb-accent { color: var(--sb-accent); }
.sb-center { text-align: center; }
/* @end tokens */

/* @piece grid */
/* 가운데 1080px 틀 + 위아래가 흐려지는 세로 안내선 */
/* 100vw 점선은 세로 스크롤바 폭만큼 넘쳐요. html만으로는 안 막혀서 body에도 걸어요(clip이라 sticky는 그대로) */
html:has(.sb-section),
body:has(.sb-section) { overflow-x: clip; }
.sb-frame {
  position: relative;
  max-width: var(--sb-max);
  margin-inline: auto;
}
.sb-frame::before,
.sb-frame::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0, var(--sb-guide) 200px, var(--sb-guide) calc(100% - 200px), transparent 100%);
}
.sb-frame::before { left: 0; }
.sb-frame::after { right: 0; }
.sb-section {
  position: relative;
  padding: clamp(56px, 8vw, 96px) clamp(16px, 4.5vw, 48px);
  scroll-margin-top: 64px; /* 위에 붙는 sb-header 높이만큼 */
}
/* 섹션 사이 점선: 4px 선 + 6px 빈칸, 화면 끝까지, 양 끝 200px은 흐리게 */
.sb-section + .sb-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 1px;
  transform: translateX(-50%);
  pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--sb-cross) 0 4px, transparent 4px 10px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 200px, #000 calc(100% - 200px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 200px, #000 calc(100% - 200px), transparent);
}
/* 모서리 십자 표시 21px */
.sb-cross {
  position: absolute;
  width: 21px;
  height: 21px;
  pointer-events: none;
}
.sb-cross::before,
.sb-cross::after {
  content: "";
  position: absolute;
  background: var(--sb-cross);
}
.sb-cross::before { left: 10px; top: 0; width: 1px; height: 100%; }
.sb-cross::after { top: 10px; left: 0; height: 1px; width: 100%; }
.sb-cross--tl { left: -10px; top: -10px; }
.sb-cross--tr { right: -11px; top: -10px; }
/* @end grid */

/* @piece reveal */
/* data-reveal="up|down|left|right|quote", 차례는 style="--i:0,1,2…" */
[data-reveal] {
  transition: opacity var(--sb-dur-2) var(--sb-ease), transform var(--sb-dur-2) var(--sb-ease);
  transition-delay: calc(var(--i, 0) * var(--sb-stagger));
}
[data-reveal="left"],
[data-reveal="right"] { transition-duration: calc(var(--sb-dur-2) * 2); }
[data-reveal][data-armed]:not([data-reveal="quote"]) { opacity: 0; }
[data-reveal="up"][data-armed] { transform: translateY(16px); }
[data-reveal="down"][data-armed] { transform: translateY(-16px); }
[data-reveal="left"][data-armed] { transform: translateX(-48px); }
[data-reveal="right"][data-armed] { transform: translateX(48px); }

/* 따옴표 벌어지기: 문장은 그대로 두고 따옴표만 가운데에서 바깥으로 */
.sb-quote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.sb-quote__mark {
  flex: none;
  font-family: var(--sb-font-quote);
  font-size: 64px;
  line-height: 1;
  color: var(--sb-muted);
  transition: transform var(--sb-dur-2) var(--sb-ease), opacity var(--sb-dur-1) var(--sb-ease);
}
.sb-quote__body {
  margin: 0;
  min-width: 0;
  max-width: 620px;
  text-align: center;
  color: var(--sb-muted);
}
[data-reveal="quote"][data-armed] .sb-quote__mark { opacity: 0; }
[data-reveal="quote"][data-armed] .sb-quote__mark--open { transform: translateX(64px); }
[data-reveal="quote"][data-armed] .sb-quote__mark--close { transform: translateX(-64px); }

/* 숨기는 순간에는 애니메이션 없이 바로 */
.sb-arming [data-reveal],
.sb-arming .sb-quote__mark { transition: none !important; }

@media (max-width: 600px) {
  .sb-quote { gap: 12px; }
  .sb-quote__mark { font-size: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  .sb-quote__mark { transition: none; }
  [data-reveal][data-armed]:not([data-reveal="quote"]),
  [data-reveal="quote"][data-armed] .sb-quote__mark { opacity: 1; transform: none; }
}
/* @end reveal */

/* @piece bubble */
/* 말풍선 3개를 24칸 격자에서 좌우로 엇갈리게 */
.sb-bubbles {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  row-gap: 50px;
  margin-top: 50px;
  container-type: inline-size;
}
.sb-bubbles > :nth-child(1) { grid-column: 5 / 16; }
.sb-bubbles > :nth-child(2) { grid-column: 9 / 20; }
.sb-bubbles > :nth-child(3) { grid-column: 6 / 17; }
@container (max-width: 640px) {
  .sb-bubbles > :nth-child(n) { grid-column: 1 / -1; }
}
.sb-bubble {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 18.8cqw; /* 11칸 폭 ÷ 2.43 */
  padding: clamp(24px, 4vw, 50px);
  color: var(--sb-fg);
  container-type: inline-size;
}
/* 외곽선: border 대신 drop-shadow를 상하좌우 1px씩 4번 겹쳐서
   둥근 몸통과 꼬리가 끊김 없는 선 하나로 이어지게 */
.sb-bubble__outline {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  filter:
    drop-shadow(1px 0 0 var(--sb-guide-strong))
    drop-shadow(-1px 0 0 var(--sb-guide-strong))
    drop-shadow(0 1px 0 var(--sb-guide-strong))
    drop-shadow(0 -1px 0 var(--sb-guide-strong));
}
.sb-bubble__shape {
  position: absolute;
  inset: 0;
  border-radius: var(--sb-radius);
  background: var(--sb-bg);
}
/* 꼬리: 31×21 사각형을 clip-path 삼각형으로 */
.sb-bubble__tail {
  position: absolute;
  bottom: -20px;
  width: 31px;
  height: 21px;
  background: var(--sb-bg);
}
.sb-bubble--left .sb-bubble__tail { left: 16px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.sb-bubble--right .sb-bubble__tail { right: 16px; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.sb-bubble__icon {
  flex: none;
  display: grid;
  place-items: center;
  color: var(--sb-fg);
}
.sb-bubble__icon svg,
.sb-bubble__icon img {
  width: auto;
  height: clamp(36px, 22cqw, 72px);
}
/* 컬러 로고를 흑백으로 맞출 때 */
.sb-bubble__icon--mono img { filter: grayscale(1) brightness(2); mix-blend-mode: screen; }
.sb-bubble__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  text-align: left;
}
.sb-bubble__title {
  margin: 0;
  font-family: var(--sb-font-display);
  font-size: clamp(17px, 1.4vw, 20px);
  font-weight: 700;
  line-height: 1.4;
}
.sb-bubble__desc {
  margin: 0;
  color: var(--sb-muted);
  line-height: 1.5;
}
/* @end bubble */

/* @piece typewriter */
/* 완성 문장(ghost)이 자리를 먼저 잡아서 글자가 늘어도 레이아웃이 밀리지 않아요 */
.sb-tw__stack { display: inline-grid; }
.sb-tw__ghost,
.sb-tw__live { grid-area: 1 / 1; }
.sb-tw__ghost { visibility: hidden; }
.sb-tw__cursor {
  display: inline-block;
  width: .06em;
  height: .85em;
  margin-left: .05em;
  vertical-align: -.06em;
  background: currentColor;
  animation: sb-blink 1s steps(1) infinite;
}
.sb-tw__cursor[hidden] { display: none; }
@keyframes sb-blink { 50% { opacity: 0; } }
/* @end typewriter */

/* @piece progress */
/* 오른쪽 섹션 점: 지금 섹션만 밝고 크게 */
.sb-progress {
  position: fixed;
  top: 50%;
  right: max(16px, env(safe-area-inset-right, 0px));
  z-index: 5;
  transform: translateY(-50%);
}
.sb-progress ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sb-progress a {
  display: block;
  width: 6px;
  height: 6px;
  padding: 7px; /* 누르는 면적은 20px */
  border-radius: 50%;
  background: var(--sb-guide-strong);
  background-clip: content-box;
  transition: transform var(--sb-dur-1) var(--sb-ease), background-color var(--sb-dur-1);
}
.sb-progress a[aria-current="step"] { background-color: var(--sb-fg); transform: scale(1.4); }
.sb-progress a:focus-visible { outline: 2px solid var(--sb-accent); outline-offset: 0; }
@media (max-width: 768px) { .sb-progress { display: none; } }
/* @end progress */

/* @piece button */
/* 작은 머리표 + 알약 버튼 두 가지 + 화살표 글자 링크 */
.sb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  color: var(--sb-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.sb-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sb-accent);
}
.sb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.sb-center .sb-actions { justify-content: center; }
.sb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--sb-fg);
  border-radius: 999px;
  background: var(--sb-fg);
  color: var(--sb-bg);
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--sb-dur-1) var(--sb-ease), background-color var(--sb-dur-1), border-color var(--sb-dur-1), color var(--sb-dur-1);
}
.sb-btn:hover { transform: translateY(-2px); background: #fff; border-color: #fff; }
.sb-btn--ghost { background: transparent; color: var(--sb-fg); border-color: var(--sb-guide-strong); }
.sb-btn--ghost:hover { background: var(--sb-raise); border-color: var(--sb-fg); }
.sb-link {
  color: var(--sb-fg);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--sb-guide-strong);
  text-underline-offset: 6px;
  transition: text-decoration-color var(--sb-dur-1);
}
.sb-link:hover { text-decoration-color: var(--sb-accent); }
.sb :focus-visible { outline: 2px solid var(--sb-accent); outline-offset: 3px; }
/* @end button */

/* @piece header */
/* 위에 붙는 머리글: 반투명 검정 + 흐림, 아래 안내선 한 줄 */
.sb-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--sb-guide);
  background: rgba(0, 0, 0, .72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.sb-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--sb-max);
  min-height: 64px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4.5vw, 48px);
}
.sb-header__brand { color: var(--sb-fg); font-weight: 700; text-decoration: none; }
.sb-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
.sb-header nav a { color: var(--sb-muted); font-size: 14px; text-decoration: none; transition: color var(--sb-dur-1); }
.sb-header nav a:hover,
.sb-header nav a[aria-current="page"] { color: var(--sb-fg); }
/* @end header */

/* @piece rows */
/* 번호 목록: 번호 | 제목 | 설명. 줄 사이는 안내선, 올리면 살짝 밝게 */
.sb-rows { margin: 48px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--sb-guide); }
.sb-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 24px;
  padding: 32px 16px;
  border-bottom: 1px solid var(--sb-guide);
  text-align: left;
  transition: background-color var(--sb-dur-2) var(--sb-ease);
}
.sb-row:hover { background: var(--sb-raise); }
.sb-row__num { color: var(--sb-accent); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 14px; padding-top: 4px; }
.sb-row__title { margin: 0; font-family: var(--sb-font-display); font-size: clamp(20px, 1.8vw, 24px); font-weight: 700; line-height: 1.35; }
.sb-row__desc { margin: 0; color: var(--sb-muted); }
.sb-row__tags { margin: 12px 0 0; color: var(--sb-fg); font-size: 14px; }
@media (max-width: 720px) {
  .sb-row { grid-template-columns: 40px minmax(0, 1fr); gap: 8px 16px; padding: 24px 8px; }
  .sb-row__body { grid-column: 2; }
}
/* @end rows */

/* @piece cards */
/* 카드 격자: 바탕을 안내선 색으로 두고 1px 틈으로 칸을 나눠요 */
.sb-cards {
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  gap: 1px;
  margin-top: 48px;
  border: 1px solid var(--sb-guide);
  background: var(--sb-guide);
  text-align: left;
}
.sb-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: clamp(24px, 3vw, 40px);
  background: var(--sb-bg);
  transition: background-color var(--sb-dur-2) var(--sb-ease);
}
.sb-card:hover { background: var(--sb-raise); }
.sb-card h3 { margin: 0; font-family: var(--sb-font-display); font-size: clamp(19px, 1.6vw, 22px); line-height: 1.4; }
.sb-card p { margin: 0; color: var(--sb-muted); }
.sb-card > :last-child { margin-top: auto; padding-top: 8px; }
.sb-card img { display: block; width: 100%; height: auto; border-radius: 10px; }
@media (max-width: 720px) { .sb-cards { grid-template-columns: 1fr; } }
/* @end cards */

/* @piece logos */
/* 이름 격자: 고객·기관 이름을 크게, 한 줄 설명은 회색으로 */
.sb-logos {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: 1px;
  margin: 48px 0 0;
  border: 1px solid var(--sb-guide);
  background: var(--sb-guide);
}
.sb-logos > div { padding: 28px 20px; background: var(--sb-bg); text-align: left; }
.sb-logos dt { font-family: var(--sb-font-display); font-size: clamp(18px, 1.6vw, 22px); font-weight: 700; }
.sb-logos dd { margin: 8px 0 0; color: var(--sb-muted); font-size: 14px; line-height: 1.5; }
@media (max-width: 860px) { .sb-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .sb-logos { grid-template-columns: 1fr; } }
/* @end logos */

/* @piece shots */
/* 사진: 둥근 모서리 + 안내선 테두리. 여러 장은 sb-shots로 한 줄에 */
.sb-shot { margin: 0; }
.sb-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--sb-guide-strong);
  border-radius: var(--sb-radius);
}
.sb-shot figcaption { margin-top: 12px; color: var(--sb-muted); font-size: 14px; text-align: left; }
.sb-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.sb-shots .sb-shot img { aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 720px) { .sb-shots { grid-template-columns: 1fr; } }
/* @end shots */

/* @piece closing */
/* 마무리: 큰 제목 + 아래에서 번지는 포인트색 빛 */
.sb-closing {
  overflow: hidden;
  padding-block: clamp(96px, 14vw, 160px);
  background: radial-gradient(60% 55% at 50% 100%, rgba(255, 174, 0, .16), transparent 70%);
}
.sb-footer {
  max-width: var(--sb-max);
  margin-inline: auto;
  padding: 40px clamp(16px, 4.5vw, 48px) 56px;
  border-top: 1px solid var(--sb-guide);
  color: var(--sb-muted);
  font-size: 14px;
}
.sb-footer a { color: var(--sb-muted); }
.sb-footer a:hover { color: var(--sb-fg); }
/* @end closing */
