/* Forest Pond Associates — site styles */

:root {
  --green: #2f5e4e;
  --green-dark: #24493c;
  --teal: #3c6067;
  --teal-dark: #1c373c;
  --cream: #f7f7f4;
  --card-border: #ddddc9;
  --breadcrumb-bg: #ededf2;
  --heading: #212121;
  --text: #4a4a4a;
  --muted: #425863;
  --white: #fff;

  --font-heading: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, sans-serif;

  --wrap: 1350px;
  --radius: 5px;
  --radius-card: 15px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
p { margin: 0 0 1.4em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--heading);
  line-height: 1.2;
  margin: 0 0 20px;
}
h1 { font-size: 50px; }
h2 { font-size: 38px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }
h5 { font-size: 18px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 3%;
}
@media (min-width: 1500px) { .wrap { padding: 0; } }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: 10px; left: 10px; z-index: 1000;
  width: auto; height: auto; clip: auto;
  background: var(--white); padding: 10px 16px;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  padding: 15px 20px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--green);
  background: var(--green);
  color: var(--white);
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.button:hover { background: var(--green-dark); border-color: var(--green-dark); color: var(--white); }
.button.outline { background: transparent; color: var(--green); }
.button.outline:hover { background: var(--green); color: var(--white); }
.button.white { background: var(--white); border-color: var(--white); color: var(--text); }
.button.white:hover { background: var(--cream); color: var(--heading); }

.button-group {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}
.center .button-group, .button-group.center { justify-content: center; }

/* ---------- Header ---------- */
/* Inner pages: the header sits on a faded photo strip.
   Home page: the header floats transparently over the hero image. */
.site-header {
  position: relative;
  z-index: 500;
  padding: 5px 0;
  background:
    linear-gradient(rgba(255,255,255,.8), rgba(255,255,255,.8)),
    url("../images/header-strip.jpg") center / cover no-repeat;
}
.site-header.over-hero {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: none;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  width: min(1350px, 94%);
  max-width: none;
  padding: 0;
}
.site-logo { flex-shrink: 0; }
.site-logo img { width: 325px; }
@media (max-width: 1399px) { .site-logo img { width: 300px; } }
@media (max-width: 1199px) { .site-logo img { width: 210px; } }

.nav-primary ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}
.nav-primary li { margin: 0 21.5px; }
.nav-primary li:last-child { margin-right: 0; }
.nav-primary a {
  display: block;
  padding: 5px 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 16px;
  color: var(--heading);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s;
}
.nav-primary a:hover,
.nav-primary a:focus-visible { color: var(--green); }
.nav-primary .highlight a {
  padding: 11px 25px;
  line-height: 32px;
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius);
  transition: background .2s;
}
.nav-primary .highlight a:hover,
.nav-primary .highlight a:focus-visible { background: var(--green-dark); color: var(--white); }
@media (max-width: 1399px) {
  .nav-primary li { margin: 0 11.5px; }
}
@media (max-width: 1199px) {
  .nav-primary li { margin: 0 9.5px; }
}

.menu-toggle {
  display: none;
  background: var(--green);
  color: var(--white);
  border: 0;
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: pointer;
}
.menu-toggle svg { display: block; width: 24px; height: 24px; fill: currentColor; }

@media (max-width: 1099px) { /* hamburger menu on phones and tablets, incl. iPad Pro portrait */
  .menu-toggle { display: block; }
  .nav-primary {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(320px, 85vw);
    background: var(--teal-dark);
    padding: 80px 24px 24px;
    transform: translateX(100%);
    transition: transform .3s ease;
    z-index: 600;
    overflow-y: auto;
  }
  .nav-primary ul { flex-direction: column; align-items: stretch; }
  .nav-primary li { margin: 0; }
  .nav-primary a { color: var(--white); font-size: 16px; line-height: 1.5; padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,.12); }
  .nav-primary a:hover, .nav-primary a:focus-visible, .nav-primary a[aria-current="page"] { color: #cfe3da; }
  .nav-primary .highlight a { margin: 20px 0 0; padding: 12px 20px; line-height: 1.5; text-align: center; border: 0; }
  .menu-open .nav-primary { transform: none; }
  /* The menu panel lives inside the header (z-index 500), so the overlay must sit
     below the header, or it covers the menu and swallows every tap on its links. */
  .menu-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 450;
    opacity: 0; visibility: hidden;
    transition: opacity .3s;
  }
  .menu-open .menu-overlay { opacity: 1; visibility: visible; }
  .menu-open { overflow: hidden; } /* stop the page scrolling behind the open menu */
  .nav-primary { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .menu-close {
    position: absolute; top: 18px; right: 18px;
    background: none; border: 0; color: var(--white);
    font-size: 32px; line-height: 1; cursor: pointer;
  }
}
@media (min-width: 1100px) { .menu-close, .menu-overlay { display: none; } }

