/* ============================================================
   Captain Jason Jones Memorial Foundation — Global Stylesheet
   Pinegrow-ready • Netlify-deployable
   ============================================================ */

/* ---------- CSS Custom Properties (edit these to tweak palette) ---------- */
:root {
  /* Primary palette – navy / gold / white */
  --color-navy:       #1B2A4A;
  --color-navy-dark:  #111D35;
  --color-gold:       #C5A44E;
  --color-gold-light: #D4BA74;
  --color-white:      #FFFFFF;
  --color-offwhite:   #F5F5F0;
  --color-gray:       #6B7280;
  --color-gray-light: #E5E7EB;
  --color-red-accent: #B22234;
  --color-text:       #1F2937;
  --color-text-light: #4B5563;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --max-width:    1200px;
  --section-pad:  5rem 1.5rem;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--color-gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-gold-light); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--color-navy); line-height: 1.25; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: 1.35rem; margin-bottom: .75rem; }
p  { margin-bottom: 1rem; }

.section-subtitle {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: .85rem;
  color: var(--color-gold);
  font-weight: 600;
  margin-bottom: .5rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: .85rem 2rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .03em;
  transition: all .25s ease;
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
}

.btn-primary {
  background: var(--color-gold);
  color: var(--color-navy-dark);
}
.btn-primary:hover {
  background: var(--color-gold-light);
  color: var(--color-navy-dark);
}

.btn-outline {
  border-color: var(--color-white);
  color: var(--color-white);
  background: transparent;
}
.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-navy);
}

.btn-donate {
  background: var(--color-red-accent);
  color: var(--color-white);
  border-color: var(--color-red-accent);
}
.btn-donate:hover {
  background: #9A1D2E;
  border-color: #9A1D2E;
  color: var(--color-white);
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-navy-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: .75rem 1.5rem;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--color-white);
  font-weight: 700;
  text-decoration: none;
  line-height: 1.3;
}
.nav-logo span { color: var(--color-gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,.85);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .03em;
  text-transform: uppercase;
  transition: color .2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--color-gold); }

.nav-donate .btn { padding: .55rem 1.4rem; font-size: .85rem; }

/* Nav dropdown */
.nav-dropdown {
  position: relative;
}
.nav-dropdown > a svg {
  transition: transform .2s;
}
.nav-dropdown:hover > a svg {
  transform: rotate(180deg);
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  background: var(--color-navy-dark);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  list-style: none;
  padding: .5rem 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s;
  z-index: 200;
}
.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
}
.dropdown-menu li a {
  display: block;
  padding: .6rem 1.25rem;
  font-size: .85rem;
  color: rgba(255,255,255,.8);
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
}
.dropdown-menu li a:hover {
  background: rgba(255,255,255,.08);
  color: var(--color-gold);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: .3s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  background: var(--color-navy);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17,29,53,.05) 0%, rgba(17,29,53,.1) 40%, rgba(17,29,53,.7) 70%, rgba(17,29,53,.9) 100%);
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 15%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
  padding: 0 1.5rem 3rem;
}

.hero h1 { color: var(--color-white); margin-bottom: .5rem; font-size: 2.4rem; }

.hero p {
  font-size: 1rem;
  opacity: .9;
  margin-bottom: 1rem;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section        { padding: var(--section-pad); }
.section-alt    { background: var(--color-offwhite); }
.section-navy   { background: var(--color-navy); color: var(--color-white); }
.section-navy h2,
.section-navy h3 { color: var(--color-white); }
.section-navy .section-subtitle { color: var(--color-gold); }

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--color-white);
  border-radius: 8px;
  padding: 2.5rem 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform .25s, box-shadow .25s;
  border-top: 4px solid var(--color-gold);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-gold);
}
.timeline-item {
  position: relative;
  padding: 0 0 2.5rem 2rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: .4rem;
  width: 13px;
  height: 13px;
  background: var(--color-gold);
  border-radius: 50%;
  border: 3px solid var(--color-white);
  margin-left: -5px;
}
.timeline-year {
  font-weight: 700;
  color: var(--color-gold);
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

/* ---------- Stats row ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  text-align: center;
  padding: 3rem 0;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--color-gold);
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-top: .35rem;
  opacity: .85;
}

/* ---------- Event cards ---------- */
.event-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.5rem;
  align-items: start;
  background: var(--color-white);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  margin-bottom: 1.5rem;
}

