:root {
  --bg-dark: #0c0f0a;
  --oak-green: #2f5d3a;
  --oak-light: #e7efe9;
  --accent: #8fc29b;
  --text-main: #ffffff;
  --text-muted: #b8c2bb;
}
:root {
  /* Core Brand Palette */
  --brand-deep: #3A0063;    /* Royal Plum (Authority/Heritage) */
  --brand-saffron: #FFD000; /* Primary Action (Clarity/Urgency) */
  --brand-oak: #AD7340;     /* Natural Wood Tone (Reliability) */
  --brand-alert: #FF4D29;   /* High-Contrast Warning/Sales Trigger */
  --brand-bright: #FFFFFF;  /* Pure Canvas */

  /* Plum Tints & Shades */
  --plum-900: #210038;
  --plum-700: #3A0063; /* Base */
  --plum-500: #5E2587;
  --plum-100: #F5F0FA;

  /* Saffron Tints & Shades */
  --saffron-900: #CCA600;
  --saffron-500: #FFD000; /* Base */
  --saffron-100: #FFF9E0;

  /* Oak Tints & Shades */
  --oak-800: #7A512D;
  --oak-500: #AD7340; /* Base */
  --oak-100: #F7F1EB;

  /* Alert Tints & Shades */
  --alert-700: #CC3D20;
  --alert-500: #FF4D29; /* Base */
  --alert-100: #FFEBE8;

  /* UI Neutral Grays (Essential for Balance) */
  --neutral-900: #1A1A1A;
  --neutral-400: #A3A3A3;
  --neutral-100: #F4F4F4;

  /* Text & Content Roles */
  --text-main: #1A1A1B;     /* Off-black for better readability than pure black */
  --text-muted: #575757;    /* For secondary info/subtitles */
  --text-on-dark: #FFFFFF;  /* For use on Purple or Oak backgrounds */
  --text-accent: #3A0063;   /* Using the Purple for emphasized text */

  /* UI Functional Roles */
  --bg-main: var(--brand-bright);
  --bg-offset: #F9F7F2;      /* A slight "parchment" off-white for sections */
  --border-subtle: rgba(58, 0, 99, 0.1); /* Transparent purple border */
  
  /* Shadow Systems (Architectural Depth) */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 40px rgba(58, 0, 99, 0.12); /* Purple-tinted shadow */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
   
  background: var(--bg-dark);
  color: var(--text-main);
  /* padding-bottom: 70px; */
}

html {
  scroll-behavior: smooth;
}


.container {
    max-width: 1440px;
    margin: 0 auto;
    /* 20px on mobile, scales up to 40px on desktop */
    padding: 0 clamp(20px, 5vw, 40px); 
}

/* --- NAVBAR ONE --- */

#mighty-top-bar {
  background-color: var(--brand-saffron); 
  padding: 8px 0;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.mighty-top-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

/* Social Icons Section */
.mighty-top-socials {
  display: flex;
  gap: 15px;
}

.mighty-top-socials a {
  color: var(--brand-deep);
  text-decoration: none;
  font-size: 18px;
  letter-spacing: 1px;
  transition: opacity 0.3s;
}

.mighty-top-socials a:hover {
  opacity: 0.7;
}

/* Middle Text Section */
.mighty-top-middle p {
  margin: 0;
    color: var(--brand-deep); 
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Right Call Section */
.mighty-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mighty-top-right a {
color: var(--brand-deep); 
}

  

.mighty-phone-link {
  color: #1B3022;
  text-decoration: none;
}

.mighty-phone-link:hover {
  text-decoration: underline;
}

/* RESPONSIVE: Hide on Mobile */
@media (max-width: 768px) {
  #mighty-top-bar {
    display: none;
  }
}

/* --- NAVBAR TWO  --- */
#nav-2 {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* padding: 0 20px; */
  /* Use fluid padding so it matches your 1440px container logic */
  padding: 0 clamp(20px, 5vw, 80px);
  background-color: var(--brand-deep);
  z-index: 1000;
  height: 120px; /* Consistent height is better for layout stability */
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;

  /* Fluid Vertical Padding: 
     On mobile, it's 10px. On desktop, it scales up to 40px. */
  padding-top: clamp(10px, 3vh, 40px);
  padding-bottom: clamp(10px, 3vh, 40px);
  
  transition: all 0.3s ease;
}

