/* ══════════════════════════════════════════════
   ALIVE GANGHWA — Design System (shared.css)
   얼라이브 강화 선교센터
   ══════════════════════════════════════════════ */

/* ── 1. CSS Variables ── */
:root {
  --cream: #FDF8F0;
  --gold: #C9A84C;
  --gold-light: #E8C97A;
  --gold-bright: #F5C842;
  --accent: #8B6914;
  --deep: #2C2416;
  --brown: #8B6914;
  --dark-brown: #5C4A1F;
  --beige: #F5E6D3;
  --white: #FFFFFF;
  --text: #2C2416;
  --text-muted: #6B5A3C;
  --dark: #2C2416;
  --muted: #6B5A3C;
  --line: #eadfcb;
  --border: rgba(139, 105, 20, .08);
  --nav-h: 72px;
  --radius: 12px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .06);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .08);
}

/* ── 2. Base Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Noto Sans KR', 'Pretendard', -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(201, 168, 76, .95);
  outline-offset: 3px;
}

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 10000;
  padding: .7rem 1rem;
  border-radius: 999px;
  background: var(--deep);
  color: var(--white);
  box-shadow: var(--shadow-md);
  transform: translateY(-140%);
  transition: transform .2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── 3. Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Serif KR', Georgia, serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.15rem; }

p {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 1rem;
}

.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }

/* ── 4. Main Content Wrapper ── */
.main-wrap {
  padding-top: var(--nav-h);
}

/* ── 5. Page Hero ── */
.page-hero {
  position: relative;
  background: var(--deep);
  padding: 6rem 5% 4rem;
  text-align: center;
  overflow: hidden;
}

.page-hero .ph-eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp .6s ease forwards;
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp .6s ease .1s forwards;
}

.page-hero p {
  color: rgba(255, 255, 255, .7);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
  opacity: 0;
  animation: fadeUp .6s ease .2s forwards;
}

.page-hero .ph-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .5rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(232, 201, 122, .22);
  color: var(--gold-light);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp .6s ease forwards;
}

.page-hero .ph-chip i {
  font-size: .82rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── 6. Section Headers ── */
.sec-head {
  text-align: center;
  margin-bottom: 3rem;
}

.sec-head .s-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
}

.sec-head .s-title {
  font-family: 'Noto Serif KR', Georgia, serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: .75rem;
  line-height: 1.3;
}

.sec-head .s-desc {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.7;
}

/* ── 7. Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 46px;
  padding: .82rem 1.75rem;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .01em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
  transition: background .25s ease, color .25s ease, transform .2s ease, box-shadow .25s ease, border-color .25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: var(--gold);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--accent);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
  box-shadow: none;
}
.btn-outline:hover {
  background: var(--gold);
  color: var(--white);
}

.quiet-panel {
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.72));
  border: 1px solid rgba(139, 105, 20, .1);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow-md);
}

/* ── 8. Cards (shared base) ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .3s ease, transform .3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ── 9. Footer ── */
.site-footer {
  background: var(--deep);
  color: rgba(255, 255, 255, .75);
  padding: 4rem 5% 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.footer-brand h3 {
  font-family: 'Noto Serif KR', Georgia, serif;
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: .75rem;
}

.footer-brand .verse {
  font-style: italic;
  font-size: .9rem;
  color: rgba(255, 255, 255, .5);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 280px;
}

.footer-brand .social-row {
  display: flex;
  gap: .6rem;
}

.footer-brand .s-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .7);
  font-size: 1rem;
  transition: background .25s ease, color .25s ease;
}

.footer-brand .s-btn:hover {
  background: var(--gold);
  color: var(--white);
}

.footer-col h4 {
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--white);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.footer-col .fc-item {
  display: block;
  color: rgba(255, 255, 255, .6);
  font-size: .92rem;
  padding: .3rem 0;
  transition: color .2s ease;
}

.footer-col .fc-item:hover {
  color: var(--gold-light);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .82rem;
  color: rgba(255, 255, 255, .4);
}

.footer-bottom a {
  color: rgba(255, 255, 255, .5);
  transition: color .2s ease;
}

.footer-bottom a:hover {
  color: var(--gold-light);
}

/* Standardized subpage hero/footer overrides for public pages */
.page-hero.page-hero-standard {
  background: linear-gradient(145deg, var(--deep) 0%, var(--dark-brown) 60%, var(--brown) 100%);
  min-height: 320px;
  padding-top: calc(var(--nav-h) + 6rem);
  padding-bottom: 5rem;
}

