/* ==========================================================================
   Partnership for Public Accountability: site styles
   One file styles all pages. Read the table of contents, then jump to a section.

   CONTENTS
     1. Settings (colors, fonts, sizes)  <- change the look of the whole site here
     2. Base (page-wide defaults)
     3. Buttons
     4. Header and mobile menu
     5. Footer
     6. Sections (shared building blocks: themes, photo backgrounds, heroes)
     7. Home page sections
     8. Services page sections
     9. Team page sections

   Responsive rules sit right under the thing they change.
   Two breakpoints are used everywhere:
     tablet and below: max-width 1000px  (columns collapse to one)
     phone:            max-width 700px   (menu becomes a hamburger, buttons go full width)
   ========================================================================== */


/* 1. SETTINGS ============================================================ */
:root {
  /* Brand colors */
  --navy: #102742;   /* text, dark sections */
  --gold: #eec474;   /* buttons, gold sections */
  --blue: #20517f;   /* medium-blue sections */
  --wash: #f0f4f8;   /* pale blue-gray panels */

  /* Fonts (loaded from Google Fonts in each page's <head>) */
  --font-head: 'Libre Baskerville', Georgia, serif;
  --font-body: 'Almarai', system-ui, sans-serif;

  /* Text sizes: scale smoothly between phone and desktop */
  --text-h1: clamp(2.8rem, 1.45rem + 3.4vw, 4.15rem);
  --text-h2: clamp(2.08rem, 1.2rem + 2.3vw, 2.89rem);
  --text-h3: clamp(1.72rem, 1.2rem + 1.1vw, 2.26rem);
  --text-h4: 1.63rem;
  --text-lede: clamp(1.24rem, 1.1rem + 0.4vw, 1.42rem);   /* larger intro paragraphs */

  /* Spacing */
  --page-pad: clamp(23px, 4vw, 58px);    /* left/right edge of the page */
  --inset: clamp(23px, 7.85vw, 113px);   /* extra-indented sections */
  --section-y: 90px;                     /* top/bottom padding of big sections */
  --gutter: 66px;                        /* gap between columns */
}


/* 2. BASE ================================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 84px; }   /* in-page links stop below the sticky header */
body {
  margin: 0;
  background: #fff;
  color: var(--navy);
  font: 400 1rem/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  line-height: 1.056;
}
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); line-height: 1.14; }
h4 { font-size: var(--text-h4); line-height: 1.17; }

.lede { font-size: var(--text-lede); line-height: 1.5; }


/* 3. BUTTONS ============================================================= */
/* <a class="btn">           gold (default)
   <a class="btn btn--dark">  navy, for light backgrounds
   <a class="btn btn--ghost"> outlined, for dark backgrounds */