.logo img {
  /* Your existing responsive fix */
  height: clamp(50px, 5vw, 75px); 
  width: auto;
  display: block; /* Removes tiny extra space at bottom of images */
  image-rendering: -webkit-optimize-contrast;
}

.logo h3 {
  margin-left: 10px;
  color: #111;
  text-decoration: none;
  font-size: 28px;
  font-family: Inter;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a {
  display: block;
  padding: 10px 16px; /* Reduced vertical padding for better centering */
  color: var(--brand-bright); /* High contrast against Plum */
  text-decoration: none;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  font-weight: 600;
  transition: all ease-in-out 200ms;
  border-radius: 4px;
}

.nav-links a:hover {
  background-color: rgba(173, 115, 64, 0.2); /* Subtle Oak tint instead of solid block */
  color: var(--plum-100);
}

.nav-links .nav-cta-button {
  padding: 10px 22px;
  margin-left: 16px;
  border: var(--brand-saffron) solid 2px;
  border-radius: 50px;
  color: var(--brand-bright);
  transition: 0.3s;
}

.nav-links .nav-cta-button:hover {
  background-color: var(--brand-saffron);
  color: white;
}

.hamburger {
  display: none;
  cursor: pointer;
  width: 34px;
  height: 24px;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger .bar {
  width: 100%;
  height: 4px;
  background-color: #111;
  transition: transform 0.3s ease, opacity 0.2s ease;
}



/*Animate Hamburger Menu*/
.hamburger.active .bar:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* .overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.overlay.active {
  opacity: 1;
  pointer-events: all;
} */

/* --- THE BLUR LAYER --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 15, 10, 0.6); /* Use your --bg-dark with transparency */
    
    /* The Blur Effect */
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); /* Safari Support */
    
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, backdrop-filter 0.4s ease;
    z-index: 998; /* Sits below Nav Links (1000) */
}

.overlay.active {
    opacity: 1;
    pointer-events: all; /* Allows clicking outside to close */
}

/* --- THE BODY LOCK --- */
/* We add this class via JS to prevent the background from shifting */
body.no-scroll {
    overflow: hidden;
    height: 100vh;
    touch-action: none; /* Disables scroll on mobile touch */
}



/*Responsive Design*/

/* Tablet & Mobile Breakpoint (992px) */
@media (max-width: 992px) {
  .hamburger {
    display: flex; /* Show hamburger */
    z-index: 1001;
  }

  .logo {
    /* Tighten it up for mobile so it doesn't eat the whole screen */
    padding: 10px 0;
    margin: 0;
  }
  
  .logo img {
    height: 70px; /* Scaled down for mobile devices */
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%; /* Hidden off-screen */
    height: 100vh;
    width: 80%; /* Takes up most of the screen */
    max-width: 400px;
    background-color: var(--brand-deep);
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    z-index: 1000;
    transition: 0.4s ease-in-out;
  }

  .nav-links.active {
    right: 0; /* Slides in */
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
  }

  .nav-links a {
    font-size: 20px; /* Larger tap targets for mobile */
    padding: 20px 0;
    width: 100%;
    text-align: center;
  }

  .nav-links .nav-cta-button {
    margin: 20px 0;
    width: 100%;
  }
}

