/* 예고픽 base — 리셋 · 타이포 · 레이아웃 · 앱 셸(상단바 · 데스크톱 상단 내비 · 모바일 하단 탭 · 푸터)
   색·간격·서체 값은 tokens.css 변수만 사용한다. */

/* ── 리셋 ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 8px); }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
img, picture, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
/* 예고편 썸네일 <picture class="yt-pic">(휴대폰 640px 상한용 <source> — YT.img, 사용자 결정 2026-10-07: 출시 전 점검 추천안)는 상자를 만들지 않는다 → 배치는 <img> 하나일 때와 같다 */
picture.yt-pic { display: contents; }
picture.yt-pic > source { display: none; } /* contents 아래에서 <source> 가 그리드·플렉스 항목이 되어 칸을 차지하지 않게(선택 동작은 그대로) */
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

/* ── 문서 ── */
body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--c-bg);
  background-image: radial-gradient(120% 60% at 50% -10%, var(--c-bg-spot), transparent 60%);
  background-repeat: no-repeat;
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
}
html.has-sheet { overflow: hidden; }

/* ── 타이포 ── */
.t-display { font-size: var(--fs-display); line-height: var(--lh-display); font-weight: var(--fw-black); letter-spacing: var(--ls-tight); }
h1, .t-h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); font-weight: var(--fw-bold); letter-spacing: var(--ls-tight); }
h2, .t-h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: var(--fw-bold); letter-spacing: var(--ls-tight); }
h3, .t-h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-bold); }
.t-body { font-size: var(--fs-body); line-height: var(--lh-body); }
.t-sm { font-size: var(--fs-sm); line-height: var(--lh-sm); }
.t-caption, small { font-size: var(--fs-caption); line-height: var(--lh-caption); }
.t-num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--c-text-muted); }
.faint { color: var(--c-text-faint); }
strong, b { font-weight: var(--fw-bold); }
p a:not(.btn), .link { color: var(--c-primary-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ── 접근성 ── */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; border-radius: var(--r-xs); }
.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: var(--sp-2); top: -100px; z-index: 100;
  background: var(--c-gold); color: var(--c-on-gold); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); font-weight: var(--fw-bold);
}
.skip-link { display: inline-flex; align-items: center; min-height: var(--touch); } /* 터치 44px(사용자 지시 2026-10-07 출시 전 감사 A-5) */
.skip-link:focus { top: var(--sp-2); }

