/* style.css controls how the page LOOKS.
   Each rule is: selector { property: value; } */

/* Design tokens: change these to re-theme the whole site */
:root {
  --page: #e6edf6;        /* soft blue-grey behind the panels */
  --panel: #d3e2f4;        /* soft blue panels (was white) */
  --mist: #e2ebf7;        /* pale blue panel */
  --navy: #132d4c;        /* deep navy panel */
  --blue: #2a5f9e;        /* accents, checks, links */
  --sky: #74aee3;         /* small status dots, accents on navy */
  --forest: #1e3b2c;      /* dark green panel (For young adults) */
  --ink: #13202f;         /* main text */
  --ink-soft: #4b5a6c;    /* secondary text */
  --on-dark: #eaf1fa;
  --on-dark-soft: #aec2da;
  --line: rgba(19, 32, 47, 0.12);
  --line-dark: rgba(234, 241, 250, 0.16);

  --font-head: "Outfit", system-ui, sans-serif;
  --font-body: "Work Sans", system-ui, sans-serif;

  --radius-panel: 28px;
  --radius-photo: 20px;
  --radius-small: 12px;
  --gap: clamp(12px, 2vw, 20px);
  --pad: clamp(24px, 5vw, 64px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  padding: var(--gap);
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.15;
  text-wrap: balance;  /* even line breaks in headings */
  margin: 0;
}

h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 300; }
h3 { font-size: 1.15rem; font-weight: 500; }
p { margin: 0; }

a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--mist);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 10;
}
.skip-link:focus { left: 16px; }

/* ---------- Panels: the big rounded blocks ---------- */
.panel {
  max-width: 1240px;
  margin: 0 auto var(--gap);
  padding: var(--pad);
  border-radius: var(--radius-panel);
  background: var(--panel);
  position: relative;
  overflow: hidden;
}
.panel-mist { background: var(--mist); }
.panel-navy { background: var(--navy); color: var(--on-dark); }
/* dark green panel: reuses the navy panel rules with green-tinted accents */
.panel-green {
  background: var(--forest);
  color: var(--on-dark);
  --on-dark-soft: #b7cbbd;
  --sky: #8fd1a8;
}
.panel-navy :focus-visible, .panel-green :focus-visible, .hero :focus-visible, .cta :focus-visible { outline-color: var(--sky); }

.center { text-align: center; }
.section-intro {
  color: var(--ink-soft);
  margin-top: 12px;
  max-width: 34rem;
}
.section-intro.center { margin-inline: auto; }
.panel-navy .section-intro, .panel-green .section-intro { color: var(--on-dark-soft); }
/* small label after a heading, e.g. "(Coming soon!)" */
.coming-soon {
  display: inline-block;
  font-family: var(--font-body);
  font-size: max(0.42em, 0.9rem);
  font-weight: 500;
  vertical-align: middle;
  color: var(--sky);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}
.btn-light { background: var(--mist); color: var(--ink); }
.btn-light:hover { background: var(--panel); }

/* ---------- Photos ----------
   Each photo spot shows a .jpg that sits next to index.html. To swap a photo,
   upload a new file with the same name. background-size: cover crops it neatly,
   and background-position chooses which part stays in view. The
   background-color shows while the photo loads. */
.photo {
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-photo);
}
.photo-hero {
  position: absolute;
  inset: 0;
  border-radius: 0;
  background-color: #8fb6dc;
}
/* Hero slideshow: photos stack on top of each other and crossfade */
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 60%;
  opacity: 0;
  transition: opacity 1.6s ease-in-out;
}
.hero-slide.is-active { opacity: 1; }
/* very bright photos: dim slightly so white text stays readable */
.hero-slide-bright { filter: brightness(0.72) saturate(1.05); }
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
}

