/* =========================================================
   Shared stylesheet
   One file, used by every page, so styling only lives once.
   ========================================================= */

:root {
  /* Colour tokens */
  --color-bg: #FBF7EF;        /* warm cream, easier on the eye than white */
  --color-bg-band: #E9EFE5;   /* soft sage for alternating sections */
  --color-ink: #2E2B26;       /* soft black body text */
  --color-ink-soft: #5B564D;  /* secondary text */
  --color-primary: #3C6E71;   /* calm teal - links, buttons */
  --color-primary-dark: #274C4E;
  --color-heading: #274C4E;   /* headings/active text - separate from primary-dark's background role */
  --color-accent: #C98A3E;    /* warm ochre - the "highlighter" signature */
  --color-border: #DDD3BE;
  --color-surface: #FFFFFF;

  /* Type tokens */
  --font-display: 'Lexend', Verdana, Tahoma, sans-serif;
  --font-body: 'Lexend', Verdana, Tahoma, sans-serif;

  /* Spacing / shape */
  --radius: 14px;
  --max-width: 920px;
  --text-scale: 1; /* changed by the A/A+/A++ control */
  --shadow-soft: 0 10px 30px rgba(39, 76, 78, 0.12);
  --shadow-card: 0 2px 10px rgba(39, 76, 78, 0.06);
  --header-height: 120px;
}

:root[data-theme="dark"] {
  --color-bg: #1D1A16;
  --color-bg-band: #262B22;
  --color-ink: #F2EEE6;
  --color-ink-soft: #BFB9AC;
  --color-primary: #6FB3B6;
  --color-accent: #E3A85C;
  --color-border: #3A362E;
  --color-surface: #262320;
  --color-heading: #8FD3D6;
}

/* Gentle colour overlays - some readers with visual stress find a
   pale blue or pink background more comfortable than white/cream. */
:root[data-theme="blue"] {
  --color-bg: #E9F1F8;
  --color-bg-band: #DCE7F1;
  --color-border: #C4D6E4;
  --color-surface: #F4F9FC;
}
:root[data-theme="pink"] {
  --color-bg: #FBEEF2;
  --color-bg-band: #F6E1E7;
  --color-border: #E9C7D1;
  --color-surface: #FDF6F8;
}

* { box-sizing: border-box; }

blockquote { margin: 0; }

html {
  font-size: calc(100% * var(--text-scale));
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 12px);
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.65;
  transition: background-color 0.2s ease, color 0.2s ease;
}

img { max-width: 100%; display: block; }

/* Never justify text - ragged right edges are easier to track */
p, li { text-align: left; max-width: 68ch; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-heading);
  line-height: 1.25;
  font-weight: 600;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.2rem; }

/* Signature element: a left accent bar marking headings that start
   a section. */
.section-title {
  border-left: 5px solid var(--color-primary);
  padding-left: 0.7em;
}

a {
  color: var(--color-primary);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { color: var(--color-heading); }

/* Clear, chunky focus ring for keyboard users */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-primary-dark);
  color: #fff;
  padding: 0.75em 1.25em;
  border-radius: 0 0 8px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.75rem;
}

