/* ============================================================
   WHOLETEM (훌템) - 소재 개발 · 제조 · 양산
   Global stylesheet
   Fonts: Pretendard (KR) + Inter (EN/Numbers)
   Point color: Royal Blue #1D4ED8 (ref. diveedgetech)
   ============================================================ */

/* ---- Fonts ---- */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

/* ---- Design tokens ---- */
:root {
  --white: #ffffff;
  --black: #000000;
  --bg-sub: #f5f5f5;
  --bg-soft: #fafafa;
  --text: #111827;
  --text-muted: #6b7280;
  --line: #e5e7eb;

  /* ---- WHOLETEM brand colors (from official logo guideline) ---- */
  --navy: #003366;         /* logo body navy */
  --teal: #33b2a6;         /* logo accent teal */
  --blue: #005b96;         /* primary point (navy-based) */
  --blue-dark: #003366;
  --blue-light: #0a7c8f;
  --cyan: #33b2a6;         /* teal accent */

  --grad: linear-gradient(120deg, #003366 0%, #005b96 50%, #33b2a6 100%);

  --header-h: 88px;
  --maxw: 1240px;
  --radius: 16px;
  --shadow-sm: 0 2px 10px rgba(17, 24, 39, .06);
  --shadow-md: 0 10px 30px rgba(17, 24, 39, .10);
  --shadow-lg: 0 24px 60px rgba(17, 24, 39, .16);

  --ff-kr: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ff-en: "Inter", "Pretendard", sans-serif;
}

/* ---- Reset ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff-kr);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  letter-spacing: -0.011em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* English / numeric snippets */
.en { font-family: var(--ff-en); letter-spacing: 0; }

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 110px 0; }
.section--sub { background: var(--bg-sub); }
.section--dark { background: var(--black); color: var(--white); }

.eyebrow {
  font-family: var(--ff-en);
  font-size: 12.5px; font-weight: 600; letter-spacing: .22em;
  text-transform: uppercase; color: var(--teal);
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 24px; height: 1.5px; background: var(--teal); display: inline-block; }

.section-title {
  font-size: clamp(27px, 3.6vw, 43px);
  font-weight: 800; line-height: 1.28; letter-spacing: -0.035em;
}
.section-title .accent { color: var(--blue); }
.section-desc { margin-top: 22px; color: var(--text-muted); font-size: 16.5px; line-height: 1.85; max-width: 620px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px; border-radius: 10px;
  font-weight: 600; font-size: 15px;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}
