/* =============================================================================
   Greener Sets — styles.css
   Order: tokens → reset → base type → layout → components → sections → responsive
   ========================================================================== */

/* -----------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Brand colour */
  --green:            #87ae61;  /* brand — decorative fills, hovers, subtle accents */
  --green-accessible: #4d7d24;  /* AA-safe green for text / white-on-green surfaces
                                   (white on this = 4.92:1; as text on white = 4.92:1).
                                   Brand --green fails AA (2.55:1), so it is never used
                                   to carry text or a white icon. */
  --green-dark:       #406915;  /* icon-tile & button hover */
  --green-bright:     #85ce19;  /* hero outline button hover (over dark overlay) */
  --blue:             #4598d3;  /* secondary accent */
  --ink:              #0a333b;  /* headings, footer background */
  --ink-2:            #265661;  /* h4 / h5 */
  --slate:            #486264;  /* h6, contact overlay */
  --muted:            #879b9c;  /* footer copyright */
  --grey-100:         #edf2f7;  /* footer secondary text */
  --grey-50:          #f7fafc;  /* light fills */
  --white:            #ffffff;
  --amber:            #f9b837;  /* services gradient only */

  /* Type */
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Hanken Grotesk', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --fs-hero:    clamp(2.75rem, 0.489rem + 7.065vw, 6rem);
  --fs-display: clamp(2.25rem, 1.728rem + 1.63vw, 3rem);
  --fs-h2:      clamp(1.75rem, 1.576rem + 0.543vw, 2rem);
  --fs-lead:    clamp(1.1rem, 0.995rem + 0.326vw, 1.25rem);
  --fs-eyebrow: clamp(0.8rem, 0.73rem + 0.217vw, 0.9rem);

  /* Layout */
  --container:      1290px;
  --container-narrow: 842px;
  --gutter:         1.5rem;
  --header-h:       72px;
  --radius-cta:     12px;
  --radius-btn:     0.6em;
  --radius-input:   5px;
  --radius-tile:    5px;
  --radius-media:   14px;
  --section-pad:    clamp(4rem, 8vw, 7rem);

  --shadow-card: 0 18px 40px -24px rgba(10, 51, 59, 0.45);
  --shadow-soft: 0 10px 30px -18px rgba(10, 51, 59, 0.35);
  --transition:  200ms ease;
}

/* -----------------------------------------------------------------------------
   2. RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, button { font-family: inherit; }
ul { list-style: none; padding: 0; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); font-weight: 700; line-height: 1.5; color: var(--ink); }

/* Section anchor offset for the sticky header */
:target { scroll-margin-top: calc(var(--header-h) + 1rem); }
section[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

/* -----------------------------------------------------------------------------
   3. BASE TYPE
   -------------------------------------------------------------------------- */
h1 { font-size: 32px; }
h2 { font-size: var(--fs-h2); color: var(--ink); }
h3 { font-size: 24px; }
h4 { font-size: 22px; color: var(--ink-2); }
h5 { font-size: 20px; color: var(--ink-2); }
h6 { font-size: 18px; color: var(--slate); }
p  { color: var(--slate); }

.eyebrow {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-accessible);
  margin-bottom: 0.75rem;
}

/* -----------------------------------------------------------------------------
   4. LAYOUT
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-pad); }

.section-head {
  max-width: var(--container-narrow);
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.section-head h2 { margin-top: 0.25rem; }

/* Accessibility helpers */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  z-index: 200;
  background: var(--white); color: var(--ink);
  padding: 0.6rem 1rem; border-radius: 0 0 8px 8px;
  transition: top var(--transition);
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 3px solid var(--green-accessible);
  outline-offset: 2px;
  border-radius: 3px;
}

/* -----------------------------------------------------------------------------
   5. COMPONENTS
   -------------------------------------------------------------------------- */

/* Icons */
.icon { width: 24px; height: 24px; flex: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  padding: 0.85em 1.6em;
  border: 2px solid transparent;
  border-radius: var(--radius-btn);
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition);
}
.btn:active { transform: translateY(1px); }

