/* 헤아림 사이트 공통 스타일. 색은 mobile/lib/ui/app_theme.dart 팔레트를 따른다. */
@font-face {
  font-family: "Jua";
  src: url("/assets/fonts/jua-subset.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #F8F7FC;
  --surface: #FFFFFF;
  --ink: #25213D;
  --ink-soft: #5F5775;
  --primary: #7057C8;
  --primary-ink: #FFFFFF;
  --link: #5B43B5;
  --outline: #948AAA;
  --line-soft: #E6E3EE;
  --lemon: #DFEAA0;
  --on-lemon: #25213D;
  --mint: #A9DBE0;
  --on-mint: #1E3F44;
  --coral: #F3CFDD;
  --on-coral: #8E3557;
  --lavender: #EFE9F8;
  --on-lavender: #3B2F63;
  --hero: #25213D;
  --on-hero: #F8F7FC;
  --shadow: 0 1px 2px rgba(32, 23, 60, .06), 0 8px 24px rgba(32, 23, 60, .07);
  --radius: 22px;
  --font-body: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --font-display: var(--font-body);
  --font-brand: "Jua", var(--font-body);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #25213D;
    --surface: #302B49;
    --ink: #F8F7FC;
    --ink-soft: #D0C8DE;
    --primary: #C7B6FF;
    --primary-ink: #25213D;
    --link: #C7B6FF;
    --outline: #6E6489;
    --line-soft: #3D3759;
    --lemon: #454A2D;
    --on-lemon: #E7F0B9;
    --mint: #314C53;
    --on-mint: #C5F0F1;
    --coral: #573348;
    --on-coral: #FFD8E5;
    --lavender: #493B61;
    --on-lavender: #EBDFF9;
    --hero: #1E1A33;
    --on-hero: #F8F7FC;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 10px; }
.skip-link:focus { left: 16px; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 32px); margin-inline: auto; }

/* 머리 */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--font-brand); font-size: 24px; line-height: 1; }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 600; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { background: var(--lavender); color: var(--on-lavender); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
@media (max-width: 640px) {
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 4px; padding-block: 10px; }
  .nav { justify-content: flex-start; margin-inline: -8px; }
  .nav a { padding: 6px 9px; font-size: 14px; }
}

