/* ==========================================================================
   바른정비 홈 — 프리미엄 리디자인 "정밀 공업 (Precision Garage)"
   그래파이트 다크 + 적외선 앰버. #tab-home / body.home-mode 로만 스코프.
   (앱 UI·폼·대시보드는 style.css 라이트 테마 그대로 — 절대 건드리지 않음)
   ========================================================================== */

#tab-home{
  --ink:#0d0f13; --ink-2:#111419; --panel:#161a21; --panel-2:#1b202a;
  --line:#272d38; --line-2:#343c49; --fog:#8b929e; --steel:#c9cfd8; --chalk:#f4f6f9;
  --ember:#e2542a; --ember-2:#ff6a3d; --ember-soft:rgba(226,84,42,.13);
  --sans:'Pretendard','Inter',system-ui,sans-serif;
  --data:'Space Grotesk','Pretendard',sans-serif;
  --wrap:1200px;
}

/* 홈일 때만 페이지 배경을 다크로 */
body.home-mode{ background:var(--ink) !important; }
#tab-home{
  background:var(--ink); color:var(--chalk);
  font-family:var(--sans); line-height:1.6; letter-spacing:-.01em;
  -webkit-font-smoothing:antialiased;
}
#tab-home *{ box-sizing:border-box; }
#tab-home img{ display:block; max-width:100%; }
#tab-home a{ color:inherit; text-decoration:none; }
#tab-home .pg-wrap{ max-width:var(--wrap); margin:0 auto; padding:0 28px; }

/* 데이터/스펙 라벨 — mono 그로테스크 + 트래킹 */
#tab-home .pg-eyebrow{
  font-family:var(--data); font-size:12px; font-weight:600; letter-spacing:.22em;
  text-transform:uppercase; color:var(--ember-2);
  display:inline-flex; align-items:center; gap:12px;
}
#tab-home .pg-eyebrow::before{
  content:""; width:26px; height:1px; background:var(--ember); opacity:.7;
}
#tab-home .pg-eyebrow.center::after{
  content:""; width:26px; height:1px; background:var(--ember); opacity:.7;
}

/* ── 상단 네비 (id=hi-nav 유지: app.js 스크롤 훅) ────────────── */
body.home-mode #hi-nav{
  position:fixed; top:0; left:0; right:0; z-index:80;
  background:transparent; border-bottom:1px solid transparent;
  transition:background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}
body.home-mode #hi-nav.scrolled{
  background:rgba(13,15,19,.82); backdrop-filter:blur(14px) saturate(1.2);
  border-bottom:1px solid var(--line);
}
#tab-home .pg-nav-inner{
  max-width:var(--wrap); margin:0 auto; padding:18px 28px;
  display:flex; align-items:center; gap:28px;
}
#tab-home .pg-brand{ font-weight:800; font-size:19px; letter-spacing:-.02em; color:var(--chalk); }
#tab-home .pg-brand span{ color:var(--ember-2); }
#tab-home .pg-brand small{
  display:block; font-family:var(--data); font-size:9.5px; letter-spacing:.28em;
  color:var(--fog); font-weight:500; margin-top:2px;
}
#tab-home .pg-nav-links{ display:flex; gap:26px; margin-left:12px; }
#tab-home .pg-nav-links a{ font-size:14px; color:var(--steel); font-weight:500; transition:color .15s; }
#tab-home .pg-nav-links a:hover{ color:var(--chalk); }
#tab-home .pg-nav-actions{ margin-left:auto; display:flex; align-items:center; gap:12px; }
#tab-home #hi-nav-login{
  background:none; border:none; color:var(--fog); font-size:13.5px; font-weight:500;
  cursor:pointer; font-family:var(--sans); transition:color .15s; white-space:nowrap;
}
#tab-home #hi-nav-login:hover{ color:var(--chalk); }
#tab-home .pg-nav-cta{
  background:var(--ember); color:#fff; border:none; cursor:pointer;
  padding:11px 20px; border-radius:100px; font-size:13.5px; font-weight:700;
  font-family:var(--sans); transition:transform .15s, background .2s; white-space:nowrap;
}
#tab-home .pg-nav-cta:hover{ background:var(--ember-2); transform:translateY(-1px); }
#tab-home .pg-burger{ display:none; }