.event-date-badge {
  text-align: center;
  background: var(--color-navy);
  color: var(--color-white);
  border-radius: 8px;
  padding: 1rem .5rem;
}
.event-date-badge .month {
  display: block;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: .8;
}
.event-date-badge .day {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

/* ---------- Contact form ---------- */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .35rem;
  color: var(--color-navy);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid var(--color-gray-light);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: .95rem;
  transition: border-color .2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(197,164,78,.15);
}

.form-group textarea { resize: vertical; min-height: 140px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-navy-dark);
  color: rgba(255,255,255,.7);
  padding: 3.5rem 1.5rem 1.5rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand p { max-width: 320px; font-size: .9rem; line-height: 1.6; }
.footer-brand .nav-logo { margin-bottom: .75rem; display: inline-block; }

.footer-heading {
  font-family: var(--font-heading);
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: rgba(255,255,255,.7); font-size: .9rem; }
.footer-links a:hover { color: var(--color-gold); }

.footer-bottom {
  max-width: var(--max-width);
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
}

.social-links { display: flex; gap: 1rem; }
.social-links a {
  color: rgba(255,255,255,.6);
  font-size: 1.1rem;
  transition: color .2s;
}
.social-links a:hover { color: var(--color-gold); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav-links     { display: none; }
  .nav-toggle    { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-navy-dark);
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: 0 8px 16px rgba(0,0,0,.2);
  }

  .nav-dropdown .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    background: transparent;
    padding: 0 0 0 1rem;
    min-width: auto;
  }
  .dropdown-menu li a {
    padding: .4rem 0;
    font-size: .85rem;
  }

  .hero { min-height: 60vh; }

  /* Homepage hero (mobile): keep Jason's face above the caption + bottom-weighted gradient */
  .hero.hero--home { min-height: 92vh; }
  .hero.hero--home h1 { font-size: 1.95rem; }
  .hero--home .hero-overlay {
    background: linear-gradient(180deg, rgba(17,29,53,0) 0%, rgba(17,29,53,0) 45%, rgba(17,29,53,.55) 72%, rgba(17,29,53,.92) 100%);
  }

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

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

  .event-card { grid-template-columns: 1fr; }
  .event-date-badge { display: inline-flex; gap: .5rem; padding: .5rem 1rem; }
  .event-date-badge .month,
  .event-date-badge .day { display: inline; }

  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Image Placeholders ---------- */
.img-placeholder {
  background: var(--color-gray-light);
  border: 3px dashed var(--color-gray);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-gray);
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 1.5rem;
  min-height: 250px;
}

.img-placeholder--tall  { min-height: 350px; }
.img-placeholder--short { min-height: 180px; }

/* Portrait photo beside text */
.bio-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: start;
}
.bio-portrait {
  border-radius: 8px;
  overflow: hidden;
  position: sticky;
  top: 6rem;
}
.bio-portrait img {
  width: 100%;
  height: auto;
  display: block;
}
.bio-portrait .img-placeholder {
  width: 100%;
  min-height: 360px;
}

/* Photo row / gallery strip */
.photo-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.photo-row img,
.photo-row .img-placeholder {
  border-radius: 8px;
  width: 100%;
  min-height: 220px;
  object-fit: cover;
}

/* Event card with image */
.event-card--with-img {
  grid-template-columns: 100px 1fr 220px;
}
.event-card--with-img .event-img {
  border-radius: 6px;
  overflow: hidden;
}
.event-card--with-img .event-img img,
.event-card--with-img .event-img .img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 140px;
  object-fit: cover;
}

/* Section with full-width inline image */
.section-img {
  border-radius: 8px;
  overflow: hidden;
  margin: 2rem auto;
  max-width: 700px;
}
.section-img img,
.section-img .img-placeholder {
  width: 100%;
  min-height: 300px;
  object-fit: cover;
}

@media (max-width: 768px) {
  .bio-layout {
    grid-template-columns: 1fr;
  }
  .bio-portrait {
    position: static;
    max-width: 280px;
    margin: 0 auto 1.5rem;
  }
  .event-card--with-img {
    grid-template-columns: 1fr;
  }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-gold   { color: var(--color-gold); }
.text-navy   { color: var(--color-navy); }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
