/* ==========================================================================
   MTO 피트니스 청당점 — 디자인 시스템
   방향: 프리미엄 다크 (Equinox 절제 × Barry's 압축 타이포)

   벤치마크에서 가져온 것
   - near-black 베이스. 순검정은 쓰지 않는다 (눈 피로 + 사진이 죽는다)
   - 액센트는 골드 하나. 면적 최소. 그라데이션 금지
   - 사진 위 텍스트는 반드시 스크림을 깐다
   - 큰 글자는 조이고, 작은 라벨은 자간을 넓힌다 (럭셔리 관습)
   - 균일 그리드 대신 풀블리드↔텍스트 교차 리듬

   index.html · exercise/ 가 공유하는 단일 정본.
   ========================================================================== */

:root {
  /* ---- 표면 : near-black. 살짝 차가운 캐스트를 줘 사진의 살색을 살린다 ---- */
  --surface-0: oklch(13% 0.006 275);   /* 바닥 */
  --surface-1: oklch(17% 0.007 275);   /* 패널 */
  --surface-2: oklch(22% 0.008 275);   /* 들린 면 */
  --surface-3: oklch(28% 0.009 275);

  /* ---- 잉크 : 전부 AA(4.5:1) 이상 ---- */
  --ink: oklch(97% 0.004 90);
  --ink-dim: oklch(74% 0.006 90);
  --ink-faint: oklch(62% 0.006 90);

  /* ---- 액센트 : MTO 브랜드 골드 하나. 그라데이션 없음 ---- */
  --gold: oklch(80% 0.13 82);
  --gold-deep: oklch(62% 0.12 74);

  /* ---- 선 ---- */
  --rule: 1px solid oklch(30% 0.008 275);
  --rule-strong: 1px solid oklch(45% 0.01 275);

  /* ---- 타이포 ----
     Anton  = 영문 압축 디스플레이 (역동)
     Pretendard = 한글 전체 + 본문. 한글 헤딩은 900 + 자간 조임으로 압축감을 낸다 */
  --font-body: "Pretendard", "Pretendard Variable", -apple-system, sans-serif;
  --font-display: "Anton", "Pretendard", sans-serif;

  --text-hero: clamp(2.75rem, 1rem + 9vw, 8.5rem);
  --text-head: clamp(1.9rem, 1.2rem + 3.2vw, 4rem);
  --text-lead: clamp(1.02rem, 0.96rem + 0.35vw, 1.2rem);
  --text-body: clamp(0.95rem, 0.92rem + 0.2vw, 1.05rem);
  --text-label: 0.72rem;

  --track-label: 0.24em;    /* 작은 라벨은 넓게 — 럭셔리 관습 */
  --track-tight: -0.035em;  /* 큰 글자는 조여야 덩어리로 읽힌다 */

  /* ---- 리듬 ---- */
  --gap-1: 0.5rem;
  --gap-2: 1rem;
  --gap-3: clamp(1.5rem, 1rem + 2vw, 3rem);
  --section: clamp(4.5rem, 3rem + 7vw, 11rem);   /* 여백이 곧 고급이다 */
  --wrap: min(1280px, 90vw);
  --wrap-narrow: min(760px, 90vw);

  /* ---- 모션 : 프리미엄은 부드럽다. 각지게 끊지 않는다 ---- */
  --dur-1: 240ms;
  --dur-2: 560ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ========================================================================== */
/* 리셋                                                                       */
/* ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--surface-0);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
ul, ol { list-style: none; }

button, input, select, textarea, video { border-radius: 0; border: 0; background: none; }
button { cursor: pointer; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ========================================================================== */
/* 타이포 프리미티브                                                          */
/* ========================================================================== */

/* 영문 압축 디스플레이 — 숫자·영문 제목 전용. 한글에 쓰면 폴백되므로 쓰지 않는다 */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 0.92;
}

/* 한글 헤딩 — 900 + 자간 조임으로 압축감 */
.tight {
  font-weight: 900;
  letter-spacing: var(--track-tight);
  line-height: 1.02;
}

/* 작은 대문자 라벨 */
.label {
  font-size: var(--text-label);
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-faint);
}
.label--gold { color: var(--gold); }

