﻿/*
 * Personal design foundation
 * ---------------------------------------------
 * 1) 이 파일은 뉴트럴 기반의 안전한 기본값을 제공합니다.
 * 2) 프로젝트별 브랜드 값은 docs/design.md에서 결정한 뒤 아래 Project theme 영역만 수정합니다.
 * 3) 보라/청록/주황 조합, 과도한 radius/shadow를 기본값으로 사용하지 않습니다.
 * 4) Pretendard 로딩 방식은 프로젝트 환경에 맞게 별도 설정하는 것을 권장합니다.
 */

:root {
  color-scheme: light;

  /* Font */
  --font-sans:
    "Pretendard Variable",
    Pretendard,
    SUIT,
    -apple-system,
    BlinkMacSystemFont,
    "Apple SD Gothic Neo",
    "Noto Sans KR",
    "Malgun Gothic",
    sans-serif;
  --font-display: var(--font-sans);

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Fluid type: 과도한 대형 제목보다 한국어 줄바꿈 안정성을 우선 */
  --text-display: clamp(2.5rem, 2rem + 2vw, 3.75rem);
  --text-h1: clamp(2.125rem, 1.8rem + 1.3vw, 3rem);
  --text-h2: clamp(1.75rem, 1.55rem + 0.8vw, 2.375rem);
  --text-h3: clamp(1.375rem, 1.25rem + 0.45vw, 1.75rem);
  --text-h4: 1.25rem;
  --text-body-lg: 1.125rem;
  --text-body: 1rem;
  --text-body-sm: 0.875rem;
  --text-caption: 0.875rem;

  --leading-display: 1.16;
  --leading-heading: 1.3;
  --leading-body: 1.65;
  --leading-caption: 1.5;

  --tracking-display: -0.025em;
  --tracking-heading: -0.015em;
  --tracking-body: -0.005em;

  /*
   * Project theme
   * 프로젝트마다 이 값의 근거를 docs/design.md에 기록합니다.
   * 기본값은 화이트/블랙 중심의 편집형 화면이며 Accent만 절제해 사용합니다.
   */
  --project-primary: #ce2636;
  --project-primary-hover: #aa1525;
  --project-primary-active: #90111f;
  --project-primary-soft: #fff0f2;
  --project-accent: #ce2636;
  --project-accent-soft: #fff0f2;

  /* Neutral */
  --color-ink-950: #111317;
  --color-ink-900: #191c21;
  --color-ink-800: #272b31;
  --color-ink-700: #3b4048;
  --color-ink-600: #555c66;
  --color-ink-500: #747c88;
  --color-ink-400: #9aa1ab;

  --color-white: #ffffff;
  --color-bg: #ffffff;
  --color-bg-warm: #fbfaf8;
  --color-bg-subtle: #f7f8fa;
  --color-bg-muted: #f0f2f5;
  --color-bg-inverse: #17191d;
  --color-overlay: rgb(17 19 23 / 52%);

  --color-text-strong: var(--color-ink-950);
  --color-text: var(--color-ink-700);
  --color-text-muted: var(--color-ink-500);
  --color-text-disabled: var(--color-ink-400);
  --color-text-inverse: #ffffff;

  --color-line-light: #eceef1;
  --color-line: #dde1e6;
  --color-line-strong: #c9cfd7;

  /* Semantic */
  --color-success: #16875d;
  --color-success-soft: #edf8f3;
  --color-warning: #a96500;
  --color-warning-soft: #fff6e5;
  --color-error: #c93636;
  --color-error-soft: #fff0f0;
  --color-info: #2764e7;
  --color-info-soft: #eef4ff;

  /* Spacing: 4px 기반, 실제 레이아웃은 8px 계열 우선 */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 1.75rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-14: 3.5rem;
  --space-16: 4rem;
  --space-18: 4.5rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-28: 7rem;

  /* Layout */
  --container-main: 82.5rem; /* 1320px */
  --container-content: 75rem; /* 1200px */
  --container-wide: 90rem; /* 1440px */
  --content-reading: 46rem;
  --content-reading-wide: 55rem;

  --page-gutter: 2.5rem;
  --section-space-xl: 6.5rem;
  --section-space-lg: 5.5rem;
  --section-space-md: 4.5rem;
  --section-space-sm: 3.5rem;
  --grid-gap: 1.5rem;
  --grid-gap-lg: 2rem;

  /* Shape: 모든 요소를 둥글게 만들지 않도록 역할별 분리 */
  --radius-control: 0.625rem;
  --radius-card: 0.75rem;
  --radius-media: 1rem;
  --radius-feature: 1.25rem;
  --radius-pill: 999px;

  /* Depth: 기본 카드에는 shadow-none 또는 border 우선 */
  --shadow-none: none;
  --shadow-float: 0 8px 24px rgb(17 19 23 / 8%);
  --shadow-overlay: 0 20px 60px rgb(17 19 23 / 14%);

  /* Controls */
  --control-height-sm: 2.5rem;
  --control-height-md: 2.875rem;
  --control-height-lg: 3.25rem;
  --header-height-desktop: 5rem;
  --header-height-mobile: 3.75rem;

  /* Interaction */
  --focus-ring-color: color-mix(in srgb, var(--project-accent) 75%, white);
  --focus-ring-width: 3px;
  --focus-ring-offset: 2px;
  --duration-fast: 160ms;
  --duration-normal: 240ms;
  --duration-slow: 360ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);

  /* Layer */
  --z-base: 0;
  --z-sticky: 50;
  --z-header: 100;
  --z-dropdown: 200;
  --z-modal: 300;
  --z-toast: 400;

  /* Media */
  --ratio-thumbnail: 4 / 3;
  --ratio-landscape: 3 / 2;
  --ratio-wide: 16 / 9;
  --ratio-hero: 2 / 1;
  --ratio-avatar: 1;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-width: 20rem;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  overflow-wrap: break-word;
}