/* ── 히어로 ─────────────────────────────────────────────────── */
#tab-home .pg-hero{ position:relative; min-height:100svh; display:flex; flex-direction:column; overflow:hidden; }
#tab-home .pg-hero-media{ position:absolute; inset:0; z-index:0; }
#tab-home .pg-hero-media img{ width:100%; height:100%; object-fit:cover; object-position:center right; }
#tab-home .pg-hero-media::after{
  content:""; position:absolute; inset:0;
  background:
    linear-gradient(90deg, var(--ink) 6%, rgba(13,15,19,.72) 42%, rgba(13,15,19,.28) 72%, rgba(13,15,19,.55) 100%),
    linear-gradient(0deg, var(--ink) 2%, transparent 34%);
}
#tab-home .pg-hero .pg-wrap{ position:relative; z-index:1; width:100%; flex:1; display:flex; flex-direction:column; justify-content:center; padding-top:120px; padding-bottom:56px; }
#tab-home .pg-hero-kicker{ margin-bottom:26px; }
#tab-home .pg-hero h1{
  font-size:clamp(38px,6vw,74px); font-weight:800; line-height:1.05; letter-spacing:-.035em;
  margin:0 0 24px; max-width:16ch;
}
#tab-home .pg-hero h1 em{ font-style:normal; color:var(--ember-2); }
#tab-home .pg-hero-sub{
  font-size:clamp(15px,1.5vw,18px); color:var(--steel); max-width:52ch; line-height:1.75; margin:0 0 36px;
}
#tab-home .pg-hero-actions{ display:flex; flex-wrap:wrap; gap:14px; }
#tab-home .pg-btn{
  display:inline-flex; align-items:center; gap:9px; cursor:pointer; font-family:var(--sans);
  padding:15px 28px; border-radius:100px; font-size:15px; font-weight:700; border:1px solid transparent;
  transition:transform .15s, background .2s, border-color .2s;
}
#tab-home .pg-btn-primary{ background:var(--ember); color:#fff; }
#tab-home .pg-btn-primary:hover{ background:var(--ember-2); transform:translateY(-2px); }
#tab-home .pg-btn-ghost{ background:rgba(255,255,255,.04); color:var(--chalk); border-color:var(--line-2); }
#tab-home .pg-btn-ghost:hover{ background:rgba(255,255,255,.09); transform:translateY(-2px); }

/* 스펙 스트립 — 정밀 데이터 시트 */
#tab-home .pg-spec{
  position:relative; z-index:1; border-top:1px solid var(--line);
  background:linear-gradient(180deg, transparent, rgba(0,0,0,.25));
}
#tab-home .pg-spec-grid{
  max-width:var(--wrap); margin:0 auto; padding:0 28px;
  display:grid; grid-template-columns:repeat(4,1fr);
}
#tab-home .pg-spec-item{ padding:26px 24px 28px; border-left:1px solid var(--line); }
#tab-home .pg-spec-item:first-child{ border-left:none; padding-left:0; }
#tab-home .pg-spec-num{ font-family:var(--data); font-size:clamp(24px,2.6vw,34px); font-weight:600; color:var(--chalk); letter-spacing:-.01em; }
#tab-home .pg-spec-num b{ color:var(--ember-2); font-weight:600; }
#tab-home .pg-spec-label{ margin-top:8px; font-size:13px; color:var(--fog); line-height:1.5; }

/* ── 섹션 공통 ──────────────────────────────────────────────── */
#tab-home .pg-section{ padding:clamp(72px,9vw,132px) 0; border-top:1px solid var(--line); }
#tab-home .pg-section h2{
  font-size:clamp(28px,3.6vw,46px); font-weight:800; line-height:1.18; letter-spacing:-.03em; margin:20px 0 0;
}
#tab-home .pg-section h2 em{ font-style:normal; color:var(--ember-2); }
#tab-home .pg-lead{ color:var(--steel); font-size:clamp(15px,1.4vw,17px); line-height:1.8; }

/* 철학(thesis) — 에디토리얼 2단 + 사진 */
#tab-home .pg-thesis-grid{ display:grid; grid-template-columns:1.05fr .95fr; gap:clamp(32px,5vw,72px); align-items:center; }
#tab-home .pg-thesis-copy p{ color:var(--steel); font-size:16px; line-height:1.85; margin:18px 0 0; }
#tab-home .pg-thesis-copy strong{ color:var(--chalk); font-weight:600; }
#tab-home .pg-figure{ position:relative; border-radius:16px; overflow:hidden; border:1px solid var(--line); }
#tab-home .pg-figure img{ width:100%; aspect-ratio:4/3; object-fit:cover; }
#tab-home .pg-figure figcaption{
  position:absolute; left:0; bottom:0; right:0; padding:16px 18px;
  font-family:var(--data); font-size:11.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--steel);
  background:linear-gradient(0deg, rgba(0,0,0,.72), transparent);
}

/* 차별화 카드 3 */
#tab-home .pg-caps-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:24px; flex-wrap:wrap; margin-bottom:44px; }
#tab-home .pg-caps{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
#tab-home .pg-cap{
  background:var(--panel); border:1px solid var(--line); border-radius:16px; overflow:hidden;
  display:flex; flex-direction:column; transition:border-color .2s, transform .2s;
}
#tab-home .pg-cap:hover{ border-color:var(--line-2); transform:translateY(-3px); }
#tab-home .pg-cap-media{ aspect-ratio:16/11; overflow:hidden; background:var(--ink-2); }
#tab-home .pg-cap-media img{ width:100%; height:100%; object-fit:cover; transition:transform .5s ease; }
#tab-home .pg-cap:hover .pg-cap-media img{ transform:scale(1.05); }
#tab-home .pg-cap-body{ padding:24px 24px 28px; }
#tab-home .pg-cap-idx{ font-family:var(--data); font-size:12px; letter-spacing:.16em; color:var(--ember-2); font-weight:600; }
#tab-home .pg-cap h3{ font-size:19px; font-weight:700; margin:12px 0 10px; letter-spacing:-.02em; }
#tab-home .pg-cap p{ font-size:14px; color:var(--fog); line-height:1.7; margin:0; }
#tab-home .pg-cap .pg-tag{
  display:inline-block; margin-top:16px; font-family:var(--data); font-size:11px; letter-spacing:.1em;
  color:var(--steel); border:1px solid var(--line-2); border-radius:100px; padding:4px 11px;
}