@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
  }

  /* .hamburger {
    display: flex;
    margin: 0 1rem;
  } */

  /* Ensure the hamburger stays visible on top of the menu */
  .hamburger {
    display: flex;
    position: relative;
    z-index: 1001; 
    margin: 0 1rem;
  }

  .logo {
    height: 80px;
    margin: 0 1rem;
  }

  /* .nav-links {
    display: none;
    flex-basis: 100%;
    flex-wrap: wrap;
  
    flex-direction: column;   
    align-items: center;       
    padding: 20px 0;
  } */

  /* .nav-links {
    display: none;        
    flex-basis: 100%;     
    flex-direction: column; 
    align-items: center;  
    margin: 0;            
    padding: 20px 0;     
    list-style: none;
    width: 100%;
  } */


  .nav-links {
    display: flex;            /* Always flex, but hidden via transform */
    flex-direction: column;
    align-items: center;
    justify-content: center;  /* Centers links vertically in the menu */
    
    /* THE FIX: Absolute Positioning */
    position: fixed;
    top: 0;
    right: -100%;            /* Starts off-screen to the right */
    width: 80%;              /* Menu width (leaves room to click overlay) */
    height: 100vh;           /* Full screen height */
    
    background-color: var(--plum-500); 
    z-index: 1000;           /* Must be higher than overlay */
    transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    list-style: none;
    margin: 0;
  }

  /* When open, slide it in */
  .nav-links.open {
  display: flex;
  right: 0;
  }


/* 

  .nav-links li {
    flex-basis: auto;          
    width: 100%;           
  } */

  .nav-links li {
    width: 100%;          /* Ensures the full width is clickable */
    text-align: center;
  }

  /* .nav-links a {
    text-align: center;
    font-size: 28px;
  } */

  /* .nav-links a {
    text-align: center;
    padding: 15px 0;          
    width: 100%;
  } */

  .nav-links a {
    display: inline-block;
    padding: 15px 0;      /* Better spacing for thumb-tapping */
    width: 100%;
    font-size: 24px;
  }

    .nav-links a:hover {
      background-color: var(--saffron-900);
    }

    .nav-links .nav-cta-button {
      padding: 30px 16px;
      margin-left: 0;
      border: none;
      border-radius: 0;
      margin-bottom: 20px;
    }

    
    .nav-links .nav-cta-button:hover {
      background-color: var(--plum-700);
    }
}

@media (max-width: 768px) {
  .logo img {
    height: 80px; /* Slightly smaller for mobile headers */
  }
}





/* WIDGET */

/* =========================================================
   WIDGET
========================================================= */


:root {
  --oak-green: #1B3022;
  --oak-green-soft: #223a2a;
  --oak-gold: #C6A664;
  --oak-gold-soft: rgba(198,166,100,0.15);
  --oak-white: #F9F7F2;

  --panel-shadow:
    0 30px 60px rgba(0,0,0,0.18),
    0 8px 18px rgba(0,0,0,0.12);
}

/* =========================================================
   FLOATING TRIGGER
========================================================= */
#mighty-a11y-trigger {
  position: fixed;
  bottom: 22px;
  left: 22px;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--oak-green), var(--oak-green-soft));
  color: var(--oak-gold);
  border: 1px solid rgba(198,166,100,0.6);
  cursor: pointer;
  z-index: 10002;
  font-size: 1.6rem;
  box-shadow: var(--panel-shadow);

  display: none;
  align-items: center;
  justify-content: center;

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#mighty-a11y-trigger:hover {
  transform: translateY(-3px);
}

/* =========================================================
   PANEL (CLOSED BY DEFAULT)
========================================================= */
#mighty-a11y-panel {
  position: fixed;
  bottom: 90px;
  left: 22px;
  width: 340px;
  max-height: calc(100vh - 140px);

  display: none;
  flex-direction: column;

  background: var(--oak-white);
  border-radius: 18px;
  box-shadow: var(--panel-shadow);
  z-index: 10003;
  overflow: hidden;

  font-family: 'Inter', system-ui, sans-serif;
}

/* OPEN STATE */
#mighty-a11y-panel.open {
  display: flex;
  animation: fadeSlideUp 0.35s ease;
}

