/* =========================================================
   부산달리기 — 공통 스타일시트 (style.css)
   모든 페이지가 이 파일 하나를 공유합니다.
   색·폰트·간격을 바꾸려면 아래 :root 변수만 수정하면
   사이트 전체에 한 번에 반영됩니다.
   ========================================================= */

:root {
  /* --- 색상 (새벽 부산 바다) --- */
  --ink:        #0B2434;   /* 심해 네이비 — 어두운 영역·제목 */
  --ink-soft:   #16384A;   /* 살짝 밝은 네이비 */
  --sea:        #0E6E84;   /* 새벽 바다 틸 */
  --aqua:       #33B4C2;   /* 밝은 물빛 — 강조선·링크 */
  --coral:      #FF5A3C;   /* 일출 코랄 — 핵심 포인트·버튼 */
  --coral-deep: #E03E22;
  --paper:      #EFF3F2;   /* 차가운 거품빛 배경 */
  --surface:    #FFFFFF;   /* 카드·표면 */
  --line:       #D7E0DE;   /* 경계선 */
  --muted:      #5C6E72;   /* 보조 텍스트 */
  --text:       #112A35;   /* 본문 텍스트 */

  /* --- 폰트 --- */
  --font-display: "Black Han Sans", "Noto Sans KR", sans-serif;
  --font-body:    "Pretendard", "Noto Sans KR", system-ui, sans-serif;
  --font-util:    "Space Grotesk", "Pretendard", sans-serif;

  /* --- 레이아웃 --- */
  --maxw: 1120px;
  --radius: 14px;
  --radius-sm: 8px;
}

/* --- 리셋 --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--sea); text-decoration: none; }
a:hover { color: var(--coral); }
ul { list-style: none; }

/* --- 공통 컨테이너 --- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* --- 눈썹 라벨 (영문/숫자 작은 라벨) --- */
.eyebrow {
  font-family: var(--font-util);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--coral);
  display: inline-block;
}

/* --- 제목 --- */
h1, h2, h3 { line-height: 1.2; color: var(--ink); font-weight: 400; }
.display { font-family: var(--font-display); letter-spacing: -0.01em; }
h2.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 44px);
  margin-top: 14px;
}
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 60ch; }

/* =========================================================
   헤더 / 내비게이션 (모든 페이지 공통 — 그대로 복사해 사용)
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 36, 52, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  font-family: var(--font-display);
  font-size: 24px;
  color: #fff;
  letter-spacing: 0.01em;
  display: inline-flex; align-items: center; gap: 9px;
}
.brand:hover { color: #fff; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); display: inline-block; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: rgba(255,255,255,0.78);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ""; display: block; height: 2px; background: var(--coral);
  margin-top: 4px; border-radius: 2px;
}

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 42px; height: 42px; color: #fff;
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 8px 16px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 8px; font-size: 16px; }
  .nav-links a.active::after { display: inline-block; width: 22px; margin: 6px 0 0; }
}

/* =========================================================
   히어로 (홈 전용 큰 영역)
   ========================================================= */
