/* CapyVoca Blossom 3.0, matching docs/DESIGN.md §10 and DSColor in the app. */
:root {
  --bg: #fff8f4;
  --surface: #ffffff;
  --surface-muted: #f4ece8;
  --line: #f1e1da;
  --ink: #3e2a24;
  --muted: #6b5650;
  --subtle: #7a6862;
  --rose: #cf3d61;
  --rose-dark: #b8304f;
  --rose-soft: #ffe8ec;
  --rose-line: #ffd0d9;
  --amber-ink: #8a5300;
  --amber-soft: #fff1d6;
  /* DSHeroCard: a 1pt edge and a soft warm lift, never a glow. */
  --lift: 0 1px 1px rgba(62, 42, 36, 0.05), 0 10px 24px rgba(62, 42, 36, 0.07);
  --r-hero: 16px;
  --r-field: 14px;
  --r-chip: 10px;
  --r-icon: 8px;
  /* Nunito carries Latin letters and numbers; Korean falls through to the system font. */
  --font: "Nunito", ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--muted);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--rose); text-underline-offset: 3px; }

h1, h2, h3, strong, b { color: var(--ink); }

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: var(--r-chip);
  background: var(--ink);
  color: #fff;
}
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; padding: 12px 0 0; background: linear-gradient(var(--bg) 70%, rgba(255, 248, 244, 0)); }
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-hero);
  background: var(--surface);
  box-shadow: var(--lift);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 17px;
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: var(--r-icon); }
.nav { display: flex; gap: 4px; }
.nav a {
  padding: 6px 12px;
  border-radius: var(--r-chip);
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: var(--bg); }
.nav a[aria-current="page"] { color: var(--rose-dark); background: var(--rose-soft); }

main { flex: 1; }

/* Shared pieces */
.eyebrow { margin: 0 0 8px; color: var(--rose); font-size: 14px; font-weight: 800; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: var(--r-field);
  background: var(--rose);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, transform 0.12s;
}
.button:hover { color: #fff; background: var(--rose-dark); }
.button:active { transform: scale(0.96); }
.card {
  border: 1px solid var(--line);
  border-radius: var(--r-hero);
  background: var(--surface);
  box-shadow: var(--lift);
}

/* Home */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 24px;
  padding: 56px 0 24px;
}
.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
}
.hero .lede { margin: 0 0 26px; font-size: 18px; max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.soon {
  padding: 4px 10px;
  border-radius: var(--r-chip);
  background: var(--amber-soft);
  color: var(--amber-ink);
  font-size: 14px;
  font-weight: 700;
}

.stage { position: relative; display: flex; justify-content: center; padding: 16px 0 24px; }
.phone {
  width: min(290px, 72vw);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 46px;
  background: var(--surface);
  box-shadow: 0 2px 2px rgba(62, 42, 36, 0.05), 0 28px 48px rgba(62, 42, 36, 0.12);
}
.phone img { border-radius: 38px; }
.stage .phone { position: relative; z-index: 1; }
/* Peeks out from behind the phone. */
.stage .peek {
  position: absolute;
  z-index: 0;
  left: max(0px, calc(50% - 240px));
  bottom: 0;
  width: 140px;
  filter: drop-shadow(0 10px 14px rgba(62, 42, 36, 0.14));
}

.section { padding: 56px 0 8px; }
.section-head { margin: 0 0 24px; text-align: center; }
.section-head h2 { margin: 0; font-size: clamp(26px, 4vw, 32px); font-weight: 800; letter-spacing: -0.02em; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 24px 22px 26px; }
.feature .art {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin: 0 0 14px;
  border-radius: var(--r-hero);
  background: var(--bg);
}
.feature .art img { width: 96px; }
.feature h3 { margin: 0 0 2px; font-size: 19px; font-weight: 800; }
.feature .tag { margin: 0 0 8px; color: var(--rose-dark); font-size: 14px; font-weight: 700; }
.feature p { margin: 0; font-size: 15px; }

.showcase {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 32px;
  padding: 36px;
}
.showcase .phone { width: min(250px, 64vw); margin: 0 auto; }
.showcase h2 { margin: 0 0 12px; font-size: clamp(26px, 4vw, 32px); font-weight: 800; line-height: 1.3; letter-spacing: -0.02em; }
.showcase ul { margin: 18px 0 0; padding: 0; list-style: none; }
.showcase li { display: flex; gap: 10px; align-items: flex-start; }
.showcase li + li { margin-top: 10px; }
.check {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 3px;
  border-radius: var(--r-icon);
  background: var(--rose-soft);
  color: var(--rose-dark);
  font-size: 14px;
  font-weight: 900;
}

.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 72px; }
.door {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  color: var(--muted);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.12s;
}
.door:hover { border-color: var(--rose-line); }
.door:active { transform: scale(0.98); }
.door img { width: 56px; flex: none; }
.door strong { display: block; font-size: 17px; font-weight: 800; }
.door span { font-size: 14px; }

