/* =============================================
   더원수학학원 - 메인 스타일시트
   Aesthetic: 클래식·학술적 + 강렬한 포인트
   Font: Noto Serif KR (헤딩) + Noto Sans KR (본문)
   Color: Navy #0B1D3A, Gold #C9A84C, White #FAFAF8
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0B1D3A;
  --navy-mid: #152B55;
  --navy-light: #1E3A6E;
  --gold: #C9A84C;
  --gold-light: #E5C97C;
  --gold-pale: #F5EDD8;
  --white: #FAFAF8;
  --gray-100: #F2F0EB;
  --gray-200: #E0DDD5;
  --gray-400: #9A9690;
  --gray-600: #5C5A56;
  --red: #C0392B;
  --font-serif: 'Noto Serif KR', Georgia, serif;
  --font-sans: 'Noto Sans KR', sans-serif;
  --shadow-sm: 0 2px 8px rgba(11,29,58,0.08);
  --shadow-md: 0 6px 24px rgba(11,29,58,0.13);
  --shadow-lg: 0 16px 48px rgba(11,29,58,0.18);
  --radius: 8px;
  --radius-lg: 16px;
  --nav-h: 76px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--white); color: var(--navy); overflow-x: hidden; }

/* ---- 공통 ---- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 2rem; }

a { color: inherit; text-decoration: none; }

h1,h2,h3 { font-family: var(--font-serif); }

.btn-primary, .cta-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: .95rem;
  padding: .85rem 2rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background .2s, transform .15s;
  letter-spacing: .03em;
}
.btn-primary:hover, .cta-primary:hover { background: var(--gold-light); transform: translateY(-2px); }

.btn-outline {
  display: inline-block;
  border: 1.5px solid var(--navy);
  color: var(--navy);
  font-weight: 500;
  font-size: .9rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s;
}
.btn-outline:hover { background: var(--navy); color: var(--white); }

/* ---- 네비게이션 ---- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  background: rgba(250,250,248,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow .3s;
}
.navbar.scrolled { box-shadow: var(--shadow-md); }
.nav-inner {
  max-width: 1400px; margin: 0 auto; padding: 0 1.25rem;
  height: 100%; display: flex; align-items: center; gap: .5rem;
  flex-wrap: nowrap;
}

.logo { display: flex; align-items: baseline; gap: 0; font-family: var(--font-serif); flex-shrink: 0; }
.logo-the { font-size: 1.2rem; font-weight: 900; color: var(--gold); letter-spacing: .01em; }
.logo-one { font-size: 1.2rem; font-weight: 900; color: var(--navy); letter-spacing: .01em; }
.logo-math { font-size: 1.2rem; font-weight: 900; color: var(--navy); letter-spacing: .01em; }

.nav-links { display: flex; list-style: none; gap: 0; margin-left: auto; flex-shrink: 1; flex-wrap: nowrap; }
.nav-links a {
  display: block; padding: .5rem .6rem;
  font-size: .92rem; font-weight: 500; color: var(--gray-600);
  border-radius: var(--radius);
  transition: color .2s, background .2s; white-space: nowrap;
}
.nav-links a:hover { color: var(--navy); background: var(--gray-100); }
.nav-links a.active { color: var(--navy); font-weight: 700; }

.nav-actions { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }

.btn-kakao {
  display: flex; align-items: center;
  background: #FEE500; color: #3C1E1E;
  font-size: .78rem; font-weight: 700;
  padding: .42rem .75rem; border-radius: 20px;
  transition: opacity .2s; white-space: nowrap;
}
.btn-kakao:hover { opacity: .85; }

.btn-login {
  background: var(--navy);
  color: var(--white);
  font-size: .78rem; font-weight: 500;
  padding: .42rem .75rem; border-radius: 20px;
  transition: background .2s; white-space: nowrap;
}
.btn-login:hover { background: var(--navy-light); }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: all .3s; }

.mobile-menu {
  display: none; flex-direction: column;
  background: var(--white); border-top: 1px solid var(--gray-200);
  padding: 1rem 2rem;
}
.mobile-menu a { padding: .75rem 0; font-size: .95rem; border-bottom: 1px solid var(--gray-100); color: var(--navy); }

/* ---- 히어로 ---- */
.hero {
  min-height: 100vh;
  background: linear-gradient(160deg, #0B1D3A 0%, #0F2448 50%, #0B1D3A 100%);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  position: relative; overflow: hidden;
  padding: calc(var(--nav-h) + 3rem) 2rem 4rem;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-grid { display: none; }
.hero-accent {
  position: absolute; border-radius: 50%;
  filter: blur(100px); pointer-events: none;
}
.accent-1 { width: 500px; height: 500px; background: rgba(201,168,76,.08); top: -150px; right: -150px; }
.accent-2 { width: 400px; height: 400px; background: rgba(14,42,90,.6); bottom: -100px; left: -100px; }

.hero-content { position: relative; text-align: center; max-width: 800px; }
.hero-eyebrow {
  display: inline-block;
  border: 1px solid rgba(201,168,76,.4);
  color: var(--gold);
  font-size: .82rem; font-weight: 500; letter-spacing: .12em;
  padding: .35rem 1.2rem; border-radius: 20px;
  margin-bottom: 1.8rem;
  animation: fadeUp .7s ease both;
}
.hero-title {
  font-family: var(--font-serif);
  display: flex; flex-direction: column;
  color: var(--white);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}
.hero-title .line1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 400; animation: fadeUp .7s .1s ease both; }
.hero-title .line2 { font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 900; animation: fadeUp .7s .2s ease both; }
.hero-title em { color: var(--gold); font-style: normal; }
.hero-sub {
  color: rgba(250,250,248,.65); font-size: 1.05rem; line-height: 1.9;
  margin-bottom: 2.5rem; animation: fadeUp .7s .3s ease both;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; animation: fadeUp .7s .4s ease both; }
.cta-secondary {
  display: inline-block;
  border: 1.5px solid rgba(250,250,248,.3); color: var(--white);
  font-size: .95rem; font-weight: 500;
  padding: .85rem 2rem; border-radius: var(--radius);
  transition: border-color .2s, background .2s;
}
.cta-secondary:hover { border-color: var(--gold); background: rgba(201,168,76,.1); }

.hero-stats {
  position: relative; margin-top: 5rem;
  display: flex; align-items: center; gap: 0;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(201,168,76,.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem 3rem;
  animation: fadeUp .7s .6s ease both;
}
.stat-item { text-align: center; padding: 0 2.5rem; }
.stat-num { font-family: var(--font-serif); font-size: 2.4rem; font-weight: 900; color: var(--gold); }
.stat-unit { font-size: 1.1rem; color: var(--gold-light); font-weight: 500; }
.stat-label { display: block; font-size: .78rem; color: rgba(250,250,248,.5); margin-top: .3rem; letter-spacing: .06em; }
.stat-divider { width: 1px; height: 50px; background: rgba(201,168,76,.2); }

/* ---- 특징 섹션 ---- */
.features { padding: 7rem 0; background: var(--white); }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-eyebrow {
  font-size: .78rem; letter-spacing: .15em; color: var(--gold);
  font-weight: 600; text-transform: uppercase; margin-bottom: .75rem;
}
.section-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 700; color: var(--navy); line-height: 1.3; }
.section-title strong { color: var(--gold); font-weight: 900; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}
.feature-card {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  opacity: 0; transform: translateY(30px);
}
.feature-card.visible { opacity: 1; transform: translateY(0); transition-delay: attr(data-delay ms); }
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--gold); }
.feature-icon { width: 52px; height: 52px; color: var(--gold); margin-bottom: 1.2rem; }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .7rem; color: var(--navy); }
.feature-card p { font-size: .88rem; line-height: 1.75; color: var(--gray-600); }