.page-hero.page-hero-standard::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
  opacity: .03;
  pointer-events: none;
}

.page-hero.page-hero-standard > * {
  position: relative;
  z-index: 1;
}

.page-hero.page-hero-standard .s-label,
.page-hero.page-hero-standard .ph-eyebrow,
.page-hero.page-hero-standard .hero-chip,
.page-hero.page-hero-standard .ph-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  color: var(--gold-light);
}

.page-hero.page-hero-standard .s-label::before {
  background: rgba(232, 201, 122, .5);
}

.page-hero.page-hero-standard h1 {
  font-size: clamp(2.35rem, 5vw, 3.9rem);
  line-height: 1.22;
  color: var(--white);
  margin: .8rem auto 1rem;
}

.page-hero.page-hero-standard p {
  max-width: 680px;
  color: rgba(255, 255, 255, .78);
  font-size: 1.02rem;
}

.site-footer {
  color: var(--beige);
  padding: 4.5rem 5% 2.2rem;
}

.site-footer .footer-grid {
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin: 0 auto 2.5rem;
  padding-bottom: 0;
  border-bottom: 0;
}

.site-footer .footer-brand p {
  color: rgba(245, 230, 211, .62);
  line-height: 1.9;
  font-size: .92rem;
  margin-top: .85rem;
}

.site-footer .verse,
.site-footer .footer-brand .verse {
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  background: rgba(245, 200, 66, .06);
  border-left: 2px solid var(--gold);
  border-radius: 0 8px 8px 0;
  color: var(--gold-light);
  font-style: italic;
  font-size: .82rem;
  line-height: 1.8;
  max-width: none;
}

.site-footer .footer-col h4 {
  color: var(--gold-light);
  font-size: .78rem;
  letter-spacing: .12em;
  margin-bottom: 1rem;
}

.site-footer .footer-col a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(245, 230, 211, .62);
  font-size: .88rem;
  padding: .35rem 0;
  transition: color .25s ease, gap .25s ease;
}

.site-footer .footer-col a:hover {
  color: var(--gold-light);
  gap: 14px;
}

.site-footer .footer-contact-item,
.site-footer .fc-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: .85rem;
  font-size: .88rem;
  color: rgba(245, 230, 211, .62);
}

.site-footer .footer-contact-item i,
.site-footer .fc-item i {
  color: var(--gold);
  margin-top: .15rem;
  width: 14px;
  flex-shrink: 0;
}

.site-footer .social-row,
.site-footer .footer-brand .social-row {
  display: flex;
  gap: .65rem;
  margin-top: 1rem;
}

.site-footer .social-btn,
.site-footer .s-btn,
.site-footer .footer-brand .s-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(245, 200, 66, .08);
  border: 1px solid rgba(245, 200, 66, .12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(245, 230, 211, .72);
  font-size: .92rem;
  transition: all .25s ease;
}

.site-footer .social-btn:hover,
.site-footer .s-btn:hover,
.site-footer .footer-brand .s-btn:hover {
  background: var(--gold);
  color: var(--dark-brown);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.site-footer .footer-bottom {
  padding-top: 1.9rem;
  color: rgba(245, 230, 211, .38);
}

.site-footer .footer-bottom p {
  color: rgba(245, 230, 211, .38);
  font-size: .79rem;
}

/* ── 10. Reveal Animation ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible,
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ── 11. Scroll Progress Bar ── */
#progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--gold);
  z-index: 9999;
  width: 0%;
  pointer-events: none;
  transition: width .1s linear;
}

/* ── 12. Responsive ── */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .page-hero {
    padding: 5rem 5% 3rem;
  }

  .page-hero.page-hero-standard {
    padding-top: calc(var(--nav-h) + 4rem);
    padding-bottom: 3rem;
  }

  .sec-head {
    margin-bottom: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: .75rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .page-hero {
    padding: 4rem 5% 2.5rem;
  }

  .page-hero.page-hero-standard {
    padding-top: calc(var(--nav-h) + 3.5rem);
  }
}

/* ── 13. Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .page-hero .ph-eyebrow,
  .page-hero h1,
  .page-hero p {
    opacity: 1;
    animation: none;
  }

  .btn,
  .card,
  .footer-brand .s-btn,
  .footer-col .fc-item {
    transition: none;
  }
}