/* Inner pages: breadcrumb bar under the header */
.breadcrumbs {
  background: var(--breadcrumb-bg);
  font-size: 16px;
  line-height: 28px;
  padding: 12px 0;
}
.breadcrumbs .wrap { width: min(1350px, 94%); max-width: none; padding: 0; }
.breadcrumbs a { color: var(--heading); }
.breadcrumbs span[aria-hidden] { margin: 0 6px; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section.no-pad-bottom { padding-bottom: 0; }
.section.bg-cream { background: var(--cream); }
.section.bg-teal {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: var(--white);
}
.section.bg-teal h2, .section.bg-teal h3, .section.bg-teal a { color: var(--white); }

.section-header { text-align: center; max-width: 1100px; margin: 0 auto 40px; }
.section-header h2 { margin-bottom: 15px; }
.eyebrow {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
  line-height: 1.5;
}
.section-footer { text-align: center; margin-top: 40px; }
.section-footer h3 { max-width: 1000px; margin: 0 auto; }

/* ---------- Hero (home) ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(to right, rgba(247,247,244,1) 0%, rgba(247,247,244,0) 60%),
    url("../images/hero.jpg") center / cover no-repeat;
}
@media (max-width: 900px) {
  .hero {
    background:
      linear-gradient(to right, rgba(247,247,244,1) 0%, rgba(247,247,244,0) 60%),
      url("../images/hero-mobile.jpg") center / cover no-repeat;
  }
}
.hero .wrap { width: 100%; padding-top: 150px; padding-bottom: 50px; }
.hero-content { max-width: 735px; }
.hero h1 { font-size: 60px; margin-bottom: 15px; }
.hero .lead { max-width: 510px; margin-bottom: 27px; }
@media (max-width: 1399px) { .hero h1 { font-size: 50px; } }
@media (max-width: 767px) {
  .hero { min-height: 640px; }
  .hero .wrap { padding-top: 130px; }
  .hero h1 { font-size: 38px; }
  .hero { background:
      linear-gradient(rgba(247,247,244,.92), rgba(247,247,244,.6)),
      url("../images/hero-mobile.jpg") center / cover no-repeat; }
}

/* ---------- Media + text split ---------- */
.split {
  display: flex;
  align-items: center;
  gap: 77px;
}
.split + .split { margin-top: 60px; }
.split > * { flex: 1 1 50%; min-width: 0; }
.split.image-left { flex-direction: row-reverse; }
.split .media img { width: 100%; border-radius: var(--radius-card); }
.split .content h5 { margin-bottom: 15px; }
@media (max-width: 900px) {
  .split, .split.image-left { flex-direction: column; gap: 30px; }
  .split .media { order: -1; width: 100%; }
}

/* About band with photo background */
.about-band {
  background: url("../images/about-bg.png") center / cover no-repeat;
  color: var(--white);
}
.about-band h2 { color: var(--white); }
.about-band .content { max-width: 620px; }
@media (max-width: 900px) {
  .about-band { background: linear-gradient(rgba(28,55,60,.85), rgba(28,55,60,.85)), url("../images/about-bg.png") center / cover no-repeat; }
}

/* ---------- Column grids ---------- */
.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}
.grid > * { flex: 0 0 calc((100% - 90px) / 4); min-width: 0; }
.grid h3 { hyphens: auto; -webkit-hyphens: auto; }
.grid.thirds > * { flex-basis: calc((100% - 60px) / 3); }
@media (max-width: 1023px) {
  .grid > *, .grid.thirds > * { flex-basis: calc((100% - 30px) / 2); }
}
@media (max-width: 600px) {
  .grid > *, .grid.thirds > * { flex-basis: 100%; }
}

.feature { text-align: center; }
.feature .icon { height: 85px; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; }
.feature .icon img { max-height: 85px; width: auto; }
.feature h3 { margin-bottom: 12px; }

.card {
  background: var(--white);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: 30px 25px;
  text-align: center;
}
.card h3 { margin-bottom: 12px; }
.card.compact { display: flex; align-items: center; justify-content: center; padding: 25px 20px; }

/* Partner logos */
.partner .icon { height: 85px; }
.partner .icon img { max-height: 60px; max-width: 220px; }
.partner h3 a { text-decoration: none; }
.partner p { margin-bottom: 10px; }
.text-link {
  font-size: 16px;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 600;
}
.text-link:hover { text-decoration: underline; }

/* ---------- Checklist ---------- */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4em;
  columns: 2;
  column-gap: 40px;
}
.checklist li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 14px;
  break-inside: avoid;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%232f5e4e' stroke-width='1.5'%3E%3Crect x='1' y='1' width='14' height='14' rx='2'/%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-5'/%3E%3C/svg%3E") no-repeat;
}
@media (max-width: 767px) { .checklist { columns: 1; } }

