/* ================================================================
   CHURCHNET — Design System
   Variables · Reset · Typography · Layout
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&family=DM+Sans:wght@400;500;600&display=swap');

/* ---- Custom Properties ---- */
:root {
  --color-bg:         #FAF9F6;
  --color-bg-alt:     #F2F0EB;
  --color-navy:       #1E2A3A;
  --color-charcoal:   #2D3748;
  --color-gold:       #B8924A;
  --color-green:      #4A7C6F;
  --color-border:     #E2DDD6;
  --color-white:      #FFFFFF;
  --color-gold-light: #F5EDDE;
  --color-green-light:#E8F2EF;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-ui:      'DM Sans', system-ui, -apple-system, sans-serif;

  --max-width:    1100px;
  --nav-height:   68px;

  --radius-sm:    4px;
  --radius:       8px;
  --radius-lg:    12px;

  --shadow-sm:    0 1px 4px rgba(0,0,0,0.06);
  --shadow:       0 2px 16px rgba(0,0,0,0.07);
  --shadow-md:    0 4px 24px rgba(0,0,0,0.10);

  --transition:   0.18s ease;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--color-navy);
  background-color: var(--color-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  cursor: pointer;
  font-family: var(--font-ui);
  border: none;
  background: none;
}

ul, ol { list-style: none; }

input, textarea, select {
  font-family: var(--font-ui);
  font-size: 1rem;
}

/* ---- Skip Link ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 8px 16px;
  background: var(--color-navy);
  color: var(--color-white);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 10000;
  transition: top var(--transition);
}
.skip-link:focus { top: 0; }

/* ---- Container ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

.container--narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---- Section ---- */
.section {
  padding: 88px 0;
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.section--dark {
  background-color: var(--color-navy);
  color: var(--color-white);
}

.section--dark p,
.section--dark li {
  color: rgba(255,255,255,0.80);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-white);
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-navy);
  line-height: 1.2;
}

h1 {
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.015em;
}

h2 {
  font-weight: 600;
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  margin-bottom: 0.5em;
}

h3 {
  font-weight: 600;
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  margin-bottom: 0.45em;
}

h4 {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.4em;
}

p {
  margin-bottom: 1.2em;
  color: var(--color-charcoal);
  max-width: 68ch;
}

p:last-child { margin-bottom: 0; }

.lead {
  font-size: 1.15rem;
  color: var(--color-charcoal);
  line-height: 1.8;
  max-width: 56ch;
}

strong {
  font-weight: 600;
  color: var(--color-navy);
}

em { font-style: italic; }

blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--color-charcoal);
  border-left: 3px solid var(--color-gold);
  padding: 0.25rem 0 0.25rem 1.5rem;
  margin: 2rem 0;
}

/* ---- Utilities ---- */
.text-center { text-align: center; }
.text-center p { margin-left: auto; margin-right: auto; }

.section-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 0.875rem;
}

.section-divider {
  display: block;
  width: 40px;
  height: 2px;
  background: var(--color-gold);
  margin: 1.25rem 0 2rem;
}

.text-center .section-divider {
  margin-left: auto;
  margin-right: auto;
}

/* ---- Scroll fade-in (driven by IntersectionObserver in nav.js) ---- */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in.delay-1 { transition-delay: 0.1s; }
.fade-in.delay-2 { transition-delay: 0.2s; }
.fade-in.delay-3 { transition-delay: 0.3s; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  html { font-size: 17px; }
  .section { padding: 56px 0; }
  .container { padding: 0 18px; }
  .container--narrow { padding: 0 18px; }
}

@media (max-width: 480px) {
  html { font-size: 16px; }
  .section { padding: 44px 0; }
}
