/* dot100.ai 공통 토큰과 기본 스타일 (Figma 4B0FpWPK6AzlPvccWZ4LLC 변수 기준) */
@font-face {
  font-family: 'Pretendard';
  src: url('/fonts/PretendardVariable.woff2') format('woff2-variations'), url('/fonts/PretendardVariable.woff2') format('woff2');
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
}
/* Ria Sans: 롯데GRS 공식 배포 TTF 원본(변환·서브셋 금지, 라이선스는 README 참고) */
@font-face {
  font-family: 'Ria Sans';
  src: url('/fonts/riasans/RiaSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Ria Sans';
  src: url('/fonts/riasans/RiaSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-bg-canvas: #f6f5ef;
  --color-bg-surface: #ffffff;
  --color-bg-ink: #131418;
  --color-bg-soft-lime: #f0ffd0;
  --color-bg-soft-blue: #e9edff;
  --color-bg-soft-error: #ffedeb;
  --color-text-primary: #16171b;
  --color-text-secondary: #696c76;
  --color-text-inverse: #ffffff;
  --color-border-subtle: #d8d9d2;
  --color-border-strong: #b7b9b1;
  --color-brand-blue: #3557ff;
  --color-brand-lime: #d9ff57;
  --color-brand-coral: #ff705d;
  --color-brand-purple: #8b64ff;
  --color-status-positive: #26a96c;
  --color-status-error: #e84a45;
  --color-action-consultation-default: #ccff39;
  --color-ink-button: #0e0f12;
  --radius-8: 8px;
  --radius-12: 12px;
  --radius-16: 16px;
  --radius-24: 24px;
  --radius-full: 999px;
  --shadow-floating: 0 3px 12px -2px rgba(18, 20, 31, 0.06), 0 18px 50px -12px rgba(18, 20, 31, 0.1);
  --font-ui: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --font-display: 'Ria Sans', 'Pretendard', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --ease-pop: cubic-bezier(0.45, 1.45, 0.8, 1);
  --page-pad: 80px;
  /*
   * 초광폭 화면: Figma 1440 기준 안쪽 콘텐츠 폭 1280px에서 더 넓어지지 않는다.
   * 섹션 배경은 전체 폭을 유지하고, 좌우 여백만 (부모 폭 - 1280px) / 2 까지 늘어난다.
   * 100vw 대신 부모 폭(%)을 써서 세로 스크롤바 폭만큼 가로 넘침이 생기지 않는다. 1440 이하에서는 --page-pad 그대로다.
   */
  --content-max: 1280px;
  --page-gutter: max(var(--page-pad), calc((100% - var(--content-max)) / 2));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html.is-dialog-open {
  overflow: hidden;
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--color-bg-canvas);
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
img,
svg {
  display: block;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid var(--color-brand-blue);
  outline-offset: 3px;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 1000;
  padding: 12px 18px;
  border-radius: var(--radius-full);
  background: var(--color-text-primary);
  color: #fff;
  font-weight: 600;
}
.skip-link:focus {
  top: 12px;
}
.display {
  font-family: var(--font-display);
  font-weight: 700;
}
/* 문구 장식용 프로젝트 아이콘 (이모지 대체, 화면 낭독기에는 읽히지 않음) */
.deco-mark {
  display: inline-flex;
  vertical-align: -2px;
  margin-right: 6px;
}
.deco-mark--end {
  margin: 0 0 0 6px;
}
.deco-mark img {
  display: block;
}
.dot {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- 브랜드 로고 ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
}
.brand img {
  width: 32px;
  height: 32px;
}

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.btn:disabled,
.btn[aria-disabled='true'] {
  cursor: not-allowed;
}
.btn-primary {
  background: var(--color-brand-blue);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: #2747f0;
}
.btn-primary:disabled {
  background: #c7c9d1;
}
.btn-ink {
  background: var(--color-ink-button);
  color: #fff;
}
.btn-ink:hover:not(:disabled) {
  background: #2a2c33;
}
.btn-secondary {
  background: #fff;
  border: 1px solid var(--color-border-strong);
  color: var(--color-text-primary);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--color-text-primary);
}
.btn-lime {
  background: var(--color-action-consultation-default);
  color: #111318;
}

/* 공고 보기 ↗ — 공통 검정 링크 버튼 (Figma 313:1691) */
.notice-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 7px 14px;
  border-radius: 16px;
  background: var(--color-ink-button);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
  position: relative;
}
.notice-link::after {
  /* 터치 타깃 44px 확보 */
  content: '';
  position: absolute;
  inset: -6px -2px;
}
.notice-link:hover {
  background: #2a2c33;
}

/* ---------- 상담 CTA: 포인터 진입 지점 기준 파란 원 확장 (Figma 211:1010) ---------- */
.consult-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 28px;
  border-radius: 22px;
  background: var(--color-action-consultation-default);
  color: #111318;
  font-weight: 600;
  font-size: 15px;
  line-height: 20px;
  white-space: pre;
  transition: color 280ms ease-in-out;
}
.consult-cta .consult-cta-fill {
  position: absolute;
  z-index: -1;
  left: var(--fill-x, 50%);
  top: 50%;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--color-brand-blue);
  opacity: 0;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 280ms ease-in-out, opacity 280ms ease-in-out;
  pointer-events: none;
}
.consult-cta.is-filled {
  color: #fff;
  transition: color 380ms ease-out;
}
.consult-cta.is-filled .consult-cta-fill {
  opacity: 1;
  transform: translate(-50%, -50%) scale(var(--fill-scale, 180));
  transition: transform 380ms ease-out, opacity 380ms ease-out;
}

