@import url('./font.css');

/* ─────────────────────────────────────
   RESET & BASE
───────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Primary */
  --primary-50:  #EEF1FB;
  --primary-100: #D5DCFA;
  --primary-200: #AABAF4;
  --primary-300: #7A97ED;
  --primary-400: #4A73E6;
  --primary-500: #2353DA;
  --primary-600: #1A3DAC;
  --primary-700: #142C84;
  --primary-800: #0E1D60;
  --primary-900: #08103C;
  --primary-950: #040820;

  /* Accent */
  --accent-50:  #FFF8EB;
  --accent-100: #FEF0C7;
  --accent-200: #FDD88A;
  --accent-300: #FBBF44;
  --accent-400: #F9A826;
  --accent-500: #E88C0A;
  --accent-600: #C06E06;

  /* Neutral */
  --neutral-50:  #F8F9FB;
  --neutral-100: #F0F2F7;
  --neutral-200: #E1E6F0;
  --neutral-300: #C4CDE0;
  --neutral-400: #9AAABE;
  --neutral-500: #74839A;
  --neutral-600: #546071;
  --neutral-700: #3C4A5C;
  --neutral-800: #28344A;
  --neutral-900: #18223A;
  --neutral-950: #0C1220;

  /* Semantic */
  --success:    #16A34A;
  --success-bg: #F0FDF4;
  --warning:    #D97706;
  --warning-bg: #FFFBEB;
  --error:      #DC2626;
  --error-bg:   #FEF2F2;
  --info:       #2563EB;
  --info-bg:    #EFF6FF;

  /* Border */
  --border-100: #ebebeb;
  --border-200: #ddd;

  /* Alias */
  --text-dark: #222;
  --text-gray: #444;
  --footer-bg: #121212;
  --slogan-overlay: rgba(14, 29, 96, 0.56);

  /* 레이아웃 */
  --content-width: 1400px;
  --px: 60px;
}

html {
  height: 100%;
}

body {
  font-family: 'Pretendard', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-dark);
  background: #fff;
  overflow-x: hidden;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; }

/* ─────────────────────────────────────
   HEADER / NAV
───────────────────────────────────── */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
}

/* 서브페이지 헤더: 흰 배경 + sticky */
.is-subpage .site-header {
  position: relative;
  background: #fff;
  border-bottom: 1px solid var(--border-200);
}


.is-subpage .nav-menu-btn img {
  filter: brightness(0);
}

/* 서브페이지 히어로: sticky 헤더가 공간 차지하므로 padding-top 조정 */
.is-subpage .subpage-hero {
  padding-top: 60px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--px);
  width: 100%;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-modoo-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  background: linear-gradient(135deg, #003A7A, #1a6abf);
  border-radius: 10px;
  padding: 10px 24px;
  text-decoration: none;
  color: #fff;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.nav-modoo-btn:hover {
  background: linear-gradient(135deg, #002a5a, #1558a0);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 58, 122, 0.35);
}

.is-subpage .nav-modoo-btn {
  background: linear-gradient(135deg, #e0c060, #f5de90);
  color: var(--text-dark);
}

.is-subpage .nav-modoo-btn:hover {
  background: linear-gradient(135deg, #e0c060, #f5de90);
  box-shadow: 0 6px 16px rgba(220, 185, 80, 0.45);
  transform: translateY(-2px);
}

.nav-modoo-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.nav-modoo-sub {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.75;
  line-height: 1.3;
}

@media (max-width: 767px) {
  .nav-modoo-btn { padding: 6px 20px; gap: 0; }
  .nav-modoo-title { font-size: 12px; }
  .nav-modoo-sub { font-size: 10px; }
}


.nav-menu-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.nav-menu-btn img {
  width: 24px;
  height: 24px;
}

/* ─────────────────────────────────────
   SIDEBAR & OVERLAY
───────────────────────────────────── */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100vw;
  height: 100vh;
  background: #fff;
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 32px rgba(0,0,0,0.12);
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 36px;
  border-bottom: 1px solid var(--border-100);
  flex-shrink: 0;
}

.sidebar-logo img {
  height: 42px;
  width: auto;
}

.sidebar-close {
  width: 36px;
  height: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
  flex-shrink: 0;
}

.sidebar-close span {
  display: block;
  width: 22px;
  height: 2px;
  background: #222;
  border-radius: 2px;
  position: absolute;
  transition: transform 0.2s;
}

.sidebar-close span:nth-child(1) { transform: rotate(45deg); }
.sidebar-close span:nth-child(2) { transform: rotate(-45deg); }

.sidebar-nav {
  flex: 1;
  padding: 40px 36px;
  overflow-y: auto;
}

.sidebar-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav li a {
  display: block;
  font-size: 22px;
  font-weight: 600;
  color: #222;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-100);
  transition: color 0.2s;
  line-height: 1.3;
}

.sidebar-nav li a:hover,
.sidebar-nav li.active a {
  color: var(--primary-500);
}

.sidebar-contact {
  padding: 28px 36px;
  border-top: 1px solid var(--border-100);
  flex-shrink: 0;
}

.sidebar-contact p {
  font-size: 12px;
  color: #999;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.sidebar-contact a {
  font-size: 15px;
  color: #444;
}

/* ─────────────────────────────────────
   SUBPAGE COMMON
───────────────────────────────────── */
.subpage .subpage-hero {
  background: linear-gradient(135deg, var(--primary-900) 0%, #1a3a8f 100%);
  padding: 140px 0 45px;
}

.subpage-hero-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--px);
}

.subpage-label {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.subpage-title {
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  word-break: keep-all;
}

.subpage-content {
  padding: 0;
}

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--px);
  width: 100%;
}

