/*
 * America Environmental Services
 * Master stylesheet. Classes start with aes- so they do not clash with WordPress.
 *
 * 1. Tokens
 * 2. Base (scoped)
 * 3. Layout
 * 4. Components
 * 5. Utilities
 * 6. Page-specific overrides
 *
 * Mobile first. Add min-width queries inside the component that needs them.
 * Do not use @layer. Twenty Twenty-Five's unlayered CSS would win.
 */

/* ==========================================================================
   1. Tokens
   Brand colors and a self-hosted family replace these defaults once confirmed.
   ========================================================================== */

:root {
  --aes-color-text: #24302b;
  --aes-color-bg: #ffffff;
  --aes-color-green: #1b4332;
  --aes-color-yellow: #f5c400;
  --aes-color-yellow-hover: #e0b400;
  --aes-color-muted: #5e675f;
  --aes-color-line: #d9d9d6;
  --aes-color-yes: #218a4d;
  --aes-color-no: #e6e6e4;
  --aes-color-no-mark: #7a7a7a;
  --aes-color-accent: var(--aes-color-green);
  --aes-color-focus: #111111;
  --aes-font-sans: var(--wp--preset--font-family--manrope, system-ui, sans-serif);
  --aes-font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --aes-color-sand: #eceee9;
  --aes-shadow-card: 0 1px 2px rgba(20, 35, 28, 0.06), 0 6px 18px rgba(20, 35, 28, 0.08);
  --aes-shadow-card-hover: 0 2px 4px rgba(20, 35, 28, 0.08), 0 14px 30px rgba(20, 35, 28, 0.14);
  --aes-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --aes-space-2xs: clamp(0.25rem, 0.2rem + 0.2vw, 0.375rem);
  --aes-space-xs: clamp(0.5rem, 0.45rem + 0.3vw, 0.75rem);
  --aes-space-s: clamp(0.75rem, 0.65rem + 0.4vw, 1rem);
  --aes-space-m: clamp(1rem, 0.8rem + 0.8vw, 1.5rem);
  --aes-space-l: clamp(1.5rem, 1.1rem + 1.4vw, 2.5rem);
  --aes-space-xl: clamp(2.5rem, 1.8rem + 2.4vw, 4.5rem);
  --aes-content-max: 72rem;
}

/*
 * Self-hosted fonts. woff2 files directly in ../fonts/ are preloaded.
 * Barlow Condensed (SIL Open Font License), Latin subset, used for headings.
 */
@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   2. Base (scoped)
   Theme element styles still apply inside .aes-page. Override them on
   .aes-page h1 (and similar) when a design needs it, with a comment.
   ========================================================================== */

