:root {
  /* BRAND COLORS */

  /* THE STRONG YELLOW */
  --site-yellow-start: #f2bd1d;

  /* Slate Blue (Used for accents lower down) */
  --slate-blue: #4a6c8a;

  /* Text Colors */
  --ink: #1a2633;
  --warm-white: #fcfbf9;
  --white: #ffffff;
  --border: #dde4e4; /* Slightly lighter border */

  /* Sky Light (for footer/accents) */
  --sky-light: #eef4f8;
}

/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth; /* CSS-only smooth scrolling */
}

body {
  margin: 0;
  font-family: "Nunito Sans", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--ink);
  line-height: 1.6;

  /* GRADIENT: Strong Yellow Top -> Fades to Warm Off-White */
  background: linear-gradient(
    to bottom,
    var(--site-yellow-start) 0vh,
    var(--site-yellow-start) 30vh,   /* Holds the strong yellow longer */
    var(--warm-white) 100vh
  );
  background-attachment: scroll;
  position: relative;
  z-index: 0;
}

/* ---------------------- */
/* BIG LOGO SECTION       */
/* ---------------------- */

.hero-logo-section {
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1rem 2rem;
  text-align: center;
  overflow: visible;
}

.hero-logo {
  width: min(60vw, 420px);
  height: auto;
  display: block;
  margin: 0 auto 1.5rem;
}

.hero-logo-section .eyebrow {
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.72rem;
  opacity: 0.9;
  color: var(--white); /* Off-white text */
  font-weight: 700;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1); /* Subtle shadow for readability */
}

/* ---------------------- */
/* HEADER + NAV           */
/* ---------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: transparent;
  backdrop-filter: none;
  border-bottom: none;
  transition: background 0.3s ease, border-bottom 0.3s ease, backdrop-filter 0.3s ease;
  overflow: visible;
}

body.scrolled .site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(74, 108, 138, 0.1);
}

.logo-row {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center; /* Centered by default for desktop */
  position: relative;
}

/* NAV LINKS */

.main-nav {
  display: flex;
  gap: 1.4rem;
  font-size: 0.9rem;
  text-transform: lowercase;
  justify-content: center;
}

.main-nav a {
  text-decoration: none;
  color: var(--white); /* White text initially */
  opacity: 0.9;
  font-weight: 500; /* Not bold */
  position: relative;
  transition: color 0.25s ease, opacity 0.25s ease;
  text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 1px;
  background: var(--white);
  transition: width 0.2s ease, background 0.25s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

/* When scrolled, switch to YELLOW */
body.scrolled .main-nav a {
  color: var(--site-yellow-start);
  text-shadow: none;
}
body.scrolled .main-nav a::after {
  background: var(--site-yellow-start); 
}

/* Default State: Nav Toggle is HIDDEN on desktop */
.nav-toggle {
  display: none; 
  flex-direction: column;
  gap: 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 30; 
  transition: transform 0.3s ease; 
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--white); /* White hamburger initially */
  transition: background 0.25s ease;
}

/* When scrolled (but menu closed): Blue */
body.scrolled .nav-toggle span {
  background: var(--slate-blue);
}

/* When Open (even if scrolled): Turn YELLOW */
body.menu-open .nav-toggle span {
    background: var(--site-yellow-start) !important;
}

/* ---------------------- */
/* HERO TEXT SECTION      */
/* ---------------------- */

.hero {
  background: transparent;
  color: var(--ink);
  padding: 4.5rem 1.5rem 6rem;
  position: relative;
  overflow: visible;
}

/* TOP BRAIN (unchanged from your original) */
.hero::before {
  content: "";
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 170%;
  background-image: url('assets/brain.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  filter: opacity(0.1) grayscale(100%) brightness(1);
  pointer-events: none;
  z-index: -1;
}

.hero-content {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.1rem);
  line-height: 1.1;
  margin: 0.4rem 0 1.2rem;
  color: var(--white); /* Headline is now White */
  text-shadow: 0 1px 4px rgba(0,0,0,0.08); /* Slight shadow to pop off yellow */
}

.hero-subtitle {
  font-size: 1.05rem;
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
  color: var(--ink); /* Keep subtitle dark for readability */
  opacity: 0.85;
}

.hero-actions {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
}

/* ---------------------- */
/* BUTTONS                */
/* ---------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn.primary {
  background: var(--slate-blue);
  color: var(--white);
  box-shadow: 0 8px 16px rgba(74, 108, 138, 0.2);
}

.btn.primary:hover {
  transform: translateY(-1px);
  background: #3a5670;
  box-shadow: 0 12px 20px rgba(74, 108, 138, 0.3);
}

.btn.ghost {
  background: transparent;
  color: var(--slate-blue);
  border-color: rgba(74, 108, 138, 0.3);
}

.btn.ghost:hover {
  background: rgba(74, 108, 138, 0.05);
  border-color: var(--slate-blue);
}

/* ---------------------- */
/* SECTIONS               */
/* ---------------------- */

.section {
  padding: 3rem 1.5rem;
  background-color: rgba(252, 251, 249, 0.7); /* warm-white but slightly translucent */
}

