/* ==========================================================================
   Design System & Custom Properties
   ========================================================================== */

:root,
[data-theme="light"] {
  /* Typography Scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.8rem);

  /* Spacing Tokens */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Color Palette (Sage & Cream) */
  --color-bg: #f7f5f1;
  --color-surface: #fcfbf8;
  --color-surface-2: #f1ede7;
  --color-text: #241f1a;
  --color-text-muted: #665f57;
  --color-text-faint: #9a938a;
  --color-primary: #0d6b6d;
  --color-primary-hover: #094f51;
  --color-border: rgba(36, 31, 26, 0.12);
  --color-divider: rgba(36, 31, 26, 0.08);
  --color-card: rgba(255, 255, 255, 0.68);

  /* Shadows */
  --shadow-sm: 0 8px 24px rgba(20, 18, 14, 0.06);
  --shadow-md: 0 18px 48px rgba(20, 18, 14, 0.12);

  /* Border Radii */
  --radius-sm: 0.5rem;
  --radius-md: 0.9rem;
  --radius-lg: 1.2rem;
  --radius-xl: 1.6rem;
  --radius-full: 999px;

  /* Fonts */
  --font-body: 'Satoshi', Inter, sans-serif;
  --font-display: 'Zodiak', Georgia, serif;
  --content: min(1160px, calc(100vw - 2rem));
}

[data-theme="dark"] {
  --color-bg: #131210;
  --color-surface: #1b1917;
  --color-surface-2: #23211e;
  --color-text: #ede8df;
  --color-text-muted: #b4ada4;
  --color-text-faint: #867f77;
  --color-primary: #75bbbb;
  --color-primary-hover: #95d0d0;
  --color-border: rgba(237, 232, 223, 0.12);
  --color-divider: rgba(237, 232, 223, 0.08);
  --color-card: rgba(255, 255, 255, 0.03);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 18px 48px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  background: radial-gradient(circle at top left, rgba(13, 107, 109, 0.08), transparent 25%), var(--color-bg);
  color: var(--color-text);
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

button {
  font: inherit;
  cursor: pointer;
}

/* ==========================================================================
   Layout & Container
   ========================================================================== */

.container {
  width: var(--content);
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 100;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--color-bg) 85%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-divider);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 700;
}

.brand-mark {
  width: 42px;
  height: 42px;
  padding: 8px;
  border-radius: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.nav-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.nav-links a:hover {
  color: var(--color-text);
}

/* ==========================================================================
   UI Components (Buttons & Badges)
   ========================================================================== */

.pill,
.theme-toggle,
.cta {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1.25rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all 0.2s ease;
}

.cta {
  background: var(--color-primary);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
}

.cta:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

.pill:hover,
.theme-toggle:hover {
  background: var(--color-surface-2);
  border-color: var(--color-text-muted);
  transform: translateY(-1px);
}

.theme-toggle {
  padding: 0;
  width: 44px;
  height: 44px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  padding: clamp(4rem, 8vw, 7rem) 0 var(--space-16);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-8);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-weight: 500;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.08;
  margin: 0;
}

h1 {
  font-size: var(--text-3xl);
  max-width: 14ch;
  margin: var(--space-5) 0;
}

h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.lede {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 40rem;
}

.hero-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-6);
}

.portrait-wrap {
  position: relative;
}

.portrait-card {
  padding: var(--space-4);
  border-radius: calc(var(--radius-xl) + 0.4rem);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  transition: transform 0.3s ease;
}

.portrait-card:hover {
  transform: translateY(-4px);
}

.portrait {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: center 25%;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
}

.badge-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.badge {
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: var(--text-sm);
  line-height: 1.4;
}

/* ==========================================================================
   General Sections
   ========================================================================== */

section {
  padding: var(--space-16) 0;
  border-top: 1px solid var(--color-divider);
}

.section-head {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: var(--space-6);
  align-items: start;
  margin-bottom: var(--space-8);
}

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

.kicker {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: var(--space-3);
  display: block;
}

/* ==========================================================================
   Cards & Timeline
   ========================================================================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.card {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.card p,
.timeline-item p {
  color: var(--color-text-muted);
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.5;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.timeline-item {
  padding: var(--space-5);
  border-left: 1px solid var(--color-border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--color-primary) 5%, var(--color-surface)), var(--color-surface));
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  transition: border-color 0.3s ease;
}

.timeline-item:hover {
  border-left-color: var(--color-primary);
}

.quote {
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
}

.quote p {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.3;
}

.quote .muted {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  padding: var(--space-8) 0 var(--space-12);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  border-top: 1px solid var(--color-divider);
}

footer p {
  margin: 0;
}

/* ==========================================================================
   Animations (Scroll Reveals)
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Charity Spotlight & Professional Insights Styles
   ========================================================================== */

.charity-callout {
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(13, 107, 109, 0.08) 0%, var(--color-surface-2) 100%);
  border: 1px dashed var(--color-primary);
  margin-top: var(--space-8);
  margin-bottom: var(--space-8);
}

.charity-callout h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-primary);
  margin-top: 0;
  margin-bottom: var(--space-2);
}

.charity-callout p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.charity-callout a {
  color: var(--color-primary);
  text-decoration: underline;
  font-weight: 500;
}

.charity-callout a:hover {
  color: var(--color-primary-hover);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-4);
}

.tip-card {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.tip-card .kicker {
  color: var(--color-primary);
}

.tip-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-top: 0;
  margin-bottom: var(--space-3);
}

.tip-card p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
  margin: 0;
}

.tip-card .tip-stat {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-primary);
  font-family: var(--font-display);
  margin-bottom: var(--space-2);
}

.business-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.business-badge {
  padding: var(--space-3) var(--space-2);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.business-badge:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
}

.business-badge span {
  font-size: var(--text-lg);
}

.scripture-card {
  text-align: center;
  max-width: 35rem;
  margin: var(--space-10) auto var(--space-6);
  padding: var(--space-6);
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}

.scripture-card p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  line-height: 1.4;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-2) 0;
}

.scripture-card cite {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-faint);
  font-style: normal;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 920px) {
  .hero-grid,
  .section-head,
  .card-grid,
  .timeline,
  .tips-grid {
    grid-template-columns: 1fr;
  }

  .business-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-3);
  }

  .site-header {
    padding: var(--space-2) 0;
  }
}

@media (max-width: 640px) {
  .hero-actions {
    flex-direction: column;
  }

  .badge-strip {
    grid-template-columns: 1fr;
  }

  .business-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-links {
    gap: var(--space-3);
  }

  .cta,
  .theme-toggle,
  .pill {
    width: 100%;
  }

  .theme-toggle {
    min-height: 44px;
  }
}

/* ==========================================================================
   Accessibility & Preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  
  .portrait-card:hover,
  .card:hover,
  .brand:hover .brand-mark,
  .cta:hover,
  .pill:hover,
  .theme-toggle:hover {
    transform: none;
    transition: none;
  }
}
