/* 기본 스타일 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 스크롤 스무스 효과 */
html {
  scroll-behavior: smooth;
}

/* ========================================
  공통 스타일 (변수, 리셋, 유틸리티)
  ======================================== */

:root {
  /* --bg: #f5f7fa; */
  --bg: #fefcf7;
  --bg-2: linear-gradient(180deg, #22344a 0%, #1a3049 100%);
  --card: #fff;
  --muted: #5f6368;
  --txt: #202124;
  --accent: #1a73e8; /* 머티리얼 블루 */
  --accent-2: #34a853; /* 머티리얼 그린 */
  --accent-3: #ea4335; /* 머티리얼 레드 */
  --ring: rgb(26 115 232 / 15%);
  --shadow: 0 2px 8px rgb(0 0 0 / 6%);
  --shadow-lg: 0 4px 16px rgb(0 0 0 / 8%);
  --radius: 8px;
  --gutter: 24px;
}

body {
  font-family:
    'Google Sans',
    Roboto,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'Helvetica Neue',
    Arial,
    'Apple SD Gothic Neo',
    'Noto Sans KR',
    'Malgun Gothic',
    'Apple Color Emoji',
    'Segoe UI Emoji',
    sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  color: var(--txt);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

main {
  scroll-snap-type: y mandatory;
  height: 100svh;
  overflow-y: auto;
}

header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: var(--card);
  border-bottom: 1px solid #e8eaed;
}

/* 섹션 공통 스타일 */
section {
  min-height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
  scroll-snap-align: start;
  padding: 100px 0; /* 헤더 여백 */
}

nav {
  width: min(1200px, 95%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
}

nav .brand {
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--txt);
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
}

/* 모바일에서 로고 크기 조정 */
@media (width <= 768px) {
  .brand-logo {
    width: 28px;
    height: 28px;
  }

  nav .brand {
    gap: 8px;
    font-size: 0.95rem;
  }
}

@media (width <= 480px) {
  .brand-logo {
    width: 24px;
    height: 24px;
  }

  nav .brand {
    gap: 6px;
    font-size: 0.9rem;
  }
}

nav a {
  color: var(--txt);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 500;
  transition: background 0.2s;
}

nav a:hover {
  background: #f1f3f4;
}

nav .spacer {
  flex: 1;
}

/* --------- 햄버거 메뉴 버튼 --------- */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 60;
  transition: all 0.3s ease;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--txt);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle:hover span {
  background: var(--accent);
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

/* --------- 드롭다운 메뉴 --------- */
.dropdown-menu {
  position: fixed;
  top: 51px;
  right: 0;
  bottom: 0;
  width: 280px;
  height: calc(100vh - 57px);
  background: var(--card);
  border-left: 1px solid #e8eaed;

  /* box-shadow: -2px 4px 12px rgb(0 0 0 / 10%); */
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  z-index: 49;
}

.dropdown-menu.active {
  transform: translateX(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  color: var(--txt);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f1f3f4;
}

.dropdown-item:hover {
  background: #f8f9fa;
  padding-left: 28px;
  color: var(--accent);
}

.dropdown-item:last-child {
  border-bottom: none;
}

/* --------- Top 버튼 --------- */
.top-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.top-btn:hover {
  background: #1557b0;
  box-shadow: 0 6px 20px rgb(0 0 0 / 25%);
  transform: translateY(-4px);
}

.top-btn:active {
  transform: translateY(-2px);
}

/* 모바일에서 Top 버튼 크기 조정 */
@media (width <= 768px) {
  .top-btn {
    width: 48px;
    height: 48px;
    bottom: 24px;
    right: 24px;
  }

  .top-btn svg {
    width: 20px;
    height: 20px;
  }
}

@media (width <= 480px) {
  .top-btn {
    width: 44px;
    height: 44px;
    bottom: 20px;
    right: 20px;
  }

  .top-btn svg {
    width: 18px;
    height: 18px;
  }
}