/* ---- 공지사항 ---- */
.notice-section { padding: 5rem 0; background: var(--navy); }
.notice-wrap { max-width: 760px; margin: 0 auto; }
.notice-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.notice-header h2 { font-family: var(--font-serif); font-size: 1.5rem; color: var(--white); }
.notice-header a { font-size: .85rem; color: var(--gold); font-weight: 500; }
.notice-list { list-style: none; }
.notice-list li { border-bottom: 1px solid rgba(255,255,255,.08); }
.notice-list li a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem .25rem; color: rgba(250,250,248,.8); font-size: .9rem;
  transition: color .2s;
}
.notice-list li a:hover { color: var(--gold); }
.notice-list .notice-date { font-size: .78rem; color: rgba(250,250,248,.35); white-space: nowrap; margin-left: 1rem; }
.notice-list .notice-badge {
  font-size: .7rem; background: var(--gold); color: var(--navy);
  padding: .15rem .5rem; border-radius: 10px; margin-right: .6rem; font-weight: 700;
}
.notice-loading { color: rgba(250,250,248,.4); font-size: .9rem; text-align: center; padding: 2rem 0; }

/* ---- CTA 배너 ---- */
.cta-banner { padding: 6rem 0; background: var(--gold-pale); }
.cta-banner .container { display: grid; grid-template-columns: 1fr auto; gap: 4rem; align-items: center; }
.cta-content h2 { font-family: var(--font-serif); font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--navy); margin-bottom: .8rem; }
.cta-content p { color: var(--gray-600); line-height: 1.8; margin-bottom: 2rem; }
.cta-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.cta-kakao-big {
  display: inline-flex; align-items: center;
  background: #FEE500; color: #3C1E1E;
  font-weight: 700; font-size: .95rem;
  padding: .85rem 1.75rem; border-radius: var(--radius);
  transition: opacity .2s;
}
.cta-kakao-big:hover { opacity: .85; }
.cta-map { text-align: center; }
.map-icon { font-size: 2rem; margin-bottom: .5rem; }
.map-addr { font-size: .9rem; line-height: 1.7; color: var(--navy); font-weight: 500; margin-bottom: .5rem; }
.map-tel a { color: var(--navy-light); font-weight: 700; }

