/* K-Spacing landing — design tokens from 05-ux-design-system (plan §5) */

:root {
  --coral500: #FF6B5E;
  --coral600: #CC3B2C;
  --coral700: #B8322A;
  --mint500: #5FD3B8;
  --mint700: #0A7059;
  --rose600: #DC2626;
  --ink900: #1F2937;
  --ink600: #5B6470;
  --bg: #F7F6F3;
  --surface: #FFFBF5;
  --raised: #FFFFFF;
  --hairline: #E7E2DB;
  --gridLine: #E7E2DB;
  --btnFill: #CC3B2C;
  --shadow-soft: 0 1px 3px rgba(31, 41, 55, 0.08), 0 4px 16px rgba(31, 41, 55, 0.06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --coral600: #FF6B5E;
    --coral700: #FF8A7A;
    --mint700: #8CE8D2;
    --rose600: #F87171;
    --ink900: #F4F5F7;
    --ink600: #A8ADB8;
    --bg: #17181C;
    --surface: #232529;
    --raised: #2C2F35;
    --hairline: #3B3E45;
    --gridLine: #3B3E45;
    --btnFill: #B8322A;
    --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink900);
  font-family: -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  max-width: 100%;
  overflow-x: hidden;
}

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

h1, h2, h3 { line-height: 1.3; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: var(--coral700); }
a:focus-visible, select:focus-visible, summary:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--coral500);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: 16px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -48px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--raised);
  color: var(--ink900);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 8px; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink900);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--coral500);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
}

.brand-name { font-size: 17px; }

.site-nav { margin-right: auto; }

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.nav-list a {
  display: inline-block;
  padding: 6px 2px;
  color: var(--ink600);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
}
.nav-list a:hover { color: var(--coral700); }

.lang-wrap select {
  font: inherit;
  font-size: 14px;
  color: var(--ink900);
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 6px 8px;
  max-width: 100%;
}

/* ---------- hero ---------- */

.hero { padding-block: 52px 44px; }

.hero-inner { text-align: center; }

.hero-badge { margin: 0 0 18px; }

.hero-badge a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
  color: var(--coral700);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}
.hero-badge a:hover { border-color: var(--coral500); }

.hero h1 {
  font-size: clamp(27px, 7vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  overflow-wrap: anywhere;
}

.hero-desc {
  max-width: 620px;
  margin: 0 auto 26px;
  color: var(--ink600);
  font-size: clamp(15px, 2.6vw, 17.5px);
  overflow-wrap: anywhere;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 168px;
  padding: 11px 22px;
  background: var(--btnFill);
  color: #FFFFFF;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}
.store-btn:hover { opacity: 0.94; }

.store-btn-text { display: flex; flex-direction: column; line-height: 1.25; text-align: left; min-width: 0; overflow-wrap: anywhere; }
.store-btn-text small { font-size: 10.5px; opacity: 0.85; letter-spacing: 0.04em; }
.store-btn-text strong { font-size: 17px; font-weight: 700; }

/* ---------- demo (wongoji) ---------- */

.demo { background: var(--surface); border-block: 1px solid var(--hairline); padding-block: 44px; }

.section-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral700);
  text-align: center;
  margin-bottom: 20px;
}

.demo-grid { display: grid; gap: 24px; }

.demo-phone {
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: 22px;
  padding: 16px 14px 14px;
  box-shadow: var(--shadow-soft);
  max-width: 500px;
  width: 100%;
  margin-inline: auto;
}

.demo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 2px 4px 12px;
}

.demo-result { color: var(--rose600); font-weight: 700; font-size: 14.5px; }

.demo-legend {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 12.5px;
  color: var(--ink600);
}
.demo-legend > span { display: inline-flex; align-items: center; gap: 4px; }
.legend-space { color: var(--rose600); font-weight: 700; }
.legend-join { color: var(--mint700); font-weight: 700; }

.wongoji {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  max-width: min(100%, 430px);
  margin-inline: auto;
  background: var(--raised);
  border: 1.5px solid var(--ink600);
  border-radius: 3px;
  overflow: hidden;
}

.wg-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--gridLine);
  border-bottom: 1px solid var(--gridLine);
  font-family: 'Noto Serif KR', serif;
  font-size: clamp(12px, 3.4vw, 19px);
  font-weight: 500;
  line-height: 1;
  color: var(--ink900);
}
.wg-cell:nth-child(10n) { border-right: 0; }
.wg-cell:nth-child(n+51):nth-child(-n+60) { border-bottom: 0; }

.wg-space { background: rgba(95, 211, 184, 0.16); }
.wg-missed { background: rgba(220, 38, 38, 0.10); }

.wg-mark-left::before {
  content: '\2228';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-50%, -54%);
  z-index: 1;
  color: var(--rose600);
  background: var(--raised);
  font-family: -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', Roboto, sans-serif;
  font-size: 0.85em;
  font-weight: 700;
  line-height: 1;
  padding: 1px 0;
}

.demo-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding-top: 14px;
}

.demo-btn {
  padding: 7px 16px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--ink600);
  font-size: 13px;
  font-weight: 600;
  background: var(--surface);
}

.demo-explain { display: flex; align-items: center; }

.ai-card {
  width: 100%;
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--coral500);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.ai-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--coral700);
  margin-bottom: 8px;
}

.ai-body { margin: 0; font-size: 15.5px; overflow-wrap: anywhere; }

/* ---------- sections ---------- */