.btn--green {
  background: var(--green-accessible);
  color: var(--white);
  border-color: var(--green-accessible);
}
.btn--green:hover,
.btn--green:focus-visible {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn--outline:hover,
.btn--outline:focus-visible {
  background: var(--green-bright);
  border-color: var(--green-bright);
  color: var(--ink);
}

/* Feature list (Reliable / Experienced / Professional) */
.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  margin: 1.5rem 0;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--ink);
}
.feature-list li { display: inline-flex; align-items: center; gap: 0.5rem; }
.feature-list__icon { width: 20px; height: 20px; color: var(--green-accessible); }

/* Info boxes (icon tile + label + value) */
.info-box {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: inherit;
}
.info-box__tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  flex: none;
  background: var(--green-accessible);
  color: var(--white);
  border-radius: var(--radius-tile);
  transition: background var(--transition);
}
.info-box__tile--circle { border-radius: 3em; }
.info-box:hover .info-box__tile,
.info-box:focus-visible .info-box__tile { background: var(--green-dark); }
.info-box__text { display: flex; flex-direction: column; }
.info-box__label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink-2);
}
.info-box__label--h5 { font-size: 20px; }
.info-box__value { color: var(--slate); }
a.info-box:hover .info-box__value { color: var(--green-dark); }

/* Cards */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}
.card {
  background: var(--white);
  border-radius: var(--radius-media);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}
.card__media { aspect-ratio: 16 / 9; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: clamp(1.5rem, 3vw, 2.25rem); display: flex; flex-direction: column; gap: 1rem; }
.card__body h3 { color: var(--ink); }
.card__body a { color: var(--green-accessible); text-decoration: underline; text-underline-offset: 2px; }
.card__body a:hover { color: var(--green-dark); }
.card__highlight { color: var(--green-accessible); font-weight: 700; }

/* Form */
.field { margin-bottom: 1rem; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #cdd8d9;
  border-radius: var(--radius-input);
  background: var(--white);
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.contact-form textarea { resize: vertical; min-height: 8rem; }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #7f9294; }
.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: none;
  border-color: var(--green-accessible);
  box-shadow: 0 0 0 3px rgba(77, 125, 36, 0.25);
}
.contact-form input[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] { border-color: #c0392b; }
.field__error { color: #ffd9d2; font-size: 0.85rem; margin-top: 0.35rem; }
.field--captcha { margin-bottom: 1.25rem; }
.field--captcha .h-captcha { min-height: 78px; }
.field--captcha .h-captcha iframe { max-width: 100%; }
.contact-form__submit { width: 100%; border-radius: var(--radius-input); margin-top: 0.25rem; }
.form-status { margin-top: 0.9rem; font-weight: 700; }
.form-status[data-state="error"] { color: #ffd9d2; }
.form-status[data-state="ok"] { color: var(--white); }
.form-success {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-input);
  padding: 1.5rem;
  color: var(--white);
}
.form-success h3 { color: var(--white); margin-bottom: 0.5rem; }
.form-success a { color: var(--white); text-decoration: underline; }

/* -----------------------------------------------------------------------------
   6. SECTIONS
   -------------------------------------------------------------------------- */

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: 0 1px 0 rgba(10, 51, 59, 0.08), var(--shadow-soft);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}
.header__logo { display: inline-flex; align-items: center; }
.header__logo img { width: auto; height: 40px; }
.header__nav { display: none; align-items: center; gap: 2rem; }
.nav-list { display: flex; align-items: center; gap: 2rem; }
.nav-list a {
  font-family: var(--font-head);
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  padding: 0.25rem 0;
  transition: color var(--transition);
}
.nav-list a:hover { color: var(--green-accessible); }
.header__cta { border-radius: var(--radius-cta); padding: 0.7em 1.3em; }

.header__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid #dfe7e8;
  border-radius: 10px;
  color: var(--ink);
}