.band { padding: 2.75rem 0; }
.band--alt { background: var(--color-bg-band); }
.band--dark {
  background: var(--color-primary-dark);
  color: #F3EFE4;
}
.band--dark h2 { color: #F3EFE4; }
.band--dark .section-title { border-left-color: #fff; }

.button {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  background: var(--color-primary);
  color: #fff;
  padding: 0.8em 1.5em;
  border-radius: var(--radius);
  text-decoration: none;
  border: none;
  font-size: 1.05rem;
  cursor: pointer;
}
.button:hover { background: var(--color-primary-dark); color: #fff; }
.button--ghost {
  background: transparent;
  color: var(--color-heading);
  border: 2px solid var(--color-heading);
}
.button--ghost:hover { background: var(--color-primary-dark); color: #fff; }
.band--dark .button--ghost { color: #fff; border-color: #fff; }
.band--dark .button--ghost:hover { background: #fff; color: var(--color-primary-dark); }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

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

/* Expandable boxes share a grid row's height, so an open one makes
   closed neighbours stretch too. One per row avoids that. */
.card-grid--single {
  grid-template-columns: 1fr;
}

.testimonial-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card--expand {
  padding: 0;
  overflow: hidden;
}
.card--expand > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  cursor: pointer;
  list-style: none;
}
.card--expand > summary::-webkit-details-marker { display: none; }
.card--expand > summary h3 { margin: 0; }
.card--expand > summary::after {
  content: "+";
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-bg-band);
  color: var(--color-heading);
  font-size: 1.2rem;
  line-height: 1;
}
.card--expand[open] > summary::after { content: "\2212"; }
.card--expand > summary:hover::after,
.card--expand > summary:focus-visible::after {
  background: var(--color-primary);
  color: #fff;
}
.card--expand > p {
  margin: 0;
  padding: 0 1.5rem 1.5rem;
}

.credential-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1rem;
}
.credential-badge {
  width: auto;
  max-width: 200px;
  height: auto;
}

.placeholder-note {
  font-size: 0.95rem;
  color: var(--color-ink-soft);
  background: #FFF8E8;
  border: 1px dashed var(--color-accent);
  border-radius: 10px;
  padding: 0.75rem 1rem;
}

/* Credential badges - a compact, scannable strip instead of a long list */
.badge-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin: 1.25rem 0 0;
}
.badge-row li {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-heading);
  background: var(--color-bg-band);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.4em 0.9em;
  max-width: none;
}

/* ---------- Site header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: var(--header-height);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.brand__logo {
  height: 100px;
  width: auto;
}

/* Menu icon button, top right, on every page and every screen size */
.nav-icon-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.55em 0.9em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  min-height: 44px;
}
.nav-icon-btn:hover { background: var(--color-primary-dark); }
.nav-icon-btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.nav-icon-btn__label { }

/* Dropdown navigation panel, anchored under the icon */
.nav-panel {
  position: absolute;
  z-index: 95;
  top: calc(100% + 10px);
  right: 1.5rem;
  width: min(320px, calc(100vw - 2rem));
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  max-height: calc(100vh - var(--header-height) - 24px);
  overflow-y: auto;
}
.nav-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-link {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--color-ink);
  padding: 0.7em 0.6em;
  border-radius: 8px;
  border-left: 4px solid transparent;
}
.nav-link:hover { background: var(--color-bg-band); }
.nav-link.is-active {
  color: var(--color-heading);
  border-left-color: var(--color-accent);
  background: var(--color-bg-band);
}

.nav-panel__divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0.5rem 0.6rem;
}

.text-size,
.theme-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  padding: 0.3em 0.6em;
}
.text-size button,
.theme-toggle button {
  font-family: var(--font-body);
  background: var(--color-bg-band);
  border: 1px solid var(--color-border);
  border-radius: 7px;
  padding: 0.2em 0.5em;
  cursor: pointer;
  font-size: 0.8rem;
  min-height: 32px;
}
.text-size button:hover,
.theme-toggle button:hover { background: var(--color-accent); color: #fff; }
.theme-toggle button[aria-pressed="true"] {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.text-size__label,
.theme-toggle__label { font-size: 0.85rem; color: var(--color-ink-soft); }

/* Backdrop so a tap outside the panel closes it, and the page content
   is visually separated from the open menu */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(46, 43, 38, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s;
  z-index: 90;
}
.nav-backdrop.is-open { opacity: 1; visibility: visible; }

/* ---------- Hero ---------- */
.hero {
  padding-top: 2.75rem;
  padding-bottom: 2.25rem;
}
.hero-logo {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
.hero__lede {
  font-size: 1.25rem;
  color: var(--color-ink-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary-dark);
  color: #F3EFE4;
  margin-top: 2rem;
}
.site-footer a { color: #FFE9C7; overflow-wrap: anywhere; }
.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding: 2.5rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.site-footer h2 {
  color: #F3EFE4;
  font-size: 1.1rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer__bottom {
  text-align: center;
  font-size: 0.85rem;
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  color: #D9D2C0;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .nav-icon-btn__label { display: none; }
  h1 { font-size: 1.7rem; }
  .nav-panel { right: 1rem; left: 1rem; width: auto; }
}

/* Respect users who have asked for less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav-panel, .nav-backdrop { transition: none; }
}
