/* ==========================================================================
   Almar Environmental
   Palette pulled from the logo: forest green, Pacific blue, charcoal.
   ========================================================================== */

:root {
  --green: #00703c;
  --green-600: #005c31;
  --blue: #005da0;
  --blue-700: #00477a;
  --ink: #0b2a3c;          /* deep navy, used for dark sections */
  --ink-2: #123a52;
  --charcoal: #231f20;
  --accent: #c8e85a;       /* lime, carried over from the original CTA */
  --accent-600: #b4d644;

  --bg: #ffffff;
  --bg-soft: #f3f6f4;
  --line: #dfe6e2;
  --text: #1d2a30;
  --muted: #56666e;

  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgb(11 42 60 / .06), 0 8px 24px rgb(11 42 60 / .08);
  --shadow-lg: 0 24px 60px rgb(11 42 60 / .18);

  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(72px, 10vw, 136px);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 7vw, 5.25rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1.1em; }

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }

.sr-only {
  position: absolute; 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: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* Eyebrow -------------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--font-display);
  font-size: .8rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: ""; width: 28px; height: 2px; background: currentColor;
}
.eyebrow-light { color: var(--accent); }
.hero .eyebrow::before { display: none; }
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px rgb(200 232 90 / .25);
}

/* Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-display); font-weight: 600; font-size: .98rem;
  text-decoration: none;
  padding: .8em 1.4em; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-lg { font-size: 1.05rem; padding: .95em 1.7em; }
.btn-block { width: 100%; }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--accent-600); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-600); }
.btn-ghost { color: #fff; border-color: rgb(255 255 255 / .55); }
.btn-ghost:hover { background: rgb(255 255 255 / .12); border-color: #fff; }

.text-link {
  display: inline-flex; gap: .4em; align-items: center;
  font-family: var(--font-display); font-weight: 600;
  color: var(--blue); text-decoration: none;
  border-bottom: 2px solid currentColor; padding-bottom: 2px;
}
.text-link:hover { color: var(--green); }

/* Header --------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  transition: background-color .3s, box-shadow .3s;
}
.site-header.is-scrolled,
.site-header.is-open {
  background: rgb(255 255 255 / .94);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  display: block;
  background: #fff;
  padding: 7px 12px;
  border-radius: 10px;
  transition: padding .3s;
}
.brand img { height: 30px; width: auto; }
.is-scrolled .brand, .is-open .brand { padding-inline: 0; }

.nav { display: flex; align-items: center; gap: 36px; }
.nav ul { display: flex; gap: 32px; margin: 0; padding: 0; list-style: none; }
.nav ul a {
  font-family: var(--font-display); font-weight: 600; font-size: .98rem;
  color: #fff; text-decoration: none; position: relative; padding-block: 6px;
}
.nav ul a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .25s;
}
.nav ul a:hover::after { transform: scaleX(1); }
.is-scrolled .nav ul a { color: var(--ink); }
.is-scrolled .nav ul a::after { background: var(--green); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: rgb(255 255 255 / .16); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.nav-toggle-bar {
  width: 20px; height: 2px; background: #fff; border-radius: 2px;
  transition: transform .25s, background-color .25s;
}
.is-scrolled .nav-toggle, .is-open .nav-toggle { background: var(--bg-soft); }
.is-scrolled .nav-toggle-bar, .is-open .nav-toggle-bar { background: var(--ink); }
.is-open .nav-toggle-bar:first-of-type { transform: translateY(4px) rotate(45deg); }
.is-open .nav-toggle-bar:last-of-type { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto;
    flex-direction: column; align-items: stretch; gap: 20px;
    padding: 12px var(--gutter) 28px;
    background: #fff; box-shadow: 0 16px 30px rgb(11 42 60 / .12);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility 0s .2s;
  }
  .is-open .nav {
    transform: none; opacity: 1; visibility: visible;
    transition: opacity .2s, transform .2s;
  }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a {
    display: block; color: var(--ink); font-size: 1.25rem;
    padding: 14px 0; border-bottom: 1px solid var(--line);
  }
  .nav ul a::after { display: none; }
  .nav-cta { padding-block: 1em; }
}

/* Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  color: #fff;
  isolation: isolate;
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 62% 70%;
  animation: hero-zoom 14s ease-out both;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgb(11 42 60 / .55) 0%, rgb(11 42 60 / 0) 28%),
    linear-gradient(90deg, rgb(11 42 60 / .82) 0%, rgb(11 42 60 / .45) 45%, rgb(11 42 60 / 0) 75%),
    linear-gradient(0deg, rgb(11 42 60 / .7) 0%, rgb(11 42 60 / 0) 45%);
}
.hero-content {
  padding-top: calc(var(--header-h) + 64px);
  padding-bottom: clamp(56px, 10vh, 120px);
}
.hero h1 { max-width: 12ch; margin-bottom: .35em; }
.hero-lede {
  max-width: 38ch;
  font-size: clamp(1.08rem, 1.6vw, 1.3rem);
  color: rgb(255 255 255 / .88);
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

@keyframes hero-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }

@media (max-width: 640px) {
  .hero-media { object-position: 70% 60%; }
  .hero-scrim {
    background: linear-gradient(0deg, rgb(11 42 60 / .92) 0%, rgb(11 42 60 / .55) 55%, rgb(11 42 60 / .35) 100%);
  }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* Highlights ----------------------------------------------------------- */
.highlights { background: var(--ink); color: #fff; }
.highlights-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.highlight {
  display: flex; flex-direction: column; gap: 4px;
  padding: 34px 28px;
  border-left: 1px solid rgb(255 255 255 / .12);
}
.highlight:first-child { border-left: 0; padding-left: 0; }
.highlight-num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -0.02em;
  color: var(--accent);
}
.highlight-label { color: rgb(255 255 255 / .75); font-size: .95rem; }

