/* ==========================================================================
   GEOptimize: About Us demo
   One stylesheet for about.html and team/*.html.

   1. Tokens        5. Hero            9.  CTA band
   2. Base          6. Values         10.  Bio page
   3. Buttons       7. Team grid      11.  Footer
   4. Header        8. Projects       12.  Reduced motion

   Breakpoints match Elementor's defaults:
   mobile up to 767px, tablet 768–1024px, desktop from 1025px.
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  /* Brand colors, from the live site's Elementor global kit */
  --color-primary: #0c878d;        /* kit "Primary" and "Accent" */
  --color-dark: #173034;           /* kit "Secondary" and "Text" */
  --color-white: #ffffff;
  --color-light: #f2f2f2;          /* kit light grey */
  --color-border: #eaecec;         /* footer column dividers */

  /* Added for this demo. Primary on white is 4.3:1, just under AA for small
     text, so small text, buttons and the CTA band use this deeper shade. */
  --color-primary-strong: #0a7378;
  --color-muted: #4a5d60;          /* secondary text, AA on white and light */
  --color-photo-bg: #dde7e7;       /* tone behind every headshot */

  /* Type: DM Sans throughout, same as the live site */
  --font-heading: "DM Sans", sans-serif;
  --font-body: "DM Sans", sans-serif;

  --text-h1: clamp(2.25rem, 1.35rem + 3.8vw, 4.375rem);     /* 36 → 70px */
  --text-h2: clamp(2rem, 1.6rem + 1.75vw, 3.125rem);        /* 32 → 50px */
  --text-h3: clamp(1.25rem, 1.19rem + 0.25vw, 1.375rem);
  --text-lead: clamp(1.125rem, 1.06rem + 0.3vw, 1.3125rem);
  --text-body: clamp(1rem, 0.96rem + 0.18vw, 1.125rem);     /* 16 → 18px */
  --text-small: 0.9375rem;

  /* Layout */
  --container: 1300px;             /* live site's boxed width */
  --gutter: clamp(1.25rem, 0.75rem + 2vw, 2.5rem);
  --section-space: clamp(4rem, 2.8rem + 5vw, 7rem);
  --radius-button: 3px;
  --radius-card: 6px;
  --header-height: 53px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --duration: 0.35s;

  /* Headshots: one subtle filter on every photo */
  --photo-filter: saturate(0.88) contrast(1.03);
}

@media (min-width: 1025px) {
  :root { --header-height: 100px; }
}

/* 2. Base ------------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-white);
  color: var(--color-dark);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.12;
  text-wrap: balance;
}

h2 { color: var(--color-primary); font-size: var(--text-h2); }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--color-dark);
  color: var(--color-white);
  transform: translateY(-110%);
}
.skip-link:focus { transform: none; }

.eyebrow {
  margin-bottom: 0.75rem;
  color: var(--color-primary-strong);
  font-size: var(--text-small);
  font-weight: 600;
}

/* 3. Buttons --------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 56px;
  padding: 0.875rem 2.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-button);
  background: var(--color-primary-strong);
  color: var(--color-white);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.button:hover { background: var(--color-dark); }

.button--light { background: var(--color-white); color: var(--color-primary-strong); }
.button--light:hover { background: var(--color-dark); color: var(--color-white); }
.button--light:focus-visible { outline-color: var(--color-white); }

.button--outline {
  border-color: var(--color-primary-strong);
  background: transparent;
  color: var(--color-primary-strong);
}
.button--outline:hover {
  border-color: var(--color-dark);
  background: var(--color-dark);
  color: var(--color-white);
}

/* 4. Header ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.22);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
}

.site-header__logo img { width: 130px; }

.site-header__toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.site-header__bars,
.site-header__bars::before,
.site-header__bars::after {
  display: block;
  width: 21px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-dark);
  transition: transform 0.2s, opacity 0.2s;
}
.site-header__bars::before,
.site-header__bars::after { content: ""; }
.site-header__bars::before { transform: translateY(-6px); }
.site-header__bars::after { transform: translateY(3px); }

.site-header__toggle[aria-expanded="true"] .site-header__bars { transform: rotate(45deg); }
.site-header__toggle[aria-expanded="true"] .site-header__bars::before { transform: translateY(0); opacity: 0; }
.site-header__toggle[aria-expanded="true"] .site-header__bars::after { transform: translateY(-3px) rotate(-90deg); }

/* Nav, mobile and tablet: dark drop panel like the live site */
.site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  visibility: hidden;
  max-height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  background: var(--color-dark);
  opacity: 0;
  transform: translateY(-8px);
}
/* Transition on open only, so the panel never flashes when a breakpoint is crossed */
.site-nav.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity 0.2s, transform 0.2s;
}