.aes-page {
  color: var(--aes-color-text);
  font-family: var(--aes-font-sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.5;
  width: 100%;
  background: var(--aes-color-bg);
}

/*
 * Overrides Twenty Twenty-Five theme.json heading weight, link underlines,
 * and default margins inside fragments.
 */
.aes-page h1,
.aes-page h2,
.aes-page h3,
.aes-page p,
.aes-page ul,
.aes-page ol,
.aes-page figure,
.aes-page address {
  margin: 0;
}

.aes-page h1,
.aes-page h2,
.aes-page h3 {
  color: var(--aes-color-green);
  font-family: var(--aes-font-display);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.05;
  text-wrap: balance;
}

.aes-page a {
  color: inherit;
  text-decoration: none;
}

.aes-page address {
  font-style: normal;
}

.aes-page,
.aes-page *,
.aes-page *::before,
.aes-page *::after {
  box-sizing: border-box;
}

/* Keeps the width and height attributes as the aspect-ratio hint. */
.aes-page img {
  max-width: 100%;
  height: auto;
}

/*
 * Intentional element rule: WCAG 2.2 focus visibility inside fragments.
 * On a dark band, set --aes-color-focus to a light color on that component.
 */
.aes-page a:focus-visible,
.aes-page button:focus-visible,
.aes-page input:focus-visible,
.aes-page select:focus-visible,
.aes-page textarea:focus-visible,
.aes-page summary:focus-visible {
  outline: 2px solid var(--aes-color-focus);
  outline-offset: 3px;
}

@media (forced-colors: active) {
  .aes-page a:focus-visible,
  .aes-page button:focus-visible,
  .aes-page input:focus-visible,
  .aes-page select:focus-visible,
  .aes-page textarea:focus-visible,
  .aes-page summary:focus-visible {
    outline: 2px solid CanvasText;
  }
}

/*
 * Required so theme and component motion cannot override the user preference.
 */
@media (prefers-reduced-motion: reduce) {
  .aes-page *,
  .aes-page *::before,
  .aes-page *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   3. Layout
   Twenty Twenty-Five constrains Post Content to 645px. A section stays in
   that column until it also has .aes-bleed.
   ========================================================================== */

.aes-section {
  padding-block: var(--aes-space-xl);
}

/*
 * Full-bleed band inside a centered Custom HTML block.
 *
 * .is-layout-constrained > .alignfull only matches direct block children, so
 * markup inside Custom HTML needs its own breakout:
 *
 * <section class="aes-section aes-bleed">
 *   <div class="aes-wrap">...</div>
 * </section>
 *
 * 100vw includes the scrollbar and can cause a slight horizontal scroll.
 * Do not set overflow hidden on a parent of .aes-bleed; that clips the band.
 * If a Group in the template clips it, set that group's overflow to visible.
 * The editor canvas is narrower than the site, so the band will not match
 * the front end exactly while editing.
 */
.aes-bleed {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/*
 * Intentional body rule. 100vw includes the scrollbar, so a full-bleed
 * fragment sticks out by a few pixels. Clip that sliver.
 */
body:has(.aes-bleed) {
  overflow-x: hidden;
}

@supports (overflow: clip) {
  body:has(.aes-bleed) {
    overflow-x: clip;
  }
}

.aes-wrap {
  width: min(100%, var(--aes-content-max));
  margin-inline: auto;
  padding-inline: var(--aes-space-m);
}

/* ==========================================================================
   4. Components
   ========================================================================== */

.aes-page .aes-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.1rem;
  border: 2px solid transparent;
  border-radius: 4px;
  background: var(--aes-color-yellow);
  color: #17211c;
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.2;
  text-align: center;
}

.aes-page .aes-button {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  transition: background-color 0.18s var(--aes-ease), transform 0.18s var(--aes-ease), box-shadow 0.18s var(--aes-ease);
}

.aes-page .aes-button:hover {
  background: var(--aes-color-yellow-hover);
  color: #17211c;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}

.aes-page .aes-button--ghost {
  background: transparent;
  border-color: #fff;
  color: #fff;
  font-weight: 600;
}

.aes-page .aes-button--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/*
 * The plugin prints the header before .wp-site-blocks and the footer after it.
 * Hide a second copy that was also pasted into the page template.
 */
body > .aes-chrome ~ .wp-site-blocks .aes-chrome {
  display: none;
}

.aes-header {
  background: #fff;
  border-bottom: 1px solid #e7e7e4;
}

.aes-header__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 0.85rem;
}

.aes-header__brand {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.aes-header__permit {
  color: var(--aes-color-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  white-space: nowrap;
}

.aes-page .aes-header__logo {
  display: inline-flex;
  line-height: 0;
}

.aes-page .aes-header__logo img {
  display: block;
  width: min(15.5rem, 64vw);
  height: auto;
}

.aes-header__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--aes-color-line);
  border-radius: 4px;
  background: #fff;
  color: var(--aes-color-green);
  cursor: pointer;
}

.aes-header.is-ready .aes-header__toggle {
  display: inline-flex;
}

.aes-header__glyph {
  display: block;
  width: 1.05rem;
  height: 1px;
  background: currentColor;
  box-shadow: 0 -0.35rem 0 currentColor, 0 0.35rem 0 currentColor;
}

.aes-header.is-open .aes-header__glyph {
  background: transparent;
  box-shadow: none;
  position: relative;
}

.aes-header.is-open .aes-header__glyph::before,
.aes-header.is-open .aes-header__glyph::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1.05rem;
  height: 1px;
  background: currentColor;
}

.aes-header.is-open .aes-header__glyph::before {
  transform: rotate(45deg);
}

.aes-header.is-open .aes-header__glyph::after {
  transform: rotate(-45deg);
}

.aes-header__panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.aes-header.is-ready .aes-header__panel {
  display: none;
}

.aes-header.is-ready.is-open .aes-header__panel {
  display: flex;
  padding-bottom: 0.35rem;
}

.aes-header__nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aes-header__nav a {
  display: inline-flex;
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
  color: #24302b;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.aes-header__nav a:hover,
.aes-header__nav a.is-active {
  color: var(--aes-color-green);
}

.aes-header__nav a.is-active {
  border-bottom-color: var(--aes-color-green);
  font-weight: 700;
}

.aes-header__tools {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.aes-header__phone {
  font-weight: 650;
  font-size: 0.9375rem;
  white-space: nowrap;
}

.aes-header__phone:hover {
  color: var(--aes-color-green);
}

.aes-page .aes-header .aes-button {
  min-height: 2.4rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
  white-space: nowrap;
}

.aes-hero {
  --aes-color-focus: #fff;
  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(28rem, 56vw, 40rem);
  color: #fff;
  isolation: isolate;
}

.aes-hero > *,
.aes-hero::before {
  grid-area: 1 / 1;
}

.aes-hero::before {
  content: "";
  z-index: 1;
  background: linear-gradient(90deg, rgba(6, 16, 12, 0.84) 0%, rgba(6, 16, 12, 0.7) 40%, rgba(6, 16, 12, 0.38) 62%, rgba(6, 16, 12, 0.08) 82%, rgba(6, 16, 12, 0) 100%);
}

.aes-page .aes-hero__media {
  z-index: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 70% center;
}

.aes-hero__content {
  z-index: 2;
  padding-block: clamp(3rem, 7vw, 5.25rem);
}

.aes-hero h1 {
  max-width: 11.5em;
  color: #fff;
  font-size: clamp(2.75rem, 1.4rem + 4.2vw, 5.25rem);
  line-height: 0.98;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.aes-hero__lede {
  max-width: 34rem;
  margin-top: 1.35rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
  font-weight: 500;
  line-height: 1.5;
}

.aes-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.aes-page .aes-hero .aes-button {
  min-height: 3.1rem;
  padding-inline: 1.4rem;
  font-size: 1rem;
}

.aes-trust,
.aes-industries {
  background-color: var(--aes-color-sand);
  background-image: radial-gradient(rgba(27, 67, 50, 0.05) 0.55px, transparent 0.55px);
  background-size: 3px 3px;
}

.aes-trust {
  border-bottom: 1px solid #dfe2dc;
}

.aes-trust__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin: 0;
  padding: 1.5rem 1rem;
  list-style: none;
  color: var(--aes-color-green);
  font-family: var(--aes-font-display);
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-align: center;
}

.aes-streams {
  padding-block: clamp(3.25rem, 6vw, 5.25rem);
}

.aes-streams__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
}

.aes-streams__col {
  display: grid;
  align-content: start;
  gap: 1.35rem;
}

.aes-streams h2,
.aes-industries h2 {
  font-size: clamp(2.1rem, 1.6rem + 1.6vw, 2.85rem);
}

.aes-checklist {
  display: grid;
  gap: 0.95rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aes-checklist li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.0625rem;
  font-weight: 500;
}

.aes-mark {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
}

.aes-mark circle {
  fill: currentColor;
}

.aes-mark path {
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aes-mark--yes {
  color: var(--aes-color-yes);
}

.aes-mark--no {
  color: var(--aes-color-no);
}

.aes-mark--no path {
  stroke: var(--aes-color-no-mark);
}

.aes-industries {
  padding-block: clamp(3.25rem, 6vw, 5rem);
  border-top: 1px solid #dfe2dc;
}

.aes-industries__grid {
  display: grid;
  gap: 1.25rem;
  margin: clamp(1.5rem, 2.5vw, 2rem) 0 0;
  padding: 0;
  list-style: none;
}

.aes-page .aes-industry {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
  box-shadow: var(--aes-shadow-card);
  color: #1d2621;
  transition: transform 0.25s var(--aes-ease), box-shadow 0.25s var(--aes-ease);
}

.aes-page .aes-industry:hover {
  color: var(--aes-color-green);
  transform: translateY(-3px);
  box-shadow: var(--aes-shadow-card-hover);
}

.aes-industry__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #dfe2dc;
}

.aes-page .aes-industry__media img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: transform 0.5s var(--aes-ease);
}

.aes-page .aes-industry:hover .aes-industry__media img {
  transform: scale(1.04);
}

.aes-industry__label {
  display: block;
  padding: 0.85rem 1rem 0.95rem;
  border-top: 3px solid var(--aes-color-green);
  font-size: 0.98rem;
  font-weight: 700;
  text-align: center;
}

.aes-cta {
  --aes-color-focus: #fff;
  background-color: var(--aes-color-green);
  background-image: radial-gradient(120% 140% at 50% 0%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 60%);
  color: #fff;
  text-align: center;
  padding-block: clamp(3.25rem, 6vw, 4.75rem);
}

.aes-cta h2 {
  max-width: 22em;
  margin-inline: auto;
  color: #fff;
  font-size: clamp(1.9rem, 1.4rem + 1.7vw, 2.75rem);
  line-height: 1.1;
}

.aes-page .aes-cta .aes-button {
  min-height: 3.1rem;
  margin-top: 1.6rem;
  padding-inline: 1.6rem;
  font-size: 1rem;
}

.aes-footer {
  background: #fff;
  border-top: 1px solid #e3e5e0;
}

.aes-footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding-block: 1.35rem 1.6rem;
}