/* =========================================================
   ANIMATION
========================================================= */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   HEADER
========================================================= */
.mighty-a11y-header {
  background: linear-gradient(145deg, var(--oak-green), #16261c);
  color: #fff;
  padding: 16px 20px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mighty-a11y-header h3 {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}

#mighty-a11y-close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.85);
  font-size: 1.3rem;
  cursor: pointer;
}

/* =========================================================
   CONTENT
========================================================= */
.mighty-a11y-content {
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* =========================================================
   BUTTONS
========================================================= */
.a11y-btn {
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  padding: 10px 12px;
  min-height: 44px;

  display: flex;
  align-items: center;
  gap: 8px;

  font-size: 0.78rem;
  font-weight: 600;
  color: var(--oak-green);
  cursor: pointer;

  transition: background 0.2s ease, border 0.2s ease, transform 0.15s ease;
}

.a11y-btn::before {
  content: "▸";
  color: var(--oak-gold);
}

.a11y-btn:hover {
  background: var(--oak-gold-soft);
  border-color: var(--oak-gold);
  transform: translateY(-1px);
}

.a11y-btn.active,
.a11y-btn[aria-pressed="true"] {
  background: linear-gradient(145deg, var(--oak-green), var(--oak-green-soft));
  color: #fff;
  border-color: var(--oak-green);
}

.a11y-btn.reset {
  background: #fff5f5;
  border-color: #e6bcbc;
}

/* =========================================================
   ACCESSIBILITY STATES
========================================================= */
body.high-contrast {
  background: #000 !important;
  color: #fff !important;
}

body.larger-text {
  font-size: 125%;
}

body.spaced-text {
  line-height: 1.8;
  letter-spacing: 0.05em;
}

body.dyslexia-font {
  font-family: Arial, Helvetica, sans-serif !important;
}

body.pause-animations * {
  animation: none !important;
  transition: none !important;
}

body.highlight-links a,
body.highlight-links button {
  outline: 3px solid var(--oak-gold);
  outline-offset: 4px;
}

/* =========================================================
   FOCUS
========================================================= */
:focus-visible {
  outline: 3px dashed var(--oak-gold);
  outline-offset: 4px;
}

/* =========================================================
   REDUCED MOTION
========================================================= */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}


/* =========================================================
PROGRESS BAR
========================================================= */
/* =========================================================
   SCROLL PROGRESS SYSTEM
   JS updates: --scroll-progress (0% → 100%)
========================================================= */

:root {
  --scroll-progress: 0%;
  --progress-height: 6px;

  --progress-bg: rgba(0,0,0,0.08);
  --progress-fill: linear-gradient(
    90deg,
    #1B3022,
    #C6A664
  );

  --progress-shadow:
    0 2px 6px rgba(0,0,0,0.25);
}

/* =========================================================
   PROGRESS BAR CONTAINER
========================================================= */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;

  width: 100%;
  height: var(--progress-height);

  background: var(--progress-bg);
  z-index: 99999;
  pointer-events: none;
}

/* =========================================================
   PROGRESS FILL
========================================================= */
.scroll-progress::before {
  content: "";
  display: block;

  height: 100%;
  width: var(--scroll-progress);

  background: var(--brand-saffron);
  box-shadow: var(--progress-shadow);

  transition: width 0.15s linear;
}

/* =========================================================
   READING MODE ENHANCEMENT
========================================================= */
body.reading-guide .scroll-progress {
  height: 8px;
}

body.reading-guide .scroll-progress::before {
  background: var(--brand-saffron);
  
}

/* =========================================================
   HIGH CONTRAST SUPPORT
========================================================= */
body.high-contrast .scroll-progress {
  background: #000;
}

body.high-contrast .scroll-progress::before {
  background: #fff;
}

/* =========================================================
   REDUCED MOTION SUPPORT
========================================================= */
@media (prefers-reduced-motion: reduce) {
  .scroll-progress::before {
    transition: none;
  }
}

/* =========================================================
   MOBILE SAFE AREA (iOS NOTCH)
========================================================= */
@supports (padding: env(safe-area-inset-top)) {
  .scroll-progress {
    padding-top: env(safe-area-inset-top);
  }
}



/* =========================================================
--- Back to Top Button ---
========================================================= */


#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 55px; /* Matches widget size */
    height: 55px; /* Matches widget size */
    background-color: var(--plum-500);
    color: var(--brand-saffron);
    border: 2px solid var(--brand-saffron);
    border-radius: 12px; /* Soft-square matching the widget */
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    display: none; /* Controlled by your JS scroll logic */
    z-index: 10002;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

#back-to-top:hover {
    background-color: var(--brand-deep);
    transform: translateY(-5px) scale(1.1); /* Lifts up on hover */
    color: #fff;

}
