/* ==========================================================================
   Sub pages — shared Figma components (덕일산업_디자인_1023, page 0:1)
   - .sp-page base reset / tokens
   - .sp-hero: breadcrumb + title + description
   - .sp-stage: boxed image + pill tabs (scene A) -> full-bleed headline (scene B)
     driven by assets/js/sp-hero.js; .sp-stage--static keeps scene A only
   - .sp-eyebrow, .sp-container
   Page-specific styles live in assets/css/pages/*.css
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600&display=swap');

.sp-page {
  --sp-navy: #002165;
  --sp-green: #1b7931;
  --sp-gutter: clamp(16px, 9.557vw, 184px);
  --sp-box-w: min(1553px, 100vw - 2 * var(--sp-gutter));
  --sp-box-h: clamp(240px, 22.66vw, 435px);
  --sp-font: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --sp-font-en: 'Montserrat', 'Pretendard', sans-serif;
  display: block;
  font-family: var(--sp-font);
  color: #111;
  background: #fff;
  overflow-x: clip;
}
.sp-page *,
.sp-page *::before,
.sp-page *::after { box-sizing: border-box; }
.sp-page h1,
.sp-page h2,
.sp-page h3,
.sp-page h4,
.sp-page p,
.sp-page ol,
.sp-page ul,
.sp-page dl,
.sp-page dd,
.sp-page figure { margin: 0; padding: 0; }
.sp-page h1,
.sp-page h2,
.sp-page h3,
.sp-page h4 { font-family: var(--sp-font); }
.sp-page img { display: block; max-width: 100%; }
.sp-page .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.sp-container {
  width: min(1600px, 100% - 2 * clamp(16px, 8.333vw, 160px));
  margin-inline: auto;
}

/* Eyebrow label: dot + Montserrat (navy by default, add .is-light on dark bg) */
.sp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sp-font-en);
  font-weight: 500;
  font-size: clamp(14px, 0.9375vw, 18px);
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: var(--sp-navy);
}
.sp-eyebrow::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.sp-eyebrow.is-light { color: #fff; }

/* ---------- Hero head ---------- */
.sp-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: clamp(56px, 8.333vw, 160px) 16px 0;
  text-align: center;
}
.sp-breadcrumb ol {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  list-style: none;
}
.sp-breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(14px, 0.9375vw, 18px);
  line-height: 1.3;
  letter-spacing: -0.04em;
  color: var(--sp-navy);
}
.sp-breadcrumb li + li::before {
  content: '';
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--sp-navy);
}
.sp-breadcrumb a { color: inherit; text-decoration: none; }
.sp-breadcrumb a:hover { text-decoration: underline; }
.sp-bc-home { display: inline-flex; }
.sp-bc-home img { width: 20px; height: 20px; }
.sp-hero-title {
  font-weight: 700;
  font-size: clamp(36px, 3.646vw, 70px);
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #111;
}
.sp-hero-desc {
  font-size: clamp(16px, 1.146vw, 22px);
  line-height: 1.3;
  letter-spacing: -0.04em;
  color: #333;
  word-break: keep-all;
}

/* ---------- Stage: boxed image (scene A) -> full-bleed headline (scene B) ----------
   Static (no JS / reduced motion): box with tabs, then the full-bleed scene below.
   .is-live (sp-hero.js): one sticky viewport whose clip, scale, overlay, tabs and
   headline are driven by scroll progress.
   Set the image per page with a root-absolute path (a relative url() resolves against this file):
   style="--sp-stage-img:url('/assets/…')" + <img class="sp-stage-img" src="…">. */