.aes-footer__identity {
  display: grid;
  gap: 0.2rem;
}

.aes-page .aes-footer__name {
  color: var(--aes-color-green);
  font-family: var(--aes-font-display);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.1;
}

.aes-footer address {
  color: var(--aes-color-muted);
  font-size: 0.92rem;
}

.aes-footer__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aes-footer__facts li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
}

.aes-footer__facts a:hover {
  color: var(--aes-color-green);
}

.aes-footer__icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  color: var(--aes-color-green);
}

.aes-footer__icon path,
.aes-footer__icon circle,
.aes-footer__icon rect {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 40rem) {
  .aes-industries__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 48rem) {
  .aes-trust__list {
    flex-direction: row;
    justify-content: center;
    gap: 0;
    padding-block: 1.6rem;
  }

  .aes-trust__list li {
    padding-inline: clamp(1.5rem, 3vw, 3.25rem);
    border-left: 1px solid var(--aes-color-line);
  }

  .aes-trust__list li:first-child {
    border-left: 0;
  }
}

@media (min-width: 64rem) {
  .aes-streams__grid,
  .aes-industries__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 72rem) {
  .aes-header__bar {
    flex-wrap: nowrap;
    gap: 1.5rem;
  }

  .aes-header__brand {
    flex: 0 0 auto;
  }

  .aes-page .aes-header__logo img {
    width: 12.5rem;
  }

  .aes-header.is-ready .aes-header__toggle {
    display: none;
  }

  .aes-header__panel,
  .aes-header.is-ready .aes-header__panel,
  .aes-header.is-ready.is-open .aes-header__panel {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 1.75rem;
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
  }

  .aes-header__nav ul {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1.35rem;
  }

  .aes-header__nav li,
  .aes-header__tools,
  .aes-header__phone {
    flex-shrink: 0;
  }

  .aes-header__nav a {
    padding-block: 0.15rem;
  }

  .aes-streams__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0;
  }

  .aes-streams__col {
    padding-inline: clamp(1rem, 3vw, 2.5rem) 0;
  }

  .aes-streams__col + .aes-streams__col {
    padding-inline: clamp(2.5rem, 6vw, 5rem) 0;
    border-left: 1px solid var(--aes-color-line);
  }

  .aes-industries__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

/* ==========================================================================
   5. Utilities
   ========================================================================== */

/* Hidden visually, still available to assistive technology. */
.aes-u-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   6. Page-specific overrides
   Prefer assets/css/pages/{slug}.css. Use this section only for a rule that
   has to ship in the master file, for example .aes-page--home .aes-hero.
   ========================================================================== */
