/* SEO·AEO·GEO 무료진단 신청 페이지 (seo_guide.php) — Figma '01 신청 페이지' 기준
 * 사이트 공통 reset.css 가 p·div·a 에 글꼴(Montserrat 13px #666)을 직접 지정하므로
 * 이 페이지 안에서는 상속값으로 되돌린 뒤 스타일을 적용함
 */
.sg-page {
  --sg-ink: #0c0c0c;
  --sg-text: #363636;
  --sg-sub: #6b7280;
  --sg-line: #e9e9e9;
  --sg-bg: #f6f7f9;
  --sg-white: #ffffff;
  --sg-blue: #0f5eb3;
  --sg-blue-dark: #0c4f97;
  --sg-blue-soft: #e8f0fa;
  --sg-dark: #1a1a1a;
  --sg-err: #d23c3c;
  --sg-en: 'Montserrat', sans-serif;

  display: block;
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--sg-text);
  word-break: keep-all;
  padding-top: 82px;               /* 고정 헤더 높이 (1281px 이상) */
}
.sg-page *, .sg-page *:before, .sg-page *:after { box-sizing: border-box; }
/* :where() 는 우선순위를 높이지 않아 아래 개별 스타일이 그대로 적용됨 */
.sg-page :where(p, div, a, li, td, th, input, button, label, span, b) {
  font-family: inherit; font-size: inherit; color: inherit; line-height: inherit;
}
.sg-page :where(h1, h2, h3, p, ul, ol) { margin: 0; padding: 0; }
/* 사이트 sub.css 의 제목 글꼴(영문 글자 없는 글꼴) 대신 이 페이지 글꼴 사용 */
.sg-page :where(h1, h2, h3), .geo-modal h3 { font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; }
.sg-page :where(ul, ol) { list-style: none; }
.sg-blind { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.sg-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; box-sizing: content-box; }
.sg-sec { padding: 120px 0; background: var(--sg-white); }
.sg-bg-gray { background: var(--sg-bg); }
.sg-bg-dark { background: var(--sg-ink); }

/* ---------- 섹션 제목 ---------- */
.sg-head { max-width: 720px; margin-bottom: 56px; }
.sg-eyebrow { font-family: var(--sg-en); font-size: 14px; font-weight: 700; letter-spacing: .12em; color: var(--sg-blue); margin-bottom: 14px; }
.sg-eyebrow-light { color: var(--sg-blue-soft); }
.sg-title { font-size: 40px; font-weight: 700; line-height: 1.35; color: var(--sg-ink); letter-spacing: -.01em; }
.sg-desc { font-size: 17px; line-height: 1.65; color: var(--sg-sub); margin-top: 14px; }
.sg-bg-dark .sg-title { color: var(--sg-white); }
.sg-bg-dark .sg-desc { color: var(--sg-line); }

/* ---------- 버튼 ---------- */
.sg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 30px; border-radius: 40px; border: 1px solid transparent;
  font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.sg-btn i { font-family: var(--sg-en); font-style: normal; transition: transform .2s; }