.site-nav__list { padding: 0.75rem var(--gutter) 1.25rem; }

.site-nav__link {
  display: block;
  width: 100%;
  padding: 0.75rem 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.8);
  font: 600 1rem/1.4 var(--font-body);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.site-nav__link:hover,
.site-nav__link[aria-current="page"] { color: var(--color-white); }
.site-nav__link:focus-visible { outline-color: var(--color-white); outline-offset: -3px; }

.site-nav__submenu { padding-left: 1.25rem; }
.site-nav__submenu .site-nav__link { padding-block: 0.625rem; }
.site-nav__caret { display: none; }

@media (min-width: 1025px) {
  .site-header__logo img { width: 200px; }
  .site-header__toggle { display: none; }

  .site-nav {
    position: static;
    visibility: visible;
    max-height: none;
    overflow: visible;
    background: none;
    opacity: 1;
    transform: none;
  }
  .site-nav__list { display: flex; gap: 40px; padding: 0 25px 0 0; }
  .site-nav__item { position: relative; }
  .site-nav__list > .site-nav__item { display: flex; align-items: center; height: var(--header-height); }

  .site-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    width: auto;
    padding: 0.5rem 0;
    color: var(--color-dark);
    font-size: 1.125rem;
    line-height: 1.25;
  }
  .site-nav__link:hover { color: var(--color-dark); }
  .site-nav__link:focus-visible { outline-color: var(--color-primary); outline-offset: 3px; }

  .site-nav__list > .site-nav__item > .site-nav__link {
    background: linear-gradient(var(--color-dark), var(--color-dark)) left calc(100% - 6px) / 0 1px no-repeat;
    transition: background-size 0.25s;
  }
  .site-nav__list > .site-nav__item > .site-nav__link:hover { background-size: 100% 1px; }
  .site-nav__list > .site-nav__item > .site-nav__link[aria-current="page"] {
    background-size: 100% 1px;
    color: var(--color-dark);
  }

  .site-nav__caret { display: block; }

  .site-nav__submenu {
    position: absolute;
    top: 100%;
    left: -20px;
    visibility: hidden;
    min-width: 230px;
    padding: 0.5rem 0;
    background: var(--color-dark);
    opacity: 0;
    transform: translateY(6px);
  }
  .site-nav__item:hover > .site-nav__submenu,
  .site-nav__item:focus-within > .site-nav__submenu {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.2s, transform 0.2s;
  }
  .site-nav__submenu .site-nav__link {
    width: 100%;
    padding: 0.75rem 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
  }
  .site-nav__submenu .site-nav__link:hover { color: var(--color-white); }
  .site-nav__submenu .site-nav__link:focus-visible { outline-color: var(--color-white); outline-offset: -3px; }
}

/* 5. Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(440px, 62vw, 700px);
  overflow: hidden;
  background: var(--color-dark);
  color: var(--color-white);
}

.hero__media,
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__media img { object-fit: cover; object-position: 45% 40%; filter: grayscale(0.85) brightness(1.15); }

/* Dark overlay: flat tint for contrast, plus a left and bottom gradient */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(23, 48, 52, 0.8), rgba(23, 48, 52, 0) 65%),
    linear-gradient(to right, rgba(23, 48, 52, 0.85), rgba(23, 48, 52, 0.4) 55%, rgba(23, 48, 52, 0) 95%),
    rgba(18, 66, 70, var(--hero-tint, 0.62));
}

@media (min-width: 768px) {
  .hero { --hero-tint: 0.5; }
}

.hero__content {
  position: relative;
  padding-block: clamp(4rem, 8vw, 6.5rem);
}

.hero__title { max-width: 13ch; font-size: var(--text-h1); line-height: 1.07; }

.hero__intro {
  max-width: 54ch;
  margin-top: 1.5rem;
  font-size: var(--text-lead);
  line-height: 1.55;
  text-wrap: pretty;
}

/* 6. Values ("What sets us apart") ------------------------------------------ */
.values { padding-block: var(--section-space); }

.values__header { display: grid; gap: 1.5rem; }
.values__intro { max-width: 58ch; font-size: var(--text-lead); text-wrap: pretty; }

.values__grid {
  display: grid;
  gap: 2.5rem var(--gutter);
  margin-top: clamp(2.5rem, 2rem + 2.5vw, 4.5rem);
}