/* ---------- 레이어 팝업 ---------- */
.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 18, 22, 0.42);
  overflow-y: auto;
  animation: fade-in 180ms ease-out;
}
.dialog {
  position: relative;
  width: min(920px, 100%);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  animation: dialog-in 220ms ease-out;
}
.dialog:focus {
  outline: none;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(17, 18, 22, 0.04);
  border: 1px solid rgba(17, 18, 22, 0.16);
}
.icon-button img {
  width: 16px;
  height: 16px;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}
/* 닫힘: dialog.js가 inert + is-closing을 붙이고 180ms 뒤 hidden으로 바꾼다 */
.dialog-backdrop.is-closing {
  pointer-events: none;
  animation: fade-out 180ms ease-in forwards;
}
.dialog-backdrop.is-closing .dialog {
  animation: dialog-out 180ms ease-in forwards;
}
@keyframes fade-out {
  to {
    opacity: 0;
  }
}
@keyframes dialog-out {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

/* ---------- 키워드 칩: 모든 화면에서 같은 규칙 ---------- */
.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.keyword-chip {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  background: var(--color-bg-soft-blue);
  border: 1px solid rgba(53, 87, 255, 0.22);
  color: var(--color-text-primary);
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}

/* ---------- 폼 공통 ---------- */
.field-input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: var(--radius-12);
  border: 1px solid var(--color-border-strong);
  background: #fff;
  font-size: 15px;
}
.field-input:focus {
  outline: none;
  border-color: var(--color-brand-blue);
  box-shadow: 0 0 0 3px rgba(53, 87, 255, 0.16);
}
.form-alert {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ff594f;
  font-weight: 600;
  font-size: 13px;
  line-height: 20px;
}
.form-alert img {
  width: 16px;
  height: 16px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 300;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 12px 20px 12px 14px;
  border-radius: var(--radius-full);
  background: var(--color-text-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  transform: translateX(-50%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}
.toast[hidden] {
  display: none;
}
.toast-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.toast[data-tone='success'] .toast-icon {
  background: #d9ff57;
  color: #16171b;
}
.toast[data-tone='error'] {
  background: #b3261e;
}
.toast[data-tone='error'] .toast-icon {
  background: #fff;
  color: #b3261e;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/*
 * 동작 줄이기: OS 미디어쿼리 대신 /js/motion-preference.js가 정한 data-motion을 쓴다.
 * 운영 주소는 OS 설정을 그대로 따르고, 로컬 주소만 기본 full + ?motion=full|reduce|system 으로 바꿀 수 있다.
 */
:root[data-motion='reduce'] {
  scroll-behavior: auto;
}
:root[data-motion='reduce'] *,
:root[data-motion='reduce'] *::before,
:root[data-motion='reduce'] *::after {
  animation-duration: 0.001ms !important;
  animation-delay: 0s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  transition-delay: 0s !important;
}
/* 안전장치: motion-preference.js를 못 읽어 data-motion이 없을 때만 OS 설정을 직접 따른다(data-motion='full'은 건드리지 않음). */
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion]) {
    scroll-behavior: auto;
  }
  :root:not([data-motion]) *,
  :root:not([data-motion]) *::before,
  :root:not([data-motion]) *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
}
