/* assets/css/base.css — frontend-seo-INSIDE-V3 functional layer.
   레이아웃/인터랙션 메커니즘만 정의 (컬러/폰트/브랜드는 visual-designer의 /assets/style.css 담당,
   이 파일 다음에 로드되어 값을 덮어쓴다). */

* { box-sizing: border-box; }
img { max-width: 100%; height: auto; display: block; }
.dp-img--fallback { background: #e5e2db; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* 섹션 공통 리듬 */
section { padding: 56px 0; }
.dp-section-head { text-align: center; margin-bottom: 32px; }
.dp-eyebrow { display: inline-block; font-size: 13px; letter-spacing: .08em; margin-bottom: 8px; }
.dp-eyebrow--center { display: block; }

/* 스크롤 reveal — assets/js/main.js의 IntersectionObserver가 .dp-reveal--in 토글 */
.dp-reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.dp-reveal--in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .dp-reveal { opacity: 1; transform: none; transition: none; } }

/* 버튼 */
.dp-btn-primary, .jgo-btn-primary { display: inline-block; border-radius: 2px; padding: 12px 24px; text-decoration: none; font-weight: 600; }
.jgo-btn-primary--large { padding: 16px 32px; font-size: 1.05rem; }

/* Hero */
.dp-hero { position: relative; padding: 72px 0; overflow: hidden; }
.dp-hero__media { position: absolute; inset: 0; z-index: 0; }
.dp-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.dp-hero__inner { position: relative; z-index: 1; }
.dp-hero__inner h1 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 12px; }
.dp-hero--right .dp-hero__inner { margin-left: auto; text-align: right; }
.dp-hero--center .dp-hero__inner { margin: 0 auto; text-align: center; }
.dp-hero__link { font-size: .9rem; }

/* 공정 카드 (템플릿 A) */
.dp-process__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 32px); }
@media (max-width: 900px) { .dp-process__list { grid-template-columns: repeat(2, 1fr); } }
.dp-process__item { border-radius: 8px; padding: 24px; }
.dp-process__num { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 50%; font-weight: 700; margin-bottom: 12px; }

/* 비교표 (템플릿 B) */
.dp-compare__table-wrap { overflow-x: auto; }
.dp-compare__table { width: 100%; border-collapse: collapse; }
.dp-compare__table th, .dp-compare__table td { padding: 12px 16px; border: 1px solid rgba(0,0,0,.1); text-align: left; }
.dp-checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.dp-checklist li::before { content: "\2713"; margin-right: 8px; }
@media (max-width: 640px) { .dp-checklist { grid-template-columns: 1fr; } }

/* 진단 카드 + 타임라인 (템플릿 C) */
.dp-diagnosis__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
@media (max-width: 900px) { .dp-diagnosis__grid { grid-template-columns: 1fr; } }
.dp-diagnosis__card { border-radius: 8px; padding: 20px; border: 1px solid rgba(0,0,0,.08); }
.dp-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.dp-timeline li { display: flex; gap: 12px; align-items: baseline; }

/* 신뢰 뱃지 (템플릿 D) */
.dp-trust__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 32px); }
@media (max-width: 768px) { .dp-trust__list { grid-template-columns: 1fr; } }
.dp-trust__item { border-radius: 8px; padding: 18px; text-align: center; border: 1px solid rgba(0,0,0,.08); }

/* 통계 (템플릿 E) */
.dp-stats__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
@media (max-width: 768px) { .dp-stats__list { grid-template-columns: repeat(2, 1fr); } }
.dp-stats__num { display: block; font-size: 2rem; font-weight: 800; }
.dp-stats__label { display: block; font-size: .85rem; margin-top: 4px; }

