/* =========================================================
   SAAM FOUNDATION — Design Tokens & Base
   ========================================================= */

:root{
  /* --- Color: New brand palette --- */
  --primary:    #F1610B;   /* Primary orange */
  --primary-dk: #CD1417;   /* Secondary red */
  --secondary:  #F58A06;   /* Gold accent */
  --green:      #2DBE3C;   /* Green accent */
  --blue:       #0365C4;   /* Blue accent */
  --purple:     #5B2A8A;   /* Purple accent */
  
  --ink:        #1B1B2E;   /* near-black indigo ink, primary text */
  --ink-soft:   #545468;   /* secondary text on white */
  --forest:     #372A7A;   /* deep indigo/purple from logo tail — brand primary */
  --forest-2:   #241B52;   /* darker indigo, footer/hero depth */
  --sage:       #F8F4FF;   /* soft lavender-tint alternating section */
  --sage-2:     #F0EAFA;
  --ivory:      #FFFFFF;   /* page ground — pure white */
  --paper:      #FFFFFF;

  /* Legacy color mappings for compatibility */
  --saffron:    var(--primary);
  --saffron-dk: var(--primary-dk);
  --saffron-tint: #FDE8DD;
  --gold:       var(--secondary);
  --gold-dk:    #D67A05;
  --gold-tint:  #FDF0D9;
  --leaf:       var(--green);
  --leaf-dk:    #1F8A2C;
  --leaf-tint:  #E3F1E2;
  --blue:       var(--blue);
  --blue-dk:    #024A94;
  --blue-tint:  #E5EEF8;
  --violet:     var(--purple);
  --violet-dk:  #421F66;
  --violet-tint: #EEE6F7;
  --indigo:     #2E3B8C;

  --line:       #E7E5EF;
  --line-dark:  rgba(255,255,255,0.14);

  /* --- Type --- */
  --font-display: "Fraunces", "Iowan Old Style", "Georgia", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* --- Radii / shadow / motion --- */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(22,38,31,0.08);
  --shadow-md: 0 8px 30px rgba(22,38,31,0.10);
  --shadow-lg: 0 24px 60px rgba(22,38,31,0.16);
  --ease: cubic-bezier(.22,.61,.36,1);

  --container: 1240px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  font-size: 16px;
}
img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
button{ font-family: inherit; cursor:pointer; }
input, textarea, select{ font-family: inherit; }

h1,h2,h3,h4{
  font-family: var(--font-display);
  color: var(--forest-2);
  margin: 0 0 0.4em;
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-weight: 600;
}

:focus-visible{
  outline: 2.5px solid var(--secondary);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-dk);
}
.eyebrow::before{
  content:"";
  width: 20px; height: 1.5px;
  background: var(--primary);
  display:inline-block;
}

.section{ padding: 96px 0; }
.section--tight{ padding: 64px 0; }
.section--sage{ background: var(--sage); }
.section--forest{ background: var(--forest-2); color: #EDEFE7; }
.section--forest h2, .section--forest h3{ color: #F5F2E7; }

.section-head{
  max-width: 680px;
  margin-bottom: 52px;
}
.section-head h2{ font-size: clamp(28px, 3.4vw, 42px); }
.section-head p{
  color: var(--ink-soft);
  font-size: 17px;
  margin-top: 14px;
}
.section--forest .section-head p{ color: #C8C4E0; }

.section-head--split{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  transition: background .22s var(--ease), color .22s var(--ease), border-color .22s var(--ease), transform .22s var(--ease), box-shadow .22s var(--ease);
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary{
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(241,97,11,0.28);
}
.btn-primary:hover{
  background: var(--primary-dk);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(205,20,23,0.36);
}
.btn-primary:active{ transform: translateY(0); }

.btn-outline{
  background: transparent;
  border-color: var(--forest-2);
  color: var(--forest-2);
}
.btn-outline:hover{
  background: var(--forest-2);
  color: #fff;
  border-color: var(--forest-2);
}
.section--forest .btn-outline{ color:#F5F2E7; border-color:#F5F2E7; }
.section--forest .btn-outline:hover{ background:#F5F2E7; color:var(--forest-2); }

/* Reliance-style underline text CTA */
.btn-text{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #fff;
  padding-bottom: 6px;
  border-bottom: 1.5px solid rgba(255,255,255,0.55);
  transition: border-color .2s var(--ease), gap .2s var(--ease), opacity .2s var(--ease);
}
.btn-text:hover{ border-color:#fff; gap:12px; opacity:1; }
.btn-text svg{ width:13px; height:13px; transition: transform .2s var(--ease); }
.btn-text:hover svg{ transform: translateX(2px); }
.btn-text--dark{ color: var(--forest-2); border-color: rgba(36,27,82,0.4); }
.btn-text--dark:hover{ border-color: var(--forest-2); }

.btn-ghost{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--forest);
  letter-spacing: 0.01em;
  border-bottom: 1.5px solid transparent;
  padding-bottom: 2px;
  transition: border-color .2s var(--ease), gap .2s var(--ease), color .2s var(--ease);
}
.btn-ghost:hover{ border-color: var(--primary); color: var(--primary); gap: 12px; }
.btn-ghost svg{ width:15px; height:15px; }

.btn-sm{ padding: 10px 20px; font-size: 13.5px; }

/* --- Utility --- */
.visually-hidden{
  position:absolute; width:1px;height:1px; margin:-1px; padding:0;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
.skip-link{
  position:absolute; left:16px; top:-60px;
  background:var(--forest); color:#fff; padding:12px 20px;
  border-radius: 8px; z-index: 999; transition: top .2s var(--ease);
  font-weight:600; font-size:14px;
}
.skip-link:focus{ top:16px; }

::selection{ background: var(--secondary); color:var(--forest-2); }

/* --- Mobile Header Actions Layout --- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px; /* Space between Donate button and Hamburger */
}

/* --- Fix the hamburger button size and alignment --- */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  width: 44px;   /* Touch-friendly hit area */
  height: 44px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.menu-toggle:hover {
  background: rgba(0,0,0,0.05);
}

.menu-toggle svg {
  width: 28px;
  height: 28px;
  stroke: #1a1a1a; /* Change to match your brand color */
}

/* --- Hide hamburger on desktop, show on mobile --- */
@media (min-width: 992px) { /* Adjust this breakpoint to match your nav breakpoint */
  .menu-toggle {
    display: none !important;
  }
}

@media (max-width: 991px) {
  .menu-toggle {
    display: flex !important;
  }
  
  /* Optional: On mobile, make the Donate button smaller to fit better */
  .header-actions .btn-primary {
    font-size: 14px;
    padding: 6px 16px;
  }
}

/* --- Make sure the mobile nav opens correctly --- */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: #ffffff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
  transition: right 0.3s ease;
  z-index: 9999;
  overflow-y: auto;
}

.mobile-nav.is-open {
  right: 0;
}

/* --- HIDE MOBILE NAV ON DESKTOP --- */
@media (min-width: 992px) { /* Make sure this matches your hamburger breakpoint */
  .mobile-nav {
    display: none !important;
  }
}

/* --- MOBILE NAVIGATION STYLES (Keeps it working on mobile) --- */
@media (max-width: 991px) {
  .mobile-nav {
    display: block;
    position: fixed;
    top: 0;
    right: -100%; /* Starts hidden off-screen */
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 9999;
    overflow-y: auto;
  }

  /* When the "is-open" class is added via JS, slide it in */
  .mobile-nav.is-open {
    right: 0;
  }
}