/* ============================================================
   동진분체 - Common Design System
   ============================================================ */
:root {
  /* Colors */
  --navy-900: #0a1628;
  --navy-800: #0f1e3d;
  --navy-700: #1a2d50;
  --navy-600: #2a3f66;
  --steel-500: #5a6b85;
  --steel-400: #8794a8;
  --steel-300: #b8c2d1;
  --steel-200: #d9dfe8;
  --steel-100: #eef1f5;
  --paper:    #f7f8fa;
  --white:    #ffffff;
  --ink-900:  #14171c;
  --ink-700:  #2c3138;
  --ink-500:  #5a6068;
  --accent:   #E85D2C;          /* signature orange */
  --accent-dark: #c44818;
  --line:     #e3e6ec;

  /* Type */
  --f-sans: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", "SF Mono", ui-monospace, "Menlo", monospace;
  --f-display: "Inter", "Pretendard", sans-serif;

  /* Spacing */
  --container: 1280px;
  --container-narrow: 1080px;

  /* Motion */
  --ease: cubic-bezier(.4, 0, .2, 1);
}

@font-face {
  font-family: "Pretendard Variable";
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/woff2/PretendardVariable.woff2") format("woff2-variations");
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-sans);
  background: var(--white);
  color: var(--ink-900);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv01";
  letter-spacing: -0.01em;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ============================================================
   TOP BAR (utility)
   ============================================================ */
.topbar {
  background: var(--navy-900);
  color: var(--steel-300);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}
.topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 9px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
}
.topbar-left {
  display: flex;
  gap: 10px;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}
.topbar-left b {
  color: var(--accent);
  font-weight: 700;
  font-family: var(--f-display);
  letter-spacing: 0.06em;
}
.topbar-left .sep {
  color: rgba(255,255,255,0.18);
  margin: 0 4px;
}
.topbar-right {
  display: flex;
  gap: 18px;
  align-items: center;
  white-space: nowrap;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.topbar-right span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.topbar-right .ico {
  opacity: 0.55;
  font-size: 11px;
}
.topbar-right .tel-pair { gap: 12px; }
.topbar-right .tel-pair a {
  color: var(--white);
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.topbar-right .tel-pair a:hover { color: var(--accent); }
.topbar-right .tel-pair .lbl {
  color: var(--steel-400);
  font-size: 11px;
  margin-right: 2px;
}

@media (max-width: 900px) {
  /* topbar: 모바일에서 완전히 숨김 — 헤더 CTA에 전화번호가 있으므로 불필요 */
  .topbar { display: none; }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  /* backdrop-filter는 새 stacking context를 생성해 자식 fixed 요소를 클리핑함.
     pseudo-element로 분리하여 nav가 올바르게 표시되도록 수정. */
  border-bottom: 1px solid var(--line);
  transition: box-shadow .35s var(--ease), background-color .35s var(--ease);
}
/* 배경+블러를 ::before pseudo로 분리 → 헤더 자체는 stacking context 비생성 */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: -1;
  transition: background-color .35s var(--ease);
}
.site-header.is-scrolled::before {
  background: rgba(255,255,255,0.98);
}
.site-header.is-scrolled {
  box-shadow: 0 4px 28px -12px rgba(15, 30, 61, 0.18);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}
/* Logo stays on the far left; everything after it is pushed to the far right */
.header-inner .logo { margin-right: auto; }
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
/* Header: horizontal PNG with transparent background */
.logo img.logo-svg {
  display: block;
  height: 54px;
  width: auto;
}
/* Footer: pre-rendered white variant on dark navy background */
.logo img.logo-svg-footer {
  display: block;
  height: 64px;
  width: auto;
}
/* legacy fallback (kept for safety, no longer used by markup) */
.logo-mark { display: none; }
.logo-name { display: none; }

/* Header height should accommodate the bigger logo */
.site-header .header-inner { padding-top: 14px; padding-bottom: 14px; }

.nav { display: flex; gap: 2px; }
.nav a {
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-700);
  position: relative;
  transition: color .2s var(--ease);
  white-space: nowrap;
}
.nav a:hover { color: var(--accent); }
.nav a.active { color: var(--navy-900); font-weight: 700; }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
}