/* ── 레이아웃 ── */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
main#app { display: block; min-height: 60vh; outline: none; }
.page { padding-block: var(--sp-4) var(--sp-10); }
.stack > * + * { margin-top: var(--sp-3); }
.stack-lg > * + * { margin-top: var(--sp-6); }
.row { display: flex; align-items: center; gap: var(--sp-2); }
.row--wrap { flex-wrap: wrap; }
.spacer { flex: 1 1 auto; }
.section { margin-top: var(--sp-8); }
.section-head { display: flex; align-items: baseline; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.section-title { font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: var(--fw-bold); letter-spacing: var(--ls-tight); }
.section-sub { color: var(--c-text-muted); font-size: var(--fs-caption); }
.page-title { font-size: var(--fs-h1); line-height: var(--lh-h1); font-weight: var(--fw-black); letter-spacing: var(--ls-tight); margin-bottom: var(--sp-2); }
.divider { height: 1px; background: var(--c-line); border: 0; margin: var(--sp-6) 0; }

/* ── 상단바 ── */
.topbar {
  position: sticky; top: 0; z-index: var(--z-topbar);
  background: color-mix(in srgb, var(--c-bg) 82%, transparent);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.topbar__inner { height: var(--topbar-h); display: flex; align-items: center; gap: var(--sp-4); }
.brand { display: inline-flex; align-items: center; color: var(--c-text); min-height: var(--touch); }
.brand .logo { height: 30px; width: auto; }
.topnav { display: none; }
.topbar__actions { margin-left: auto; display: flex; gap: var(--sp-1); }

/* 마키 전구 줄 — 상단바 아래 금색 점선, 천천히 점멸(모션 감소 시 정지) */
.marquee-lights {
  height: 3px; opacity: 0.85;
  background-image: radial-gradient(circle at 1.5px 1.5px, var(--c-gold) 1.2px, transparent 1.6px);
  background-size: 12px 3px; background-repeat: repeat-x;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  animation: marquee-chase var(--dur-marquee) steps(4) infinite;
}
@keyframes marquee-chase { to { background-position: 12px 0; } }

/* ── 하단 탭(모바일) ── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-tabbar);
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: color-mix(in srgb, var(--c-surface) 90%, transparent);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-top: 1px solid var(--c-line);
}
.tabbar__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--touch); color: var(--c-text-muted); font-size: var(--fs-micro); line-height: var(--lh-micro); font-weight: var(--fw-semibold);
  position: relative;
}
.tabbar__item .icon { width: 24px; height: 24px; }
.tabbar__item[aria-current="page"] { color: var(--c-text); }
.tabbar__item[aria-current="page"]::before {
  content: ""; position: absolute; top: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--c-primary);
  transform: translateY(-4px);
}
.tabbar__item[aria-current="page"] .icon { color: var(--c-primary); }

/* ── 푸터 ── */
.site-footer { margin-top: var(--sp-12); border-top: 1px solid var(--c-line); background: color-mix(in srgb, var(--c-surface) 40%, transparent); }
.site-footer__inner { padding-block: var(--sp-8) var(--sp-10); display: grid; gap: var(--sp-3); font-size: var(--fs-caption); line-height: var(--lh-caption); color: var(--c-text-muted); }
.site-footer__brand { display: flex; align-items: center; gap: var(--sp-3); color: var(--c-text); }
.site-footer__brand .logo { height: 24px; width: auto; }
.site-footer__tag { font-weight: var(--fw-semibold); color: var(--c-text-muted); }
.site-footer__notice strong { color: var(--c-text); }
.site-footer__demo { display: flex; gap: var(--sp-2); align-items: flex-start; }
.site-footer__demo .chip { flex: none; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); }
.site-footer__links a { min-height: var(--touch); display: inline-flex; align-items: center; color: var(--c-text); text-decoration: underline; text-underline-offset: 3px; }
.site-footer__copy { color: var(--c-text-faint); }
.site-footer__install { display: inline-flex; align-items: center; gap: 6px; min-height: var(--touch); padding: 0 var(--sp-3); border-radius: var(--r-pill); border: 1px solid var(--c-line-strong); color: var(--c-text); font-size: var(--fs-caption); font-weight: var(--fw-semibold); }
.site-footer__install[hidden] { display: none; }
.site-footer__install:hover { background: var(--c-surface-2); }
/* 「고객문의」 버튼 줄(사용자 지시 2026-10-06) — 코랄 채움 버튼 + 한 줄 안내. 대비: 다크 #0F1014/#FF5A3C 6.1:1 · 라이트 #FFF/#D93A2B 4.6:1 */
.site-footer__help { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); }
.site-footer__contact {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--touch); padding: 0 var(--sp-5);
  border-radius: var(--r-pill); background: var(--c-primary); color: var(--c-on-primary);
  font-size: var(--fs-sm); font-weight: var(--fw-bold); text-decoration: none; box-shadow: var(--shadow-1);
  transition: background var(--dur-1), transform var(--dur-1);
}
.site-footer__contact:hover { background: var(--c-primary-hover); }
.site-footer__contact:active { transform: translateY(1px); }
.site-footer__help-txt { color: var(--c-text-muted); }
/* 하단 고정 바가 있는 페이지(모바일): 푸터 마지막 줄이 바에 가리지 않게(QA-19) */
@media (max-width: 899px) { html.has-dock body { padding-bottom: calc(var(--tabbar-h) + 76px + env(safe-area-inset-bottom, 0px)); } }

/* ── 아이콘 ── */
.icon { flex: none; }

/* ── 데스크톱 ── */
@media (min-width: 900px) {
  /* 상단바 높이 64→76px · 로고 30→36px · 메뉴 글자 14→16px(사용자 지시 2026-10-07 "상단 메뉴 2px 더, 상단바 더 크게") */
  :root { --gutter: 24px; --topbar-h: 76px; }
  .brand .logo { height: 36px; }
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; gap: var(--sp-2); margin-left: var(--sp-8); }
  .topnav__link {
    min-height: 48px; display: inline-flex; align-items: center; padding-inline: var(--sp-4);
    color: var(--c-text-muted); font-weight: var(--fw-semibold); border-radius: var(--r-pill); font-size: 16px;
    transition: color var(--dur-1), background var(--dur-1);
  }
  .topnav__link:hover { color: var(--c-text); background: var(--c-surface-2); }
  .topnav__link[aria-current="page"] { color: var(--c-text); background: var(--c-surface-2); box-shadow: inset 0 -2px 0 var(--c-primary); }
  .page { padding-block: var(--sp-6) var(--sp-12); }
  .site-footer__inner { grid-template-columns: 1fr 1fr; column-gap: var(--sp-10); }
  .site-footer__brand, .site-footer__copy, .site-footer__help { grid-column: 1 / -1; }
}

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