@media (max-width: 760px) {
  .highlights-grid { grid-template-columns: 1fr; }
  .highlight { padding: 22px 0; border-left: 0; border-top: 1px solid rgb(255 255 255 / .12); }
  .highlight:first-child { border-top: 0; }
}

/* About ---------------------------------------------------------------- */
.about-grid {
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: clamp(40px, 7vw, 96px); align-items: center;
}
.about-media { position: relative; }
.about-media img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.about-media::before {
  content: ""; position: absolute; z-index: -1;
  inset: 36px -24px -24px 36px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--green), var(--blue));
}
.about-badge {
  position: absolute; left: -20px; bottom: 32px;
  max-width: 250px;
  background: #fff; border-radius: var(--radius);
  padding: 18px 22px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  border-left: 4px solid var(--green);
}
.about-badge strong { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.25; color: var(--ink); }
.about-badge span { color: var(--muted); font-size: .92rem; }
.about-copy p { color: var(--muted); font-size: 1.1rem; }
.about-copy h2 { color: var(--ink); }
.about-copy .text-link { margin-top: .5rem; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-media { margin-right: 24px; }
  .about-media img { aspect-ratio: 4 / 3; }
  .about-badge { left: 16px; bottom: -28px; }
  .about-copy { margin-top: 24px; }
}

/* Services ------------------------------------------------------------- */
.services {
  background:
    radial-gradient(1000px 500px at 100% 0%, rgb(0 93 160 / .35), transparent 60%),
    radial-gradient(800px 500px at 0% 100%, rgb(0 112 60 / .3), transparent 60%),
    var(--ink);
  color: #fff;
}
.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 72px); }
.services-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.service-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 32px 26px 30px;
  border-radius: var(--radius-lg);
  background: rgb(255 255 255 / .05);
  border: 1px solid rgb(255 255 255 / .1);
  transition: background-color .3s, border-color .3s, transform .3s;
}
.service-card:hover {
  background: rgb(255 255 255 / .09);
  border-color: rgb(200 232 90 / .5);
  transform: translateY(-4px);
}
.service-num {
  position: absolute; top: 26px; right: 26px;
  font-family: var(--font-display); font-weight: 700; font-size: .9rem;
  color: rgb(255 255 255 / .4); letter-spacing: .08em;
}
.service-icon {
  width: 48px; height: 48px; padding: 11px; margin-bottom: 44px;
  border-radius: 12px; background: var(--accent);
  fill: none; stroke: var(--ink); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.service-card h3 { color: #fff; }
.service-card p { color: rgb(255 255 255 / .72); font-size: 1rem; margin: 0; }

@media (max-width: 1080px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  {
  .services-grid { grid-template-columns: 1fr; gap: 14px; }
  .service-icon { margin-bottom: 24px; }
}

/* Contact -------------------------------------------------------------- */
.contact { background: var(--bg-soft); }
.contact-grid {
  display: grid; grid-template-columns: 1fr 1.15fr;
  gap: clamp(40px, 6vw, 88px); align-items: start;
}
.contact-info h2 { color: var(--ink); max-width: 14ch; }
.contact-list { margin: 2rem 0 0; display: grid; gap: 0; }
.contact-item {
  padding: 20px 0; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 150px 1fr; gap: 16px;
}
.contact-item:last-child { border-bottom: 1px solid var(--line); }
.contact-item dt {
  font-family: var(--font-display); font-weight: 600; font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  padding-top: 3px;
}
.contact-item dd { margin: 0; font-size: 1.1rem; font-weight: 500; color: var(--ink); }
.contact-item a { text-decoration: none; overflow-wrap: anywhere; }
.contact-item a:hover { color: var(--blue); text-decoration: underline; }

.contact-form {
  background: #fff; border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: var(--shadow);
  display: grid; gap: 18px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-weight: 600; font-size: .92rem; color: var(--ink); }
.field label span { color: var(--green); }
.field input, .field textarea {
  width: 100%;
  font: inherit; font-size: 1rem; color: var(--text);
  padding: 13px 15px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--bg-soft);
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus {
  outline: none; background: #fff; border-color: var(--blue);
  box-shadow: 0 0 0 4px rgb(0 93 160 / .12);
}
.field.has-error input, .field.has-error textarea { border-color: #c0392b; }
.form-status { margin: 0; font-size: .95rem; color: var(--muted); min-height: 1.5em; }
.form-status.is-error { color: #c0392b; }
.form-status.is-success { color: var(--green); }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
  .contact-item { grid-template-columns: 1fr; gap: 4px; }
}

/* Footer --------------------------------------------------------------- */
.site-footer { background: var(--ink); color: rgb(255 255 255 / .7); padding-block: 48px; font-size: .95rem; }
.footer-inner {
  display: grid; grid-template-columns: 1fr auto auto; gap: 32px; align-items: center;
}
.footer-brand { display: flex; align-items: center; gap: 20px; }
.footer-brand img { height: 44px; width: auto; background: #fff; padding: 8px 12px; border-radius: 10px; }
.footer-brand p { margin: 0; line-height: 1.45; }
.footer-nav { display: flex; gap: 24px; }
.footer-nav a { text-decoration: none; color: #fff; font-weight: 500; }
.footer-nav a:hover { color: var(--accent); }
.footer-copy { margin: 0; }

@media (max-width: 820px) {
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-brand { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* Reveal on scroll ----------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
.services-grid .reveal:nth-child(2) { transition-delay: .08s; }
.services-grid .reveal:nth-child(3) { transition-delay: .16s; }
.services-grid .reveal:nth-child(4) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
