/* ============================================================
   타밍 공개 사이트 (taming.co.kr) 공통 스타일.

   색은 앱의 디자인 시스템과 브랜드 심볼에서 그대로 가져왔다.
   앱은 src/theme/index.ts, 심볼은 assets/brand/taming-app-icon.svg —
   사이트만 다른 파랑을 쓰면 스토어에서 넘어온 사람이 다른 앱으로 읽는다.

     파랑  #2F6BFF  앱 primary. 심볼의 바탕이자 이 사이트의 유일한 포인트 색

   **흰 바탕 하나로 간다.** 다크 모드를 따로 두지 않는다 — 어두운 배경에서
   읽기 어렵다는 판단이다. 그래서 색은 전부 아래 한 벌뿐이고, 배경도 body 에
   명시해 둔다. 기기가 다크 모드여도 이 사이트는 흰 바탕으로 보인다.
   ============================================================ */

:root {
  color-scheme: light;      /* 스크롤바·폼 요소까지 밝게 고정 */

  --blue: #2F6BFF;
  --blue-ink: #1B4ED1;      /* 흰 바탕에서 글자로 쓸 수 있는 진한 파랑 */
  --blue-wash: #EDF2FF;

  --ground: #FFFFFF;
  --surface: #F5F6F8;
  --surface-2: #ECEFF3;
  --line: #E3E5E9;
  --line-soft: #EFF1F4;

  --ink: #14161A;
  --ink-soft: #454B55;
  --muted: #6B7280;

  --shadow: 0 1px 2px rgba(20, 22, 26, .04), 0 12px 32px -12px rgba(20, 22, 26, .12);

  --f-display: 'Gothic A1', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --f-body: 'IBM Plex Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  /*
    한글 대체를 본문 폰트로 지정한다. IBM Plex Mono 에는 한글이 없어서, 이걸
    빼면 "막차 00:32 지남" 같은 문자열의 한글만 시스템 고정폭으로 떨어져
    본문과 다른 얼굴이 된다.
  */
  --f-mono: 'IBM Plex Mono', 'IBM Plex Sans KR', 'Apple SD Gothic Neo', ui-monospace, monospace;

  --page: 68rem;
  --gutter: clamp(1.15rem, 5vw, 2.5rem);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  /* 한국어는 단어 중간에서 끊기면 읽기 나쁘다 */
  word-break: keep-all;
  overflow-wrap: anywhere;
}

img, svg { max-width: 100%; }

a { color: var(--blue-ink); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  background: var(--ground);
  padding: .6rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* ── 머리·꼬리 ─────────────────────────────────────────── */

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand svg { width: 30px; height: 30px; border-radius: 8px; display: block; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(.8rem, 3vw, 1.6rem);
  font-size: .93rem;
}
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }

.site-foot {
  margin-top: 5rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding-block: 2.5rem 3rem;
  font-size: .9rem;
  color: var(--muted);
}
.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  justify-content: space-between;
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.site-foot a { color: var(--ink-soft); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }

/* ── 공통 타이포 ───────────────────────────────────────── */

/*
  라벨. 한글이 들어가므로 자간을 넓게 벌리지 않는다 — 로마자에서 멋있어 보이는
  0.15em 대는 한글에서 "사 용 법" 처럼 낱자가 흩어져 보인다.
*/
.eyebrow {
  font-family: var(--f-body);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--blue-ink);
  margin: 0;
}

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -.022em;
  line-height: 1.18;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: clamp(2.15rem, 6.5vw, 3.6rem); }
h2 { font-size: clamp(1.55rem, 4vw, 2.15rem); }
h3 { font-size: 1.08rem; font-weight: 700; line-height: 1.4; }

.lede {
  font-size: clamp(1.02rem, 2.2vw, 1.16rem);
  color: var(--ink-soft);
  max-width: 34em;
  margin: 1.1rem 0 0;
}

section { padding-block: clamp(3.5rem, 8vw, 5.5rem); }
section + section { border-top: 1px solid var(--line-soft); }

