@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Marcellus&display=swap');

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #355e3b;
  --green-dark:  #1e3d23;
  --green-light: #4a7850;
  --cream:       #f2f5f2;
  --white:       #ffffff;
  --text:        #1a2e1c;
  --text-muted:  #4a6350;
  --nav-h:       60px;
  --font-display: 'Copperplate', 'Copperplate Gothic Light', 'Copperplate Gothic Bold', 'Marcellus', Georgia, serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--white);
}

/* === LAYOUT === */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* === NAV === */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: var(--green-dark);
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.nav-inner {
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap:1.5rem;
}

.nav-brand-link { justify-self: start; align-self: center; }
.nav-auth-cta--desktop { justify-self: end; align-self: center; }
.nav-links .nav-auth-cta--mobile { display: none; }

/* Pages with no centre links (login): brand left, CTA right */
.nav--simple .nav-inner { display: flex; }
.nav--simple .nav-links { justify-content: flex-end; }
.nav--simple .nav-links .nav-auth-cta--mobile { display: flex; }

.nav-brand-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
  text-decoration: none;
}

.nav-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-brand-name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1rem;
  color: var(--white);
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}

.nav-links {
  list-style: none;
  flex: 1;
  display: flex;
  align-items: stretch;
  height: 100%;
  justify-content: center;
}

.nav-links li { display: flex; align-items: stretch; }

.nav-link {
  display: flex;
  align-items: center;
  padding: 0 0.9rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.nav-link:hover { color: rgba(255,255,255,0.9); }

.nav-link--active {
  color: var(--white);
  border-bottom-color: rgba(255,255,255,0.7);
}

/* === NAV DROPDOWNS === */
.nav-links .has-dropdown { position: relative; }

.has-dropdown > .nav-link::after {
  content: '';
  margin-left: 0.45rem;
  border: 3px solid transparent;
  border-top-color: currentColor;
  border-bottom: 0;
}

.dropdown {
  display: none;
  list-style: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  padding: 0.4rem 0;
  background: var(--green-dark);
  border-top: 2px solid var(--green-light);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown { display: block; }

.has-dropdown:hover > .nav-link,
.has-dropdown:focus-within > .nav-link { color: rgba(255,255,255,0.9); }

.dropdown li { display: block; }

.nav-sublink {
  display: block;
  padding: 0.65rem 1.25rem;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.nav-sublink:hover,
.nav-sublink:focus-visible {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}

.nav-login-btn {
  display: flex-end;
  align-items: center;
  align-self: center;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 3px;
  color: var(--white);
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s, border-color 0.2s;
}

.nav-login-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.8);
}

.nav-auth-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logout-btn {
  border-color: transparent;
  opacity: 0.7;
}

.nav-logout-btn:hover {
  opacity: 1;
  border-color: rgba(255,255,255,0.4);
}

/* === NAV HAMBURGER === */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.8);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav--open .nav-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav--open .nav-hamburger span:nth-child(2) { opacity: 0; }
.nav--open .nav-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 600px) {
  .nav-hamburger { display: flex; }

  .nav-inner { display: flex; }
  .nav-auth-cta--desktop { display: none; }
  .nav-links .nav-auth-cta--mobile { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    background: var(--green-dark);
    padding: 0.5rem 0 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    overflow-x: visible;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    overflow-x: hidden;
  }

  .nav--open .nav-links { display: flex; }

  .nav-links li { width: 100%; }
  .nav-links .has-dropdown { flex-direction: column; }

  .dropdown {
    display: none;
    position: static;
    transform: none;
    min-width: 0;
    padding: 0 0 0.4rem;
    border-top: none;
    box-shadow: none;
    background: none;
  }

  .nav-sublink {
    padding: 0.5rem 1.5rem 0.5rem 2.75rem;
    text-transform: none;
    letter-spacing: 0.04em;
    font-size: 0.8rem;
  }

  /* Touch devices keep :hover/:focus after a tap, so only .is-open may show a submenu here */
  .has-dropdown:hover > .dropdown,
  .has-dropdown:focus-within > .dropdown { display: none; }
  .has-dropdown.is-open > .dropdown { display: block; }

  .has-dropdown > .nav-link::after { transition: transform 0.2s; }
  .has-dropdown.is-open > .nav-link::after { transform: rotate(180deg); }

  /* Simple nav (sub-pages): brand left, CTA right, never collapses */
  .nav--simple .nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    justify-content: flex-end;
    padding: 0;
    box-shadow: none;
    background: none;
  }

  .nav-link {
    padding: 0.75rem 1.5rem;
    justify-content: flex-start;
    border-bottom: none;
    border-left: 3px solid transparent;
  }

  .nav-link:hover { border-left-color: rgba(255,255,255,0.4); }
  .nav-link--active { border-bottom: none; border-left-color: rgba(255,255,255,0.7); }

  .nav-links > li:last-child { padding: 0.5rem 1.5rem 0; }

  .nav-login-btn {
    display: inline-flex;
    align-self: flex-start;
  }

  .nav-auth-cta {
    margin: 0.5rem 1.5rem 0;
  }

  /* The mobile row is a list item that already has horizontal padding */
  .nav-links .nav-auth-cta--mobile { margin: 0; }
}