/* Before/After 갤러리 */
.dp-gallery__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 768px) { .dp-gallery__grid { grid-template-columns: 1fr; } }
.dp-gallery__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.dp-gallery__before, .dp-gallery__after { position: relative; }
.dp-gallery__before span, .dp-gallery__after span { position: absolute; top: 8px; left: 8px; font-size: .7rem; padding: 2px 8px; border-radius: 2px; background: rgba(0,0,0,.6); color: #fff; }

/* FAQ 아코디언 — max-height CSS 트랜지션 */
.dp-faq__item { border-bottom: 1px solid rgba(0,0,0,.1); }
.dp-faq__q { width: 100%; display: flex; justify-content: space-between; align-items: center; background: none; border: 0; padding: 18px 4px; font-size: 1rem; text-align: left; cursor: pointer; }
.dp-faq__icon { transition: transform .3s ease; }
.dp-faq__q[aria-expanded="true"] .dp-faq__icon { transform: rotate(45deg); }
.dp-faq__a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.dp-faq__a p { margin: 0 0 18px; padding: 0 4px; }

/* CTA 배너 */
.dp-cta { text-align: center; border-radius: 8px; }
.dp-cta--card { border: 1px solid rgba(0,0,0,.08); padding: 40px 24px; }
.dp-cta--inline { display: flex; align-items: center; justify-content: space-between; text-align: left; }
@media (max-width: 640px) { .dp-cta--inline { flex-direction: column; align-items: flex-start; gap: 16px; } }
.dp-cta__text { margin: 0 0 16px; font-size: 1.1rem; }
.dp-cta--inline .dp-cta__text { margin: 0; }
.dp-cta__assurance { display: block; margin-top: 10px; font-size: .78rem; opacity: .7; }
.dp-cta--inline .dp-cta__assurance { flex-basis: 100%; margin-top: 6px; }

/* 관련 서비스 / 카드 그리드(NSEO) */
.dp-related__list, .dp-nseo-grid__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1024px) { .dp-related__list, .dp-nseo-grid__list { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .dp-related__list, .dp-nseo-grid__list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .dp-related__list, .dp-nseo-grid__list { grid-template-columns: 1fr; } }
.dp-nseo-card { display: block; border-radius: 12px; overflow: hidden; text-decoration: none; }
.dp-nseo-card__img-wrap { aspect-ratio: 16/9; overflow: hidden; }
.dp-nseo-card__img-wrap img, .dp-nseo-card__img-placeholder { width: 100%; height: 100%; object-fit: cover; background: #e5e2db; }
.dp-nseo-card__body { padding: 12px; }

/* 메인 이동 링크 */
.dp-back-main { text-align: center; padding: 32px 0; }
.dp-hero__link { display: inline-block; margin-top: 12px; }

/* Rule 14 변주 유틸리티 */
.dp-section-head--left { text-align: left; }
.dp-density-compact section { padding: 36px 0; }
.dp-density-spacious section { padding: 88px 0; }
.dp-card--outline .dp-diagnosis__card, .dp-card--outline .dp-process__item { border: 1px solid rgba(0,0,0,.15); background: none; }
.dp-card--filled .dp-diagnosis__card, .dp-card--filled .dp-process__item { border: none; background: rgba(0,0,0,.04); }

/* 메인 서비스 카드 그리드 (내부링크 5개+) */
.dp-service-grid__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.dp-service-grid__list > li { min-width: 0; height: 100%; }
.dp-service-grid__list > li > article { height: 100%; }
@media (max-width: 900px) { .dp-service-grid__list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .dp-service-grid__list { grid-template-columns: 1fr; } }
.dp-service-card { display: block; border-radius: 8px; overflow: hidden; text-decoration: none; border: 1px solid rgba(0,0,0,.08); }
.dp-service-card__img { aspect-ratio: 4/3; }
.dp-service-card__img img, .dp-service-card__img .dp-img--fallback { width: 100%; height: 100%; object-fit: cover; }
.dp-service-card__body { padding: 16px; }

/* AFTER 마퀴 (메인) */
.jgo-marquee { overflow: hidden; }
.jgo-marquee__track { display: flex; gap: 16px; width: max-content; animation: dp-marquee 40s linear infinite; }
.jgo-marquee:hover .jgo-marquee__track, .jgo-marquee:focus-within .jgo-marquee__track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .jgo-marquee__track { animation: none; overflow-x: auto; } }
.jgo-marquee__item { flex: 0 0 260px; margin: 0; }
.jgo-marquee__item img { aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; }
@keyframes dp-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.jgo-marquee__empty { text-align: center; padding: 24px; opacity: .6; font-size: .9rem; }
.jgo-cases-explore { text-align: center; margin-top: clamp(160px, 18vw, 220px); padding-top: 48px; border-top: 1px solid rgba(0,0,0,.1); }

/* ── cro-designer: Floating CTA (전화 아이콘 SVG 64x64, 각진) — v2.4 핵심 룰 3 ── */
.dp-float-cta {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  width: 64px; height: 64px; border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--dp-primary-3, #2A2825);
  color: var(--dp-bg-soft, #F5F2ED);
  box-shadow: var(--dp-shadow-lg, 0 24px 60px rgba(0,0,0,.25));
  border-left: 3px solid var(--dp-accent, #A07850);
  text-decoration: none;
}
.dp-float-cta__icon { width: 26px; height: 26px; }
.dp-float-cta::before {
  content: ""; position: absolute; inset: -6px; border: 2px solid var(--dp-accent, #A07850);
  opacity: .55; animation: dp-float-pulse 2.4s ease-out 3; pointer-events: none;
}
@keyframes dp-float-pulse {
  0%   { transform: scale(.92); opacity: .55; }
  70%  { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(1.18); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .dp-float-cta::before { animation: none; opacity: 0; } }
@media (max-width: 768px) { .dp-float-cta { display: none; } }

/* ── cro-designer: Mobile sticky bar — 데스크톱 Floating CTA와 배타적으로 모바일 전용 ── */
.dp-sticky-bar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: var(--dp-bg-soft, #F5F2ED);
  border-top: 1px solid var(--dp-border, #C4C2BE);
  box-shadow: 0 -6px 20px rgba(0,0,0,.08);
}
.dp-sticky-bar__label { font-size: .85rem; font-weight: 700; color: var(--dp-text, #131210); }
.dp-sticky-bar__cta {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 2px; font-weight: 700; text-decoration: none;
  background: var(--dp-primary-d, #12110E); color: var(--dp-bg-soft, #F5F2ED);
}
@media (max-width: 768px) { .dp-sticky-bar { display: flex; } body { padding-bottom: 64px; } }

/* ── cro-designer: Contact 페이지 액션 카드 2분할 (Phone/SMS) — v2.4 핵심 룰 4 ── */
.dp-contact-cards__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 768px) { .dp-contact-cards__grid { grid-template-columns: 1fr; } }
.dp-contact-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  min-height: 360px; padding: 48px 44px; text-decoration: none; color: inherit;
  border: 1px solid var(--dp-border, #C4C2BE);
}
.dp-contact-card__icon { margin-bottom: 12px; }
.dp-contact-card__num { font-size: 1.4rem; font-weight: 800; margin: 4px 0; }
.dp-contact-card p { margin: 0 0 .4em; }

/* ── cro-designer: 운영정보 3x2 그리드 ── */
.dp-ops__grid { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.5vw, 24px); }
@media (max-width: 768px) { .dp-ops__grid { grid-template-columns: 1fr; } }
.dp-ops__item { background: var(--dp-bg-soft, #F5F2ED); border: 1px solid var(--dp-border, #C4C2BE); padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.dp-ops__label { font-size: .78rem; font-weight: 700; letter-spacing: .06em; color: var(--dp-accent, #A07850); text-transform: uppercase; }
.dp-ops__value { font-size: .96rem; }