/* Documents */
.doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 32px 0 20px;
  padding: 28px 32px;
}
.doc-head h1 { margin: 0 0 6px; font-size: clamp(28px, 4.6vw, 38px); font-weight: 800; line-height: 1.25; letter-spacing: -0.02em; }
.doc-head p { margin: 0; }
.doc-head .meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.doc-head .meta span { padding: 2px 10px; border-radius: var(--r-chip); background: var(--bg); border: 1px solid var(--line); color: var(--subtle); font-size: 13px; font-weight: 700; }
.doc-head img { width: 120px; flex: none; }

.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; padding-bottom: 72px; }
.toc {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 16px 12px;
  font-size: 14px;
}
.toc strong { display: block; margin: 0 0 6px 10px; font-size: 13px; font-weight: 800; color: var(--subtle); }
.toc a {
  display: block;
  padding: 6px 10px;
  border-radius: var(--r-chip);
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}
.toc a:hover { background: var(--rose-soft); color: var(--rose-dark); }

.prose { padding: 32px 36px; }
.prose section { scroll-margin-top: 96px; }
.prose section + section { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.prose h2 { margin: 0 0 12px; font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.prose p, .prose ul, .prose ol { margin: 0 0 12px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 5px; }
.prose li::marker { color: var(--rose); }

.path {
  padding: 1px 8px;
  border-radius: var(--r-icon);
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 0.93em;
  font-weight: 700;
  /* Long paths wrap on a phone; each line keeps its own rounded fill. */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.table-scroll { overflow-x: auto; margin: 6px 0 16px; border: 1px solid var(--line); border-radius: var(--r-field); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { padding: 11px 14px; text-align: left; vertical-align: top; }
.table th { background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 800; white-space: nowrap; }
.table td:first-child { color: var(--ink); font-weight: 700; white-space: nowrap; }
.table tr + tr td, .table thead + tbody tr:first-child td { border-top: 1px solid var(--line); }

.facts { margin: 0 0 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-field); background: var(--bg); }
.facts h3 { margin: 0 0 8px; font-size: 16px; font-weight: 800; }
.facts dl { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 15px; }
.facts dt { color: var(--subtle); font-weight: 700; }
.facts dd { margin: 0; }

.note { margin: 16px 0; padding: 14px 18px; border-radius: var(--r-field); background: var(--amber-soft); color: var(--amber-ink); font-weight: 600; }
.note p:last-child { margin-bottom: 0; }

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 10px 0 16px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-field);
  background: var(--bg);
}
.contact strong { display: block; font-size: 17px; font-weight: 800; }
.contact span { font-size: 14px; }

/* Footer */
.site-footer { padding: 8px 0 32px; font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--subtle); }
.site-footer a { color: var(--muted); }
.site-footer .site-note { flex-basis: 100%; margin: 0; font-size: 12px; line-height: 1.5; }

/* 404 */
.lost { margin: 56px auto 80px; max-width: 520px; padding: 36px; text-align: center; }
.lost img { width: 180px; margin: 0 auto 12px; }
.lost h1 { margin: 0 0 8px; font-size: 26px; font-weight: 800; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; text-align: center; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .features, .doors { grid-template-columns: 1fr; }
  .feature { display: grid; grid-template-columns: 88px minmax(0, 1fr); column-gap: 16px; align-items: start; padding: 18px; }
  .feature .art { grid-row: span 3; width: 88px; height: 88px; margin: 0; }
  .feature .art img { width: 76px; }
  .showcase { grid-template-columns: 1fr; padding: 28px 22px; text-align: center; }
  .showcase ul { display: inline-block; text-align: left; }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .doc-head { flex-direction: column-reverse; align-items: flex-start; gap: 4px; padding: 22px 20px; }
  .doc-head img { width: 88px; }
  .prose { padding: 24px 20px; }
  .facts dl { grid-template-columns: 1fr; gap: 0; }
  .facts dd + dt { margin-top: 6px; }
  .stage .peek { width: 100px; left: 0; }
  .nav a { padding: 6px 9px; font-size: 14px; }
}

@media (max-width: 360px) {
  .brand span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .door { transition: none; }
}