.section-head { max-width: 40rem; }
.section-head h2 { margin-top: .5rem; }
.section-head p { color: var(--ink-soft); margin: .9rem 0 0; }

/* ── 히어로 ────────────────────────────────────────────── */

.hero { padding-block: clamp(3rem, 9vw, 6rem) clamp(3.5rem, 8vw, 5.5rem); }

.hero .wrap {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
}
@media (min-width: 60rem) {
  .hero .wrap { grid-template-columns: 1.05fr .95fr; }
}

.hero h1 { margin-top: .7rem; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem 1rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--f-body);
  font-size: .96rem;
  font-weight: 600;
  padding: .7rem 1.3rem;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform .12s ease, background-color .12s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--blue); color: #FFFFFF; }
.btn-primary:hover { background: color-mix(in srgb, var(--blue) 88%, #000); }

.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-quiet:hover { background: var(--surface); }

.btn[aria-disabled="true"] {
  pointer-events: none;
  opacity: .55;
}

.cta-note {
  font-size: .87rem;
  color: var(--muted);
  margin: 0;
}

/* ── 히어로의 앱 화면 재현 ─────────────────────────────── */

.phone {
  --pad: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: var(--pad);
  box-shadow: var(--shadow);
  display: grid;
  gap: .7rem;
  max-width: 25rem;
  width: 100%;
  justify-self: center;
}

.phone-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: .1rem .3rem .4rem;
}
.phone-bar b {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.05rem;
}
.phone-bar span {
  font-family: var(--f-mono);
  font-size: .72rem;
  color: var(--muted);
}

.stop-card {
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.stop-name {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .6rem .9rem;
  border-bottom: 1px solid var(--line-soft);
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.stop-name .mode {
  font-size: .68rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 .38rem;
  flex: none;
}

.route {
  display: grid;
  grid-template-columns: 4.6rem 1fr auto;
  align-items: center;
  gap: .8rem;
  padding: .7rem .9rem;
}
.route + .route { border-top: 1px solid var(--line-soft); }

.route-no {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: .98rem;
  letter-spacing: -.01em;
}
.route-way {
  font-size: .8rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/*
  숫자만 자리를 맞추면 된다. 폰트까지 고정폭으로 두면 "곧 도착" 처럼 한글만
  있는 값에서 낱말 사이가 한 칸 넘게 벌어진다 — 고정폭 공백이 그만큼 넓다.
*/
.route-eta {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  font-size: 1rem;
  white-space: nowrap;
}
.route-eta.soon { color: var(--blue-ink); font-weight: 600; }

/* 곧 도착하는 차에만 붙는 점. 심볼에서 시계 바늘이 가 닿는 그 점이다. */
.dot {
  display: inline-block;
  width: .42rem;
  height: .42rem;
  border-radius: 50%;
  background: var(--blue);
  margin-right: .35rem;
  vertical-align: .06em;
}
@media (prefers-reduced-motion: no-preference) {
  .dot { animation: pulse 2s ease-in-out infinite; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.82); }
}

/* ── 사용 3단계 ────────────────────────────────────────── */

.steps {
  display: grid;
  gap: 1px;
  margin-top: 2.5rem;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
@media (min-width: 48rem) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step {
  background: var(--ground);
  padding: 1.6rem 1.4rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.step .n {
  font-family: var(--f-mono);
  font-size: .78rem;
  font-weight: 600;
  color: var(--blue-ink);
  letter-spacing: .06em;
}
.step p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* ── 특징 카드 ─────────────────────────────────────────── */

.features {
  display: grid;
  gap: 1.1rem;
  margin-top: 2.5rem;
}
@media (min-width: 44rem) { .features { grid-template-columns: repeat(2, 1fr); } }

.feature {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem 1.4rem;
  background: var(--ground);
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.feature p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.feature .sample {
  font-family: var(--f-mono);
  font-size: .82rem;
  color: var(--muted);
  background: var(--surface);
  border-radius: 6px;
  padding: .35rem .6rem;
  align-self: flex-start;
  margin-top: .2rem;
}

/* ── 커버리지·출처 ─────────────────────────────────────── */

.coverage {
  display: grid;
  gap: 1px;
  margin-top: 2.5rem;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
@media (min-width: 48rem) { .coverage { grid-template-columns: repeat(3, 1fr); } }

.coverage div { background: var(--ground); padding: 1.3rem 1.4rem 1.5rem; }
.coverage dt {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: .3rem;
}
.coverage dd { margin: 0; font-size: .92rem; color: var(--ink-soft); }

.sources {
  margin-top: 2rem;
  padding: 1.3rem 1.4rem;
  background: var(--blue-wash);
  border-radius: 14px;
  font-size: .93rem;
  color: var(--ink-soft);
}
.sources ul {
  margin: .6rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: .2rem;
}

/* ── 문의 ──────────────────────────────────────────────── */

.contact {
  display: grid;
  gap: 1.6rem;
  align-items: start;
}
@media (min-width: 52rem) { .contact { grid-template-columns: 1fr 1fr; } }

.contact .box {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem 1.4rem;
}
.contact .box p { margin: .6rem 0 0; color: var(--ink-soft); font-size: .95rem; }

/* ── 문서 페이지(개인정보처리방침) ─────────────────────── */

.doc { padding-block: clamp(2.5rem, 6vw, 4rem) 1rem; }
.doc-head { max-width: 44rem; }
.doc-head .meta {
  font-family: var(--f-mono);
  font-size: .82rem;
  color: var(--muted);
  margin: 1rem 0 0;
}

.doc-body {
  display: grid;
  gap: 3rem;
  align-items: start;
  padding-bottom: 4rem;
}
@media (min-width: 62rem) {
  .doc-body { grid-template-columns: 15rem minmax(0, 1fr); gap: 4rem; }
}

.doc-toc { font-size: .9rem; }
@media (min-width: 62rem) {
  .doc-toc { position: sticky; top: 5.5rem; }
}
.doc-toc p {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--muted);
  margin: 0 0 .7rem;
}
.doc-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .1rem;
  counter-reset: toc;
}
.doc-toc a {
  display: block;
  padding: .28rem 0;
  color: var(--ink-soft);
  text-decoration: none;
  border-left: 2px solid var(--line);
  padding-left: .8rem;
}
.doc-toc a::before {
  counter-increment: toc;
  content: counter(toc) ". ";
  color: var(--muted);
  font-family: var(--f-mono);
  font-size: .82em;
}
.doc-toc a:hover { color: var(--blue-ink); border-left-color: var(--blue); }

.prose { max-width: 40rem; }
.prose h2 {
  font-size: 1.3rem;
  margin-top: 2.8rem;
  scroll-margin-top: 5.5rem;
}
.prose h2:first-of-type { margin-top: 0; }
.prose p { margin: .9rem 0 0; color: var(--ink-soft); }
.prose ul { margin: .8rem 0 0; padding-left: 1.2rem; color: var(--ink-soft); }
.prose li { margin: .3rem 0; }
.prose li::marker { color: var(--muted); }
.prose strong { color: var(--ink); font-weight: 600; }

.summary {
  background: var(--blue-wash);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 2.5rem;
}
.summary h2 { margin-top: 0 !important; font-size: 1.1rem; }
.summary p { color: var(--ink-soft); }

/*
  아직 정하지 않은 값. 배포 전에 전부 실제 값으로 바꿔야 한다.
  일부러 눈에 띄게 칠해 둔다 — 빈칸인 채로 공개되면 심사에서도 걸리고,
  무엇보다 이 문서는 지키겠다는 약속이라 빈칸이 있으면 안 된다.
*/
.todo {
  background: #FFE9A8;
  color: #6B4A00;
  border-radius: 4px;
  padding: 0 .32em;
  font-weight: 600;
  box-decoration-break: clone;
}