/* 공정 스텝 플로우 그래픽 */
#tab-home .pg-flow-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:24px; flex-wrap:wrap; margin-bottom:56px; }
#tab-home .pg-flow-head .pg-lead{ max-width:34ch; }
#tab-home .pg-flow{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(5,1fr); }
#tab-home .pg-step{ position:relative; text-align:center; padding:0 8px; }
/* 이전 단계와 잇는 연결선 */
#tab-home .pg-step::before{ content:""; position:absolute; top:27px; right:50%; width:100%; height:2px; background:var(--line-2); z-index:0; }
#tab-home .pg-step:first-child::before{ display:none; }
#tab-home .pg-step-n{ position:relative; z-index:1; display:grid; place-items:center; width:54px; height:54px; margin:0 auto 22px; border-radius:50%; background:var(--panel); border:1px solid var(--line-2); font-family:var(--data); font-size:20px; font-weight:600; color:var(--steel); }
#tab-home .pg-step.is-final .pg-step-n{ background:var(--ember); border-color:var(--ember); color:#fff; box-shadow:0 0 0 6px var(--ember-soft); }
#tab-home .pg-step-t{ font-size:16px; font-weight:700; letter-spacing:-.02em; }
#tab-home .pg-step.is-final .pg-step-t{ color:var(--ember-2); }
#tab-home .pg-step-d{ margin-top:7px; font-size:12.5px; color:var(--fog); line-height:1.5; }
#tab-home .pg-flow-more{ text-align:center; margin-top:48px; }
#tab-home .pg-link{ display:inline-flex; align-items:center; gap:8px; color:var(--ember-2); font-weight:700; font-size:15px; }
#tab-home .pg-link:hover{ gap:12px; }

/* CTA */
#tab-home .pg-cta{ text-align:center; }
#tab-home .pg-cta h2{ margin:20px auto 0; max-width:20ch; }
#tab-home .pg-cta .pg-lead{ max-width:44ch; margin:18px auto 34px; }
#tab-home .pg-cta-actions{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

/* 푸터 */
#tab-home .pg-foot{ border-top:1px solid var(--line); padding:44px 0 64px; }
#tab-home .pg-foot-inner{ display:flex; justify-content:space-between; gap:20px; flex-wrap:wrap; color:var(--fog); font-size:13px; }
#tab-home .pg-foot b{ color:var(--steel); }

/* ── 반응형 ─────────────────────────────────────────────────── */
@media(max-width:900px){
  #tab-home .pg-nav-links{ display:none; }
  #tab-home .pg-thesis-grid{ grid-template-columns:1fr; }
  #tab-home .pg-caps{ grid-template-columns:1fr; }
  #tab-home .pg-spec-grid{ grid-template-columns:1fr 1fr; }
  #tab-home .pg-spec-item:nth-child(3){ border-left:none; padding-left:0; }
  #tab-home .pg-spec-item{ border-top:1px solid var(--line); }
  #tab-home .pg-spec-item:nth-child(-n+2){ border-top:none; }
}
@media(max-width:720px){
  /* 공정 플로우: 가로 → 세로 스택 */
  #tab-home .pg-flow{ grid-template-columns:1fr; }
  #tab-home .pg-step{ display:grid; grid-template-columns:54px 1fr; gap:18px; text-align:left; padding:0 0 30px; align-items:start; }
  #tab-home .pg-step-n{ margin:0; }
  #tab-home .pg-step-b{ padding-top:12px; }
  #tab-home .pg-step::before{ top:54px; left:27px; right:auto; width:2px; height:100%; }
  #tab-home .pg-step:first-child::before{ display:block; }
  #tab-home .pg-step:last-child::before{ display:none; }
  #tab-home .pg-step:last-child{ padding-bottom:0; }
}
@media(max-width:560px){
  #tab-home .pg-wrap, #tab-home .pg-nav-inner, #tab-home .pg-spec-grid{ padding-left:20px; padding-right:20px; }
  #tab-home .pg-spec-grid{ grid-template-columns:1fr; }
  #tab-home .pg-spec-item{ border-left:none; padding-left:0; }
  #tab-home .pg-hero-actions .pg-btn{ flex:1; justify-content:center; }
}
@media(prefers-reduced-motion:reduce){
  #tab-home *{ transition:none !important; }
}
