/* ========================================================================
   components.css
   공통 UI 컴포넌트 (헤더, 햄버거, 버튼, FAQ, 푸터, 모바일 고정 CTA, 상단 버튼)
   페이지별 색상은 각 페이지 style.css 의 :root 변수에서 덮어씁니다.
   ======================================================================== */

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg, rgba(255, 255, 255, 0.96));
  color: var(--header-fg, #111);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--header-border, rgba(0, 0, 0, 0.06));
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.04em;
}

.brand-mark__logo {
  width: 28px;
  height: 28px;
  flex: none;
}

.nav-list {
  display: flex;
  gap: 22px;
  align-items: center;
}

.nav-list a {
  font-size: 14px;
  font-weight: 500;
  padding: 6px 0;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.nav-list a:hover {
  opacity: 0.6;
}

.nav-cta {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--nav-cta-bg, #111);
  color: var(--nav-cta-fg, #fff);
  font-weight: 600;
  font-size: 14px;
}

/* Hamburger */
.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  position: relative;
  border-radius: 8px;
}

.hamburger span {
  position: absolute;
  left: 50%;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transform: translateX(-50%);
  transition: transform 0.25s, opacity 0.2s, top 0.25s;
}
.hamburger span:nth-child(1) { top: 15px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 27px; }

.hamburger.is-open span:nth-child(1) {
  top: 21px;
  transform: translateX(-50%) rotate(45deg);
}
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) {
  top: 21px;
  transform: translateX(-50%) rotate(-45deg);
}

@media (max-width: 1024px) {
  .hamburger { display: block; }

  .nav-list {
    position: fixed;
    inset: 64px 0 auto 0;
    background: var(--header-bg, #fff);
    color: var(--header-fg, #111);
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    gap: 0;
    z-index: 90;
    border-bottom: 1px solid var(--header-border, rgba(0, 0, 0, 0.08));
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.3s ease, visibility 0s linear 0.3s;
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.15);
  }
  .nav-list.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.3s ease, visibility 0s;
  }

  .nav-list a {
    font-size: 17px;
    padding: 16px 4px;
    border-bottom: 1px solid var(--header-border, rgba(0, 0, 0, 0.06));
  }
  .nav-cta {
    width: 100%;
    text-align: center;
    margin-top: 16px;
    padding: 14px 18px;
    font-size: 15px;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 14px 26px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  transition: transform 0.15s ease, background 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-primary, #111);
  color: var(--color-on-primary, #fff);
}
.btn-secondary {
  background: var(--color-secondary-bg, transparent);
  color: var(--color-secondary-fg, #111);
  border: 1.5px solid currentColor;
}
.btn-accent {
  background: var(--color-accent, #c89968);
  color: var(--color-on-accent, #1a1714);
}
.btn-ghost {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Section helpers ---------- */
.section {
  padding: 96px 0;
  scroll-margin-top: 80px;
}
@media (max-width: 768px) {
  .section { padding: 64px 0; }
}

.section-eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 14px;
  font-weight: 600;
}
.section-title {
  font-size: 36px;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}
.section-lead {
  font-size: 17px;
  max-width: 640px;
  margin-bottom: 48px;
  line-height: 1.8;
  opacity: 0.78;
}
@media (max-width: 768px) {
  .section-title { font-size: 26px; }
  .section-lead  { font-size: 15.5px; margin-bottom: 32px; }
}

/* ---------- FAQ Accordion ---------- */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--faq-border, rgba(0, 0, 0, 0.1));
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  font-size: 17px;
  font-weight: 600;
  text-align: left;
  color: inherit;
}
.faq-question__icon {
  flex: none;
  width: 24px;
  height: 24px;
  position: relative;
  transition: transform 0.3s;
}
.faq-question__icon::before,
.faq-question__icon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.faq-question__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 0.3s;
}
.faq-item.is-open .faq-question__icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-item.is-open .faq-answer {
  max-height: 600px;
}
.faq-answer__inner {
  padding: 4px 0 24px;
  opacity: 0.82;
  line-height: 1.85;
  font-size: 15.5px;
}
@media (max-width: 768px) {
  .faq-question { font-size: 16px; padding: 18px 0; }
}

/* ---------- Sample notice (모든 페이지 공통 고지) ---------- */
.sample-notice {
  background: var(--notice-bg, #f6f3ee);
  color: var(--notice-fg, #5d564d);
  padding: 28px 0;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.85;
  border-top: 1px solid var(--notice-border, rgba(0, 0, 0, 0.06));
  border-bottom: 1px solid var(--notice-border, rgba(0, 0, 0, 0.06));
}
.sample-notice strong { font-weight: 700; }

/* ---------- Site footer ---------- */
.site-footer {
  background: var(--footer-bg, #0f0d0b);
  color: var(--footer-fg, #d7d1c4);
  padding: 64px 0 36px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

.footer-brand-name {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--footer-fg-strong, #fff);
}
.footer-tagline {
  opacity: 0.7;
  line-height: 1.7;
  margin-bottom: 18px;
}

.footer-section h4 {
  font-size: 14px;
  margin-bottom: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--footer-fg-strong, #fff);
}
.footer-section a {
  display: block;
  padding: 5px 0;
  opacity: 0.72;
  transition: opacity 0.2s;
}
.footer-section a:hover { opacity: 1; }

.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  opacity: 0.7;
}

.back-to-portfolio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
}
.back-to-portfolio:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}
.back-to-portfolio::before {
  content: '←';
  font-size: 16px;
}

/* ---------- Mobile sticky CTA ---------- */
.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--mcta-bg, #fff);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
  gap: 8px;
  z-index: 80;
}
@media (max-width: 768px) {
  .mobile-cta-bar { display: flex; }
  body.has-mobile-cta { padding-bottom: 84px; }
}
.mobile-cta-bar .btn {
  flex: 1;
  min-height: 48px;
  font-size: 15px;
  padding: 12px 14px;
}

/* ---------- Scroll-to-top button ---------- */
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s, background 0.2s;
  pointer-events: none;
  z-index: 75;
  font-size: 20px;
}
.to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.to-top:hover { background: rgba(0, 0, 0, 0.9); }

@media (max-width: 768px) {
  .to-top { bottom: 88px; right: 14px; }
}