.slideshow-toggle {
  position: absolute;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(234, 241, 250, 0.55);
  border-radius: 50%;
  background: rgba(12, 26, 46, 0.35);
  color: #ffffff;
  cursor: pointer;
}
.slideshow-toggle[hidden] { display: none; }
.slideshow-toggle:hover { background: rgba(12, 26, 46, 0.55); }
.slideshow-toggle .icon-play,
.slideshow-toggle[aria-pressed="true"] .icon-pause { display: none; }
.slideshow-toggle[aria-pressed="true"] .icon-play { display: block; }
.slideshow-label {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.photo-work {
  aspect-ratio: 4 / 3.4;
  background-color: #5b86b8;
  background-image: url("work.jpg");
  background-position: center 40%;
}
.photo-young {
  aspect-ratio: 4 / 3.6;
  background-color: #3a6aa3;
  background-image: url("young.jpg");
  background-position: center;
}
.photo-cta {
  position: absolute;
  inset: 0;
  border-radius: 0;
  background-color: #2b4f7c;
  background-image: url("contact.jpg");
  background-position: center;
}

/* ---------- Hero ---------- */
.hero {
  min-height: min(88vh, 760px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(20px, 3vw, 32px) var(--pad) var(--pad);
  color: #ffffff;
}
/* darken the bottom so white text stays readable on any photo */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 26, 46, 0.45) 0%, transparent 28%, rgba(12, 26, 46, 0.62) 100%);
}
.hero > *:not(.photo) { position: relative; z-index: 1; }
.hero > .slideshow-toggle { position: absolute; z-index: 2; }  /* stays in the corner */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 500;
  text-decoration: none;
}
.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.92;
}
.nav-links a:not(.btn):hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.nav-links .btn { margin-left: 8px; }

.menu-toggle {
  display: none;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: end;
  gap: 32px;
  margin-top: 120px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  font-weight: 300;
  max-width: 18ch;
  letter-spacing: -0.01em;
}
.hero-side {
  max-width: 22rem;
  justify-self: end;
  display: grid;
  gap: 20px;
  justify-items: start;
}

/* ---------- Sub page header (Resources, Team) ---------- */
.page-header {
  background: var(--navy);
  color: var(--on-dark);
  padding: clamp(20px, 3vw, 32px) var(--pad) var(--pad);
}
.page-header :focus-visible { outline-color: var(--sky); }
.page-header-content {
  margin-top: clamp(40px, 7vw, 88px);
  display: grid;
  gap: 16px;
  justify-items: start;
}
.page-header h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 300;
}
.page-header p { color: var(--on-dark-soft); max-width: 34rem; }

/* "Back to home" button: outlined so it doesn't compete with Contact us */
.btn-back {
  gap: 6px;
  padding: 0 18px 0 12px;
  border: 1px solid rgba(234, 241, 250, 0.45);
  color: var(--on-dark);
}
.btn-back:hover { background: rgba(234, 241, 250, 0.12); }