/* 공통 요소 */
h1, h2, h3 { line-height: 1.3; letter-spacing: -0.025em; font-weight: 800; }
.kicker { margin: 0 0 10px; font-size: 14px; font-weight: 700; letter-spacing: .04em; color: var(--ink-soft); }
.display { font-family: var(--font-display); font-weight: 400; }
.eyebrow { display: inline-block; background: var(--lemon); color: var(--on-lemon); font-size: 14px; font-weight: 700; padding: 4px 12px; border-radius: 10px; letter-spacing: .02em; }
.lead { font-size: 19px; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.card { background: var(--surface); border: 1.5px solid var(--outline); border-radius: var(--radius); padding: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 22px; border-radius: 16px; font-weight: 700; font-size: 17px; text-decoration: none; border: 2px solid transparent; }
.btn-lemon { background: var(--lemon); color: var(--on-lemon); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-outline { border-color: var(--primary); color: var(--link); background: var(--surface); }
.btn[aria-disabled="true"] { cursor: default; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--mint); color: var(--on-mint); }

/* 소개: 첫 화면 */
.hero { padding: 64px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(36px, 6vw, 60px); margin: 0 0 14px; line-height: 1.18; }
.hero h1 .accent { color: var(--primary); }
.hero .tagline { font-size: clamp(18px, 2.2vw, 22px); font-weight: 700; margin: 0 0 16px; color: var(--ink-soft); }
.hero .lead { margin: 0 0 28px; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { margin-top: 14px; font-size: 14px; color: var(--ink-soft); }
.hero-visual { position: relative; display: flex; justify-content: center; }
.phone { position: relative; width: min(300px, 78vw); border-radius: 36px; padding: 8px; background: var(--hero); box-shadow: var(--shadow); }
.phone img { border-radius: 29px; aspect-ratio: 1170 / 2532; object-fit: cover; object-position: top; width: 100%; }
.phone.small { width: min(240px, 70vw); }
@media (max-width: 860px) {
  .hero { padding-top: 36px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* 사실 요약 */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin: 40px 0 0; border-top: 1px solid var(--outline); }
.facts > div { padding: 16px 20px 4px 0; }
.facts dt { font-size: 14px; font-weight: 700; color: var(--ink-soft); margin-bottom: 4px; }
.facts dd { margin: 0; font-size: 16px; line-height: 1.6; }
@media (max-width: 860px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .facts { grid-template-columns: 1fr; } .facts > div { border-bottom: 1px solid var(--line-soft); padding-bottom: 14px; } }

/* 섹션 */
.section { padding: 72px 0; }
.section-title { font-size: clamp(26px, 3.6vw, 36px); margin: 0 0 10px; }
.section-tight { padding-top: 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p { margin: 0; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 28px 0; }
.feature + .feature { border-top: 1px dashed var(--line-soft); }
.feature.reverse .feature-media { order: 2; }
.feature-media { display: flex; justify-content: center; }
.feature h3 { font-size: 26px; margin: 0 0 10px; }
.feature ul { padding-left: 1.1em; margin: 14px 0 0; }
.feature li { margin: 6px 0; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 24px; }
  .feature.reverse .feature-media { order: 0; }
}

.dark-band { background: var(--hero); color: var(--on-hero); border-radius: 32px; padding: 48px; }
.dark-band .section-title { color: var(--on-hero); }
.dark-band p, .dark-band li { color: #D0C8DE; }
.points-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; }
.points-grid div { background: #302B49; border: 1px solid #4A4366; border-radius: 16px; padding: 14px 16px; }
.points-grid { margin-bottom: 0; }
.points-grid dt { color: #F8F7FC; font-size: 15px; font-weight: 700; }
.points-grid dd { margin: 4px 0 0; font-size: 14px; color: #D0C8DE; line-height: 1.55; }
@media (max-width: 860px) { .dark-band { grid-template-columns: 1fr; padding: 32px 22px; } .points-grid { grid-template-columns: 1fr; } }

.spec-list { margin: 0; border-top: 1px solid var(--outline); }
.spec-list > div { display: grid; grid-template-columns: 180px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.spec-list dt { font-weight: 700; }
.spec-list dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 560px) { .spec-list > div { grid-template-columns: 1fr; gap: 2px; } }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .spec-list { margin: 0; border-top: 1px solid var(--outline); }
.spec-list > div { display: grid; grid-template-columns: 180px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.spec-list dt { font-weight: 700; }
.spec-list dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 560px) { .spec-list > div { grid-template-columns: 1fr; gap: 2px; } }
.grid-3 { grid-template-columns: 1fr; } }
.icon-badge { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--lavender); color: var(--on-lavender); margin-bottom: 12px; }
.icon-badge svg { width: 24px; height: 24px; }
.card h3 { margin: 0 0 6px; font-size: 19px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 16px; }

/* 자주 묻는 질문 */
.faq details { background: var(--surface); border: 1.5px solid var(--outline); border-radius: 18px; padding: 0 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 700; padding: 18px 28px 18px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 10px; height: 10px; border-right: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: 0 0 18px; color: var(--ink-soft); }

.cta { text-align: center; padding: 56px 24px; border-radius: 32px; background: var(--lavender); color: var(--on-lavender); }
.cta img { width: 72px; height: 72px; margin: 0 auto 12px; }
.cta .section-title { color: inherit; }

/* 문서(정책) 페이지 */
.doc-hero { padding: 48px 0 8px; }
.doc-hero h1 { font-size: clamp(30px, 4.6vw, 42px); margin: 0 0 10px; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 15px; color: var(--ink-soft); margin: 0 0 8px; }
.summary-box { background: var(--surface); border: 1.5px solid var(--outline); border-left: 4px solid var(--primary); border-radius: 0 14px 14px 0; padding: 20px 24px; margin: 24px 0; }
.summary-box h2 { font-size: 19px; margin: 0 0 8px; }
.summary-box ul { margin: 0; padding-left: 1.2em; }
.summary-box li { margin: 4px 0; }
.toc { border: 1.5px solid var(--outline); border-radius: var(--radius); padding: 18px 22px; background: var(--surface); margin: 24px 0 8px; }
.toc b { display: block; margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 1.4em; columns: 2; column-gap: 32px; font-size: 15.5px; }
.toc li { break-inside: avoid; margin: 3px 0; }
@media (max-width: 640px) { .toc ol { columns: 1; } }
.doc { padding-bottom: 72px; }
.doc h2 { font-size: 22px; margin: 48px 0 12px; padding-top: 8px; scroll-margin-top: 90px; }
.doc h2 .num { color: var(--primary); margin-right: 6px; }
.doc h3 { font-size: 18px; margin: 26px 0 8px; }
.doc p, .doc li { color: var(--ink); }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: 5px 0; }
.table-wrap { overflow-x: auto; margin: 14px 0; border: 1.5px solid var(--outline); border-radius: 16px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; line-height: 1.6; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
th { background: var(--lavender); color: var(--on-lavender); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) {
  .table-wrap.stack { border: 0; background: transparent; overflow: visible; }
  .stack table, .stack tbody, .stack tr, .stack td { display: block; width: 100%; }
  .stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stack tr { background: var(--surface); border: 1.5px solid var(--outline); border-radius: 16px; margin-bottom: 10px; padding: 6px 0; }
  .stack td { border: 0; padding: 6px 16px; }
  .stack td::before { content: attr(data-label); display: block; font-size: 13px; font-weight: 700; color: var(--link); }
}
.note { border-left: 4px solid var(--primary); background: var(--surface); padding: 14px 18px; border-radius: 0 14px 14px 0; margin: 16px 0; font-size: 16px; }
.note.warn { border-left-color: #D9594C; }
.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps li { counter-increment: step; position: relative; padding: 14px 16px 14px 60px; background: var(--surface); border: 1.5px solid var(--outline); border-radius: 16px; margin: 10px 0; }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 800; font-size: 15px; line-height: 1; }
.contact-card { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.contact-card .email { font-size: 20px; font-weight: 800; }

/* 바닥 */
.site-footer { border-top: 1px solid var(--line-soft); padding: 40px 0 48px; font-size: 15px; color: var(--ink-soft); margin-top: 24px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--ink); font-weight: 600; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-links a.strong { color: var(--link); }
.site-footer p { margin: 6px 0 0; }

@media print {
  .site-header, .site-footer, .toc, .skip-link { display: none; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .doc h2 { break-after: avoid; }
}