.hero {
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 2; padding-top: 88px; padding-bottom: 96px; }
.hero .eyebrow { color: var(--aqua); }
.hero .eyebrow::before { background: var(--aqua); }
.hero h1 {
  font-family: var(--font-display);
  color: #fff;
  font-size: clamp(46px, 11vw, 116px);
  line-height: 0.96;
  margin: 18px 0 22px;
  letter-spacing: -0.02em;
}
.hero h1 .accent { color: var(--coral); }
.hero p.tagline { font-size: clamp(17px, 2.4vw, 22px); color: rgba(255,255,255,0.82); max-width: 46ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* 해안 루트 라인 — 시그니처 모티프 (히어로 배경) */
.routeart { position: absolute; inset: 0; z-index: 1; opacity: 0.55; }
.routeart path.route { fill: none; stroke: var(--sea); stroke-width: 2.5; stroke-dasharray: 5 9; stroke-linecap: round; }
.routeart circle.pin { fill: var(--coral); }
@media (prefers-reduced-motion: no-preference) {
  .routeart path.route { animation: flow 6s linear infinite; }
}
@keyframes flow { to { stroke-dashoffset: -140; } }

/* 다음 행사 미니카드 */
.next-run {
  display: inline-flex; align-items: center; gap: 16px;
  margin-top: 40px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  padding: 14px 20px;
}
.next-run .nr-date { font-family: var(--font-util); color: var(--aqua); font-weight: 600; font-size: 14px; letter-spacing: 0.08em; }
.next-run .nr-title { color: #fff; font-weight: 600; }
.next-run .nr-meta { color: rgba(255,255,255,0.6); font-size: 14px; }

/* =========================================================
   버튼
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 16px;
  padding: 13px 24px; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .12s, background .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--coral); color: #fff; }
.btn-primary:hover { background: var(--coral-deep); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-soft); color: #fff; }

/* =========================================================
   페이지 상단 밴드 (홈 외 모든 페이지)
   ========================================================= */
.page-band {
  background: var(--ink);
  color: #fff;
  padding: 64px 0 56px;
  position: relative; overflow: hidden;
}
.page-band .wrap { position: relative; z-index: 2; }
.page-band h1 {
  font-family: var(--font-display);
  color: #fff;
  font-size: clamp(34px, 6vw, 58px);
  margin-top: 14px;
}
.page-band p { color: rgba(255,255,255,0.78); max-width: 60ch; margin-top: 14px; }
.page-band .eyebrow { color: var(--aqua); }
.page-band .eyebrow::before { background: var(--aqua); }

/* =========================================================
   섹션 / 카드 / 그리드
   ========================================================= */
.section { padding: 72px 0; }
.section.alt { background: var(--surface); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.section.alt .card { background: var(--paper); }
.card h3 { font-size: 21px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 16px; }
.card .tag {
  font-family: var(--font-util); font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--sea);
}

/* 루트 라인 디바이더 — 섹션 구분용 시그니처 */
.routeline { display: flex; align-items: center; gap: 0; height: 2px; margin: 0; }
.routeline::before { content: ""; flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 16px); }
.routeline::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); margin-left: -2px; }

/* 데이터 칩 (거리·페이스·날짜) */
.stat { font-family: var(--font-util); }
.stat .num { font-size: 40px; font-weight: 700; color: var(--ink); }
.stat .unit { font-size: 15px; color: var(--muted); font-weight: 500; }
.stat .label { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; font-family: var(--font-body); }

/* 행사 항목 (events.html에서 복사해 추가) */
.event {
  display: grid; grid-template-columns: 130px 1fr; gap: 24px;
  padding: 28px 0; border-top: 1px solid var(--line);
}
.event:last-child { border-bottom: 1px solid var(--line); }
.event .when { font-family: var(--font-util); }
.event .when .d { font-size: 30px; font-weight: 700; color: var(--coral); line-height: 1; }
.event .when .m { font-size: 14px; color: var(--muted); letter-spacing: 0.08em; }
.event .what h3 { font-size: 22px; margin-bottom: 8px; }
.event .what .meta { color: var(--muted); font-size: 15px; margin-bottom: 10px; }
@media (max-width: 600px) { .event { grid-template-columns: 1fr; gap: 8px; } }

/* FAQ */
.faq details {
  border-top: 1px solid var(--line); padding: 20px 0;
}
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 18px; color: var(--ink);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--coral); font-size: 24px; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 14px; color: var(--muted); }

/* 갤러리 격자 (이미지는 나중에 교체) */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery .shot {
  aspect-ratio: 4/3; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--ink-soft), var(--sea));
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.55); font-family: var(--font-util); font-size: 13px;
  overflow: hidden;
}
.gallery .shot img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* SNS 링크 줄 */
.sns { display: flex; flex-wrap: wrap; gap: 12px; }
.sns a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font-weight: 600; font-size: 15px;
}
.sns a:hover { border-color: var(--coral); color: var(--coral); }

/* 편집 안내 표시 — 완성본에서는 숨김 처리 (혹시 남아 있어도 화면에 보이지 않음) */
.editnote { display: none; }

/* =========================================================
   푸터
   ========================================================= */
.site-footer {
  background: var(--ink); color: rgba(255,255,255,0.7);
  padding: 56px 0 40px; margin-top: 0;
}
.site-footer .routeline { margin-bottom: 40px; }
.site-footer .routeline::before { background: repeating-linear-gradient(90deg, rgba(255,255,255,0.18) 0 8px, transparent 8px 16px); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid .brand { font-size: 28px; }
.footer-grid h4 { color: #fff; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--font-util); margin-bottom: 14px; font-weight: 600; }
.footer-grid a { color: rgba(255,255,255,0.7); display: block; padding: 4px 0; font-size: 15px; }
.footer-grid a:hover { color: var(--coral); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 13px; color: rgba(255,255,255,0.5); font-family: var(--font-util); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* 접근성 — 키보드 포커스 */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--aqua); outline-offset: 2px; border-radius: 4px;
}