/* marks the page you're on in the menu */
.nav-links a[aria-current="page"] {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

/* ---------- Exercise page (five-minute-reset.html) ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.eyebrow-dark { color: var(--sky); font-weight: 500; font-size: 0.95rem; }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--gap);
  max-width: 46rem;
}
.step {
  background: var(--panel);
  border-radius: var(--radius-photo);
  padding: clamp(20px, 3vw, 28px);
  display: grid;
  gap: 10px;
}
.step p { max-width: 38rem; }
.step-time {
  display: flex;
  gap: 10px;
  align-items: baseline;
  color: var(--blue);
  font-weight: 500;
  font-size: 0.9rem;
}
.step-time span { color: var(--ink-soft); font-weight: 400; }
.step h3 { font-size: 1.35rem; font-weight: 400; }
.breath {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.breath span {
  background: var(--mist);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.95rem;
}
.breath strong { font-family: var(--font-head); font-weight: 500; margin-right: 4px; }
.senses { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.senses strong {
  display: inline-grid;
  place-items: center;
  width: 1.8em;
  height: 1.8em;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--on-dark);
  font-family: var(--font-head);
  font-weight: 500;
}
.notes {
  margin-top: 32px;
  max-width: 46rem;
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
}
.notes h3 { color: var(--ink); }
.page-end-nav {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
}
.btn-solid { background: var(--navy); color: var(--on-dark); }
.btn-solid:hover { background: var(--blue); }
.text-link { color: var(--blue); font-weight: 500; text-underline-offset: 4px; }

/* ---------- About ---------- */
.lead {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 300;
  max-width: 30ch;
  line-height: 1.3;
}
.pillars {
  list-style: none;
  padding: 0;
  margin: clamp(40px, 6vw, 72px) 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.pillars li { border-top: 1px solid var(--line); padding-top: 20px; }
.pillars p { color: var(--ink-soft); margin-top: 8px; font-size: 0.95rem; }

/* ---------- Split sections (For work / For young adults) ---------- */
.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.split-reverse { grid-template-columns: 1fr 1.1fr; }

.checklist { margin-top: 32px; }
.checklist details { border-top: 1px solid var(--line); }
.checklist details:last-child { border-bottom: 1px solid var(--line); }
.panel-navy .checklist details, .panel-green .checklist details { border-color: var(--line-dark); }

.checklist summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  cursor: pointer;
  font-weight: 500;
}
.checklist summary::-webkit-details-marker { display: none; }
/* check mark, drawn with CSS borders */
.checklist summary::before {
  content: "";
  flex: none;
  width: 6px;
  height: 11px;
  margin: 0 6px 4px 4px;
  border: solid var(--blue);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.panel-navy .checklist summary::before, .panel-green .checklist summary::before { border-color: var(--sky); }
.checklist details:not([open]) summary { opacity: 0.6; }
.checklist details:not([open]) summary:hover { opacity: 0.9; }
.checklist details p {
  padding: 0 0 20px 28px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 34rem;
}
.panel-navy .checklist details p, .panel-green .checklist details p { color: var(--on-dark-soft); }

.photo-wrap { margin: 0; position: relative; }
.float-card {
  position: absolute;
  left: 20px;
  bottom: 20px;
  background: var(--mist);
  color: var(--ink);
  border-radius: var(--radius-small);
  padding: 12px 16px;
  display: grid;
  gap: 2px;
  min-width: 170px;
  box-shadow: 0 8px 24px rgba(12, 26, 46, 0.18);
}
.float-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.float-card strong { font-family: var(--font-head); font-weight: 500; font-size: 1.15rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sky); }

/* ---------- Resources ---------- */
.resource-grid {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.resource {
  background: #e8f0fa;
  border-radius: var(--radius-photo);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.resource p { color: var(--ink-soft); font-size: 0.95rem; flex: 1; }
/* a card whose title is a link: the whole card is clickable */
.resource:has(.resource-link) { position: relative; transition: background-color 200ms ease; }
.resource:has(.resource-link):hover { background: var(--panel-hover, #f1f6fc); }
.resource-link { text-decoration: none; color: var(--blue); }
.resource-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.resource-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.resource-link:focus-visible { outline: none; }
.resource:has(.resource-link:focus-visible) { outline: 3px solid var(--blue); outline-offset: 3px; }
.tag {
  align-self: flex-start;
  font-size: 0.8rem;
  color: var(--blue);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px 10px;
}
.crisis {
  margin-top: 32px;
  padding: 16px 20px;
  border-left: 3px solid var(--blue);
  background: #e8f0fa;
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  font-size: 0.95rem;
}
.crisis strong { margin-right: 4px; }
.crisis a { color: var(--blue); font-weight: 500; }

/* ---------- Team ---------- */
.team-grid {
  list-style: none;
  padding: 0;
  margin: 40px auto 0;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}
.person { display: grid; justify-items: center; gap: 4px; }
.avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
}
.avatar-empty {
  background: var(--panel);
  border: 1px dashed rgba(19, 32, 47, 0.3);
}

/* ---------- Contact (photo call-to-action) ---------- */
.cta {
  min-height: 420px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #ffffff;
}
.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(12, 26, 46, 0.55);
}
.cta-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  justify-items: center;
  max-width: 30rem;
}
.cta-note { font-size: 0.9rem; opacity: 0.9; }

/* ---------- Footer ---------- */
.footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px var(--pad);
  background: var(--panel);
  border-radius: var(--radius-panel);
  display: grid;
  grid-template-columns: 1.5fr 1fr auto;
  gap: 24px;
  align-items: start;
}
.footer-brand p { color: var(--ink-soft); font-size: 0.9rem; margin-top: 8px; max-width: 22rem; }
.footer-links { display: grid; gap: 2px; }
.footer-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  padding: 4px 0;
}
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.copyright { color: var(--ink-soft); font-size: 0.85rem; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; align-items: center; }
  .nav { flex-wrap: wrap; }
  .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    background: var(--mist);
    color: var(--ink);
    border-radius: var(--radius-small);
    padding: 8px;
  }
  .nav-links.open { display: flex; }
  .nav-links .btn { margin: 8px 0 0; justify-content: center; background: var(--navy); color: var(--on-dark); }

  .hero-content,
  .split,
  .split-reverse { grid-template-columns: 1fr; }
  .hero-side { justify-self: start; }
  .split-reverse .photo-wrap { order: 2; }

  .pillars,
  .resource-grid { grid-template-columns: 1fr; }
  .footer { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .team-grid { grid-template-columns: 1fr; }
  .logo { font-size: 1.1rem; }
  .menu-toggle { padding: 0 14px; }
}

/* Sub pages: the grid is the first thing in its panel, so no top gap.
   Kept at the end so it wins over the .resource-grid and .team-grid margins. */
.resource-grid-top,
.team-grid-top { margin-top: 0; }
