/* 도슨트아트 기본 스타일 — 디자인 토큰, 리셋, 글꼴, 버튼, 모션 (docs/07-design-system.md) */

@font-face {
  font-family: "Pretendard";
  src: url(../fonts/PretendardVariable.woff2) format("woff2");
  font-weight: 45 920;
  font-display: swap;
}

:root {
  /* 색 */
  --vermilion: #F05A3C;
  --vermilion-600: #D94A2F;
  --vermilion-700: #B83B28;
  --vermilion-800: #923125;
  --vermilion-400: #F76F54;
  --vermilion-100: #FFDCD3;
  --vermilion-50: #FFF1ED;
  --black: #161B1D;
  --charcoal: #1F2A2E;
  --gray-700: #465155;
  --gray-500: #707A7E;
  --gray-on-dark: #A9B2B5;
  --border: #D9DEDF;
  --ivory: #F7F5F0;
  --white: #fff;
  --sand: #D8C3A5;
  --sand-pale: #F1E8DC;
  --archive: #725D4C;
  --live: #2F9E62;
  --live-text: #2F7A50;
  --live-bg: #E3F1E9;

  /* 글꼴 */
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --fs-h1: clamp(44px, 5vw, 72px);
  --fs-h2: clamp(32px, 3.4vw, 48px);
  --fs-lead: 20px;
  --fs-body: 17px;
  --fs-caption: 14px;

  /* 레이아웃 */
  --container: 1280px;
  --gutter: clamp(20px, 5.5vw, 80px);
  --section-gap: 144px;
  --header-h: 88px;
  --radius-card: 28px;
  --radius-img: 24px;
  --radius-pill: 999px;

  /* 모션 */
  --ease-out: cubic-bezier(.2, .7, .2, 1);
}

@media (max-width: 767px) {
  :root {
    --fs-h1: 38px;
    --fs-h2: 28px;
    --fs-lead: 17px;
    --fs-body: 16px;
    --section-gap: 96px;
    --header-h: 60px;
  }
}

/* 리셋 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--black);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  /* 내용이 짧아도 푸터가 화면 아래에 붙도록 */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* 화면 밖으로 걸친 원형 장식이 가로 스크롤을 만들지 않게 */
body > main { flex: 1 0 auto; overflow-x: clip; }
main:focus { outline: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--vermilion-700); }
a:hover { color: var(--vermilion-800); }
:focus-visible { outline: 2px solid var(--vermilion); 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: -100px; z-index: 100;
  padding: 12px 20px; border-radius: var(--radius-pill);
  background: var(--black); color: var(--white); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; color: var(--white); }

/* 레이아웃 */
/* 시안 기준: 좌우 여백을 뺀 콘텐츠 폭이 최대 1280px */
.container { max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-gap) 0; }
.section-label {
  display: block; margin-bottom: 16px;
  font-size: 14px; font-weight: 600; line-height: 1.2; letter-spacing: .08em; text-transform: uppercase;
  color: var(--vermilion-600);
}
.h1 { font-size: var(--fs-h1); font-weight: 700; line-height: 1.22; letter-spacing: -.02em; }
.h2 { font-size: var(--fs-h2); font-weight: 700; line-height: 1.3; letter-spacing: -.015em; }
.lead { font-size: var(--fs-lead); line-height: 1.65; color: var(--gray-700); }
.caption { font-size: var(--fs-caption); color: var(--gray-500); }

