/* base.css — 40페이지 공통 리셋 + 토큰 계약 + 접근성. 색상·레이아웃은 페이지별 pNN.css가 담당한다. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif);
  color: var(--ink, #1A1A1A);
  background: var(--bg, #FFFFFF);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-display, inherit); line-height: 1.3; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
img, picture, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul, ol { padding-left: 1.2em; }

.wrap { max-width: 1180px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 32px); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: #fff; color: #000; padding: 10px 16px; border-radius: 4px;
}
.skip-link:focus { left: 12px; top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* 키보드 포커스는 항상 보이게 — outline:none 단독 사용 금지 */
:focus-visible {
  outline: 3px solid var(--accent, #0F3D6B);
  outline-offset: 2px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 10px; font-weight: 700; font-size: 15px;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.btn-solid { background: var(--accent, #0F3D6B); color: #fff; }
.btn-outline { background: transparent; border-color: var(--accent, #0F3D6B); color: var(--accent-text, var(--accent, #0F3D6B)); }
.btn-kakao { background: #FEE500; color: #191600; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }

.cta-buttons { display: flex; flex-wrap: wrap; gap: 12px; }

.section { padding-block: clamp(48px, 8vw, 88px); }
.section-head { margin-bottom: clamp(24px, 4vw, 40px); }
.section-head h2 { font-size: clamp(22px, 3vw, 32px); }

footer.site-footer {
  background: var(--footer-bg, #14181C);
  color: var(--footer-text, #C7CACD);
  padding-block: clamp(32px, 5vw, 56px);
  font-size: 14px;
}
footer.site-footer a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer-disclaimer { font-size: 12.5px; opacity: .85; line-height: 1.8; }
.footer-biz { line-height: 1.9; }
@media (max-width: 640px) {
  footer.site-footer { padding-block: 24px; font-size: 12.5px; }
  .footer-biz, .footer-links, .footer-disclaimer { line-height: 1.5; }
  .footer-biz p, .footer-links p, .footer-disclaimer p { margin: 0 0 6px; }
  footer.site-footer .wrap { gap: 12px; }
}

/* 히어로 차량 사진 슬라이드쇼 — 필요한 페이지의 .hero 안에 .hero-slideshow(7장) 삽입 시 동작.
   사용하는 페이지는 자신의 pNN.css에서 .hero{position:relative;overflow:hidden}만 추가하면 된다. */
.hero-slideshow { position: absolute; inset: 0; z-index: 0; }
.hero-slideshow img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; animation: hero-slide 28s infinite;
}
.hero-slideshow img:nth-child(1) { animation-delay: 0s; }
.hero-slideshow img:nth-child(2) { animation-delay: 4s; }
.hero-slideshow img:nth-child(3) { animation-delay: 8s; }
.hero-slideshow img:nth-child(4) { animation-delay: 12s; }
.hero-slideshow img:nth-child(5) { animation-delay: 16s; }
.hero-slideshow img:nth-child(6) { animation-delay: 20s; }
.hero-slideshow img:nth-child(7) { animation-delay: 24s; }
@keyframes hero-slide {
  0%, 100% { opacity: 0; }
  2%, 12% { opacity: 1; }
  14% { opacity: 0; }
}
.hero-inner { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero-slideshow img { animation: none; opacity: 0; }
  .hero-slideshow img:first-child { opacity: 1; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 본문 차량 사진 갤러리 — 주제별 상담 페이지에서 재사용 (accent는 각 pNN.css 값을 따름) */
.body-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.body-gallery picture img { width: 100%; height: auto; border-radius: 8px; display: block; }

/* 본문 비교 표 — 주제별 상담 페이지에서 재사용 */
.body-table-wrap { overflow-x: auto; margin: 20px 0; }
.body-table { width: 100%; border-collapse: collapse; min-width: 480px; background: #fff; }
.body-table th, .body-table td { border: 1px solid rgba(0,0,0,.1); padding: 12px 14px; text-align: left; font-size: 14.5px; }
.body-table thead th { background: var(--accent, #333); color: #fff; text-align: center; }
.body-table tbody th { text-align: left; background: rgba(0,0,0,.03); }
/* 페이지마다 표 클래스명이 제각각이라(l2-table, l6-table, ev3-table 등) 요소 선택자로 전부 커버 */
@media (max-width: 640px) {
  table { min-width: 0 !important; font-size: 12px; }
  table th, table td { padding: 6px 5px; word-break: keep-all; }
}

/* 절차 흐름 도식(SVG) — 주제별 상담 페이지에서 재사용 */
.flow-row { display: grid; gap: 24px; align-items: center; margin: 28px 0; }
.flow-row .flow-graphic { display: flex; justify-content: center; }
.flow-row .flow-graphic svg { width: 120px; height: 120px; }
@media (min-width: 700px) { .flow-row { grid-template-columns: 1fr auto; } }
.flow-row.flow-row--reverse { direction: rtl; }
.flow-row.flow-row--reverse > * { direction: ltr; }

@media (max-width: 319px) {
  .wrap { padding-inline: 12px; }
}