/* === HERO === */
.hero {
  min-height: 50vh;
  padding-top: 30px;
}

.hero-text {
  flex: 1;
  background: radial-gradient(ellipse at 40% 60%, var(--green-light) 0%, var(--green) 50%, var(--green-dark) 100%);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5rem;
  padding: 4rem 5%;
  position: relative;
  overflow: hidden;
}

.hero-copy {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4rem;
}

.hero-summary-box {
  background: rgba(255,255,255,0.0);
  border: 1px solid rgba(255,255,255,0.0);
  border-radius: 6px;
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 420px;
}

.hero-summary {
  font-size: 1rem;
  line-height: 1.8;
  justify-content: right;
  color: rgba(255,255,255,0.8);
}

.hero-image {
  width: 340px;
  max-width: 100%;
  max-height: 400px;
  height: auto;
  object-fit: contain;
  align-self: center;
  flex-shrink: 0;
}

.hero-logo {
  height: 240px;
  width: auto;
  object-fit: contain;
}

.hero-headline {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  color: var(--white);
  letter-spacing: 0.1em;
  font-weight: 400;
  white-space: nowrap;
}

.hero-sub {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: rgba(255,255,255,0.9);
  font-style: normal;
  letter-spacing: 0.04em;
  line-height: 1.75;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255,255,255,0.25);
  border-bottom: 1px solid rgba(255,255,255,0.25);
  max-width: 420px;
  text-align: center;
  align-self: center;
}

@media (max-width: 768px) {
  .hero-text { flex-direction: column; padding: 3rem 2rem; gap: 2rem; }
  .hero-copy { width: 100%; justify-content: center; align-items: center; }
  .hero-image { width: 220px; }
  .hero-summary-box { max-width: 100%; padding: 1.5rem; text-align: center; }
}

/* === BUTTON === */
.btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--white);
  color: var(--white);
  text-decoration: none;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: var(--white);
  color: var(--green);
}

.btn--green {
  border-color: var(--green);
  color: var(--green);
}

.btn--green:hover {
  background: var(--green);
  color: var(--white);
}

/* === SECTIONS === */
.section {
  padding: 3rem 0;
  background: var(--cream);
}

.section--green {
  background: var(--green);
}

.section--white {
  background: var(--white);
}

/* First section on a page: clear the fixed nav */
.section--page { padding-top: calc(var(--nav-h) + 3rem); }

/* Fixed nav: keep anchored sections and cards clear of it */
section[id] { scroll-margin-top: var(--nav-h); }
.card[id], .service-area[id] { scroll-margin-top: calc(var(--nav-h) + 1rem); }

.section-body.about-follow { margin-top: 1.25rem; }

.careers-cta { text-align: center; margin-top: 2rem; }

.section--green .section-title,
.section--green .section-body {
  color: var(--white);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--green-dark);
}

.section-body {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.divider {
  width: 48px;
  height: 2px;
  background: var(--green);
  margin: 1.25rem auto 2.5rem;
}

.divider--light {
  background: rgba(255,255,255,0.5);
}

/* === CARDS === */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1rem;
  align-self: center;
}

@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid #d0dbd0;
  border-radius: 4px;
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--text);
}

.card--link {
  display: block;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

.card--link:hover {
  border-color: var(--green);
  transform: translateY(-2px);
}

.card-more {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--green);
}

.card-icon {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--green);
}

.card h3 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
  color: var(--green-dark);
}

.card p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* === SERVICE AREAS === */
.service-areas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1rem;
  align-self: center;
}

@media (max-width: 900px) {
  .service-areas { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .service-areas { grid-template-columns: 1fr; }
}

.service-area {
  background: var(--white);
  border: 1px solid #d0dbd0;
  border-radius: 4px;
  padding: 2.5rem 2rem;
  color: var(--text);
}

.service-area h3 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  color: var(--green-dark);
  text-align: center;
  margin-bottom: 1.1rem;
}

