/* ============================================================
   98 OCTANE — DESIGN ELEVATION LAYER
   Bolder, more custom, less template-ish
   ============================================================ */

/* ---- Grain texture overlay for depth ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ---- Typography upgrades ---- */
h1 {
  font-size: clamp(3.2rem, 8vw, 6.5rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  line-height: 0.95 !important;
}

h2 {
  font-size: clamp(2.2rem, 5.5vw, 4rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
}

h3 {
  font-weight: 800 !important;
}

/* ---- Hero upgrades ---- */
.hero {
  min-height: 92vh !important;
}

.hero-content h1 {
  text-shadow: 0 4px 40px rgba(0,0,0,0.5);
}

.hero-content h1 .accent {
  position: relative;
  display: inline-block;
}

.hero-content h1 .accent::after {
  content: '';
  position: absolute;
  bottom: 0.05em;
  left: -0.05em;
  right: -0.05em;
  height: 0.12em;
  background: var(--orange);
  opacity: 0.4;
  z-index: -1;
  transform: skewX(-3deg);
}

.hero-sub {
  font-size: 1.25rem !important;
  max-width: 600px !important;
}

/* ---- Animated gradient border on hero bottom ---- */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--orange), var(--field-olive), var(--orange));
  background-size: 200% 100%;
  animation: gradient-slide 6s linear infinite;
}