.content-placeholder {
  background: var(--neutral-50);
  border-radius: 16px;
  padding: 80px 40px;
  text-align: center;
  color: #999;
  font-size: 18px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─────────────────────────────────────
   FOOTER
───────────────────────────────────── */
.site-footer {
  background: var(--footer-bg);
  padding: 60px 0;
}

.footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.footer-email {
  font-size: 16px;
  color: #fff;
  line-height: 1.5;
}

.footer-copy {
  font-size: 15px;
  color: #ddd;
  line-height: 1.5;
}

/* ═════════════════════════════════════
   TABLET  768px – 1199px
═════════════════════════════════════ */
@media (max-width: 1199px) {
  :root {
    --px: 40px;
  }

  .nav-inner { height: 72px; }
  .nav-logo img { height: 42px; }

  .subpage .subpage-hero { padding: 140px 0 60px; }
  .subpage-title { font-size: 36px; }
  .subpage-content { padding: 60px 0 80px; }

  .site-footer { padding: 40px 0; }
}

/* ═════════════════════════════════════
   MOBILE  ~ 767px
═════════════════════════════════════ */
@media (max-width: 767px) {
  :root {
    --px: 20px;
  }

  .nav-inner { height: 60px; }
  .nav-logo img { height: 34px; }
  .nav-menu-btn img { width: 24px; height: 24px; }

  .sidebar { width: 100vw; }
  .sidebar-header { padding: 20px 20px; }
  .sidebar-nav { padding: 28px 20px; }
  .sidebar-contact { padding: 20px 20px; }
  .sidebar-nav li a { font-size: 20px; padding: 14px 0; }

  .subpage .subpage-hero { padding: 120px 0 60px; }
  .subpage-title { font-size: 32px; }
  .subpage-content { padding: 48px 0 80px; }
  .content-placeholder { padding: 48px 20px; font-size: 16px; }

  .site-footer { padding: 32px 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer-email { font-size: 14px; }
  .footer-copy { font-size: 13px; }
}

/* ─────────────────────────────────────
   PAGE UP
───────────────────────────────────── */
.page-up {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 60px;
  height: 60px;
  background: #fff;
  border: 1px solid var(--border-200);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #333;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s, background 0.2s;
  z-index: 200;
}

.page-up.visible {
  opacity: 1;
  visibility: visible;
}

.page-up:hover {
  background: var(--neutral-50, #f9f9f9);
}

@media (max-width: 767px) {
  .page-up { bottom: 24px; right: 20px; width: 48px; height: 48px; }
  .page-up svg { width: 22px; height: 22px; }
}