.features, .kculture, .core, .pricing, .faq, .updates-body { padding-block: 52px; }
section[id] { scroll-margin-top: 72px; }

.features h2, .kculture h2, .core h2, .pricing h2, .faq h2, .updates-head h1 {
  font-size: clamp(21px, 4.6vw, 30px);
  font-weight: 800;
  letter-spacing: -0.015em;
  text-align: center;
}

.section-subtitle {
  max-width: 640px;
  margin: 0 auto 30px;
  text-align: center;
  color: var(--ink600);
  font-size: 15.5px;
  overflow-wrap: anywhere;
}

/* features */

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 22px 20px;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(255, 107, 94, 0.12);
  color: var(--coral700);
  margin-bottom: 12px;
}

.feature-icon svg { display: none; }
.feature-grid li:nth-of-type(1) .fi-1,
.feature-grid li:nth-of-type(2) .fi-2,
.feature-grid li:nth-of-type(3) .fi-3,
.feature-grid li:nth-of-type(4) .fi-4 { display: block; }

.feature-title { font-size: 16.5px; font-weight: 700; margin-bottom: 6px; overflow-wrap: anywhere; }
.feature-desc { margin: 0; color: var(--ink600); font-size: 14.5px; overflow-wrap: anywhere; }

/* chips */

.kculture, .core { background: var(--surface); border-block: 1px solid var(--hairline); }
.kculture + .core { border-top: 0; }

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 680px;
  margin: 0 auto 18px;
}

.chip {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  padding: 8px 16px;
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink900);
}

.kculture-note { text-align: center; margin: 0; }

.badge-free {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(95, 211, 184, 0.18);
  color: var(--mint700);
  font-size: 13.5px;
  font-weight: 700;
}

/* pricing */

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
}

.price-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 26px 22px;
}

.plan-pro {
  border: 2px solid var(--coral500);
  background: var(--raised);
  box-shadow: var(--shadow-soft);
}

.plan-name { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.plan-price { font-size: 24px; font-weight: 800; color: var(--coral700); margin-bottom: 16px; }

.plan-items {
  display: grid;
  gap: 9px;
  margin-bottom: 22px;
}

.plan-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14.5px;
  min-width: 0;
}
.plan-item .check { color: var(--mint700); font-weight: 700; flex: none; }
.plan-item > span:last-child { min-width: 0; overflow-wrap: anywhere; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 15.5px;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid transparent;
  overflow-wrap: anywhere;
}
.btn:hover { opacity: 0.92; }

.btn-primary { background: var(--btnFill); color: #FFFFFF; }
.btn-outline { border-color: var(--coral600); color: var(--coral700); background: transparent; }

.pricing-note {
  max-width: 640px;
  margin: 18px auto 0;
  text-align: center;
  color: var(--ink600);
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* faq */

.faq-list {
  display: grid;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 2px 18px;
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 15.5px;
  list-style: none;
  min-width: 0;
  overflow-wrap: anywhere;
}
.faq-q::-webkit-details-marker { display: none; }

.faq-q-text { min-width: 0; overflow-wrap: anywhere; }
.faq-chevron { color: var(--ink600); flex: none; transition: transform 0.15s ease; }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }

.faq-a {
  margin: 0;
  padding: 0 0 16px;
  color: var(--ink600);
  font-size: 14.5px;
  overflow-wrap: anywhere;
}

/* ---------- updates page ---------- */

.updates-head { padding-block: 40px 8px; }

.back-link {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink600);
}
.back-link:hover { color: var(--coral700); }

.updates-head h1 {
  font-size: clamp(24px, 5.4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}

.updates-subtitle {
  color: var(--ink600);
  margin: 0;
  text-align: center; /* 제목과 같은 가운데 정렬 */
  overflow-wrap: anywhere;
}

.updates-body { padding-block: 24px 60px; }

.update-list {
  display: grid;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.update-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 22px 20px;
}

.update-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 14px;
}

.update-version { font-size: 19px; font-weight: 800; color: var(--coral700); }
.update-date { font-size: 13.5px; color: var(--ink600); }

.badge-latest {
  display: none;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--mint500);
  color: #003B30;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.update-list .update-card:first-of-type .badge-latest { display: inline-block; }

.update-items {
  display: grid;
  gap: 8px;
}

.update-items li {
  position: relative;
  padding-left: 16px;
  font-size: 14.5px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.update-items li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--coral500);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  background: var(--surface);
  padding-block: 28px;
}

.footer-inner { text-align: center; }

.footer-brand { font-weight: 800; margin-bottom: 10px; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-bottom: 14px;
}
.footer-nav a { font-size: 14px; color: var(--ink600); text-decoration: none; }
.footer-nav a:hover { color: var(--coral700); }

.footer-copy { margin: 0; font-size: 12.5px; color: var(--ink600); }

/* ---------- wider screens ---------- */

@media (min-width: 640px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .demo { padding-block: 56px; }
  .hero { padding-block: 72px 56px; }
  .features, .kculture, .core, .pricing, .faq { padding-block: 64px; }
}

@media (min-width: 880px) {
  .demo-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: center;
    max-width: 900px;
    margin-inline: auto;
  }
  .demo-explain { align-items: center; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .faq-chevron { transition: none; }
  .skip-link { transition: none; }
}

/* 한국어는 어절 단위로 줄바꿈(단어 중간 끊김 방지). 아주 긴 단어는 overflow-wrap 이 처리한다. */
html:lang(ko) body { word-break: keep-all; }