@keyframes gradient-slide {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

/* ---- Bold section numbers ---- */
.section-header .mono-label {
  font-size: 3.5rem !important;
  font-weight: 500 !important;
  opacity: 0.12 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  position: absolute;
  top: -0.15em;
  left: 0;
}

.section-header {
  position: relative;
  padding-left: 0;
  border-bottom: 2px solid currentColor !important;
  padding-bottom: 20px !important;
  margin-bottom: 64px !important;
}

/* ---- Button upgrades — more punch ---- */
.btn {
  padding: 16px 32px !important;
  font-size: 1.1rem !important;
  letter-spacing: 0.08em !important;
  position: relative;
  overflow: hidden;
  border-radius: 0 !important;
}

.btn-primary {
  background: var(--orange) !important;
  color: var(--carbon) !important;
  border-color: var(--orange) !important;
  font-weight: 800 !important;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-primary:hover::before {
  transform: translateX(100%);
}

.btn-primary:hover {
  background: #e55a1b !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(240,100,35,0.3);
}

.btn-outline-light, .btn-outline-dark, .btn-outline-orange {
  border-width: 2px !important;
  font-weight: 700 !important;
}

.btn-outline-light:hover, .btn-outline-dark:hover {
  transform: translateY(-1px);
}

/* ---- Path cards upgrade ---- */
.paths-grid {
  border: none !important;
}

.path-card {
  border: none !important;
  border-right: 1px solid rgba(89,99,74,0.25) !important;
  padding: 48px 40px !important;
  position: relative;
}

.path-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 3px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.path-card:hover::before {
  transform: scaleX(1);
}

.path-card:hover {
  background: rgba(240,100,35,0.04) !important;
}

.path-card .path-icon {
  font-size: 2.8rem !important;
  margin-bottom: 20px !important;
}

.path-card h3 {
  font-size: 1.6rem !important;
  margin-bottom: 16px !important;
}

/* ---- Stats section — big number treatment ---- */
.stat-number {
  font-size: clamp(3.5rem, 8vw, 6rem) !important;
  font-weight: 800 !important;
  background: linear-gradient(135deg, var(--orange), #ff8c42);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card {
  padding: 48px 36px !important;
}

.stat-card::before {
  width: 48px !important;
  height: 3px !important;
  margin-bottom: 28px !important;
}

/* ---- Manual cover placeholder — more dramatic ---- */
.manual-cover-placeholder {
  background: linear-gradient(160deg, var(--carbon) 0%, var(--deep-olive) 100%) !important;
  box-shadow: 16px 16px 0 rgba(240,100,35,0.12), 0 24px 60px rgba(0,0,0,0.25);
  border: none !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.manual-cover-placeholder:hover {
  transform: translate(-4px, -4px);
  box-shadow: 20px 20px 0 rgba(240,100,35,0.18), 0 32px 80px rgba(0,0,0,0.3);
}

.manual-cover-placeholder::before {
  height: 8px !important;
  background: linear-gradient(90deg, var(--orange), #ff8c42) !important;
}

.manual-cover-placeholder .cover-label {
  font-size: 2.4rem !important;
  letter-spacing: 0.12em !important;
}

/* ---- Program cards ---- */
.program-card {
  padding: 40px 32px !important;
  position: relative;
  overflow: hidden;
}

.program-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.program-card:hover::before {
  transform: scaleX(1);
}

.program-num {
  font-size: 0.78rem !important;
  color: var(--orange) !important;
  opacity: 0.6;
}

/* ---- Testimonials upgrade ---- */
.testimonial-card {
  border: none !important;
  background: var(--off-white);
  box-shadow: 0 1px 0 rgba(89,99,74,0.15);
  padding: 48px 44px !important;
  position: relative;
  overflow: hidden;
}

.testimonial-card::before {
  font-size: 8rem !important;
  opacity: 0.08 !important;
  color: var(--carbon) !important;
  top: -10px !important;
  left: 20px !important;
}

.testimonial-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--orange);
}

.testimonial-photo {
  width: 64px;
  height: 64px;
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 20px;
  border: 2px solid var(--orange);
}

.testimonial-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(25%);
  transition: filter 0.3s ease;
}

.testimonial-card:hover .testimonial-photo img {
  filter: grayscale(0%);
}

.testimonial-card blockquote {
  font-size: 1.15rem !important;
  font-style: normal !important;
  font-weight: 500;
  line-height: 1.75 !important;
  margin-top: 0 !important;
}

.testimonial-attr strong {
  font-size: 1.1rem !important;
}

/* ---- Page hero (inner pages) — more dramatic ---- */
.page-hero {
  padding: 120px 24px 80px !important;
  min-height: 340px;
}

.page-hero-content h1 .accent::after {
  content: '';
  position: absolute;
  bottom: 0.05em;
  left: -0.05em;
  right: -0.05em;
  height: 0.12em;
  background: var(--orange);
  opacity: 0.4;
  z-index: -1;
  transform: skewX(-3deg);
}

.page-hero-content h1 .accent {
  position: relative;
  display: inline-block;
}

/* ---- Newsletter section upgrade ---- */
.newsletter-form input[type="email"] {
  padding: 16px 20px !important;
  font-size: 1.05rem !important;
  background: rgba(255,255,255,0.05) !important;
  border: 2px solid rgba(255,255,255,0.15) !important;
  border-right: none !important;
}

.newsletter-form button {
  padding: 16px 28px !important;
  font-size: 1rem !important;
  background: var(--orange) !important;
  border: 2px solid var(--orange) !important;
}

/* ---- Giving tier upgrade ---- */
.giving-tier {
  border-radius: 0 !important;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease !important;
}

.giving-tier::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--orange);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.giving-tier:hover::before,
.giving-tier.featured::before {
  transform: scaleX(1);
}

.giving-tier .amount {
  font-size: 2.8rem !important;
  font-weight: 800 !important;
}

/* ---- FAQ upgrade ---- */
.faq-question {
  font-size: 1.25rem !important;
  padding: 24px 0 !important;
}

.faq-icon {
  width: 32px;
  height: 32px;
  border: 2px solid currentColor;
  border-radius: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem !important;
  transition: all 0.25s ease !important;
}

.faq-question:hover .faq-icon {
  border-color: var(--orange);
  color: var(--orange) !important;
}

.faq-question[aria-expanded="true"] .faq-icon {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff !important;
}

/* ---- Pillar cards ---- */
.pillar-card {
  padding: 56px 40px !important;
}

.pillar-card::before {
  width: 56px !important;
  height: 4px !important;
  margin-bottom: 28px !important;
}

.pillar-card h3 {
  font-size: 1.8rem !important;
}

/* ---- Team cards ---- */
.team-card {
  border: none !important;
  box-shadow: 0 2px 0 rgba(89,99,74,0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

/* ---- Inquiry form upgrade ---- */
.inquiry-form {
  border: none !important;
  background: var(--carbon) !important;
  padding: 56px 44px !important;
  position: relative;
}

.inquiry-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--orange), var(--field-olive));
}

.inquiry-form h3 {
  color: var(--off-white) !important;
}

.inquiry-form .form-sub {
  color: rgba(243,240,231,0.6) !important;
}

/* ---- Coming soon blocks ---- */
.coming-soon-block {
  border: 2px dashed rgba(89,99,74,0.4) !important;
  position: relative;
  overflow: hidden;
}

.coming-soon-block::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 16px;
  width: 20px;
  height: 20px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  opacity: 0.12;
}

