/**
 * CampusOut 공통 상단 헤더 — 모든 랜딩 페이지 단일 소스 (#0B1220 · #3B82F6)
 */
:root {
  /* 고정 헤더 실제 높이(본문 padding-top과 동일 값 유지) */
  --hc-header-bar: 92px;
  --hc-header-bg: rgba(11, 18, 32, 0.96);
  --hc-header-border: rgba(148, 163, 184, 0.12);
  --hc-accent: #3b82f6;
  --hc-accent-hover: #2563eb;
  --hc-text: #f8fafc;
  --hc-muted: #94a3b8;
  --hc-soft: #e2e8f0;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  box-sizing: border-box;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  isolation: isolate;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--hc-header-bg);
  border-bottom: 1px solid var(--hc-header-border);
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
  padding-top: max(0px, env(safe-area-inset-top, 0px));
}

.site-header-backdrop {
  display: none;
}

.site-header-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.site-header-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.38);
}

.site-header-menu-bars {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 22px;
}

.site-header-menu-bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: var(--hc-soft);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header--open .site-header-menu-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header--open .site-header-menu-bar:nth-child(2) {
  opacity: 0;
}

.site-header--open .site-header-menu-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.header-inner {
  min-height: var(--hc-header-bar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: relative;
  z-index: 2;
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 24px;
  font-weight: 900;
  color: var(--hc-text);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-header .logo-mark {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hc-accent);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
  font-weight: 900;
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.site-header .nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
  flex: 1;
  justify-content: flex-end;
}

.site-header .nav-link {
  color: var(--hc-muted);
  font-size: 16px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
}

.site-header .nav-link:hover {
  color: var(--hc-text);
  background: rgba(255, 255, 255, 0.06);
}

.site-header .nav-link-quiet {
  font-size: 15px;
  font-weight: 600;
}

.site-header .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease,
    box-shadow 0.15s ease;
  text-decoration: none;
  box-sizing: border-box;
}

.site-header .btn:active {
  transform: scale(0.98);
}

.site-header .btn-primary {
  background: var(--hc-accent);
  color: #fff;
  border: none;
  box-shadow: 0 4px 18px rgba(59, 130, 246, 0.35);
}

.site-header .btn-primary:hover {
  background: var(--hc-accent-hover);
  box-shadow: 0 6px 22px rgba(59, 130, 246, 0.42);
}

.site-header .btn-secondary {
  background: transparent;
  color: var(--hc-soft);
  border: 1px solid rgba(255, 255, 255, 0.38);
  font-weight: 700;
}

.site-header .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.5);
}

/* 고정 헤더 높이만큼 본문 시작 위치 보정 */
body.marketing-with-header.page-legal main {
  padding-top: calc(var(--hc-header-bar) + 28px + env(safe-area-inset-top, 0px));
}

body.marketing-with-header .pricing-main {
  padding-top: calc(var(--hc-header-bar) + 32px + env(safe-area-inset-top, 0px)) !important;
}

/* 모바일·소형 태블릿: 햄버거 + 드로어 (가로 모드 폰 등 640px 초과 대비 768까지) */
@media (max-width: 767px) {
  :root {
    --hc-header-bar: 76px;
  }
  .site-header-backdrop {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: calc(var(--hc-header-bar) + env(safe-area-inset-top, 0px));
    z-index: 0;
    background: rgba(0, 0, 0, 0.48);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    pointer-events: none;
  }

  .site-header.site-header--open .site-header-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-header .header-inner {
    flex-wrap: nowrap;
    gap: 8px;
    min-height: var(--hc-header-bar);
  }
  .site-header .logo {
    font-size: 19px;
    flex-shrink: 0;
    min-width: 0;
  }
  .site-header .logo-mark {
    width: 42px;
    height: 42px;
    font-size: 23px;
  }

  .site-header-menu-btn {
    display: inline-flex;
    margin-left: auto;
  }

  .site-header .nav {
    position: fixed;
    left: 0;
    right: 0;
    top: calc(var(--hc-header-bar) + env(safe-area-inset-top, 0px));
    z-index: 3;
    flex: none;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px))
      max(16px, env(safe-area-inset-left, 0px));
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    background: rgba(11, 18, 32, 0.98);
    border-bottom: 1px solid var(--hc-header-border);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.24s ease, opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    max-height: min(72vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .site-header.site-header--open .nav {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-header .nav-link {
    width: 100%;
    text-align: center;
    padding: 14px 16px;
    font-size: 15px;
    border-radius: 12px;
    box-sizing: border-box;
  }
  .site-header .nav .btn {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    font-size: 15px;
    box-sizing: border-box;
  }
  body.marketing-with-header.page-legal main {
    padding-top: calc(var(--hc-header-bar) + 20px + env(safe-area-inset-top, 0px));
  }
}

@media (max-width: 400px) {
  :root {
    --hc-header-bar: 70px;
  }
  .site-header .logo {
    font-size: 17px;
    gap: 10px;
  }
  .site-header .nav .btn {
    padding: 0 12px;
    font-size: 13px;
  }
  .site-header .nav-link {
    padding: 8px 10px;
    font-size: 13px;
  }
}