/* ---- 푸터 ---- */
.footer { background: var(--navy); color: rgba(250,250,248,.5); padding: 3rem 0 2rem; }
.footer-top { margin-bottom: 2rem; }
.footer-brand { display: flex; align-items: baseline; gap: .3rem; margin-bottom: 1rem; }
.footer-brand .logo-the { color: var(--gold); font-family: var(--font-serif); font-size:1.3rem; font-weight:900; letter-spacing:.01em; }
.footer-brand .logo-one { color: #ffffff !important; font-family: var(--font-serif); font-size:1.3rem; font-weight:900; letter-spacing:.01em; }
.footer-brand .logo-math { color: #ffffff !important; font-family: var(--font-serif); font-size:1.3rem; font-weight:900; letter-spacing:.01em; }
.footer p { font-size: .82rem; line-height: 1.8; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; font-size: .78rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: rgba(250,250,248,.4); transition: color .2s; }
.footer-links a:hover { color: var(--gold); }

/* ---- 카카오 플로팅 ---- */
.kakao-float {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 900;
  width: 54px; height: 54px;
  background: #FEE500; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform .2s;
}
.kakao-float:hover { transform: scale(1.1); }
.kakao-float img { width: 30px; height: 30px; }

/* ---- 애니메이션 ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- 폼 공통 ---- */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .5rem; color: var(--navy); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: .75rem 1rem;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius);
  font-family: var(--font-sans); font-size: .9rem; color: var(--navy);
  background: var(--white); transition: border-color .2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--gold); }

/* ---- 페이지 헤더 ---- */
.page-hero {
  background: var(--navy);
  padding: calc(var(--nav-h) + 3.5rem) 2rem 4rem;
  text-align: center;
}
.page-hero h1 { font-family: var(--font-serif); color: var(--white); font-size: clamp(2rem,5vw,3rem); margin-bottom: .75rem; }
.page-hero p { color: rgba(250,250,248,.55); font-size: 1rem; }

/* ---- 배지/태그 ---- */
.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .05em;
  padding: .2rem .65rem; border-radius: 20px;
}
.badge-gold { background: var(--gold); color: var(--navy); }
.badge-navy { background: var(--navy); color: var(--white); }
.badge-green { background: #d4edda; color: #155724; }
.badge-red { background: #f8d7da; color: #721c24; }

/* ---- 회원 등급 뱃지 ---- */
.grade-새싹 { background: #e8f5e9; color: #2e7d32; }
.grade-기본 { background: #e3f2fd; color: #1565c0; }
.grade-학원 { background: #fff3e0; color: #e65100; }
.grade-관리자 { background: var(--navy); color: var(--gold); }

/* ---- 반응형 ---- */
@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .hamburger { display: flex; }

  .hero-stats { flex-direction: column; gap: 1.5rem; padding: 1.5rem; }
  .stat-divider { width: 60px; height: 1px; }
  .stat-item { padding: 0; }

  .cta-banner .container { grid-template-columns: 1fr; }
  .cta-map { display: none; }

  .features-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
}
