/*
 * Halkit 랜딩·약관 공용 스타일.
 *
 * 색은 앱의 HalkitPalette(apps/ios/Packages/HalkitKit/Sources/HalkitDesignSystem/Tokens/HalkitPalette.swift)
 * 값을 그대로 옮겼다 — 앱과 사이트가 같은 색으로 보이게. 앱 팔레트가 바뀌면 여기도 바꾼다.
 * 대비(WCAG): 본문·보조 글자·링크 조합은 라이트·다크 모두 4.5:1 이상으로 재서 골랐다 (apps/landing/CLAUDE.md).
 *
 * 테마는 시스템 설정(prefers-color-scheme)을 따른다. 토글은 두지 않는다.
 */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-2: #f4f6f8;
  --surface: #ffffff;
  --text: #0b1220;
  --text-2: #5b6471;
  --glyph: #828997;
  --line: #e3e5ea;

  --brand: #1a5cf5;
  --on-brand: #ffffff;
  --brand-tint: rgba(26, 92, 245, 0.1);
  /* 틴트 면 위의 브랜드 글자. 틴트가 면을 밝혀 다크에서 --brand 로는 3.81:1 이라 따로 둔다 (라이트 4.68, 다크 5.35) */
  --brand-on-tint: #1a5cf5;

  /* 차트 시리즈 — 장식용 선·막대에만 쓴다 (글자에 쓰지 않는다) */
  --s-blue: #1a5cf5;
  --s-teal: #0b7c87;
  --s-green: #0c8a63;
  --s-purple: #6741d9;

  --header-bg: rgba(255, 255, 255, 0.82);
  --shadow: 0 1px 2px rgba(11, 18, 32, 0.04), 0 8px 24px rgba(11, 18, 32, 0.06);

  --radius-lg: 22px;
  --radius-md: 14px;
  --max: 1080px;
  --gutter: 20px;
  --header-h: 60px;

  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0c0f;
    --bg-2: #16181d;
    --surface: #1e2127;
    --text: #f2f4f7;
    --text-2: #9aa3b0;
    --glyph: #707886;
    --line: #2c2f36;

    --brand: #4c86ff;
    --on-brand: #0b1220;
    --brand-tint: rgba(76, 134, 255, 0.16);
    --brand-on-tint: #7aa5ff;

    --s-blue: #7aa5ff;
    --s-teal: #3bc9d4;
    --s-green: #3fd6a8;
    --s-purple: #b197fc;

    --header-bg: rgba(11, 12, 15, 0.78);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

/* ── 기본 ─────────────────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

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

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 600;
}

.skip-link:focus {
  top: 10px;
}

.muted {
  color: var(--text-2);
}

/* ── 헤더 ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9375rem;
}

.site-nav a {
  color: var(--text-2);
  padding: 6px 10px;
  border-radius: 8px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}

.site-nav .lang {
  margin-left: 6px;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 640px) {
  .site-nav .optional {
    display: none;
  }
}

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

.hero {
  padding: 72px 0 64px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

/* 격자 항목은 기본이 min-width: auto 라 내용의 최소 폭만큼 늘어난다 — 예시 카드의 "118/76mmHg" 처럼 끊을 수 없는
   값이 히어로 열 전체를 320px 화면 밖으로 밀었다(레이아웃 폭 350~362px). */
.hero .wrap > * {
  min-width: 0;
}

@media (max-width: 900px) {
  .hero {
    padding-top: 48px;
  }

  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 44px;
  }
}

.eyebrow {
  color: var(--brand);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(2.25rem, 5.2vw, 3.5rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.hero .lead {
  margin-top: 20px;
  max-width: 34em;
  color: var(--text-2);
  font-size: 1.1875rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 32px;
}

.store-soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}

.store-soon::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--s-green);
}

.text-link {
  font-weight: 600;
}

.hero .fineprint {
  margin-top: 20px;
  color: var(--text-2);
  font-size: 0.9375rem;
}

/* 히어로 오른쪽 — 예시 카드. 실제 화면 캡처가 아니라는 것을 캡션으로 밝힌다. */