.values__item { padding-top: 1.75rem; border-top: 1px solid #cbd6d6; }

.values__icon {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.values__title { margin-top: 1.25rem; font-size: var(--text-h3); line-height: 1.25; }
.values__text { margin-top: 0.625rem; color: var(--color-muted); text-wrap: pretty; }

@media (min-width: 768px) {
  .values__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1025px) {
  .values__header { grid-template-columns: 1fr 1fr; gap: var(--gutter); }
  .values__intro { padding-top: 2.25rem; }
  .values__grid { grid-template-columns: repeat(4, 1fr); }
}

/* 7. Team grid and cards --------------------------------------------------- */
.team { padding-block: var(--section-space); background: var(--color-light); }

.team__intro { max-width: 60ch; margin-top: 1rem; font-size: var(--text-lead); text-wrap: balance; }

.team-grid {
  display: grid;
  gap: 1.75rem;
  margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

@media (min-width: 768px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1025px) {
  .team-grid { grid-template-columns: repeat(4, 1fr); }
}

.team-card {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--color-white);
  text-decoration: none;
  transition: transform var(--duration) var(--ease);
}

.team-card__media { overflow: hidden; background: var(--color-photo-bg); }

/* Uniform headshots: same crop, same tone, same filter. Swap-in photos of any
   shape will be cropped to match. */
.team-card__media img,
.bio__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  background: var(--color-photo-bg);
  filter: var(--photo-filter);
}
.team-card__media img { transition: transform 0.6s var(--ease); }

.team-card__body { padding: 1.375rem 1.5rem 1.625rem; }

.team-card__name {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--color-primary-strong);
  font-size: var(--text-h3);
  line-height: 1.25;
}

.team-card__arrow {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.team-card__credentials { margin-top: 0.25rem; font-size: var(--text-small); font-weight: 500; }
.team-card__title { margin-top: 0.125rem; color: var(--color-muted); font-size: var(--text-small); }

/* Hover effects use transform and opacity only. Touch devices keep the arrow. */
@media (hover: hover) {
  .team-card__arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
  }
  .team-card:hover { transform: translateY(-6px); }
  .team-card:hover .team-card__media img { transform: scale(1.04); }
  .team-card:hover .team-card__arrow { opacity: 1; transform: none; }
}

.team-card:focus-visible { outline-offset: 4px; transform: translateY(-6px); }
.team-card:focus-visible .team-card__arrow { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   OPTION B: grayscale photos that turn to color on hover.
   Uncomment this block to show the client the second look.

.team-card__media img {
  filter: grayscale(1) contrast(1.05);
  transition: transform 0.6s var(--ease), filter 0.4s ease;
}
.team-card:hover .team-card__media img,
.team-card:focus-visible .team-card__media img {
  filter: var(--photo-filter);
}
-------------------------------------------------------------------------- */

/* Compact cards: "Meet the rest of the team" on bio pages */
.team-grid--compact { gap: 1.25rem; }

.team-card--compact { display: grid; grid-template-columns: 112px 1fr; align-items: center; }
.team-card--compact .team-card__media { height: 100%; }
.team-card--compact .team-card__media img { height: 100%; }
.team-card--compact .team-card__body { padding: 1rem 1.25rem; }
.team-card--compact .team-card__name { font-size: 1.1875rem; }

@media (min-width: 768px) {
  .team-grid--compact { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .team-card--compact { display: block; }
  .team-card--compact .team-card__media,
  .team-card--compact .team-card__media img { height: auto; }
}

/* 8. Projects strip -------------------------------------------------------- */
.projects { padding-block: clamp(3rem, 2.4rem + 2.5vw, 4.75rem); }

.projects__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}
.projects__heading { font-size: clamp(1.5rem, 1.35rem + 0.6vw, 1.875rem); }

.projects__all { color: var(--color-primary-strong); font-weight: 600; text-underline-offset: 4px; }
.projects__all:hover { color: var(--color-dark); }

.projects__list { display: grid; margin-top: 1.5rem; }

.projects__item { padding-block: 1rem; border-top: 1px solid var(--color-border); }
.projects__link { font-weight: 700; line-height: 1.3; text-decoration: none; }
.projects__link:hover { text-decoration: underline; text-underline-offset: 4px; }
.projects__place { display: block; margin-top: 0.125rem; color: var(--color-muted); font-size: var(--text-small); }

@media (min-width: 768px) {
  .projects__list { grid-template-columns: repeat(3, 1fr); gap: 0 var(--gutter); }
}
@media (min-width: 1025px) {
  .projects__list { grid-template-columns: repeat(5, 1fr); gap: 0 1.75rem; }
}

/* 9. CTA band -------------------------------------------------------------- */
.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--color-primary-strong);
  color: var(--color-white);
}