.narrow { max-width: 1100px; margin: 0 auto; text-align: center; }
.narrow .checklist { text-align: left; max-width: 820px; margin-left: auto; margin-right: auto; }

/* ---------- Case studies ---------- */
.archive-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}
.filter-box h2 {
  background: var(--teal-dark);
  color: var(--white);
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 10px 15px;
  border-radius: var(--radius);
  margin-bottom: 15px;
}
.filter-box label { display: flex; gap: 8px; align-items: center; font-size: 15px; margin-bottom: 6px; cursor: pointer; }
.filter-box input { accent-color: var(--green); }
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}
.case-card { padding: 30px 20px; }
.case-card .icon { height: 60px; margin: 0 auto 15px; display: flex; justify-content: center; }
.case-card .icon img { height: 60px; width: auto; }
.case-card .figure { display: block; font-family: var(--font-heading); font-size: 22px; color: var(--heading); margin-bottom: 8px; }
.case-card h2 { font-family: var(--font-body); font-size: 16px; line-height: 1.75; color: var(--text); margin: 0; }
.case-card[hidden] { display: none; }
@media (max-width: 1100px) { .case-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) {
  .archive-layout { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
}

/* ---------- Contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 50px;
  align-items: start;
}
.contact-intro ul { padding-left: 20px; }
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.contact-form .full { grid-column: 1 / -1; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  font: inherit;
  color: var(--heading);
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  background: var(--white);
}
.contact-form input:focus,
.contact-form textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.contact-form textarea { min-height: 220px; resize: vertical; }
.contact-form .hp { position: absolute; left: -9999px; }
.form-note { font-size: 15px; margin-top: 10px; }
@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .contact-form { grid-template-columns: 1fr; }
}

/* ---------- Legal / simple pages ---------- */
.prose { max-width: 1000px; margin: 0 auto; }
.prose h1 { text-align: center; margin-bottom: 40px; }
.prose h4 { margin-top: 35px; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 15px; }
.prose td { border: 1px solid var(--card-border); padding: 10px 12px; vertical-align: top; }
.prose figure { margin: 0; overflow-x: auto; }

/* ---------- Call to action ---------- */
.cta {
  padding: 80px 0;
  background:
    linear-gradient(to right, rgba(247,247,244,1) 0%, rgba(247,247,244,0) 60%),
    url("../images/cta-kingfishers.jpg") center / cover no-repeat;
}
.cta .content { max-width: 620px; }
.cta h2 { margin-bottom: 15px; }
.cta p { margin-bottom: 30px; }
@media (max-width: 767px) {
  .cta { background:
      linear-gradient(rgba(247,247,244,.9), rgba(247,247,244,.9)),
      url("../images/cta-kingfishers.jpg") center / cover no-repeat; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--teal-dark);
  color: var(--white);
  padding: 65px 0 50px;
  text-align: center;
}
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-nav ul {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 24px;
  font-weight: 600;
}
.social-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.social-link svg { width: 18px; height: 18px; fill: currentColor; }
.copyright { margin: 0; font-size: 15px; opacity: .85; }

.scroll-top {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .3s;
  z-index: 400;
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Small screens ---------- */
@media (max-width: 767px) {
  h1 { font-size: 38px; }
  h2 { font-size: 30px; }
  h3 { font-size: 22px; }
  .section, .cta { padding: 60px 0; }
  .section-header { margin-bottom: 30px; }
}

/* ---------- Home: REDCap Cloud band (links to /services/#redcap-cloud) ---------- */
.rcc-band { padding: 70px 0; background: var(--cream); }
.rcc-band-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  background: var(--white); border: 1px solid var(--card-border); border-radius: 22px;
  padding: 40px 48px; box-shadow: 0 12px 32px -18px rgba(28,55,60,.25);
}
.rcc-band .eyebrow { color: var(--green); font-size: 13px; font-weight: 600; letter-spacing: .18em; margin-bottom: 10px; }
.rcc-band h2 { margin: 0 0 10px; }
.rcc-band p:last-child { margin: 0; max-width: 640px; }
.rcc-band .button { flex-shrink: 0; }
@media (max-width: 900px) {
  .rcc-band { padding: 50px 0; }
  .rcc-band-inner { flex-direction: column; align-items: flex-start; padding: 30px 26px; gap: 24px; }
}

/* Partner tile: second link under "Visit Website" */
.partner .text-link.secondary { display: block; margin-top: 8px; font-size: 14px; text-transform: none; letter-spacing: 0; }

/* Case studies: leave room under the header when jumping to an entry */
.case-card[id] { scroll-margin-top: 30px; }