.preview {
  position: relative;
  margin: 0;
  padding: 20px 20px 44px;
  border-radius: 28px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* 360px 이하(iPhone SE 1세대 등)에서는 2열 카드 한 칸이 값 하나도 못 담는다 — 1열로 쌓는다 */
@media (max-width: 360px) {
  .preview {
    padding: 14px 14px 40px;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }
}

.m-card {
  min-width: 0;
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.m-label {
  color: var(--text-2);
  font-size: 0.8125rem;
  font-weight: 600;
}

.m-value {
  margin-top: 2px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.m-value small {
  margin-left: 3px;
  color: var(--text-2);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
}

.m-sub {
  color: var(--text-2);
  font-size: 0.75rem;
}

.chart {
  width: 100%;
  height: 44px;
  margin-top: 8px;
}

.chart .bar {
  opacity: 0.32;
}

.chart .bar.now {
  opacity: 1;
}

.chart .ln {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart .ln.dash {
  stroke-dasharray: 3 5;
}

.chart .blue {
  fill: var(--s-blue);
}

.chart .teal {
  stroke: var(--s-teal);
}

.chart .teal-dot {
  fill: var(--s-teal);
}

.chart .purple {
  fill: var(--s-purple);
}

.chart .green {
  stroke: var(--s-green);
}

.chart .green-dot {
  fill: var(--s-green);
}

.plus-pill {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
  box-shadow: var(--shadow);
  white-space: nowrap;
}

.preview figcaption {
  position: absolute;
  right: 18px;
  bottom: 12px;
  color: var(--text-2);
  font-size: 0.75rem;
}

/* ── 섹션 공통 ────────────────────────────────────────────────────────── */

.section {
  padding: 88px 0;
}

.section.alt {
  background: var(--bg-2);
}

.section-head {
  max-width: 40em;
  margin-bottom: 40px;
}

.section-head h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.375rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.section-head p {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 1.125rem;
}

.card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.section.alt .card {
  border-color: transparent;
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.card p {
  margin-top: 10px;
  color: var(--text-2);
}

/* 두 축 */

.pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 760px) {
  .pillars {
    grid-template-columns: 1fr;
  }
}

.pillar-num {
  display: block;
  margin-bottom: 10px;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.checks {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.checks li {
  position: relative;
  padding-left: 28px;
  margin-top: 10px;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 7px;
  height: 12px;
  border: solid var(--brand);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* 기능 격자 */

/* 카드가 5개라 3열에서 첫 카드가 두 칸을 차지해야 3+3 으로 맞는다 (auto-fit 은 4+1 로 떨어졌다) */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature.wide {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .features {
    grid-template-columns: 1fr;
  }

  .feature.wide {
    grid-column: auto;
  }
}

.feature {
  padding: 24px;
}

.feature h3 {
  font-size: 1.125rem;
}

.feature p {
  font-size: 0.96875rem;
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--brand-tint);
  color: var(--brand-on-tint);
}

.icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 개인정보 */

.privacy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 860px) {
  .privacy-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.privacy-grid .section-head {
  margin-bottom: 0;
}

.promise-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.promise-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: start;
}

.promise-list .icon {
  margin: 0;
}

.promise-list strong {
  display: block;
  font-size: 1.0625rem;
}

.promise-list span {
  color: var(--text-2);
  font-size: 0.96875rem;
}

.note {
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.9375rem;
}

.note strong {
  color: var(--text);
}

/* 요금 */

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 820px;
}

@media (max-width: 700px) {
  .plans {
    grid-template-columns: 1fr;
  }
}

.plan.featured {
  border: 2px solid var(--brand);
}

.plan-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand-on-tint);
  font-size: 0.8125rem;
  font-weight: 600;
  vertical-align: 3px;
}

.plan .price {
  margin-top: 8px;
  color: var(--text);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* 면책 */

.disclaimer {
  padding: 40px 0 72px;
}

.disclaimer p {
  max-width: 48em;
  color: var(--text-2);
  font-size: 0.9375rem;
}

.disclaimer strong {
  color: var(--text);
}

/* ── 푸터 ─────────────────────────────────────────────────────────────── */

.site-footer {
  padding: 40px 0 48px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 0.875rem;
}

.site-footer .wrap {
  display: grid;
  gap: 18px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.footer-links a {
  color: var(--text);
}

.footer-meta p + p {
  margin-top: 4px;
}

/* ── 약관 ─────────────────────────────────────────────────────────────── */

.legal {
  max-width: 780px;
  padding-top: 56px;
  padding-bottom: 88px;
}

.legal h1 {
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.legal .dates {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 0.9375rem;
}

.legal .summary {
  margin-top: 32px;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: var(--bg-2);
}

.legal .summary h2 {
  font-size: 1.0625rem;
  margin: 0;
}

.legal .summary p {
  margin-top: 4px;
  color: var(--text-2);
  font-size: 0.875rem;
}

.legal .summary ul {
  margin: 12px 0 0;
  padding-left: 1.2em;
}

.legal .summary li + li {
  margin-top: 4px;
}

.legal .toc {
  margin-top: 32px;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.legal .toc h2 {
  font-size: 1rem;
  margin: 0 0 10px;
}

.legal .toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 32px;
  font-size: 0.9375rem;
}

@media (max-width: 600px) {
  .legal .toc ol {
    columns: 1;
  }
}

.legal .toc li {
  break-inside: avoid;
  padding: 3px 0;
}

.legal article h2 {
  margin-top: 44px;
  font-size: 1.25rem;
  font-weight: 700;
}

.legal article p,
.legal article ol,
.legal article ul {
  margin-top: 12px;
}

.legal article ol,
.legal article ul {
  padding-left: 1.4em;
}

.legal article li + li {
  margin-top: 8px;
}

.legal article li > ul,
.legal article li > ol {
  margin-top: 8px;
}

.legal .contact {
  list-style: none;
  padding-left: 0;
}

/* 처리방침의 표(수탁자·국외 이전 — APP-129). 좁은 화면에서는 표만 가로로 밀린다(페이지는 넘치지 않는다).
   색은 기존 짝만 쓴다 — 글자 --text / 머리 --text-2 on --bg-2, 줄 --line. */
.legal .table-scroll {
  margin-top: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.legal table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.legal th,
.legal td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line);
}

.legal thead th {
  border-top: 0;
  background: var(--bg-2);
  color: var(--text-2);
  font-weight: 600;
  white-space: nowrap;
}

.legal .closing {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 0.9375rem;
}

.legal .closing p + p {
  margin-top: 6px;
}

/* ── 404 ──────────────────────────────────────────────────────────────── */

.not-found {
  min-height: 70vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 12px;
  padding: 48px var(--gutter);
}

.not-found h1 {
  font-size: 2rem;
}

.not-found .actions {
  justify-content: center;
  margin-top: 12px;
}