.sg-btn:hover i { transform: translateX(4px); }
.sg-btn-blue { background: var(--sg-blue); color: #fff !important; }
.sg-btn-blue:hover { background: var(--sg-blue-dark); }
.sg-btn-white { background: #fff; color: var(--sg-ink) !important; border-color: var(--sg-ink); }
.sg-btn-white:hover { background: var(--sg-blue-soft); }
.sg-btn-dark { background: var(--sg-ink); color: #fff !important; }
.sg-btn-dark:hover { background: #333; }
.sg-btn-block { width: 100%; height: 56px; margin-top: 6px; }
.sg-btn:disabled { opacity: .6; cursor: wait; }

/* =========================================================
 * 1. 첫 화면 + 신청 폼
 * ========================================================= */
.sg-hero { background: var(--sg-ink); padding: 110px 0 120px; }

/* ---------------------------------------------------------
 
 * ▶ 겹쳐 놓은 어두운 막(그라데이션): 글자가 잘 읽히게 이미지를 어둡게 덮음
 *    - 숫자(.88 / .7 …)가 클수록 더 어두움. 이미지가 너무 안 보이면 숫자를 줄이면 됨
 * --------------------------------------------------------- */
.sg-hero {
  position: relative;
  isolation: isolate;          /* 아래 ::before 막이 다른 요소 위로 올라가지 않게 */
  overflow: hidden;
  background-color: var(--sg-ink);
  background-image: url('/seo/images/seo_top.webp');   /* ← 첫 화면 배경 이미지 */
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}
.sg-hero:before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  /* 왼쪽(글자 영역)은 진하게, 오른쪽(폼 쪽)으로 갈수록 이미지가 더 보이게 */
  background: linear-gradient(90deg, rgba(12, 12, 12, .92) 0%, rgba(12, 12, 12, .78) 45%, rgba(12, 12, 12, .45) 100%);
}

.sg-bg-dark {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--sg-ink);
  background-image: url('/seo/images/seo_part.webp');  /* ← 파트별 설계 배경 이미지 */
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}
.sg-bg-dark:before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  /* 카드가 위에 올라가는 영역이라 고르게 어둡게 */
  background: linear-gradient(180deg, rgba(12, 12, 12, .88) 0%, rgba(12, 12, 12, .78) 100%);
}
/* 이미지 위에서도 카드가 구분되게 살짝 투명 + 흐림 */
.sg-bg-dark .sg-steps li { background: rgba(26, 26, 26, .82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* 스크롤할 때 배경이 고정된 느낌(패럴랙스) — 원하면 아래 주석을 풀기
   (아이폰 사파리는 fixed 를 지원하지 않아 자동으로 일반 배경처럼 보임)
.sg-hero, .sg-bg-dark { background-attachment: fixed; }
*/

/* 영상 배경용 — 영상은 CSS 만으로 넣을 수 없어 섹션 안에 아래 한 줄 HTML 이 필요함
   <video class="sg-bg-video" src="/common/images/seo/hero.mp4" poster="/common/images/seo/sg_hero_bg.jpg" autoplay muted loop playsinline aria-hidden="true"></video>
   영상을 넣으면 위의 어두운 막(:before)이 영상 위를 덮어 글자가 잘 보임 */
.sg-bg-video {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .sg-bg-video { display: none; }   /* 움직임 줄이기 설정한 사용자에게는 영상 대신 이미지 */
}

.sg-hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 80px; }
.sg-hero-copy { flex: 1; min-width: 0; max-width: 620px; }
.sg-hero-copy .sg-eyebrow { letter-spacing: .14em; margin-bottom: 24px; }
.sg-hero-title { font-size: 48px; font-weight: 700; line-height: 1.3; color: #fff; letter-spacing: -.02em; }
.sg-hero-lead { font-size: 17px; line-height: 1.75; color: var(--sg-line); margin-top: 24px; }
.sg-stats { display: flex; gap: 40px; margin-top: 48px; }
.sg-stats b { display: block; font-family: var(--sg-en); font-size: 34px; font-weight: 800; color: #fff; line-height: 1.2; }
.sg-stats span { display: block; font-size: 14px; color: var(--sg-line); margin-top: 6px; }

.sg-form-card {
  flex: 0 0 520px; background: #fff; border-radius: 24px; padding: 36px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.sg-form-title { font-size: 24px; font-weight: 700; color: var(--sg-ink); line-height: 1.3; }
.sg-form-desc { font-size: 14px; color: var(--sg-sub); line-height: 1.6; margin: 8px 0 20px; }
.sg-form-note { font-size: 13px; color: var(--sg-sub); margin-top: 12px; }

.geo-field { margin-bottom: 16px; }
.geo-field label { display: block; font-size: 14px; font-weight: 700; color: var(--sg-ink); margin-bottom: 8px; }
.geo-field em { color: var(--sg-err); font-style: normal; }
.geo-field input {
  display: block; width: 100%; height: 52px; padding: 0 16px;
  border: 1px solid var(--sg-line); border-radius: 10px; background: #fff;
  font-size: 15px; color: var(--sg-ink);
}
.geo-field input::placeholder { color: #9aa1ac; }
.geo-field input:focus { outline: none; border-color: var(--sg-blue); box-shadow: 0 0 0 3px rgba(15, 94, 179, .15); }
.geo-field.is-err input { border-color: var(--sg-err); }
.geo-err { color: var(--sg-err) !important; font-size: 13px !important; margin-top: 6px !important; }
.geo-err:empty { display: none; }

.geo-agree { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; padding: 6px 0; font-size: 14px; }
.geo-agree .geo-err { flex-basis: 100%; margin-top: 0 !important; }
.geo-check { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--sg-text); }
.geo-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--sg-blue); }
.geo-check b { color: var(--sg-blue); font-weight: 700; }
.geo-link { background: none; border: 0; padding: 0; color: var(--sg-sub); text-decoration: underline; cursor: pointer; font-size: 13px !important; }

.geo-msg { color: var(--sg-err) !important; text-align: center; font-size: 14px !important; margin: 10px 0 0 !important; }
.geo-msg:empty { display: none; }
.geo-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.geo-progress { text-align: center; padding: 40px 0; }
.geo-prog-msg { font-size: 16px; color: var(--sg-ink); margin-top: 16px; }
.geo-bar { height: 10px; background: #edf0f4; border-radius: 99px; overflow: hidden; margin: 18px 0 6px; }
.geo-bar span { display: block; height: 100%; width: 3%; background: var(--sg-blue); transition: width .5s; }

/* =========================================================
 * 2. 왜 지금인가 / 4·6. 단계 카드
 * ========================================================= */
.sg-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.sg-reasons li { background: #fff; border: 1px solid var(--sg-line); border-radius: 20px; padding: 40px 36px; }
.sg-num { font-family: var(--sg-en); font-size: 40px; font-weight: 800; color: var(--sg-blue); line-height: 1.1; }
.sg-reasons h3 { font-size: 22px; font-weight: 700; line-height: 1.4; color: var(--sg-ink); margin: 16px 0 16px; }
.sg-reasons p:not(.sg-num) { font-size: 16px; line-height: 1.7; color: var(--sg-sub); }

.sg-steps li { background: var(--sg-dark); border-radius: 20px; padding: 40px 36px; }
.sg-parts li { border: 1px solid var(--sg-text); }
.sg-step-label { font-family: var(--sg-en); font-size: 13px; font-weight: 700; letter-spacing: .1em; color: var(--sg-blue-soft); }
.sg-steps h3 { font-size: 22px; font-weight: 700; line-height: 1.4; color: #fff; margin: 14px 0; }
.sg-steps p:not(.sg-step-label) { font-size: 15px; line-height: 1.7; color: var(--sg-line); }

/* =========================================================
 * 3. 4개 축 카드
 * ========================================================= */
.sg-head + .sg-axes { margin-top: -36px; }   /* 제목과 간격 20px (Figma) */
.sg-axes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: start; }
.sg-axis { background: var(--sg-bg); border-radius: 16px; padding: 32px 28px; }
.sg-axis-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sg-axis-badge {
  display: flex !important; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  font-family: var(--sg-en) !important; font-size: 18px !important; font-weight: 700; color: #fff !important; background: var(--sg-blue);
}
.sg-axis-naver .sg-axis-badge { background: #03a94f; }
.sg-axis-google .sg-axis-badge { background: var(--sg-blue); }
.sg-axis-aeo .sg-axis-badge { background: #0e7c86; }
.sg-axis-geo .sg-axis-badge { background: var(--sg-dark); }
.sg-axis-count { background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 13px !important; font-weight: 500; color: var(--sg-text); }
.sg-axis-name { font-size: 22px; font-weight: 700; color: var(--sg-ink); line-height: 1.3; }
.sg-axis-sub { font-size: 13px; font-weight: 500; color: var(--sg-blue); margin-top: 4px; }
.sg-axis-desc { font-size: 14px; line-height: 1.65; color: var(--sg-sub); margin-top: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--sg-line); }
.sg-axis-list { margin-top: 16px; }
.sg-axis-list li { position: relative; padding-left: 21px; font-size: 14px; line-height: 1.5; color: var(--sg-text); }
.sg-axis-list li + li { margin-top: 10px; }
.sg-axis-list li:before { content: '✓'; position: absolute; left: 0; top: 0; font-weight: 700; color: var(--sg-blue); font-size: 13px; }

/* 진단 기준 출처·수정일 */
.sg-source { margin-top: 24px; font-size: 13px; color: var(--sg-sub); line-height: 1.8; }
.sg-source a { color: var(--sg-blue); text-decoration: underline; text-underline-offset: 2px; }
.sg-source-date { display: inline-block; margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--sg-line); }
@media screen and (max-width: 768px) {
  .sg-source-date { display: block; margin: 4px 0 0; padding: 0; border: 0; }
}

/* =========================================================
 * 5. 비교표
 * ========================================================= */
.sg-table-wrap { border: 1px solid var(--sg-line); border-radius: 20px; overflow: hidden; }
.sg-compare { width: 100%; border-collapse: collapse; table-layout: fixed; }
.sg-compare th, .sg-compare td { padding: 21px 32px; text-align: left; font-size: 16px; border-top: 1px solid var(--sg-line); }
.sg-compare thead th { background: var(--sg-ink); color: #fff; font-weight: 700; border-top: 0; }
.sg-compare tbody th { color: var(--sg-ink); font-weight: 700; background: #fff; }
.sg-compare tbody td { color: var(--sg-sub); background: #fff; }
.sg-compare tbody td:last-child { background: var(--sg-blue-soft); color: var(--sg-blue); font-weight: 700; }
.sg-compare tbody td:last-child:before { content: '✓'; margin-right: 10px; }

/* =========================================================
 * 7. FAQ
 * ========================================================= */
.sg-head + .sg-faq { margin-top: -16px; }
.sg-faq { border: 1px solid var(--sg-line); border-radius: 16px; overflow: hidden; background: #fff; }
.sg-faq-item + .sg-faq-item { border-top: 1px solid var(--sg-line); }
.sg-faq-q button {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 22px 28px;
  background: none; border: 0; text-align: left; cursor: pointer;
}
.sg-faq-mark {
  flex: 0 0 28px; height: 28px; display: flex !important; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--sg-blue); color: #fff !important; font-family: var(--sg-en) !important; font-size: 13px !important; font-weight: 700;
}
.sg-faq-text { flex: 1; font-size: 18px !important; font-weight: 700; color: var(--sg-ink) !important; }
.sg-faq-icon { position: relative; flex: 0 0 18px; height: 18px; }
.sg-faq-icon:before, .sg-faq-icon:after {
  content: ''; position: absolute; left: 1px; top: 8px; width: 16px; height: 2px; background: var(--sg-blue); transition: transform .25s;
}
.sg-faq-icon:after { transform: rotate(90deg); }
.sg-faq-item.is-open .sg-faq-icon:after { transform: rotate(0); }
.sg-faq-a { display: none; padding: 0 28px 24px 70px; }
.sg-faq-a p { font-size: 16px; line-height: 1.7; color: var(--sg-sub); }
.sg-faq-item.is-open .sg-faq-a { display: block; }

/* =========================================================
 * 8. 마무리 CTA
 * ========================================================= */
.sg-cta-sec { padding: 100px 0 120px; }
.sg-cta { background: var(--sg-blue); border-radius: 24px; padding: 64px 40px; text-align: center; }
.sg-cta .sg-eyebrow { letter-spacing: .14em; margin-bottom: 28px; }
.sg-cta-title { font-size: 36px; font-weight: 700; line-height: 1.4; color: #fff; }
.sg-cta-btns { display: flex; justify-content: center; gap: 12px; margin-top: 28px; }

/* ---------- 모달 ---------- */
.geo-modal { border: 0; border-radius: 16px; padding: 28px; max-width: 460px; width: calc(100% - 32px); font-family: 'Noto Sans KR', sans-serif; }
.geo-modal::backdrop { background: rgba(0, 0, 0, .5); }
.geo-modal h3 { margin: 0 0 14px; font-size: 18px; color: #0c0c0c; }
.geo-modal table { width: 100%; border-collapse: collapse; font-size: 14px; }
.geo-modal th, .geo-modal td { border: 1px solid #e9e9e9; padding: 8px 10px; text-align: left; vertical-align: top; font-size: 14px; color: #363636; }
.geo-modal th { background: #f6f7f9; width: 90px; white-space: nowrap; }
.geo-modal p { font-size: 13px; color: #6b7280; margin: 12px 0 16px; }
.geo-modal .sg-btn { width: 100%; height: 48px; }

/* =========================================================
 * 반응형
 * ========================================================= */
@media screen and (max-width: 1280px) {
  .sg-page { padding-top: 0; }   /* 이 폭부터 사이트 헤더가 고정이 아님 */
  .sg-hero-inner { gap: 48px; }
  .sg-form-card { flex-basis: 460px; }
  .sg-hero-title { font-size: 42px; }
}

@media screen and (max-width: 1024px) {
  .sg-sec { padding: 90px 0; }
  .sg-hero { padding: 80px 0 90px; }
  .sg-hero-inner { flex-direction: column; align-items: stretch; }
  .sg-hero:before { background: linear-gradient(180deg, rgba(12, 12, 12, .9) 0%, rgba(12, 12, 12, .8) 100%); }   /* 세로 배치 — 위아래 고르게 어둡게 */
  .sg-hero-copy { max-width: none; }
  .sg-form-card { flex-basis: auto; }
  .sg-axes { grid-template-columns: repeat(2, 1fr); }
  .sg-title { font-size: 34px; }
}

@media screen and (max-width: 768px) {
  .sg-pc { display: none; }
  .sg-sec { padding: 70px 0; }
  .sg-hero { padding: 56px 0 64px; }
  .sg-inner { padding: 0 16px; }
  .sg-head { margin-bottom: 36px; }
  .sg-head + .sg-axes, .sg-head + .sg-faq { margin-top: -16px; }
  .sg-hero-title { font-size: 28px; }
  .sg-hero-lead { font-size: 15px; }
  .sg-stats { gap: 24px; margin-top: 32px; flex-wrap: wrap; }
  .sg-stats b { font-size: 26px; }
  .sg-stats span { font-size: 13px; }
  .sg-form-card { padding: 28px 20px; border-radius: 20px; }
  .sg-form-title { font-size: 21px; }
  .sg-title { font-size: 26px; }
  .sg-desc { font-size: 15px; }
  .sg-grid-3, .sg-axes { grid-template-columns: 1fr; gap: 14px; }
  .sg-reasons li, .sg-steps li { padding: 28px 24px; }
  .sg-num { font-size: 32px; }
  .sg-reasons h3, .sg-steps h3 { font-size: 19px; margin: 10px 0; }
  .sg-axis { padding: 26px 22px; }

  /* 비교표: 표 → 카드형 */
  .sg-table-wrap { border: 0; border-radius: 0; overflow: visible; }
  .sg-compare, .sg-compare tbody, .sg-compare tr, .sg-compare th, .sg-compare td { display: block; width: 100%; }
  .sg-compare thead { display: none; }
  .sg-compare tr { border: 1px solid var(--sg-line); border-radius: 14px; overflow: hidden; margin-bottom: 10px; }
  .sg-compare th, .sg-compare td { padding: 12px 18px; font-size: 15px; border-top: 0; }
  .sg-compare tbody th { background: var(--sg-bg); }
  .sg-compare tbody td:nth-of-type(1):before { content: '일반 제작 · '; color: #9aa1ac; font-weight: 400; }

  .sg-faq-q button { padding: 18px 18px; gap: 10px; }
  .sg-faq-text { font-size: 16px !important; }
  .sg-faq-a { padding: 0 18px 20px 56px; }
  .sg-faq-a p { font-size: 15px; }

  .sg-cta-sec { padding: 50px 0 70px; }
  .sg-cta { padding: 44px 22px; border-radius: 20px; }
  .sg-cta-title { font-size: 22px; }
  .sg-cta-btns { flex-direction: column; }
  .sg-cta-btns .sg-btn { width: 100%; }
}