.sp-stage {
  position: relative;
  margin-top: clamp(48px, 8.385vw, 161px);
  padding-top: var(--sp-box-h);
}
.sp-stage::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--sp-box-w);
  height: var(--sp-box-h);
  transform: translateX(-50%);
  border-radius: 14px 14px 0 0;
  background: #0a1a3a var(--sp-stage-img, none) center top / 100% auto no-repeat;
}
.sp-stage-sticky {
  position: relative;
  height: clamp(420px, 48.958vw, 940px);
  overflow: hidden;
  background: #03091a;
}
.sp-stage-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.sp-stage-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform-origin: 50% 0;
}
.sp-stage-dim {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--sp-stage-dim, 0.4); /* per page: .xxx-page .sp-stage { --sp-stage-dim: 0.7 } */
}
.sp-stage-headline {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(100% - 32px);
  transform: translate(-50%, -50%);
  font-weight: 700;
  font-size: clamp(26px, 3.333vw, 64px);
  line-height: 1.3;
  letter-spacing: -0.04em;
  color: #fff;
  text-align: center;
  word-break: keep-all;
  text-wrap: balance;
}
.sp-stage-headline small {
  display: block;
  margin-top: 24px;
  font-weight: 400;
  font-size: clamp(15px, 1.042vw, 20px);
  line-height: 1.6;
  letter-spacing: -0.03em;
}
.sp-pill-tabs {
  position: absolute;
  left: 50%;
  top: calc(var(--sp-box-h) - clamp(20px, 2.604vw, 50px));
  z-index: 2;
  display: flex;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
  max-width: calc(100vw - 32px);
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
  transform: translate(-50%, -100%);
}
.sp-pill-tabs::-webkit-scrollbar { display: none; }
.sp-pill-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.04em;
  color: #fff;
  text-decoration: none;
  transition: background-color 0.2s;
}
.sp-pill-tab:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.sp-pill-tab.is-active { background: var(--sp-navy); font-weight: 600; }

/* Scene A only (pages whose design has no full-bleed headline scene) */
.sp-stage--static .sp-stage-sticky { display: none; }

/* Live scroll motion */
.sp-stage.is-live {
  height: 200vh;
  padding-top: 0;
}
.sp-stage.is-live::before { display: none; }
.sp-stage.is-live .sp-stage-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  background: transparent;
}
.sp-stage.is-live .sp-stage-media { will-change: clip-path; }
.sp-stage.is-live .sp-stage-img { will-change: transform; }
.sp-stage.is-live .sp-pill-tabs {
  top: var(--sp-tabs-top, 318px);
  transform: translateX(-50%);
}

@media (max-width: 768px) {
  .sp-stage.is-live { height: 150vh; }
}
@media (max-width: 600px) {
  .sp-stage-headline br { display: none; }
  .sp-pill-tab { padding: 10px 14px; font-size: 14px; }
  .sp-pill-tabs { padding: 6px; gap: 4px; border-radius: 14px; }
}

/* ==========================================================================
   Motion (assets/js/sp-motion.js) — reference: recruit.kakaobank.com
   Hidden states only under html.sp-motion, which the script sets outside
   Figma capture mode and prefers-reduced-motion, so captures stay fully visible.
   ========================================================================== */

/* Reveal: fade-up once (the rise itself is a Web Animation, so page hover transitions stay intact) */
html.sp-motion [data-sp-reveal]:not(.is-in),
html.sp-motion [data-sp-reveal-group]:not(.is-in) > * {
  opacity: 0;
}

/* Steps: pinned block, lines darken one by one */
[data-sp-steps].is-live { position: relative; }
[data-sp-steps].is-live > .sp-steps-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
[data-sp-steps].is-live [data-sp-step] {
  color: #c4c4c4;
  transition: color 0.45s ease;
}
[data-sp-steps].is-live [data-sp-step].is-on { color: inherit; }
[data-sp-steps].is-live [data-sp-step]:not(.is-on) * { color: inherit; }

/* Spy: sticky tab bar following the sections (pages style the bar itself) */
[data-sp-spy] {
  position: sticky;
  top: var(--sp-header-offset, 0px);
  z-index: 60;
  transition: top 0.35s ease;
}

/* Sub page header: hide on scroll down, back on scroll up */
.header.sp-header-fixed { position: fixed; }
.header.sp-header-fixed,
.header.sp-header-hidden { transition: translate 0.35s ease; }
.header.sp-header-hidden { translate: 0 calc(-100% - 24px); }
.header.sp-header-instant { transition: none !important; }

html.capture-mode [data-sp-reveal],
html.capture-mode [data-sp-reveal-group] > * {
  opacity: 1 !important;
  translate: none !important;
}
@media (prefers-reduced-motion: reduce) {
  [data-sp-spy],
  .header.sp-header-fixed,
  .header.sp-header-hidden { transition: none; }
}