.service-area ul {
  list-style: none;
}

.service-area li {
  font-size: 0.92rem;
  color: var(--text);
  padding: 0.35rem 0 0.35rem 1.1rem;
  position: relative;
}

.service-area li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--green);
}

/* === TEAM === */
.team-grid {
  display: grid;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

.team-card {
  background: var(--white);
  border: 1px solid #d0dbd0;
  border-radius: 4px;
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 350px;
}

.team-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: var(--white);
}

.team-name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.3rem;
  color: var(--green-dark);
}

.team-title {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1rem;
}

.team-headshot {
  width: 240px;
  height: 240px;
  object-fit: cover;
  object-position: top;
  border-radius: 50%;
  border: 3px solid var(--green);
  margin: 0 auto 1.25rem;
  display: block;
}

.team-headline {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* Profile (photo, name, socials) on the left, bio on the right */
.team-card--bio {
  max-width: 900px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: center;
  text-align: left;
}

.team-profile { text-align: center; }
.team-profile .team-headshot { margin-bottom: 1.5rem; }
.team-profile .social-links { margin-top: 0.5rem; }

.team-bio p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.team-bio p:last-child { margin-bottom: 0; }

@media (max-width: 768px) {
  .team-card--bio { grid-template-columns: 1fr; gap: 2rem; }
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--green);
  transition: color 0.2s, transform 0.2s;
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.social-link:hover {
  color: var(--green-dark);
  transform: translateY(-2px);
}

/* === RESEARCH === */
.research-more {
  text-align: center;
  margin-top: 2.5rem;
}

.research-more-link {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--green-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--green);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.research-more-link:hover { color: var(--green); border-color: var(--green-light); }

.section--green .research-more-link {
  color: rgba(255,255,255,0.8);
  border-bottom-color: rgba(255,255,255,0.4);
}

.section--green .research-more-link:hover {
  color: var(--white);
  border-bottom-color: rgba(255,255,255,0.8);
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  margin-top: 2.5rem;
}

.research-item {
  background: var(--white);
  border: 1px solid #d0dbd0;
  border-radius: 4px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.research-tag {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 600;
}

.research-item h3 {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--green-dark);
}

.research-item p {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-muted);
  flex: 1;
}

.research-link {
  margin-top: 0.5rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid var(--green-light);
  align-self: flex-start;
  transition: color 0.2s, border-color 0.2s;
}

.research-link span {
  font-size: 0.72rem;
  opacity: 0.7;
}

.research-link:hover { color: var(--green-dark); border-color: var(--green-dark); }

/* === CONTACT === */
#contact {
  padding: 0;
}

.contact-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--nav-h));
}

.contact-image {
  overflow: hidden;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
}

.contact-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.contact-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
}

.contact-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4rem 5%;
}

.contact-content .section-body {
  margin-bottom: 2rem;
}

.contact-about {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4rem 5%;
}

.contact-about .team-grid {
  margin-top: 0;
}

@media (max-width: 768px) {
  .contact-two-col { grid-template-columns: 1fr; }
  .contact-image { position: relative; height: auto; min-height: 260px; }
}

/* === FOOTER === */
.footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.55);
  text-align: center;
  padding: 2.5rem 1rem;
}

.footer-logo {
  height: 60px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
  opacity: 0.85;
}

.footer p {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.75rem;
  margin-bottom: 1.25rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--white); text-decoration: underline; }

/* === DOCUMENT PAGES (privacy, legal, site map) === */
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3rem) 2rem 4rem;
  line-height: 1.75;
}

.doc h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  letter-spacing: 0.03em;
  color: var(--green-dark);
}

.doc .divider { margin: 1.25rem 0 1.5rem; }

.doc h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.3rem;
  color: var(--green-dark);
  margin: 2.25rem 0 0.6rem;
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}

.doc p, .doc li { font-size: 0.97rem; color: var(--text); }
.doc p { margin-bottom: 1rem; }
.doc ul { margin: 0 0 1rem 1.25rem; }
.doc li { margin-bottom: 0.35rem; }
.doc a { color: var(--green); }
.doc a:hover { color: var(--green-dark); }
.doc .doc-meta { font-size: 0.85rem; color: var(--text-muted); }

.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.sitemap-grid h2 { margin-top: 0; font-size: 1.1rem; }
.sitemap-grid ul { list-style: none; margin: 0; }

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .nav-links { gap: 1.25rem; }
  .nav-links a { font-size: 0.75rem; }
  .hero-logo { width: 160px; }
  .section { padding: 4rem 0; }
}