/* 섹션 머리 (라벨 + 제목 ‖ 오른쪽 설명·링크) */
.h2--xl { font-size: clamp(36px, 3.9vw, 56px); line-height: 1.2; }
.sec-head { display: flex; flex-wrap: wrap; gap: 24px 64px; justify-content: space-between; align-items: flex-end; }
.sec-head__title { display: flex; flex-direction: column; gap: 20px; }
.sec-head__title .section-label { margin: 0; }
.sec-head__side { flex: 0 1 420px; font-size: 18px; line-height: 1.6; color: var(--gray-700); }
.sec-head__side--muted { font-size: 16px; color: var(--gray-500); }
.text-link {
  padding-bottom: 4px; border-bottom: 1.5px solid var(--black); color: var(--black);
  font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
}
.text-link:hover, .text-link:focus-visible { color: var(--vermilion-600); border-color: var(--vermilion-600); }
@media (max-width: 767px) {
  .sec-head__title { gap: 16px; }
  .h2--xl { font-size: 32px; line-height: 1.3; }
}

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; gap: 16px;
  height: 58px; padding: 0 6px 0 28px; border: 0; border-radius: var(--radius-pill);
  background: var(--vermilion); color: var(--white);
  font-family: inherit; font-size: 18px; font-weight: 600; text-decoration: none;
  transition: background .3s ease, color .3s ease, box-shadow .3s ease;
}
.btn .ic {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--white); color: var(--black);
  transition: transform .3s ease, background .3s ease, color .3s ease;
}
.btn:hover, .btn:focus-visible { background: var(--charcoal); color: var(--white); }
.btn:hover .ic, .btn:focus-visible .ic { transform: rotate(45deg); }
.btn.dark { background: var(--black); }
.btn.dark:hover, .btn.dark:focus-visible { background: var(--white); color: var(--black); }
.btn.dark:hover .ic, .btn.dark:focus-visible .ic { background: var(--black); color: var(--white); }
.btn.ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7); }
.btn.ghost:hover, .btn.ghost:focus-visible { background: var(--white); color: var(--black); }
.btn.ghost:hover .ic, .btn.ghost:focus-visible .ic { background: var(--black); color: var(--white); }
@media (max-width: 767px) {
  .btn { height: 52px; padding-left: 22px; font-size: 16px; gap: 12px; }
  .btn .ic { width: 40px; height: 40px; }
}

/* 원형 화살표 버튼 */
.go {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--vermilion); color: var(--white); transition: background .3s ease;
}
.go:hover, .go:focus-visible { background: var(--charcoal); color: var(--white); }

/* 탭·필터 */
.tab {
  height: 52px; padding: 0 24px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--border); background: var(--white); color: var(--gray-700);
  font-size: 17px; font-weight: 600; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .3s ease;
}
.tab:hover { border-color: var(--black); color: var(--black); }
.tab.on, .tab[aria-selected="true"], .tab[aria-current] { background: var(--black); border-color: var(--black); color: var(--white); }

/* 태그(적용된 기능) */
.tag {
  height: 48px; padding: 0 22px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--black); color: var(--black); background: transparent;
  display: inline-flex; align-items: center; font-weight: 600; text-decoration: none;
  transition: background .3s ease, color .3s ease;
}
a.tag:hover, a.tag:focus-visible { background: var(--black); color: var(--white); }

/* 모션 — 화면에 들어올 때 1회 재생. JS 가 [data-reveal] 에 .is-in 을 붙인다.
   JS 가 없으면(html 에 .js 없음) 처음부터 보인다. */
@keyframes dUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes dPop { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: scale(1); } }
@keyframes dRise { from { opacity: 0; transform: translateY(60px) rotate(-2deg); } to { opacity: 1; transform: none; } }
@keyframes dZoom { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes dFloat { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-16px, 14px); } }
@keyframes dFloat2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(10px, -12px); } }
@keyframes dPhone { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-18px) rotate(-3deg); } }
@keyframes dScroll { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }

.js [data-reveal]:not(.is-in) { opacity: 0; }
.is-in.m-up { animation: dUp .9s var(--ease-out) both; }
.is-in.m-pop { animation: dPop 1.1s cubic-bezier(.2, .8, .2, 1) both; }
.is-in.m-rise { animation: dRise 1.1s var(--ease-out) .2s both; }
.is-in.m-phone { animation: dRise 1.1s var(--ease-out) .2s both, dPhone 6s ease-in-out 1.4s infinite; }
.m-d1 { animation-delay: .12s !important; }
.m-d2 { animation-delay: .26s !important; }
.m-d3 { animation-delay: .4s !important; }
.m-d4 { animation-delay: .55s !important; }
.m-zoom { animation: dZoom 2.6s var(--ease-out) both; }
.m-float { animation: dFloat 7s ease-in-out 1.2s infinite; }
.m-float2 { animation: dFloat2 5.5s ease-in-out 1.2s infinite; }
.m-scroll { animation: dScroll 1.8s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal]:not(.is-in) { opacity: 1; }
}

/* 폭별로만 보이는 줄바꿈·요소 */
@media (max-width: 767px) { .pc-only { display: none !important; } }
@media (min-width: 768px) { .m-only { display: none !important; } }