/* Mobile drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 51, 59, 0.5);
  z-index: 110;
  opacity: 0;
  transition: opacity var(--transition);
}
.drawer-backdrop.is-open { opacity: 1; }
.drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100dvh;
  width: min(320px, 84vw);
  background: var(--white);
  z-index: 120;
  transform: translateX(100%);
  transition: transform 250ms ease;
  padding: 1.25rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px -20px rgba(10, 51, 59, 0.5);
}
.drawer.is-open { transform: translateX(0); }
.drawer__head { display: flex; justify-content: flex-end; }
.drawer__close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: transparent; border: 1px solid #dfe7e8; border-radius: 10px;
  color: var(--ink);
}
.drawer__list { display: flex; flex-direction: column; gap: 0.25rem; margin: 1.5rem 0; }
.drawer__list a {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--ink);
  padding: 0.75rem 0.25rem;
  border-bottom: 1px solid #eef2f2;
}
.drawer__list a:hover { color: var(--green-accessible); }
.drawer__cta { margin-top: auto; border-radius: var(--radius-cta); }

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(88vh, 760px);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; }
.hero__overlay {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(60deg, #0a333b 0%, rgba(44, 51, 35, 0.5) 100%);
  opacity: 0.55;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding-block: clamp(4rem, 12vw, 7rem);
}
.hero__spacer { display: none; }
.hero__content { max-width: 60ch; }
.hero__title {
  font-size: var(--fs-hero);
  color: var(--white);
  line-height: 1.1;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}
.hero__lead {
  color: var(--white);
  font-size: var(--fs-lead);
  margin-top: 1.25rem;
  max-width: 52ch;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.28);
}
.hero__btn { margin-top: 2rem; }

/* About */
.about { background: var(--white); }
.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
.about__media img { width: 100%; border-radius: var(--radius-media); box-shadow: var(--shadow-card); }
.about__body h2 { margin-bottom: 1rem; }
.about__contacts { display: flex; flex-wrap: wrap; gap: 1.5rem 2rem; margin-top: 1.75rem; }

/* Services */
.services {
  background: linear-gradient(149deg, rgba(249, 184, 55, 0.09) 0%, rgba(135, 174, 97, 0.16) 100%);
}

/* Contact */
.contact { position: relative; isolation: isolate; color: var(--white); overflow: hidden; }
.contact__bg {
  position: absolute; inset: 0; z-index: -2;
  background: url('/assets/images/topography.svg') center / cover no-repeat;
}
.contact__overlay {
  position: absolute; inset: 0; z-index: -1;
  background: var(--slate);
  opacity: 0.98;
}
.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
.contact__intro h2 { color: var(--white); }
.contact__intro > p { color: var(--white); margin: 0.75rem 0 2rem; }
.contact__card {
  background: var(--white);
  border-radius: var(--radius-media);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  box-shadow: var(--shadow-card);
}
.contact__card h3 { color: var(--ink); }
.contact__card > p { margin: 0.9rem 0 1.75rem; }
.contact-rows { display: flex; flex-direction: column; gap: 1.25rem; }

/* Footer */
.site-footer { background: var(--ink); color: var(--white); padding-block: clamp(3rem, 6vw, 4.5rem); }
.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
.footer__brand img { width: auto; height: 40px; }
.footer__copy { color: var(--muted); margin-top: 1rem; }
.footer__nav ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer__nav a {
  font-family: var(--font-head);
  font-weight: 700;
  text-decoration: none;
  color: var(--white);
  transition: color var(--transition);
}
.footer__nav a:hover { color: var(--green); }
.footer__about p { color: var(--white); }
.footer__muted { color: var(--grey-100); margin-top: 1rem; }

/* -----------------------------------------------------------------------------
   7. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (min-width: 48em) {          /* 768px */
  .about__grid { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .contact__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 2fr 1fr 2fr; }
}

@media (min-width: 64em) {          /* 1024px */
  .header__nav { display: flex; }
  .header__toggle { display: none; }
  .hero__inner { grid-template-columns: 62fr 38fr; }
  .hero__spacer { display: block; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