#services {
  background: transparent; /* Services sits on the gradient */
  overflow: visible;
}

/* Make the "Services" specific H2 Blue */
#services h2 {
    color: var(--slate-blue);
}

/* Make subheadings in Approach Blue */
#approach h3 {
    color: var(--slate-blue);
    margin-top: 0;
    font-size: 1.1rem;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr);
  gap: 2.8rem;
  align-items: center; 
}

/* Styles for the LEFT COLUMN in the approach section */
#approach .two-column > div:first-child {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center; 
}

#approach h2 {
    position: relative;
    z-index: 1;
    margin-bottom: 0.5rem;
}

/* Alternating panel feel via slightly different white */
/* LOWER alpha so more brain shows through in white sections */
.section-alt {
  background-color: rgba(255, 255, 255, 0.7);
}

.container {
  max-width: 1040px;
  margin: 0 auto;
}

/* --- GENERAL H2 STYLES --- */
.section h2 {
  font-size: clamp(1.3rem, 5vw, 1.8rem);
  margin-top: 0;
  color: var(--slate-blue); 
  letter-spacing: 0.02em; 
  text-transform: lowercase;
  font-weight: 700;
  text-align: left; 
}

/* ---------------------- */
/* LOWER CONTENT WRAPPER  */
/* (ABOUT ↓ brain overlay)*/
/* ---------------------- */

#lower-content-background-wrapper {
  position: relative;
  z-index: 0;
  overflow: visible; /* let the brain bleed up a bit */
}

#lower-content-background-wrapper {
  position: relative;
  z-index: 0;
  overflow: visible;

  /* Brain background for everything from about → footer */
  background-image:
    /* soft white fade over the brain so it’s not too loud at the top */
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.2) 20%,
      rgba(255, 255, 255, 0.6) 60%,
      rgba(255, 255, 255, 0.85) 100%
    ),
    url('assets/brain copy 2.png');  /* already rotated asset */

  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

/* ---------------------- */
/* BIO SECTION            */
/* ---------------------- */

#bio {
  position: relative;
  overflow: hidden;
  background: ; 
  
}

.bio-section-container {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: center;
}

.bio-text {
  flex: 1 1 400px;
}

.bio-image {
  flex: 1 1 300px;
  display: flex;
  justify-content: center;
}

.bio-image img {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
  border-radius: 20px;
  box-shadow:
    20px 20px 0px rgba(74, 108, 138, 0.5),
    40px 40px 0px rgba(242, 189, 29, 0.5);
}

/* ---------------------- */
/* CARDS                  */
/* ---------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.6rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--white);
  border-radius: 16px;
  padding: 1.6rem 1.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(74, 108, 138, 0.06);
}

.card {
  position: relative;
  z-index: 1;   /* FORCE cards to sit above the brain graphic */
}

.card h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--slate-blue);
}

/* ---------------------- */
/* CONTACT FORM & FEES    */
/* ---------------------- */

.bullet-list li {
    margin-bottom: 0.5rem;
}

.note {
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.7);
  margin-bottom: 1.2rem;
}

.contact-form {
  margin-top: 1.2rem;
  padding: 1.4rem 1.4rem 1.6rem;
  border-radius: 16px;
  background: var(--sky-light);
  border: 1px solid var(--border);
}

/* ---------------------- */
/* FOOTER                 */
/* ---------------------- */

.site-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: var(--sky-light);
  padding: 1.3rem 1.5rem 1.6rem;
  font-size: 0.83rem;
  color: var(--ink);
}

.footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
}

.footnote {
  opacity: 0.7;
}

/* ---------------------- */
/* RESPONSIVE             */
/* ---------------------- */

@media (max-width: 768px) {
  .two-column {
    grid-template-columns: 1fr;
  }

  #lower-content-background-wrapper::before {
    top: -160px;              /* a bit less shift on small screens */
    opacity: 0.35;            /* softer overall on mobile */
    mask-image: none;
    -webkit-mask-image: none; /* show the image without fancy fade on mobile */
  }

  /* Center H2s on mobile */
  .section h2 {
    text-align: center;
  }

  .desktop-text {
    display: none;
  }

  .nav-toggle {
    display: none;
  }

  .main-nav {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.75rem;
    width: 100%;
  }
  
  .main-nav a {
    color: var(--white);
    opacity: 1;
    font-weight: 500;
  }

  body.scrolled .nav-toggle {
    display: flex;
    margin: 0.5rem auto;
  }
  
  body.scrolled .main-nav {
    display: none;
  }

  body.scrolled .main-nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; 
    right: 0;
    background: var(--white);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1.5rem 2rem;
    gap: 1.2rem;
    font-size: 1.1rem;
    max-height: 400px; 
    opacity: 1;
    pointer-events: auto;
  }

  body.scrolled .main-nav.open a {
    color: var(--site-yellow-start);
    font-weight: 500;
    text-shadow: none;
  }

  body.menu-open .nav-toggle {
    transform: rotate(90deg);
  }
}