/* =========================================
   긴이야기 — 공통 스타일
   story.ensconces.com
   ========================================= */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }

body {
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  word-break: keep-all;
}

/* === CSS Variables === */
:root {
  --primary:  #1a3a6e;
  --primary-dark: #122a52;
  --accent:   #e8a020;
  --accent-light: #f5c060;
  --text:     #1a1a1a;
  --sub:      #555;
  --bg:       #f4f5f7;
  --white:    #fff;
  --border:   #d8dbe2;
  --shadow:   0 4px 24px rgba(26,58,110,0.10);
  --radius:   12px;
  --transition: 0.25s ease;
}

/* === Typography === */
h1, h2, h3, h4 {
  font-family: 'Noto Serif KR', serif;
  line-height: 1.35;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

/* === Layout === */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 96px 0; }

.section-title {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-sub {
  color: var(--sub);
  font-size: 1.05rem;
  margin-bottom: 56px;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
}
.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232,160,32,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
}

/* === Header / GNB === */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.header.scrolled { box-shadow: var(--shadow); }

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

.logo {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.logo span {
  font-size: 0.68rem;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 400;
  color: var(--sub);
  letter-spacing: 0.05em;
}

.gnb {
  display: flex;
  gap: 36px;
  align-items: center;
}
.gnb a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: color var(--transition);
  position: relative;
}
.gnb a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.gnb a:hover { color: var(--primary); }
.gnb a:hover::after { transform: scaleX(1); }

.gnb-cta {
  background: var(--primary);
  color: var(--white) !important;
  padding: 9px 22px;
  border-radius: 50px;
  font-size: 0.9rem !important;
}
.gnb-cta:hover { background: var(--primary-dark); }
.gnb-cta::after { display: none !important; }

/* 모바일 햄버거 */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--primary);
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 모바일 드로어 */
.mobile-nav {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0; bottom: 0;
  background: var(--white);
  z-index: 99;
  padding: 32px 24px;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
}
.mobile-nav a:last-child {
  margin-top: 24px;
  border: none;
  background: var(--accent);
  color: var(--primary-dark);
  text-align: center;
  border-radius: 50px;
  padding: 16px;
  font-weight: 700;
}

/* === Hero === */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #2a5298 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 68px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(232,160,32,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -15%; left: -5%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(232,160,32,0.18);
  border: 1px solid rgba(232,160,32,0.4);
  color: var(--accent-light);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 28px;
  letter-spacing: 0.03em;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: var(--white);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.hero h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero-desc {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.78);
  margin-bottom: 44px;
  max-width: 560px;
  line-height: 1.8;
}

.hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  animation: bounce 2s infinite;
}
.hero-scroll::after {
  content: '';
  display: block;
  width: 1px; height: 40px;
  background: rgba(255,255,255,0.3);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* === Services Summary === */
.services-summary { background: var(--bg); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 32px;
  border: 1px solid var(--border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 56px; height: 56px;
  background: rgba(26,58,110,0.08);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.service-icon svg { width: 28px; height: 28px; color: var(--primary); }

.service-card h3 {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 12px;
}
.service-card p {
  color: var(--sub);
  font-size: 0.93rem;
  line-height: 1.75;
}

.service-price {
  margin-top: 20px;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
}

/* === CTA Banner === */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #2a5298 100%);
  padding: 80px 0;
}
.cta-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.cta-text h2 {
  font-size: 1.9rem;
  color: var(--white);
  margin-bottom: 10px;
}
.cta-text p {
  color: rgba(255,255,255,0.72);
  font-size: 1rem;
}

/* === Footer === */
.footer {
  background: #0f2347;
  color: rgba(255,255,255,0.55);
  padding: 48px 0 32px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.footer-brand .logo { color: var(--white); }
.footer-brand .logo span { color: rgba(255,255,255,0.45); }
.footer-brand p {
  margin-top: 12px;
  font-size: 0.85rem;
  line-height: 1.8;
}
.footer-links {
  display: flex;
  gap: 60px;
}
.footer-col h4 {
  color: var(--white);
  font-size: 0.9rem;
  margin-bottom: 16px;
  font-family: 'Noto Sans KR', sans-serif;
}
.footer-col a {
  display: block;
  margin-bottom: 10px;
  font-size: 0.85rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 8px;
}

/* === Animations === */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 900px) {
  .gnb { display: none; }
  .hamburger { display: flex; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-banner .container { flex-direction: column; text-align: center; }
  .footer-links { gap: 32px; }
}

@media (max-width: 720px) {
  section { padding: 72px 0; }
  .services-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .hero-btns { flex-direction: column; }
  .footer-inner { flex-direction: column; }
  .footer-links { flex-wrap: wrap; gap: 24px; }
}

@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .section-title { font-size: 1.6rem; }
  .hero h1 { font-size: 1.75rem; }
  .service-card { padding: 28px 20px; }
}