/* 수치 — 자리폭 고정 */
.num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

.wrap { width: var(--wrap); margin-inline: auto; }
.wrap-narrow { width: var(--wrap-narrow); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10000;
  padding: 0.9em 1.4em; background: var(--gold); color: var(--surface-0); font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ========================================================================== */
/* 섹션 머리                                                                  */
/* ========================================================================== */

.sec { padding-block: var(--section); }

.sec-head { margin-bottom: var(--gap-3); }
.sec-head h2 {
  margin-top: var(--gap-2);
  font-size: var(--text-head);
  font-weight: 900;
  letter-spacing: var(--track-tight);
  line-height: 1.06;
}
.sec-head p { margin-top: var(--gap-2); max-width: 44ch; color: var(--ink-dim); }

/* ========================================================================== */
/* 버튼                                                                       */
/* ========================================================================== */

.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 1.05em 2.2em;
  font-size: var(--text-label);
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: background var(--dur-1) var(--ease),
              color var(--dur-1) var(--ease),
              border-color var(--dur-1) var(--ease);
}
.btn--gold { background: var(--gold); color: var(--surface-0); }
.btn--gold:hover, .btn--gold:focus-visible { background: var(--ink); }
.btn--line { border-color: oklch(60% 0.01 275); color: var(--ink); }
.btn--line:hover, .btn--line:focus-visible { border-color: var(--ink); background: var(--ink); color: var(--surface-0); }

/* ========================================================================== */
/* 사진 — 프리미엄 다크의 핵심. 텍스트가 얹히면 반드시 스크림                  */
/* ========================================================================== */

.shot { position: relative; overflow: hidden; background: var(--surface-1); }
.shot > img { width: 100%; height: 100%; object-fit: cover; }

/* 스크림: 아래에서 위로. 사진의 밝은 부분이 글자를 먹는 걸 막는다 */
.shot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(
    to top,
    oklch(13% 0.006 275 / 0.92) 0%,
    oklch(13% 0.006 275 / 0.55) 38%,
    oklch(13% 0.006 275 / 0.15) 72%,
    transparent 100%
  );
}
.shot > *:not(img) { position: relative; z-index: 1; }

/* ========================================================================== */
/* 헤더 — 히어로 위에 투명하게 얹혔다가 스크롤하면 판이 생긴다                 */
/* ========================================================================== */

.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--gap-2);
  padding: 1rem clamp(1rem, 4vw, 3rem);
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
  border-bottom: 1px solid transparent;
}
.site-head[data-stuck] {
  background: oklch(13% 0.006 275 / 0.92);
  backdrop-filter: blur(14px);
  border-bottom-color: oklch(30% 0.008 275);
}
.site-head__brand { display: flex; align-items: center; gap: 0.65rem; }
.site-head__brand img { height: 34px; width: auto; }
.site-head__branch { color: var(--gold); }

.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.2rem); }
.site-nav a { font-size: 0.85rem; color: var(--ink-dim); transition: color var(--dur-1) var(--ease); }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--ink); }
.site-nav a[data-cta] {
  padding: 0.7em 1.4em;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: var(--text-label);
}
.site-nav a[data-cta]:hover, .site-nav a[data-cta]:focus-visible { background: var(--gold); color: var(--surface-0); }
@media (max-width: 720px) {
  .site-nav a:not([data-cta]) { display: none; }
}

/* ========================================================================== */
/* 푸터                                                                       */
/* ========================================================================== */

.site-foot { padding-block: var(--gap-3) calc(var(--gap-3) * 1.6); border-top: var(--rule); }
.site-foot__row {
  display: flex; flex-wrap: wrap; gap: var(--gap-2);
  align-items: center; justify-content: space-between;
}
.site-foot img { height: 30px; width: auto; opacity: 0.7; }
.site-foot p { font-size: 0.82rem; color: var(--ink-faint); }

.draft-note {
  margin-top: var(--gap-3);
  padding: 1rem 1.2rem;
  border-left: 2px solid var(--gold-deep);
  background: var(--surface-1);
  font-size: 0.82rem;
  color: var(--ink-dim);
}
.draft-note b { color: var(--gold); }

/* ========================================================================== */
/* 모션 감소                                                                  */
/* ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