/* Mobile hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
  position: relative;
  z-index: 110;
  transition: all .2s var(--ease);
}
.nav-toggle:hover { border-color: var(--navy-900); }
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy-900);
  position: relative;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--navy-900);
  transition: transform .3s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }
.nav-toggle.is-open span { background: transparent; }
.nav-toggle.is-open span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-open span::after  { transform: translateY(-6px) rotate(-45deg); }

.header-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--navy-900);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  transition: background .2s var(--ease);
}
.header-cta:hover { background: var(--accent); }
.header-cta .phone-num {
  font-family: var(--f-display);
  letter-spacing: 0.04em;
}

/* ============================================================
   PAGE HERO (subpages)
   ============================================================ */
.page-hero {
  position: relative;
  height: 340px;
  background: var(--navy-900);
  color: var(--white);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(15,30,61,0.92), rgba(10,22,40,0.78)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 24px);
}
.page-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 280px;
  height: 6px;
  background: var(--accent);
}
.page-hero-inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px 56px;
  width: 100%;
}
.crumb {
  font-family: var(--f-display);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--steel-300);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.crumb b { color: var(--accent); font-weight: 600; }
.page-hero h1 {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.page-hero .h1-en {
  font-family: var(--f-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--steel-400);
  margin-top: 12px;
  text-transform: uppercase;
}

/* ============================================================
   CONTAINER & SECTION
   ============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 32px;
}
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section-bg { background: var(--paper); }

.section-head {
  margin-bottom: 56px;
}
.section-head .eyebrow {
  font-family: var(--f-display);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-head .eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}
.section-head h2 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--navy-900);
  line-height: 1.15;
  max-width: 720px;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.section-head .lead {
  margin-top: 18px;
  font-size: 17px;
  color: var(--ink-500);
  max-width: 640px;
  line-height: 1.7;
}

/* ============================================================
   IMAGE PLACEHOLDER (striped)
   ============================================================ */
.img-slot {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      var(--steel-100) 0 12px,
      var(--steel-200) 12px 13px,
      var(--steel-100) 13px 24px);
  border: 1px solid var(--steel-200);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.img-slot::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 12px;
  width: 8px;
  height: 8px;
  background: var(--accent);
}
.img-slot-label {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--steel-500);
  letter-spacing: 0.04em;
  background: rgba(255,255,255,0.92);
  padding: 6px 12px;
  border: 1px solid var(--steel-200);
  text-align: center;
  max-width: 80%;
}
.img-slot-label b {
  color: var(--navy-800);
  font-weight: 700;
  display: block;
  font-size: 12px;
  margin-bottom: 2px;
}

/* dark variant for hero overlay */
.img-slot.dark {
  background:
    repeating-linear-gradient(135deg,
      var(--navy-800) 0 14px,
      var(--navy-700) 14px 15px,
      var(--navy-800) 15px 28px);
  border-color: var(--navy-700);
}
.img-slot.dark .img-slot-label {
  background: rgba(10,22,40,0.85);
  color: var(--steel-300);
  border-color: var(--navy-600);
}
.img-slot.dark .img-slot-label b { color: var(--white); }
.img-slot.dark::after { background: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy-900);
  color: var(--steel-300);
  padding: 64px 0 32px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand .logo-mark { background: var(--white); color: var(--navy-900); }
.footer-brand .logo-name .ko { color: var(--white); }
.footer-brand p {
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--steel-400);
  line-height: 1.7;
}
.footer-col h5 {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 18px;
  font-family: var(--f-display);
}
.footer-col ul { list-style: none; }
.footer-col li {
  margin-bottom: 10px;
  color: var(--steel-300);
  font-size: 13.5px;
}
.footer-col li b { color: var(--white); font-weight: 500; margin-right: 8px; }
.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--steel-500);
  font-family: var(--f-display);
  letter-spacing: 0.04em;
}

/* ============================================================
   UTILS
   ============================================================ */
.tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--steel-100);
  color: var(--navy-700);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-family: var(--f-display);
  text-transform: uppercase;
}
.divider { height: 1px; background: var(--line); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  background: var(--navy-900);
  color: var(--white);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  transition: all .2s var(--ease);
}
.btn:hover { background: var(--accent); }
.btn.outline {
  background: transparent;
  color: var(--navy-900);
  border: 1.5px solid var(--navy-900);
}
.btn.outline:hover {
  background: var(--navy-900);
  color: var(--white);
}
.btn .arrow {
  display: inline-block;
  transition: transform .2s var(--ease);
}
.btn:hover .arrow { transform: translateX(4px); }