/* Nested U-loops, like pipe in a vertical borehole field */
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: min(760px, 100%);
  background: url("../images/loop-pattern.svg") right top / auto 100% no-repeat;
}

.cta-band__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
  padding-block: clamp(3.5rem, 3rem + 2vw, 5rem);
}

.cta-band__title { color: inherit; font-size: clamp(1.875rem, 1.6rem + 1.3vw, 2.75rem); }
.cta-band__text { max-width: 52ch; margin-top: 0.75rem; font-size: var(--text-lead); text-wrap: balance; }
.cta-band .button { flex: none; }

@media (min-width: 768px) {
  .cta-band__inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* 10. Bio page ------------------------------------------------------------- */
.bio { padding-block: clamp(1.5rem, 1rem + 2vw, 2.75rem) var(--section-space); }

.bio__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-block: 0.625rem;
  color: var(--color-primary-strong);
  font-weight: 600;
  text-decoration: none;
}
.bio__back:hover { text-decoration: underline; text-underline-offset: 4px; }
.bio__back svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bio__layout { display: grid; gap: 2rem; margin-top: 1rem; }

.bio__media {
  width: 100%;
  max-width: 460px;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--color-photo-bg);
}

.bio__name { color: var(--color-primary); font-size: clamp(2.25rem, 1.8rem + 2vw, 3.5rem); }
.bio__credentials { margin-top: 0.75rem; font-size: 1.1875rem; font-weight: 600; }
.bio__title { color: var(--color-muted); font-size: 1.1875rem; }

.bio__text {
  max-width: 62ch;
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid #cbd6d6;
  font-size: var(--text-lead);
  line-height: 1.7;
  text-wrap: pretty;
}

.bio__actions { margin-top: 2rem; }
.bio__actions svg { width: 18px; height: 18px; fill: currentColor; }

@media (min-width: 768px) {
  .bio__layout {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: start;
    gap: clamp(2rem, 5vw, 5rem);
  }
  .bio__media { position: sticky; top: calc(var(--header-height) + 2rem); }
}
@media (min-width: 1025px) {
  .bio__content { padding-top: 1.5rem; }
}

.team--rest { padding-block: clamp(3rem, 2.4rem + 2.5vw, 5rem); }
.team--rest .team__heading { font-size: clamp(1.625rem, 1.4rem + 0.9vw, 2.125rem); }
.team--rest .team-grid { margin-top: 1.75rem; }

/* 11. Footer --------------------------------------------------------------- */
.site-footer { padding-block: 30px; background: var(--color-white); }

.site-footer__inner { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 1.75rem; }

.site-footer__logo img { width: 100px; }
.site-footer__address { font-size: 0.8125rem; font-style: normal; line-height: 1.4; }
.site-footer__address a { color: var(--color-primary-strong); text-decoration: none; }
.site-footer__address a:hover { text-decoration: underline; }

.site-footer__nav { display: none; }

.site-footer__meta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8125rem;
}
.site-footer__meta a { color: var(--color-primary-strong); }
.site-footer__linkedin { display: grid; place-items: center; width: 44px; height: 44px; margin-left: -12px; }
.site-footer__linkedin svg { width: 18px; height: 18px; fill: var(--color-dark); }

@media (min-width: 768px) {
  .site-footer__inner { grid-template-columns: 100px 1fr auto; }
  .site-footer__meta { grid-column: auto; flex-direction: column; align-items: flex-end; gap: 0.25rem; }
  .site-footer__linkedin { margin: 0 -14px -0.5rem 0; }
}
@media (min-width: 1025px) {
  .site-footer__inner { grid-template-columns: 100px auto 1fr auto; gap: 0; }
  .site-footer__address {
    min-width: 300px;
    margin-left: 30px;
    padding: 18px 25px 18px 0;
    border-right: 1px solid var(--color-border);
  }
  .site-footer__nav {
    display: block;
    padding: 18px 30px;
    border-right: 1px solid var(--color-border);
  }
  .site-footer__list { display: flex; justify-content: space-evenly; gap: 1.25rem; }
  .site-footer__list a {
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s;
  }
  .site-footer__list a:hover,
  .site-footer__list a[aria-current="page"] { border-color: var(--color-dark); }
  .site-footer__meta { padding-left: 40px; }
}

/* 12. Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { transition-duration: 0.01ms !important; }
  .team-card:hover,
  .team-card:focus-visible,
  .team-card:hover .team-card__media img { transform: none; }
}
