/* ============================================================
   yesa.kr — Design System v2.0
   Pretendard CDN + Apple-inspired tokens + base reset
   ============================================================ */



:root {
  /* Background */
  --bg-primary:   #FFFFFF;
  --bg-secondary: #F5F5F7;
  --bg-tertiary:  #FFFFFF;
  --bg-dark:      #1D1D1F;
  --bg-subtle:    #FAFAFA;

  /* Text */
  --text-primary:   #1D1D1F;
  --text-secondary: #515154;
  --text-tertiary:  #86868B;
  --text-inverse:   #F5F5F7;

  /* Accent — Royal Cobalt */
  --accent:       #1D4ED8;
  --accent-hover: #1E40AF;
  --accent-light: #EFF6FF;
  --accent-text:  #FFFFFF;

  /* Trust */
  --trust:       #1D1D1F;
  --trust-light: #F5F5F7;

  /* Border */
  --border:        #D2D2D7;
  --border-light:  #E8E8ED;
  --border-strong: #86868B;

  /* Semantic */
  --success:       #34C759;
  --success-light: #E8F8EC;
  --warning:       #FF9500;
  --warning-light: #FFF4E5;
  --error:         #FF3B30;
  --error-light:   #FFEBEA;
  --info:          #007AFF;
  --info-light:    #E8F3FF;

  /* Typography */
  --font-display: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body:    "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "SF Mono", "JetBrains Mono", Menlo, monospace;

  /* Spacing (8pt) */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-6:  24px;
  --space-8:  32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* Containers */
  --container-max:  1280px;
  --hero-max:       1120px;
  --article-max:    760px;
  --simulator-max:  920px;
  --form-max:       560px;

  /* Radius */
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   14px;
  --r-xl:   18px;
  --r-2xl:  24px;
  --r-full: 9999px;

  /* Shadow */
  --shadow-sm:     0 1px 2px rgba(0,0,0,.04);
  --shadow-md:     0 1px 4px rgba(0,0,0,.05), 0 4px 12px rgba(0,0,0,.04);
  --shadow-lg:     0 4px 16px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.04);
  --shadow-xl:     0 8px 32px rgba(0,0,0,.08), 0 16px 48px rgba(0,0,0,.06);
  --shadow-accent: 0 4px 12px rgba(29,78,216,.22);

  /* Transition */
  --ease:   cubic-bezier(0.42,0,0.58,1);
  --t-fast: 0.15s var(--ease);
  --t-base: 0.2s var(--ease);
  --t-slow: 0.3s var(--ease);

  /* ── 구버전 CSS 변수 호환 별칭 (페이지 콘텐츠 DB 저장값 대응) ── */
  --color-primary:      var(--accent);
  --color-primary-dark: var(--accent-hover);
  --color-bg-secondary: var(--bg-secondary);
  --color-accent:       #F59E0B;
  --color-text:         var(--text-primary);
  --color-text-light:   var(--text-secondary);
  --color-text-muted:   var(--text-tertiary);
  --color-border:       var(--border);
  --color-border-light: var(--border-light);
}

/* Reset + Base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.82;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.02em;
}
h1 { font-size: 56px; font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: -0.025em; }
h3 { font-size: 24px; font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; }
h4 { font-size: 20px; font-weight: 600; line-height: 1.4; letter-spacing: -0.015em; }

p { margin: 0 0 1em; text-wrap: pretty; }

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-8);
}
.container--hero    { max-width: var(--hero-max); }
.container--article { max-width: var(--article-max); }
.container--form    { max-width: var(--form-max); }

@media (max-width: 640px) {
  body { font-size: 16px; line-height: 1.78; }
  h1 { font-size: 34px; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }
  h4 { font-size: 18px; }
  .container { padding: 0 var(--space-6); }
}

::selection { background: var(--accent); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