/* ---- Callout banner upgrade ---- */
.callout-banner {
  border-width: 3px !important;
  padding: 40px 48px !important;
  position: relative;
  overflow: hidden;
}

.callout-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: var(--orange);
}

/* ---- Footer elevation ---- */
.site-footer {
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), var(--field-olive), transparent);
}

.footer-col h4 {
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 20px !important;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--orange);
}

/* ---- Nav logo pulse on hover ---- */
.nav-logo-mark {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-logo:hover .nav-logo-mark {
  transform: scale(1.08);
  box-shadow: 0 0 16px rgba(240,100,35,0.4);
}

/* ---- Nav donate button glow ---- */
.nav-donate-btn {
  position: relative;
  overflow: hidden;
}

.nav-donate-btn::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--orange);
  opacity: 0;
  z-index: -1;
  border-radius: 2px;
  transition: opacity 0.3s ease;
  filter: blur(8px);
}

.nav-donate-btn:hover::after {
  opacity: 0.4;
}

/* ---- Scroll-driven fade-in animations ---- */
@media (prefers-reduced-motion: no-preference) {
  .stat-card,
  .path-card,
  .program-card,
  .testimonial-card,
  .pillar-card,
  .team-card,
  .giving-tier {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .stat-card.visible,
  .path-card.visible,
  .program-card.visible,
  .testimonial-card.visible,
  .pillar-card.visible,
  .team-card.visible,
  .giving-tier.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* Stagger children */
  .stat-card:nth-child(2),
  .path-card:nth-child(2),
  .program-card:nth-child(2),
  .pillar-card:nth-child(2),
  .team-card:nth-child(2),
  .giving-tier:nth-child(2) { transition-delay: 0.1s; }

  .stat-card:nth-child(3),
  .path-card:nth-child(3),
  .program-card:nth-child(3),
  .pillar-card:nth-child(3),
  .team-card:nth-child(3),
  .giving-tier:nth-child(3) { transition-delay: 0.2s; }

  .program-card:nth-child(4),
  .team-card:nth-child(4),
  .giving-tier:nth-child(4) { transition-delay: 0.3s; }

  .program-card:nth-child(5) { transition-delay: 0.4s; }

  /* Section-level entrance */
  .section-header,
  .manual-feature,
  .program-detail,
  .giving-strip,
  .callout-banner {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .section-header.visible,
  .manual-feature.visible,
  .program-detail.visible,
  .giving-strip.visible,
  .callout-banner.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Diagonal section dividers ---- */
.section-olive {
  position: relative;
  z-index: 1;
}

.section-olive::before {
  content: '';
  position: absolute;
  top: -32px;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--deep-olive);
  clip-path: polygon(0 50%, 100% 0, 100% 100%, 0 100%);
  z-index: -1;
}

.section-field {
  position: relative;
  z-index: 1;
}

.section-field::before {
  content: '';
  position: absolute;
  top: -24px;
  left: 0;
  right: 0;
  height: 48px;
  background: var(--field-olive);
  clip-path: polygon(0 50%, 100% 0, 100% 100%, 0 100%);
  z-index: -1;
}

/* ---- 404 page drama ---- */
.not-found h1 {
  font-size: clamp(4rem, 10vw, 9rem) !important;
  margin-bottom: 24px !important;
}

.not-found .error-code {
  font-size: 1rem !important;
  letter-spacing: 0.2em !important;
  color: var(--orange) !important;
}

/* ---- Scrollbar styling ---- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--carbon);
}

::-webkit-scrollbar-thumb {
  background: var(--field-olive);
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--orange);
}

/* ---- Selection color ---- */
::selection {
  background: var(--orange);
  color: #fff;
}

/* ---- Noindex banner upgrade ---- */
.noindex-banner {
  background: var(--carbon) !important;
  border-bottom: 1px solid var(--orange);
  color: var(--orange) !important;
  font-size: 0.68rem !important;
  padding: 6px 24px !important;
}

/* ---- Photo strip responsive ---- */
@media (max-width: 768px) {
  section[style*="grid-template-columns: repeat(4"],
  section[style*="grid-template-columns:repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
    height: 160px !important;
  }
  section[style*="grid-template-columns: repeat(3"],
  section[style*="grid-template-columns:repeat(3"] {
    grid-template-columns: repeat(3, 1fr) !important;
    height: 120px !important;
  }
}

@media (max-width: 480px) {
  section[style*="grid-template-columns: repeat(4"],
  section[style*="grid-template-columns:repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
    height: 120px !important;
  }
  section[style*="grid-template-columns: repeat(3"],
  section[style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr 1fr 1fr !important;
    height: 100px !important;
  }
}

/* ---- Responsive tweaks ---- */
@media (max-width: 768px) {
  .section-header .mono-label {
    font-size: 2.5rem !important;
  }

  .path-card::before {
    left: 0;
    right: 0;
  }

  .section-olive::before,
  .section-field::before {
    display: none;
  }

  .inquiry-form {
    padding: 36px 28px !important;
  }
}

/* ============================================================
   GLOBAL MOBILE PASS — covers inline-style grids sitewide
   ============================================================ */
@media (max-width: 768px) {

  /* ---- Inline 2-col grids → 1 col ---- */
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  /* ---- Hero content padding ---- */
  div[style*="padding:80px 24px"],
  div[style*="padding: 80px 24px"] {
    padding: 48px 20px !important;
  }

  /* ---- Page hero tighter ---- */
  .page-hero { padding: 52px 20px 48px !important; }

  /* ---- Announcement bar smaller text ---- */
  body > div[style*="background:var(--orange)"],
  body > div[style*="background: var(--orange)"] {
    font-size: 0.72rem !important;
    padding: 8px 16px !important;
    line-height: 1.4 !important;
  }

  /* ---- Hero CTA buttons stack ---- */
  .hero-ctas { flex-direction: column !important; }
  .hero-ctas .btn { width: 100% !important; text-align: center !important; }

  /* ---- Callout banner with inline border stack ---- */
  div[style*="border:2px solid var(--orange)"],
  div[style*="border: 2px solid var(--orange)"] {
    flex-direction: column !important;
    padding: 24px 20px !important;
  }

  /* ---- Donation tier rows — let amount wrap ---- */
  div[style*="display:flex;gap:16px;align-items:baseline"],
  div[style*="display: flex; gap: 16px; align-items: baseline"] {
    flex-wrap: wrap !important;
    gap: 4px 16px !important;
  }

  /* ---- About page 2-col bios grid ---- */
  div[style*="grid-template-columns:repeat(auto-fit,minmax(280px"] {
    gap: 16px !important;
  }

  /* ---- Get Involved border boxes ---- */
  div[style*="border:1px solid rgba(89,99,74,0.3);padding:36px"],
  div[style*="border:1px solid rgba(89,99,74,0.5);padding:40px"] {
    padding: 24px 20px !important;
  }

  /* ---- Section general padding reduction ---- */
  section { padding: 64px 20px !important; }
  section.compact { padding: 48px 20px !important; }

  /* ---- Testimonial cards ---- */
  .testimonial-card { padding: 24px 20px !important; }
  .testimonial-card::before { font-size: 3.5rem !important; top: 12px !important; left: 20px !important; }

  /* ---- Team grid ---- */
  .team-grid { grid-template-columns: 1fr 1fr !important; gap: 16px !important; }

  /* ---- Giving tiers ---- */
  .giving-tiers { grid-template-columns: 1fr 1fr !important; }

  /* ---- CTA button groups stack ---- */
  div[style*="display:flex;gap:12px;flex-wrap:wrap"],
  div[style*="display: flex; gap: 12px; flex-wrap: wrap"] {
    flex-direction: column !important;
  }
  div[style*="display:flex;gap:12px;flex-wrap:wrap"] a.btn,
  div[style*="display: flex; gap: 12px; flex-wrap: wrap"] a.btn {
    text-align: center !important;
  }
}

@media (max-width: 480px) {
  /* ---- Headings scale down more aggressively ---- */
  h1 { font-size: clamp(2rem, 9vw, 3.5rem) !important; }
  h2 { font-size: clamp(1.6rem, 7vw, 2.8rem) !important; }

  /* ---- Team grid → 1 col on tiny screens ---- */
  .team-grid { grid-template-columns: 1fr !important; }

  /* ---- Giving tiers → 1 col ---- */
  .giving-tiers { grid-template-columns: 1fr !important; }

  /* ---- Stat cards tighter ---- */
  .stat-card { padding: 24px 16px !important; }

  /* ---- Nav inner tighter ---- */
  .nav-inner { padding: 0 16px !important; }

  /* ---- Container padding ---- */
  .container { padding: 0 16px !important; }

  /* ---- Section padding ---- */
  section { padding: 48px 16px !important; }
  section.compact { padding: 36px 16px !important; }
}