:where(h1, h2, h3, h4, p) {
  margin-block: 0;
}

:where(h1, h2, h3, h4, .heading, .card-title) {
  color: var(--color-text-strong);
  font-family: var(--font-display);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  word-break: keep-all;
  overflow-wrap: break-word;
}

:where(a) {
  color: inherit;
  text-decoration-thickness: from-font;
  text-underline-offset: 0.18em;
}

:where(button, input, select, textarea) {
  font: inherit;
}

:where(a, button, input, select, textarea):focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

.container {
  width: min(100% - (var(--page-gutter) * 2), var(--container-main));
  margin-inline: auto;
}

.container--content {
  width: min(100% - (var(--page-gutter) * 2), var(--container-content));
  margin-inline: auto;
}

.container--wide {
  width: min(100% - (var(--page-gutter) * 2), var(--container-wide));
  margin-inline: auto;
}

.reading-width {
  width: min(100%, var(--content-reading));
}

.section {
  padding-block: var(--section-space-lg);
}

.section-heading {
  display: grid;
  gap: var(--space-3);
  max-width: 48rem;
}

.eyebrow {
  color: var(--color-text-muted);
  font-size: var(--text-caption);
  font-weight: var(--font-weight-semibold);
  line-height: var(--leading-caption);
  letter-spacing: 0;
}

.surface-card {
  border: 1px solid var(--color-line-light);
  border-radius: var(--radius-card);
  background: var(--color-white);
  box-shadow: var(--shadow-none);
}

@media (max-width: 64rem) {
  :root {
    --page-gutter: 1.5rem;
    --section-space-xl: 5rem;
    --section-space-lg: 4.5rem;
    --section-space-md: 4rem;
    --grid-gap-lg: 1.5rem;
  }
}

@media (max-width: 40rem) {
  :root {
    --page-gutter: 1.125rem;
    --section-space-xl: 4rem;
    --section-space-lg: 3.5rem;
    --section-space-md: 3rem;
    --section-space-sm: 2.5rem;
    --grid-gap: 1.125rem;
    --grid-gap-lg: 1.25rem;
  }

  .section-heading {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
