/* =========================================================
   장평교회 — 디자인 시스템
   밝고 따뜻하고 환영하는 분위기
   ========================================================= */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');
@import url('https://fonts.googleapis.com/css2?family=Nanum+Myeongjo:wght@400;700;800&display=swap');

:root {
  /* ---- 색 (warm) ---- */
  --cream:      #FBF6EC;   /* 페이지 배경 */
  --cream-deep: #F3E9D7;   /* 섹션 교차 배경 */
  --paper:      #FFFFFF;   /* 카드 */
  --ink:        #2E2820;   /* 본문 텍스트 (warm near-black) */
  --ink-soft:   #6E6354;   /* 보조 텍스트 */
  --ink-faint:  #9C9180;   /* 캡션 */
  --gold:       #C18A3D;   /* 주 강조 (honey gold) */
  --gold-deep:  #9C6C26;   /* 강조 진하게 */
  --gold-soft:  #EAD6B0;   /* 강조 옅게 (배지/라인) */
  --sage:       #6F7E5E;   /* 보조 강조 (peace green) */
  --line:       #E7DCCB;   /* 구분선 */
  --shadow:     0 24px 60px -28px rgba(80, 56, 18, 0.30);
  --shadow-sm:  0 10px 30px -18px rgba(80, 56, 18, 0.35);

  /* ---- 타입 ---- */
  --serif: 'Nanum Myeongjo', serif;
  --sans:  'Pretendard', system-ui, sans-serif;

  /* ---- 레이아웃 ---- */
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 84px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ================= 헤더 ================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background .35s ease, box-shadow .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header.scrolled {
  background: rgba(251, 246, 236, 0.92);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  box-shadow: 0 4px 14px -5px rgba(40,34,24,.4);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-mark svg { width: 24px; height: 24px; }
.site-header.on-dark:not(.scrolled) .brand-mark { box-shadow: 0 0 0 1.5px rgba(255,255,255,.5), 0 4px 14px -5px rgba(0,0,0,.5); }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name b { font-family: var(--serif); font-size: 23px; font-weight: 800; }
.brand-name span { font-size: 11.5px; letter-spacing: .28em; color: var(--ink-faint); font-weight: 600; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  position: relative;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 16.5px;
  color: var(--ink);
  border-radius: 999px;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease;
}
.nav a::after {
  content: '';
  position: absolute; left: 18px; right: 18px; bottom: 4px;
  height: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform .28s ease;
}
.nav a:hover { color: var(--gold-deep); }
.nav a:hover::after,
.nav a.active::after { transform: scaleX(1); }
.nav a.active { color: var(--gold-deep); }

.site-header.on-dark:not(.scrolled) .brand-name b,
.site-header.on-dark:not(.scrolled) .nav a { color: #fff; }
.site-header.on-dark:not(.scrolled) .brand-name span { color: rgba(255,255,255,.7); }
.site-header.on-dark:not(.scrolled) .nav a:hover { color: #fff; }

/* ================= 버튼 ================= */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 700; font-size: 16px;
  font-family: var(--sans);
  cursor: pointer; border: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--gold); color: #fff; box-shadow: 0 14px 30px -12px rgba(156,108,38,.7); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(156,108,38,.8); background: var(--gold-deep); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-deep); transform: translateY(-2px); }
.btn-light { background: rgba(255,255,255,.16); color: #fff; border: 1.5px solid rgba(255,255,255,.5); backdrop-filter: blur(4px); }
.btn-light:hover { background: #fff; color: var(--gold-deep); transform: translateY(-2px); }

/* ================= 섹션 공통 ================= */
section { position: relative; }
.section-pad { padding-block: clamp(72px, 9vw, 130px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans);
  font-size: 13.5px; font-weight: 700; letter-spacing: .26em;
  text-transform: uppercase; color: var(--gold-deep);
}
.eyebrow::before { content: ''; width: 26px; height: 2px; background: var(--gold); }
.section-title { font-size: clamp(30px, 4vw, 50px); margin-top: 18px; }
.section-lead { font-size: 19px; color: var(--ink-soft); margin-top: 18px; max-width: 60ch; line-height: 1.85; }
.bg-deep { background: var(--cream-deep); }

/* ================= 스크롤 리빌 ================= */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s cubic-bezier(.16,.84,.44,1), transform .9s cubic-bezier(.16,.84,.44,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .1s; }
.reveal[data-d="2"] { transition-delay: .2s; }
.reveal[data-d="3"] { transition-delay: .3s; }
.reveal[data-d="4"] { transition-delay: .4s; }
.reveal-img { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s cubic-bezier(.16,.84,.44,1); }
.reveal-img.in { clip-path: inset(0 0 0 0); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-img { opacity: 1; transform: none; clip-path: none; transition: none; }
}

/* ================= image-slot 기본 스타일 ================= */
image-slot {
  --img-slot-bg: #efe4d2;
  --img-slot-border: #ddccae;
  --img-slot-fg: #9c8a68;
  display: block;
}

/* ================= 카드 ================= */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

/* ================= 오시는 길 (지도) ================= */
.map-wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.map-img { position: relative; min-height: 420px; }
.map-img image-slot { width: 100%; height: 100%; min-height: 420px; }
.map-img iframe { display: block; width: 100%; height: 100%; min-height: 420px; border: 0; }
.map-pin { position: absolute; left: 50%; top: 44%; transform: translate(-50%,-100%); z-index: 2; color: var(--gold-deep); filter: drop-shadow(0 6px 8px rgba(0,0,0,.25)); pointer-events: none; }
.map-link { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.95); color: var(--gold-deep); font-weight: 700; font-size: 14.5px; padding: 11px 20px; border-radius: 999px; box-shadow: var(--shadow-sm); transition: transform .2s ease, background .2s ease; white-space: nowrap; }
.map-link svg { width: 16px; height: 16px; }
.map-link:hover { transform: translateX(-50%) translateY(-2px); background: #fff; }
.map-info { background: var(--paper); padding: clamp(34px,4vw,54px); display: flex; flex-direction: column; justify-content: center; }
.map-info .mrow { padding: 20px 0; border-bottom: 1px solid var(--line); }
.map-info .mrow:last-of-type { border-bottom: none; }
.map-info .mlabel { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; }
.map-info .mval { font-size: 18px; margin-top: 6px; line-height: 1.6; }
@media (max-width: 860px) { .map-wrap { grid-template-columns: 1fr; } }

/* ================= 페이지 배너 (상세) ================= */
.page-hero {
  position: relative;
  min-height: 460px;
  display: flex; align-items: flex-end;
  padding-top: var(--header-h);
  overflow: hidden;
}
.page-hero .ph-bg { position: absolute; inset: 0; z-index: 0; }
.page-hero .ph-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(46,40,32,.30) 0%, rgba(46,40,32,.72) 100%);
}
.page-hero image-slot { width: 100%; height: 100%; }
.page-hero .ph-inner { position: relative; z-index: 1; padding-block: 64px; color: #fff; }
.page-hero .crumb { font-size: 14px; letter-spacing: .2em; color: rgba(255,255,255,.8); font-weight: 600; margin-bottom: 18px; }
.page-hero h1 { font-size: clamp(38px, 5.5vw, 68px); color: #fff; font-weight: 800; }
.page-hero .ph-sub { margin-top: 16px; font-size: 19px; color: rgba(255,255,255,.88); max-width: 56ch; }

/* ================= 푸터 ================= */
.site-footer { background: #2A241C; color: #D8CDBA; padding-block: 70px 40px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 50px; }
.site-footer h4 { font-family: var(--sans); font-size: 14px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 18px; }
.site-footer .f-brand b { font-family: var(--serif); font-size: 26px; color: #fff; font-weight: 800; }
.site-footer p { font-size: 15.5px; line-height: 1.9; color: #B7AC97; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 48px; padding-top: 26px; font-size: 13.5px; color: #8B8169; text-align: center; }
.f-links { display: flex; flex-direction: column; gap: 10px; }
.f-links a { font-size: 15.5px; color: #B7AC97; }

/* ================= 유틸 ================= */
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.grid { display: grid; }
.flex { display: flex; }
.muted { color: var(--ink-soft); }

@media (max-width: 860px) {
  .nav { display: none; }
  .site-footer .wrap { grid-template-columns: 1fr; gap: 36px; }
}
