/* ============================================================
   EcoTail Consulting — main stylesheet
   Edit design tokens below to retheme the whole site.
   ============================================================ */

:root {
  /* Brand colour tokens */
  --ink:        #0B2E33;   /* headings / near-black teal */
  --teal:       #10505C;   /* primary brand teal */
  --teal-deep:  #0C3B44;   /* dark panels, footer */
  --leaf:       #74A63F;   /* brand green accent */
  --leaf-dark:  #567F2B;   /* green hover / borders */
  --leaf-soft:  #EAF2DE;   /* pale green tint */
  --mist:       #EDF3F1;   /* light section background */
  --paper:      #FFFFFF;
  --muted:      #3F5B59;   /* body copy on light */
  --line:       #D6E1DF;   /* hairline borders */
  --on-dark:    #D9E7E4;   /* body copy on teal */

  /* Type */
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body:    "Public Sans", "Segoe UI", sans-serif;
  --font-mono:    "IBM Plex Mono", "Courier New", monospace;

  /* Rhythm */
  --max-w: 1180px;
  --radius: 10px;
  --pad-section: clamp(64px, 9vw, 120px);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--leaf-dark); }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 2px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p  { margin: 0 0 1em; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 22px; }
.section { padding: var(--pad-section) 0; }
.section--mist { background: var(--mist); }
.section--teal { background: var(--teal-deep); color: var(--on-dark); }
.section--teal h2, .section--teal h3 { color: #fff; }

/* Instrumentation-style eyebrow: SEC 03 / SERVICES */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--leaf-dark);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 34px; height: 2px;
  background: var(--leaf);
}
.section--teal .eyebrow { color: #A7CE73; }
.section--teal .eyebrow::before { background: #A7CE73; }

.lead { font-size: 1.13rem; max-width: 62ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--leaf); color: #fff; }
.btn--primary:hover { background: var(--leaf-dark); color: #fff; }
.btn--ghost { border-color: var(--teal); color: var(--teal); background: transparent; }
.btn--ghost:hover { background: var(--teal); color: #fff; }
.btn--ghost-light { border-color: rgba(255,255,255,0.55); color: #fff; background: transparent; }
.btn--ghost-light:hover { background: #fff; color: var(--teal-deep); }

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 88px;
}
.nav__logo img { height: 64px; width: auto; }
.nav__links {
  display: flex; gap: 26px; align-items: center;
  list-style: none; margin: 0; padding: 0;
}
.nav__links a {
  font-family: var(--font-display);
  font-size: 0.95rem; font-weight: 500;
  color: var(--ink);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav__links a:hover { color: var(--leaf-dark); }
.nav__links a[aria-current="page"] { border-bottom-color: var(--leaf); color: var(--teal); }
.nav__cta { margin-left: 6px; }
.nav__toggle {
  display: none;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav__toggle span {
  display: block; width: 26px; height: 3px; margin: 5px 0;
  background: var(--teal); border-radius: 2px; transition: transform 0.25s, opacity 0.25s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    url("../assets/contours.svg") center/cover no-repeat,
    linear-gradient(140deg, var(--teal-deep) 0%, var(--teal) 62%, #176472 100%);
  color: var(--on-dark);
  overflow: hidden;
}
.hero .container {
  position: relative;
  padding-top: clamp(80px, 11vw, 150px);
  padding-bottom: clamp(80px, 11vw, 150px);
}
.hero h1 { color: #fff; max-width: 17ch; }
.hero .lead { color: var(--on-dark); }
.hero__kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: #A7CE73; margin-bottom: 18px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

/* Page heroes (inner pages) */
.page-hero {
  background:
    url("../assets/contours.svg") center/cover no-repeat,
    linear-gradient(140deg, var(--teal-deep), var(--teal));
  color: var(--on-dark);
  padding: clamp(56px, 8vw, 96px) 0;
}
.page-hero h1 { color: #fff; }
.page-hero p { max-width: 62ch; }

/* ---------- Stats band ---------- */
.stats {
  background: var(--ink);
  color: #fff;
}
.stats .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-top: 34px; padding-bottom: 34px;
}
.stat { border-left: 2px solid var(--leaf); padding-left: 16px; }
.stat__num { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; }
.stat__label { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: #B9CFCB; }

/* ---------- Card grids ---------- */
.grid { display: grid; gap: 26px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--leaf);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(11,46,51,0.10); }
.card__code {
  font-family: var(--font-mono);
  font-size: 0.74rem; letter-spacing: 0.12em;
  color: var(--leaf-dark);
  margin-bottom: 10px;
}
.card ul { padding-left: 18px; margin: 0; }
.card li { margin-bottom: 6px; }
.card--dark {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.14);
  color: var(--on-dark);
}
.card--dark h3 { color: #fff; }

/* Value chips */
.values { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.value {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
}
.value h3 { font-size: 1.05rem; margin-bottom: 6px; }
.value p { font-size: 0.9rem; margin: 0; }
.value__dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--leaf); margin: 0 auto 12px;
}

/* ---------- Split layout ---------- */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.split__media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 320px;
  background:
    url("../assets/contours.svg") center/cover no-repeat,
    linear-gradient(150deg, var(--teal), var(--teal-deep));
  display: flex; align-items: flex-end;
}
.split__media .photo-note {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.75); padding: 14px 16px;
}
.split__media img { width: 100%; height: 100%; object-fit: cover; }

/* Cross-section divider — signature motif */
.xsection {
  height: 84px;
  background: var(--paper);
  position: relative;
  overflow: hidden;
}
.xsection svg { width: 100%; height: 100%; }

/* ---------- Checklist / process ---------- */
.steps { counter-reset: step; display: grid; gap: 0; border-top: 1px solid var(--line); }
.step {
  display: grid; grid-template-columns: 90px 1fr; gap: 20px;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.step__num {
  font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--leaf-dark); padding-top: 4px;
}
.step h3 { margin-bottom: 4px; }
.step p { margin: 0; }

/* ---------- Team ---------- */
.team { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.person {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px;
}
.person__role {
  font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--leaf-dark); margin-bottom: 14px;
}
.person__creds { font-size: 0.9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }

/* ---------- Project gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery figure {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, var(--mist), #dfe9e6);
  aspect-ratio: 4/3;
  display: flex; align-items: flex-end;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--muted); padding: 10px 12px;
}

/* ---------- CTA band ---------- */
.cta-band {
  background:
    url("../assets/contours.svg") center/cover no-repeat,
    linear-gradient(120deg, var(--teal), var(--teal-deep));
  color: #fff; text-align: center;
}
.cta-band h2 { color: #fff; max-width: 26ch; margin: 0 auto 14px; }
.cta-band p { color: var(--on-dark); max-width: 58ch; margin: 0 auto 26px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(30px, 5vw, 60px); }
.contact-info dl { margin: 0; }
.contact-info dt {
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--leaf-dark); margin-top: 20px;
}
.contact-info dd { margin: 4px 0 0; font-size: 1.05rem; color: var(--ink); }

.form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label {
  display: block; font-family: var(--font-display); font-weight: 600;
  font-size: 0.9rem; color: var(--ink); margin: 16px 0 6px;
}
.form input, .form select, .form textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 8px;
  font: inherit; color: var(--ink); background: #FBFDFC;
}
.form input:focus, .form select:focus, .form textarea:focus {
  border-color: var(--leaf); outline: none; box-shadow: 0 0 0 3px var(--leaf-soft);
}
.form textarea { min-height: 130px; resize: vertical; }
.form .btn { margin-top: 22px; width: 100%; }
.form__status { margin-top: 14px; font-size: 0.92rem; }
.form__status.ok { color: var(--leaf-dark); }
.form__status.err { color: #A3412C; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-deep); color: var(--on-dark); }
.site-footer a { color: #CFE3E0; }
.site-footer a:hover { color: #A7CE73; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 34px; padding: 56px 0 40px;
}
.footer-grid img {
  height: 92px; width: auto; margin-bottom: 16px;
  background: #fff; padding: 12px 14px; border-radius: 10px;
  display: inline-block;
}
.footer-grid h4 {
  color: #fff; font-size: 0.85rem; letter-spacing: 0.1em;
  text-transform: uppercase; font-family: var(--font-mono); font-weight: 500;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.14);
  padding: 18px 0;
  font-size: 0.85rem;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .values { grid-template-columns: repeat(3, 1fr); }
  .split, .contact-grid, .team { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats .container { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav__links {
    position: fixed; inset: 88px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 10px 22px 22px;
    display: none;
  }
  .nav__links.open { display: flex; }
  .nav__links a { padding: 13px 4px; border-bottom: 1px solid var(--line); }
  .nav__cta { margin: 14px 0 0; text-align: center; }
  .nav__toggle { display: block; }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .step { grid-template-columns: 56px 1fr; }
}
@media (max-width: 460px) {
  .values, .gallery { grid-template-columns: 1fr; }
  .stats .container { grid-template-columns: 1fr; }
}