/* ============================================================
   Header CTA — mobile trim
   ============================================================ */
.header-cta .cta-label { display: inline; }

/* 구분선 제거 — CTA가 2줄 세로 배치로 변경됨 */

/* ============================================================
   CTA BAND (shared across pages)
   ============================================================ */
.cta-band {
  background: var(--paper);
  padding: 80px 0;
  border-top: 1px solid var(--line);
}
.cta-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}
.cta-inner h3 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--navy-900);
  line-height: 1.3;
}
.cta-inner h3 .accent { color: var(--accent); }
.cta-inner .phone-big {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy-900);
  margin-top: 8px;
  letter-spacing: 0.02em;
}
@media (max-width: 900px) {
  .cta-band { padding: 56px 0; }
  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .cta-inner h3 { font-size: 24px; }
  .cta-inner .phone-big { font-size: 18px; }
}

/* responsive trim */
@media (max-width: 1080px) {
  .nav a { padding: 12px 12px; font-size: 14px; }
  .nav a.active::after { left: 12px; right: 12px; }
}

@media (max-width: 900px) {
  /* Hide desktop nav, show hamburger */
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 88vw);
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 96px 24px 32px;
    box-shadow: -16px 0 48px -20px rgba(15, 30, 61, 0.35);
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.7, 0, .2, 1);
    z-index: 105;
    overflow-y: auto;
  }
  .nav.is-open { transform: translateX(0); }
  .nav a {
    padding: 18px 8px;
    font-size: 17px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .nav a::after { display: none; }
  .nav a.active {
    color: var(--accent);
  }
  .nav a.active::after {
    content: "—";
    display: inline;
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    color: var(--accent);
    font-weight: 400;
  }

  /* Backdrop when menu is open */
  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease);
    z-index: 100;
  }
  .nav-backdrop.is-open { opacity: 1; pointer-events: auto; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .page-hero h1 { font-size: 36px; }
  .section-head h2 { font-size: 26px; line-height: 1.3; }
  .section { padding: 64px 0; }
  .header-inner { padding: 12px 16px; gap: 10px; }
  /* 로고 비율 보정 — flex-shrink로 인한 가로 압축 방지 */
  .header-inner .logo {
    flex-shrink: 0;          /* 로고 컨테이너가 줄어들지 않도록 */
  }
  .logo img {
    height: 44px !important;
    width: auto !important;
    max-width: none !important;  /* max-width:100% 상속 차단 → 비율 유지 */
    flex-shrink: 0;
    object-fit: contain;
    display: block;
  }
  /* ── CTA 버튼: 2줄 세로 배치로 너비 축소 ── */
  .header-cta {
    padding: 6px 10px;
    gap: 1px;
    flex-direction: column;     /* 견적·상담 / 전화번호 2줄 */
    align-items: center;
    line-height: 1.2;
    white-space: nowrap;
    flex-shrink: 0;             /* CTA도 줄어들지 않도록 */
  }
  .header-cta .cta-label {
    display: block !important;
    font-size: 10px;
    opacity: 0.75;
    letter-spacing: 0;
  }
  .header-cta .phone-num {
    font-size: 12px;
    font-weight: 700;
  }

  /* ── 햄버거 버튼 맨 우측 배치 ── */
  .header-inner .logo   { order: 1; margin-right: auto; }   /* 로고: 맨 왼쪽 */
  .header-cta           { order: 2; }                        /* CTA: 중간 */
  .nav-toggle           { order: 3; margin-left: 0; }        /* 햄버거: 맨 우측 */
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding-bottom: 32px; }
  .footer-bottom { flex-direction: column; gap: 6px; align-items: flex-start; }
  /* header-cta: 560px 이하에서도 견적·상담 표시 유지 — 숨기지 않음 */
  .header-cta { padding: 8px 10px; }
  .container,
  .container-narrow { padding: 0 20px; }
  .page-hero-inner { padding: 0 20px 40px; }
  .page-hero { height: 280px; }
  .page-hero h1 { font-size: 30px; }
  .topbar-right { font-size: 12px; }
}