.btn {
  display: inline-block;
  min-height: 66px;
  padding: 24px 35px;
  border: 0;
  border-radius: 0;
  background: var(--gold);
  color: var(--navy);
  font: 400 1rem/1.1 var(--font-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { filter: brightness(0.95); }
.btn--dark  { background: var(--navy); color: #fff; }
.btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px #fff; }

@media (max-width: 700px) {
  .btn { width: 100%; }
}


/* 4. HEADER AND MOBILE MENU ============================================= */
.site-header {
  position: sticky;           /* stays at the top while scrolling */
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 var(--page-pad);
  background: #fff;
}
.site-title {
  max-width: 60%;
  font: 400 1.525rem/1.2 var(--font-head);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.site-nav { display: flex; align-items: center; gap: 36px; }
.site-nav a { text-decoration: none; }
.site-nav .btn { display: flex; align-items: center; width: auto; height: 48px; min-height: 0; padding: 0 28px; }

/* Hamburger button (phone only). js: assets/menu.js toggles .open on .site-nav */
.burger { display: none; width: 44px; height: 44px; padding: 10px; border: 0; background: none; cursor: pointer; }
.burger span,
.burger span::before,
.burger span::after { content: ""; display: block; position: relative; width: 24px; height: 2px; background: var(--navy); }
.burger span::before { position: absolute; top: -8px; }
.burger span::after  { position: absolute; top: 8px; }

@media (max-width: 700px) {
  .site-header { height: 64px; }
  .site-title { max-width: 68%; font-size: 1.2rem; }
  .burger { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 16px var(--page-pad) 28px;
    background: #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  }
  .site-nav.open { display: flex; }
}


/* Announcement banner (home page only; see assets/banner.js) */
.banner { position: relative; display: flex; align-items: center; justify-content: center; padding: 12px 56px; background: var(--gold); color: var(--navy); text-align: center; }
.banner[hidden] { display: none; }
.banner__text { margin: 0; font-size: 1rem; line-height: 1.4; }
.banner__text a { font-weight: 700; text-underline-offset: 3px; white-space: nowrap; }
.banner__close { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; color: inherit; font-size: 1.8rem; line-height: 1; cursor: pointer; }

/* 5. FOOTER ============================================================== */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 48px;
  padding: 28px var(--page-pad);
}
.site-footer h3 { margin: 0; font-size: 1.35rem; line-height: 1.2; }
.site-footer__about { margin: 0.3em 0 0; font-size: 0.95rem; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 28px; }
.site-footer__links ul { display: contents; margin: 0; padding: 0; list-style: none; }
.site-footer a { text-decoration: none; }


/* 6. SECTIONS (shared building blocks) =================================== */
/* Every band of the page is <section class="sec ...">. Pick a theme: */
.sec { position: relative; overflow: hidden; }
.sec--navy { background: var(--navy); color: #fff; }
.sec--blue { background: var(--blue); color: #fff; }
.sec--gold { background: var(--gold); color: var(--navy); }
.sec--navy a:not(.btn),
.sec--photo a:not(.btn) { color: #fff; }

/* Photo background: <section class="sec sec--photo"> with this as the first child:
   <div class="sec__photo"><img src="/assets/x.webp" alt=""></div>
   Darkness of the navy tint over the photo is --overlay (0 = none, 1 = solid), e.g.
   style="--overlay: .81" on the section. Default is .43. */
.sec--photo { background: var(--navy); color: #fff; }
.sec > *:not(.sec__photo) { position: relative; z-index: 1; }
.sec__photo { position: absolute; inset: 0; z-index: 0; }
.sec__photo img { width: 100%; height: 100%; object-fit: cover; }
.sec__photo::after { content: ""; position: absolute; inset: 0; background: var(--navy); opacity: var(--overlay, 0.43); }

/* Hero: the big band at the top of each page */
.hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 532px;
  padding: 54px var(--page-pad);
}
.hero h1,
.hero p { max-width: 601px; }
.hero p { margin-bottom: 2.4em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 20px; }
.hero__actions .btn { min-width: 230px; }          /* the two hero buttons match in width */
.hero__link { margin-top: 28px; font-weight: 700; text-underline-offset: 4px; }
.hero--faint .sec__photo img { opacity: 0.2; }      /* home: photo at 20% opacity */
.hero--faint .sec__photo::after { display: none; }
.hero--page { min-height: 305px; }                  /* inner-page hero (Services) */
.hero--page h1 { margin-bottom: 0.4em; }
.hero--page p { margin: 0; }
.hero--short { min-height: 226px; }                 /* title-only hero (Team) */
.hero--center { align-items: center; text-align: center; }
.hero--center h1 { max-width: none; margin: 0; }

@media (max-width: 700px) {
  .hero { min-height: 633px; }
  .hero--page { min-height: 252px; }
  .hero--short { min-height: 129px; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { min-width: 0; }
}


/* 7. HOME PAGE =========================================================== */

/* "Our experience" strip (under the hero) */
.experience { padding: 56px var(--page-pad) 60px; background: var(--wash); }
.experience h2 { margin-bottom: 0.9em; font-size: var(--text-h3); }
.experience__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.experience figure { display: flex; flex-direction: column; justify-content: space-between; gap: 20px; margin: 0; }
.experience blockquote { margin: 0; font: 400 1.2rem/1.4 var(--font-head); letter-spacing: -0.01em; }
.experience figcaption { font-size: 0.95rem; line-height: 1.4; }
.experience figcaption strong { display: block; }

/* Two-column text section ("When officials abuse their power...") */
.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 67px;
  align-items: start;
  padding: var(--section-y) var(--inset);
}

/* Three columns on gold ("What we offer") */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: var(--gutter); row-gap: 0; padding: 64px var(--page-pad); }
.pillars h2 { grid-column: 1 / -1; margin: 0 0 0.4em; }
.pillars h3 { margin-bottom: 0.4em; }

/* "How we help prosecutors": three cards over a photo */
.help__inner { padding: var(--section-y) var(--page-pad); }
.help__inner h2 { margin-bottom: 0.3em; }
.help .lede { max-width: 700px; margin-bottom: 2em; }
.help__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 2.6em; }
.help__cards article { padding: 28px; background: rgba(255, 255, 255, 0.07); }
.help__cards h4 { margin-bottom: 0.5em; }
.help__cards p { margin-bottom: 1.2em; }
.help__cards a { font-weight: 700; text-underline-offset: 4px; }

/* "Built by prosecutors" band */
.built-by {
  display: grid;
  grid-template-columns: 657px 434px;
  gap: 67px;
  align-content: center;
  align-items: start;
  justify-content: space-between;
  min-height: 594px;
  padding: var(--section-y) var(--page-pad);
}
.built-by p { font-size: var(--text-lede); line-height: 1.5; }

/* "Meet Our Experts": four cards */
.experts { padding: 70px var(--page-pad) 86px; }
.experts > h2 { margin-bottom: 1.2em; text-align: center; }
.expert-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.expert-card { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: 20px; background: var(--wash); }
.expert-card__head { display: flex; align-items: center; gap: 20px; width: 100%; }
.expert-card img { flex: none; width: 104px; height: 104px; border-radius: 50%; object-fit: cover; object-position: 50% 25%; }
.expert-card h3 { margin: 0 0 0.15em; font-size: var(--text-h3); line-height: 1.1; }
.expert-card .expert-card__role { margin: 0; font-size: 1.21rem; line-height: 1.4; }
.expert-card p { margin: 0; font-size: 1.21rem; line-height: 1.5; }

@media (max-width: 1000px) {
  .experience__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .split { grid-template-columns: 1fr; gap: 28px; padding: 26px var(--inset); }
  .pillars { grid-template-columns: 1fr; row-gap: 20px; }
  .pillars h2 { margin-bottom: 0; }
  .help__cards { grid-template-columns: 1fr; }
  .built-by { grid-template-columns: 1fr; gap: 28px; }
  .expert-cards { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .experience__grid { grid-template-columns: 1fr; }
}


/* "Support our work": text and cost list on the left, donation form on the right.
   To use the Zeffy embed, replace the <a class="btn"> inside .support__form with
   Zeffy's embed code (see README). Zeffy's script sizes the form to fit, so it never scrolls. */
.support { display: flex; flex-wrap: wrap; gap: 28px 56px; padding: var(--section-y) var(--page-pad); background: #fff; align-items: flex-start; border-top: 1px solid #d5dde6; }
.support > div:first-child { flex: 5 1 320px; }
.support__form { flex: 7 1 460px; min-width: 0; padding: 0; background: transparent; }

@media (max-width: 1000px) {
  .support { padding: 56px var(--page-pad); }
}


/* 8. SERVICES PAGE ======================================================= */

/* Case Assistance (blue, left) beside Training + Resources (white, right) */
.services-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: stretch; }
.services-layout__main { padding: 70px 60px 70px var(--page-pad); }
.services-layout__intro { margin-bottom: 2em; }
.services-layout__side { display: flex; flex-direction: column; gap: 56px; padding: 70px var(--page-pad) 70px 70px; }
.services-layout__side h2 { margin-bottom: 0.5em; }
.services-layout__side ul { margin: 0; padding-left: 1.4em; }
.services-layout__side li { margin-bottom: 0.8em; }

/* Dropdown list. Plain HTML <details>: no JavaScript. Add "open" to a
   <details> tag to make it start expanded. */
.accordion details { border-top: 1px solid rgba(255, 255, 255, 0.35); }
.accordion details:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.35); }
.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font: 400 var(--text-h4)/1.17 var(--font-head);
  letter-spacing: -0.02em;
  list-style: none;
  cursor: pointer;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; margin-left: 16px; font-family: var(--font-body); font-size: 1.6rem; }
.accordion details[open] summary::after { content: "–"; }
.accordion__body { padding: 0 0 24px; }
.accordion ul { margin: 0.6em 0 0; padding-left: 1.2em; }
.accordion li { margin-bottom: 0.6em; }

/* "Work with us" contact band */
.contact-cta { padding: var(--section-y) var(--page-pad); }
.contact-cta h2 { margin-bottom: 0.4em; }
.contact-cta .lede { max-width: 760px; margin: 0 0 2.2em; }
.contact-cta__steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); margin-bottom: 2.4em; }
.contact-cta__steps h3 { margin-bottom: 0.5em; font-size: var(--text-h4); line-height: 1.17; }
.contact-cta__steps p { margin: 0; }

@media (max-width: 1000px) {
  .services-layout { grid-template-columns: 1fr; }
  .services-layout__main { padding: 70px var(--page-pad); }
  .services-layout__side { padding: 26px var(--page-pad) 70px; }
  .contact-cta__steps { grid-template-columns: 1fr; gap: 28px; }
}


/* 9. TEAM PAGE =========================================================== */
/* One full bio. Photo on the right; add "bio-section--flip" to put it on the left. */
.bio-section {
  display: grid;
  grid-template-columns: 768px 490px;
  column-gap: var(--gutter);
  align-items: start;
  justify-content: space-between;
  padding: 122px var(--page-pad) 54px;
}
.bio-section h3 { grid-column: 1; grid-row: 1; margin: 0 0 0.6em; }
.bio-section__text { grid-column: 1; grid-row: 2; }
.bio-section__text p { margin-bottom: 1em; }
.bio-section img { grid-column: 2; grid-row: 2; width: 100%; height: auto; }
.bio-section--flip { grid-template-columns: 490px 768px; }
.bio-section--flip h3,
.bio-section--flip .bio-section__text { grid-column: 2; }
.bio-section--flip img { grid-column: 1; }

@media (max-width: 1000px) {
  /* phone/tablet order: photo, name, bio */
  .bio-section,
  .bio-section--flip { grid-template-columns: 1fr; row-gap: 0; padding: 53px var(--page-pad); }
  .bio-section img,
  .bio-section--flip img { grid-column: 1; grid-row: 1; aspect-ratio: 343 / 479; margin-bottom: 38px; object-fit: cover; }
  .bio-section h3,
  .bio-section--flip h3 { grid-column: 1; grid-row: 2; }
  .bio-section__text,
  .bio-section--flip .bio-section__text { grid-column: 1; grid-row: 3; }
}