.btn i { transition: transform .25s ease; }
.btn:hover i { transform: translateX(4px); }
.btn--primary { background: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(0,51,102,.22); border-radius: 10px; }
.btn--primary:hover { background: #00284f; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,51,102,.30); }
.btn--dark { background: var(--black); color: #fff; }
.btn--dark:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--ghost { border: 1.5px solid rgba(255,255,255,.35); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.1); }
.btn--line { border: 1.5px solid var(--line); color: var(--text); border-radius: 10px; }
.btn--line:hover { border-color: var(--navy); color: var(--navy); }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.header.scrolled { background: rgba(255,255,255,.96); border-color: var(--line); box-shadow: var(--shadow-sm); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }

.logo { display: flex; align-items: center; gap: 13px; font-weight: 800; }
.logo__img { height: 48px; width: auto; display: block; }
.logo__sub { font-size: 14px; color: var(--text-muted); font-weight: 600; padding-left: 13px; border-left: 1px solid var(--line); }

/* GNB */
.gnb { display: flex; align-items: center; gap: 4px; }
.gnb > li { position: relative; }
.gnb > li > a {
  display: flex; align-items: center; gap: 6px;
  padding: 0 20px; height: var(--header-h); font-weight: 600; font-size: 16px;
  color: var(--text); transition: color .2s;
}
.gnb > li > a::after {
  content: ""; position: absolute; left: 20px; right: 20px; bottom: 22px; height: 2px;
  background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.gnb > li:hover > a { color: var(--navy); }
.gnb > li:hover > a::after { transform: scaleX(1); }

/* dropdown */
.dropdown {
  position: absolute; top: calc(var(--header-h) - 12px); left: 50%; transform: translateX(-50%) translateY(10px);
  min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-md); padding: 10px; opacity: 0; visibility: hidden; transition: all .25s ease;
}
.gnb > li:hover .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown a {
  display: block; padding: 11px 16px; border-radius: 9px; font-size: 15px; font-weight: 500; color: var(--text-muted);
  transition: background .2s, color .2s;
}
.dropdown a:hover { background: var(--bg-sub); color: var(--navy); }

.header__cta { display: flex; align-items: center; gap: 14px; }
.header__cta .btn { padding: 11px 22px; font-size: 14px; }

/* hamburger */
.hamburger { display: none; width: 44px; height: 44px; position: relative; }
.hamburger span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--text); transition: all .3s; }
.hamburger span:nth-child(1) { top: 15px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 27px; }
.hamburger.active span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* mobile menu */
.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 999;
  background: #fff; transform: translateX(100%); transition: transform .35s ease;
  overflow-y: auto; padding: 20px 24px 60px;
}
.mobile-menu.open { transform: translateX(0); }
.m-group { border-bottom: 1px solid var(--line); }
.m-group > button, .m-group > a {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 20px 4px; font-size: 18px; font-weight: 700; color: var(--text); text-align: left;
}
.m-group > button i { transition: transform .3s; color: var(--text-muted); }
.m-group.open > button i { transform: rotate(180deg); }
.m-sub { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.m-group.open .m-sub { max-height: 400px; }
.m-sub a { display: block; padding: 13px 4px 13px 16px; color: var(--text-muted); font-size: 16px; font-weight: 500; }
.m-sub a:hover { color: var(--blue); }
.mobile-menu .btn { width: 100%; justify-content: center; margin-top: 28px; }

/* ============================================================
   FOOTER  (light tone — navy logo stays legible)
   ============================================================ */
.footer {
  background: #f7f9fb;
  color: #55657a;
  padding: 72px 0 30px;
  border-top: 1px solid var(--line);
}
.footer__top { display: grid; grid-template-columns: 1.5fr 1fr 1.1fr; gap: 48px; padding-bottom: 40px; border-bottom: 1px solid #e3e9ef; }
.logo__img--footer { height: 40px; }
.footer__brand p { margin-top: 20px; font-size: 14px; line-height: 1.95; max-width: 380px; color: #6b7885; }
.footer h4 { color: var(--navy); font-size: 14px; font-weight: 700; margin-bottom: 20px; letter-spacing: .01em; }
.footer li { margin-bottom: 12px; font-size: 14px; }
.footer li a { color: #55657a; transition: color .2s; }
.footer a:hover { color: var(--teal); }
.footer__bottom { padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: #8593a3; }
.footer__bottom .en { color: #9aa7b5; }

/* ============================================================
   PAGE HERO (sub pages)
   ============================================================ */
.page-hero {
  background: var(--black); color: #fff; padding: calc(var(--header-h) + 80px) 0 90px;
  position: relative; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 460px; height: 460px;
  background: var(--grad); filter: blur(90px); opacity: .35; border-radius: 50%;
}
.page-hero .eyebrow { color: var(--cyan); }
.page-hero .eyebrow::before { background: var(--cyan); }
.page-hero h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; position: relative; z-index: 1; }
.page-hero p { margin-top: 18px; color: #cbd5e1; font-size: 17px; position: relative; z-index: 1; }

/* breadcrumb */
.breadcrumb { padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--text-muted); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .sep { margin: 0 8px; color: #c9ced6; }
.breadcrumb .cur { color: var(--text); font-weight: 600; }

/* ============================================================
   TEXT EDIT MODE (관리자 인라인 편집)
   ============================================================ */
.is-editable {
  outline: 1.5px dashed rgba(51,178,166,.55);
  outline-offset: 3px;
  border-radius: 4px;
  cursor: text;
  transition: outline-color .2s, background .2s;
}
.is-editable:hover { outline-color: var(--teal); background: rgba(51,178,166,.06); }
.is-editable:focus { outline: 2px solid var(--teal); background: rgba(51,178,166,.08); }

/* 우측 하단 '편집' 플로팅 버튼 */
.edit-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 1400;
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--navy); font-size: 14px; font-weight: 700;
  padding: 12px 18px; border-radius: 999px; border: 1.5px solid var(--navy);
  box-shadow: 0 8px 22px rgba(17,24,39,.18); transition: transform .2s, background .2s, color .2s;
}
.edit-fab i { color: var(--teal); }
.edit-fab:hover { transform: translateY(-2px); background: var(--navy); color: #fff; }
.edit-fab:hover i { color: #fff; }
/* 제품소개 페이지에는 관리자 버튼이 우측 하단에 있으므로 편집 버튼은 그 위로 */
body[data-page="products"] .edit-fab { bottom: 78px; }
@media (max-width: 560px) {
  .edit-fab { right: 16px; bottom: 16px; padding: 11px 15px; font-size: 13px; }
  body[data-page="products"] .edit-fab { bottom: 70px; }
}

body.has-edit-toolbar { padding-bottom: 64px; }
.edit-toolbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3000;
  display: flex; align-items: center; gap: 16px;
  background: var(--navy); color: #fff; padding: 12px 22px;
  box-shadow: 0 -6px 24px rgba(0,0,0,.22); font-size: 14px;
}
.edit-toolbar__label { font-weight: 700; }
.edit-toolbar__label i { color: var(--teal); margin-right: 7px; }
.edit-toolbar__hint { color: #a9c4dc; font-size: 13px; }
.edit-toolbar__save, .edit-toolbar__exit {
  margin-left: 0; padding: 9px 20px; border-radius: 8px; font-weight: 700; font-size: 13.5px; color:#fff;
}
.edit-toolbar__save { background: var(--teal); margin-left: auto; }
.edit-toolbar__save:hover { background: #2aa093; }
.edit-toolbar__exit { background: rgba(255,255,255,.16); }
.edit-toolbar__exit:hover { background: rgba(255,255,255,.28); }
@media (max-width: 560px) {
  .edit-toolbar { gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
  .edit-toolbar__hint { display: none; }
}

/* ---- reveal animation ---- */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s ease, transform .7s ease; }
.reveal.show { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .gnb, .header__cta .btn { display: none; }
  .hamburger { display: block; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .section { padding: 80px 0; }
}
@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .footer__top { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .logo__sub { display: none; }
  .logo .logo__img { height: 38px; }
}

/* ============================================================
   공용 사진 슬롯 업로드 버튼 (site-img.js)
   ============================================================ */
.slot-upload { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.slot-upload__btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: #003366; color: #fff; font-weight: 600; font-size: 14px;
  padding: 9px 16px; border-radius: 999px; transition: background .2s;
}
.slot-upload__btn:hover { background: #00284f; }
.slot-upload__btn i { color: #33b2a6; }
.slot-upload__del {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: #fff; color: #c0392b; border: 1.5px solid #f0c8c4; font-weight: 600; font-size: 13.5px;
  padding: 8px 14px; border-radius: 999px; transition: background .2s;
}
.slot-upload__del:hover { background: #fdeaea; }

/* 슬롯 사진 페이드인 (아이콘→사진 전환 시 깜빡임 완화) */
img.slot-photo { opacity: 0; transition: opacity .35s ease; }
img.slot-photo.is-loaded { opacity: 1; }

/* 사진 슬롯이 아직 준비되기 전(사진 데이터 불러오는 중)에는
   원래 박혀있던 기본 이미지/아이콘을 감춰서 "원본이 잠깐 번쩍이는" 현상 제거.
   준비가 끝나면(.imgslot-ready) 판단 결과에 따라 사진 또는 원본을 보여준다. */
[data-imgslot]:not(.imgslot-ready) > img,
[data-imgslot]:not(.imgslot-ready) > i { opacity: 0 !important; }
