/* ==========================================================================
   Greatsoil design system
   Loaded on every page. Page-area files (home.css, products.css, contact.css,
   blog.css) add their own rules after this one.
   How to use each component: docs/components.md.

   Screen sizes, smallest first:
     phones   up to 767px   (the base rules)
     tablets  768px and up  (@media (min-width: 768px))
     desktop  1025px and up (@media (min-width: 1025px)), where the full menu shows
   Sizes and colors were measured on the live site at 1440px and 412px wide.
   ========================================================================== */

/* ---------- Font: Work Sans, self-hosted (copied in by eleventy.config.js) ---------- */
@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/work-sans-latin-wght-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Work Sans";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/work-sans-latin-wght-italic.woff2") format("woff2");
}

/* ---------- Design tokens: change a color or size here and it changes everywhere ---------- */
:root {
  /* Brand colors (from the live site's theme) */
  --green: rgb(43 58 14);
  --green-90: rgb(43 58 14 / 0.9); /* see-through green over photos */
  --red: rgb(173 38 39);
  --cream: rgb(250 250 231);
  --yellow-green: rgb(214 215 78);
  --white: #fff;

  /* Supporting colors */
  --gray-bg: rgb(242 242 242); /* light gray section and card background */
  --text: #000;
  --muted: rgb(116 116 116); /* blog card descriptions */

  --font: "Work Sans", Arial, sans-serif;

  /* Type sizes (phone values; larger screens below) */
  --h1: 35px;
  --h2: 28px;
  --h3: 24px;
  --body: 16px;

  /* Layout */
  --container: 1200px; /* width of the content column */
  --gutter: 15px; /* space at the left and right screen edges */
  --section-space: 50px; /* space above and below a section */
  --radius: 10px; /* rounded corners on photos, cards and bands */
  --radius-button: 5px;
}

@media (min-width: 768px) {
  :root {
    --h1: 48px;
    --h2: 34px;
    --body: 18px;
    --gutter: 40px;
    --section-space: 70px;
  }
}

@media (min-width: 1025px) {
  :root {
    --h1: 60px;
    --h2: 40px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* The header stays pinned at the top (see "Header and menu"). When a link
     jumps to a spot on a page (like /about#FAQ), stop that far below the top
     of the screen so the header doesn't cover it. One value per header size. */
  scroll-padding-top: 107px;
}

@media (min-width: 768px) {
  html {
    scroll-padding-top: 196px;
  }
}

@media (min-width: 1025px) {
  html {
    scroll-padding-top: 106px; /* the slim header shown after scrolling */
  }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--body);
  line-height: 1.5;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

/* The image plugin wraps each <img> in a <picture>. This makes the <picture>
   invisible to layout, so the <img> sizes and positions as if it were alone. */
picture {
  display: contents;
}

/* The <source> tags inside a <picture> never show; keep them out of layouts. */
picture > source {
  display: none;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  font-weight: 700;
  line-height: 1.17;
}

h1 {
  color: var(--green);
  font-size: var(--h1);
}

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

h3 {
  color: var(--red);
  font-size: var(--h3);
}

p,
ul,
ol,
dl {
  margin: 0 0 1em;
}

a {
  color: var(--red);
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

/* On dark backgrounds the focus ring is yellow-green so it stays visible. */
.hero__panel :focus-visible,
.cta-band :focus-visible,
.site-bottom :focus-visible,
.menu__submenu :focus-visible {
  outline-color: var(--yellow-green);
}

/* ---------- Helpers ---------- */

/* Hidden on screen, still read by screen readers. */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Google Tag Manager's no-JavaScript frame (base.njk) never shows. */
.gtm-noscript {
  display: none;
}

/* "Skip to content" link for keyboard users; appears when tabbed to. */
.skip-link {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 15px;
  background: var(--white);
  color: var(--green);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Centers content and limits it to the page width. */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* A full-width band of the page with space above and below. */
.section {
  padding-block: var(--section-space);
}

.section--gray {
  background: var(--gray-bg);
}

/* Centered heading and intro text at the top of a section. */
.section__intro {
  max-width: 1000px;
  margin: 0 auto 30px;
  text-align: center;
}

.text-center {
  text-align: center;
}

/* Taller line spacing, used for some paragraphs on the live site. */
.text-loose {
  line-height: 2;
}

/* ---------- Buttons ----------
   <a class="btn">            red button
   <a class="btn btn--outline"> white button with red text and border
   <a class="btn btn--link">  red bold text link ("Learn more")
   Wrap side-by-side buttons in <div class="btn-row">.
   Sizes: the live site gives each button a fixed size for its place on the
   page (hero, text sections, bands). Those sizes are set with the section
   they belong to, below; this is the size everywhere else. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%; /* full width on phones, as live */
  min-height: 41px;
  padding: 8px 30px;
  border: 1px solid transparent;
  border-radius: var(--radius-button);
  background: var(--red);
  color: var(--white);
  font: 700 16px/1.2 var(--font);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s,
    border-color 0.2s;
}

.btn:hover {
  background: var(--green);
}

.btn--outline {
  border-color: var(--red);
  background: var(--white);
  color: var(--red);
}

.btn--outline:hover {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
}

.btn--link {
  width: auto;
  min-height: 0;
  padding: 5px;
  background: none;
  color: var(--red);
}

.btn--link:hover {
  background: none;
  text-decoration: underline;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 30px;
}

/* 404 page: the buttons are centred under the centred text. */
.not-found__actions {
  justify-content: center;
}

@media (min-width: 768px) {
  .btn {
    width: auto;
    min-width: 230px;
    min-height: 55px;
  }

  .btn--link {
    min-width: 0;
    min-height: 0;
  }
}

/* ---------- Header and menu (partials/header.njk) ----------
   The header stays pinned to the top of the screen at every size, as live.
   On desktop it turns into a slimmer bar once the page is scrolled:
   js/main.js adds the class "is-compact" (see the desktop rules below). */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--white);
}

/* Tablets and desktop: as live, the header floats over the page and the page
   always starts the same distance from the top: 120px on tablets, 142px on
   desktop. So each page's heading sits where live's does at every width.
   The header's lower part covers the top of the page, as live (on tablets,
   76px of the hero photo), and the desktop header can shrink without moving
   the page. */
@media (min-width: 768px) {
  .site-header {
    position: fixed;
    inset: 0 0 auto;
  }

  body {
    padding-top: 120px;
  }
}

@media (min-width: 1025px) {
  body {
    padding-top: 142px;
  }
}

/* Phones: logo on the left, menu button on the right. */
.site-header__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  min-height: 107px;
  padding: 16px 10px 10px;
}

.site-header__logo {
  display: block;
}

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

/* Desktop menu and header button are hidden on phones and tablets. */
.site-nav,
.site-header__quote {
  display: none;
}

.menu-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-top: 17px;
  padding: 0;
  border: 0;
  background: var(--red);
  color: var(--white);
  cursor: pointer;
}

/* Tablets: a larger logo and menu button, as live. */
@media (min-width: 768px) {
  .site-header__inner {
    min-height: 196px;
    padding: 25px 18px 25px 40px;
  }

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

  .menu-button {
    width: 52px;
    height: 52px;
    margin-top: 15px;
  }

  .menu-button svg {
    width: 26px;
    height: 19px;
  }
}

.menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu__link {
  display: block;
  color: var(--green);
  letter-spacing: 0.03em;
  text-decoration: none;
}

.menu__link:hover,
.menu__link[aria-current="page"] {
  text-decoration: underline;
}

/* Small down-pointing arrow after "About" and "Resources". */
.menu__chevron {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 2px 3px 12px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

/* Desktop: three columns, as live: logo (2/12 of the width), menu (8/12),
   "Get a Quote" (2/12). The logo is its column less 60px, up to 193px wide,
   so it shrinks smoothly on smaller laptops; the button fills its column. */
@media (min-width: 1025px) {
  /* Lets the bar below size itself from the header's width (cqi units). */
  .site-header {
    container-type: inline-size;
  }

  /* The bar's height is set, not left to its contents, so the slim bar can
     centre its items with "top: 50%" (Safari ignores that in a bar of
     automatic height). It is the logo's height plus 12px above and below,
     at least 131px. --logo-width matches the logo's width rule below. */
  .site-header__inner {
    --logo-width: min((100cqi - 80px) / 6 - 60px, 193px);
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 8fr) minmax(0, 2fr);
    align-items: start;
    gap: 0;
    height: max(131px, 24px + var(--logo-width) * 258 / 363); /* logo file is 363×258 */
    min-height: 0;
    padding: 12px 40px;
  }

  .site-header__logo {
    justify-self: center;
    width: min(100% - 60px, 193px);
  }

  .site-header__logo-img {
    width: 100%;
  }

  /* Top offsets match the live header: menu rows start 67px down, button 50px.
     The side margins make the menu wrap onto a second row where live's does. */
  .site-nav {
    display: block;
    margin: 55px 27px 0;
  }

  .site-header__quote {
    display: inline-flex;
    width: 100%;
    min-width: 0;
    margin-top: 38px;
    padding-inline: 10px;
  }

  .menu-button,
  .mobile-menu {
    display: none;
  }

  /* Slim bar after scrolling: logo at 60% size, everything centred in a bar
     at least 83px tall. Centring uses "top: 50%" and a transform rather
     than align-items, so the change can be animated (below). */
  .site-header__logo,
  .site-nav,
  .site-header__quote {
    position: relative;
    top: 0;
  }

  .site-header.is-compact .site-header__inner {
    height: max(83px, 24px + 0.6 * var(--logo-width) * 258 / 363);
  }

  .site-header.is-compact .site-header__logo {
    width: calc(0.6 * min(100% - 60px, 193px));
  }

  .site-header.is-compact .site-header__logo,
  .site-header.is-compact .site-nav,
  .site-header.is-compact .site-header__quote {
    top: 50%;
    margin-top: 0;
    transform: translateY(-50%);
  }
}

/* The header shrinks and grows over 0.2s, as live. */
@media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
  .site-header__inner,
  .site-header__logo,
  .site-nav,
  .site-header__quote {
    transition:
      height 0.2s ease,
      width 0.2s ease,
      margin 0.2s ease,
      top 0.2s ease,
      transform 0.2s ease;
  }
}

/* Menu across the header (desktop). Wraps to two centered rows, as live. */
.menu--bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.menu--bar > .menu__item {
  position: relative;
}

/* 24px tall rows: the smallest tap target WCAG 2.2 AA allows (live: 23px). */
.menu--bar .menu__link {
  padding: 0 15px;
  font-size: 15px;
  line-height: 24px;
}

/* Drop-down under About and Resources: opens on hover or keyboard focus. */
.menu--bar .menu__submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  min-width: 100%;
  width: max-content;
  margin: 0;
  padding: 0;
  background: var(--red);
  list-style: none;
}

.menu--bar .menu__item--parent:hover > .menu__submenu,
.menu--bar .menu__item--parent:focus-within > .menu__submenu {
  display: block;
}

/* It fades in and slides down 10px as it opens, as live. */
@media (prefers-reduced-motion: no-preference) {
  .menu--bar .menu__submenu {
    transition:
      opacity 0.1s ease-out,
      transform 0.4s ease-out;
  }

  @starting-style {
    .menu--bar .menu__item--parent:hover > .menu__submenu,
    .menu--bar .menu__item--parent:focus-within > .menu__submenu {
      opacity: 0;
      transform: translateY(-10px);
    }
  }
}

.menu--bar .menu__submenu .menu__link {
  padding: 15px 30px 15px 15px;
  color: var(--white);
}

/* Side panel menu (phones and tablets): a <dialog> opened by js/main.js. */
.mobile-menu {
  inset: 0 0 0 auto;
  width: min(330px, 85vw);
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: var(--white);
  color: var(--green);
  overflow-y: auto;
}

.mobile-menu::backdrop {
  background: rgb(0 0 0 / 0.4);
}

.mobile-menu__panel {
  position: relative;
  min-height: 100%;
  padding: 80px 20px 30px;
}

/* Close button: a plain red ✕, as live. */
.mobile-menu__close {
  position: absolute;
  top: 32px;
  right: 11px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--red);
  cursor: pointer;
}

.mobile-menu__close svg {
  width: 18px;
  height: 18px;
}

/* Phones: 16px items, 47px apart, as live. */
.menu--panel .menu__link {
  padding: 11.5px 0;
  font-size: 16px;
  line-height: 24px;
}

/* The sub-items (FAQ, Blog, Calculator) always show (decision D27). */
.menu--panel .menu__submenu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu--panel .menu__submenu .menu__link {
  padding: 5px 12px;
}

.menu--panel .menu__chevron {
  display: none;
}

.mobile-menu__quote {
  min-height: 53px;
  margin-top: 35px;
}

.mobile-menu__phone {
  display: inline-block;
  margin-top: 16px;
  color: var(--red);
  font-size: 24px;
}

/* Tablets: a wider panel with larger items, as live. */
@media (min-width: 768px) {
  .mobile-menu {
    width: 392px;
  }

  .mobile-menu__panel {
    padding: 143px 40px 30px;
  }

  .mobile-menu__close {
    top: 46px;
    right: 24px;
  }

  .mobile-menu__close svg {
    width: 24px;
    height: 24px;
  }

  .menu--panel .menu__link {
    padding: 11px 0;
    font-size: 22px;
    line-height: 33px;
  }

  .menu--panel .menu__submenu .menu__link {
    padding: 10px 12px;
    font-size: 20px;
    line-height: 30px;
  }

  .mobile-menu__quote {
    width: 236px;
    min-width: 0;
    min-height: 55px;
    margin-top: 70px;
  }
}

/* Slide the panel in from the right, unless the visitor asked for less motion. */
@media (prefers-reduced-motion: no-preference) {
  .mobile-menu {
    transform: translateX(100%);
    transition:
      transform 0.3s ease,
      overlay 0.3s allow-discrete,
      display 0.3s allow-discrete;
  }

  .mobile-menu[open] {
    transform: none;
  }

  @starting-style {
    .mobile-menu[open] {
      transform: translateX(100%);
    }
  }

  /* The dimmed page behind it fades in and out, as live. */
  .mobile-menu::backdrop {
    opacity: 0;
    transition:
      opacity 0.3s ease-out,
      overlay 0.3s allow-discrete,
      display 0.3s allow-discrete;
  }

  .mobile-menu[open]::backdrop {
    opacity: 1;
  }

  @starting-style {
    .mobile-menu[open]::backdrop {
      opacity: 0;
    }
  }
}

/* ---------- Photo backgrounds (CTA bands, footer) ----------
   A band holds an <img class="bg-layer"> as its first child; the image fills
   the band behind the content. Add bg-layer--parallax for the scroll effect. */
.bg-layer {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
}

/* Parallax: on desktop the photo drifts down as the page scrolls, so it moves
   slower than the content. Browsers without scroll-driven animations (and
   visitors who prefer reduced motion) get a still photo instead. */
@supports (animation-timeline: view()) {
  @media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
    .cta-band,
    .site-bottom {
      view-timeline: --parallax;
    }

    .bg-layer--parallax {
      top: -15vh;
      height: calc(100% + 30vh);
      animation: parallax linear both;
      animation-timeline: --parallax;
    }
  }
}

@keyframes parallax {
  from {
    transform: translateY(-15vh);
  }

  to {
    transform: translateY(15vh);
  }
}

/* ---------- Hero (partials/hero.njk) ---------- */
.hero {
  display: grid;
}

/* The panel is a size container, so the h1 below can be sized to fit it. */
.hero__panel {
  container-type: inline-size;
  padding: 68px var(--gutter) 61px;
  background: var(--green);
  color: var(--white);
}

/* The h1 shrinks on narrow panels so its longest word still fits inside the
   panel (the live site breaks words like "Amendments" in the middle instead).
   cqi = 1% of the panel's text width. The formula fits a 6.6em word, such as
   "Amendments" or "Conservation", in the text width plus 30px of the panel's
   right padding. */
.hero__panel h1 {
  margin-bottom: 12px;
  color: var(--white);
  font-size: min(var(--h1), calc(15.15cqi + 4.5px));
  line-height: 1.19; /* live's line spacing for this heading */
}

.hero__lead {
  font-size: 19px;
  line-height: 1.5;
}

.hero__panel .btn {
  min-height: 53px;
  margin-top: 10px;
}

.hero__media {
  position: relative;
  min-height: 259px;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Blog post hero: red panel with the date. */
.hero--post .hero__panel {
  padding: 58px var(--gutter) 59px;
  background: var(--red);
  text-align: center;
}

.hero__date {
  margin: 0 0 7px;
  font-size: 15px;
  line-height: 27px;
}

/* Phones: the date and title sit 27px further in than the page text, as live. */
.hero--post .hero__panel > * {
  margin-inline: 27px;
}

.hero--post .hero__panel h1 {
  margin-bottom: 8px;
}

/* Phones: the post photo is cropped from the top, as live. */
.hero--post .hero__img {
  object-position: center top;
}

@media (min-width: 768px) {
  /* Fixed columns (5/12 text, 7/12 photo), whatever the h1 says. */
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .hero__panel {
    padding: 122px 40px 130px 50px;
  }

  .hero__panel h1 {
    margin-bottom: 24px;
  }

  .hero__lead {
    margin-bottom: 32px;
    font-size: 24px;
  }

  /* Live's post panel is a third of the screen. On tablets that leaves its
     title a few letters per line, so ours takes 45% there. */
  .hero--post {
    grid-template-columns: 45% minmax(0, 1fr);
    column-gap: 40px;
  }

  .hero--post .hero__panel {
    padding: 120px 40px 120px 60px;
    text-align: left;
  }

  .hero--post .hero__panel > * {
    margin-inline: 0;
  }

  .hero--post .hero__panel h1 {
    margin-bottom: 0;
  }

  .hero--post .hero__img {
    object-position: center;
  }

  .hero__date {
    margin: 0;
    font-size: 16px;
    line-height: 28px;
  }

  .hero__panel .btn {
    width: min(249px, 100%);
    min-width: 0;
    margin-top: 0;
  }
}

@media (min-width: 1025px) {
  .hero--post {
    grid-template-columns: 33.333% minmax(0, 1fr);
  }
}

/* ---------- Split text and photos (partials/split.njk) ---------- */
.split__inner {
  display: grid;
  gap: 30px;
}

.split__media {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 10px;
}

.split__img {
  width: 100%;
  height: 100%;
  min-height: 184px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Live leaves one empty line between paragraphs: a gap of one line height. */
.split__text > p {
  margin-bottom: 1lh;
}

/* Phones: the section right under a page hero starts 40px below its photo,
   as live (110px on larger screens, below). */
.hero + .split {
  padding-top: 40px;
}

/* Product pages' text beside the photo pair: spacing as live. */
.split--wide-media .split__text h2 {
  margin-bottom: 22px;
}

.split--wide-media .split__text p:has(+ .btn) {
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .split__inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px 70px;
  }

  .split__text {
    align-self: center;
  }

  /* The section right under a page hero starts 110px below it, as live. */
  .hero + .split {
    padding-top: 110px;
  }

  .split--wide-media .split__text p:has(+ .btn) {
    margin-bottom: 32px;
  }

  .split--wide-media .split__text .btn {
    width: min(289px, 100%);
    min-width: 0;
    min-height: 53px;
  }

  .split--wide-media .split__inner {
    grid-template-columns: 1fr 2fr;
    gap: 40px;
  }

  .split--reverse .split__media {
    order: -1;
  }

  .split__img {
    min-height: 400px;
  }
}

/* ---------- Card grid (partials/card-grid.njk) ---------- */
.card-grid {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 25px;
  border-radius: var(--radius);
  background: var(--gray-bg);
}

.card__img {
  width: 100%;
  height: 234px;
  margin-bottom: 20px;
  object-fit: cover;
  border-radius: var(--radius);
}

.card__title {
  margin-bottom: 15px;
}

.card__text {
  flex: 1;
}

.card__link {
  align-self: flex-start;
}

/* Three even columns on tablets and desktop (decision D28). */
@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- CTA bands (partials/cta-band.njk) ---------- */
.cta-band {
  position: relative;
  isolation: isolate; /* keeps the photo and tint behind this band's text */
  overflow: clip;
  color: var(--white);
}

.cta-band h2,
.cta-band h3 {
  color: var(--white);
}

.cta-band > .cta-band__content > :last-child {
  margin-bottom: 0;
}

/* Rounded band inside the page width (product pages, About). */
.cta-band-wrap {
  margin-block: 50px;
  padding-inline: 0;
}

.cta-band--rounded {
  padding: 10px var(--gutter) 25px;
  border-radius: var(--radius);
  background: var(--green);
}

/* Spacing as live: heading, text, then the buttons. */
.cta-band--rounded h2 {
  margin-bottom: 12px;
}

.cta-band--rounded p {
  margin-bottom: 35px;
}

.cta-band--rounded::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(43 58 14 / 0.8);
}

@media (min-width: 768px) {
  .cta-band-wrap {
    padding-inline: var(--gutter);
  }

  .cta-band--rounded {
    padding: 32px 30px 40px;
  }

  .cta-band--rounded h2 {
    margin-bottom: 4px;
  }

  .cta-band--rounded p {
    margin-bottom: 34px;
  }

  .cta-band--rounded .btn {
    min-width: 285px;
  }
}

/* Desktop: the heading and text sit 10px further in than the buttons. */
@media (min-width: 1025px) {
  .cta-band--rounded h2,
  .cta-band--rounded p {
    margin-inline: 10px;
  }
}

/* Full-width photo with a green box of centered text (home page). */
.cta-band--panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(0 0 0 / 0.13);
}

.cta-band--panel .cta-band__content {
  padding: 50px var(--gutter);
  background: var(--green-90);
  text-align: center;
}

.cta-band--panel h2 {
  font-weight: 600;
}

@media (min-width: 768px) {
  .cta-band--panel .cta-band__content {
    width: min(720px, 60%);
    margin-left: 7%;
    padding: 100px 50px;
  }
}

/* ---------- FAQ accordion (partials/faq.njk) ----------
   Each question is a row with a red line under it; its answer opens below
   the line. Spacing as live. */
.faq {
  padding-block: 50px;
}

.faq__title {
  margin-bottom: 27px;
}

.faq__list {
  max-width: var(--container);
  margin-inline: auto;
}

.faq__item {
  margin-bottom: 10px;
}

.faq__item:last-child {
  margin-bottom: 0;
}

.faq__question {
  position: relative; /* for the plus sign's turning bar (::before) */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 20px 20px;
  border-bottom: 1px solid var(--red);
  list-style: none;
  cursor: pointer;
}

/* The question text is an <h3>, as live; it keeps the row's look. */
.faq__q {
  margin: 0;
  color: var(--green);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.17;
}

.faq__question::-webkit-details-marker {
  display: none;
}

/* Plus sign in a cream circle: ::after is the circle with the flat bar,
   ::before the upright bar laid over its centre. When the answer opens, the
   upright bar turns flat, so the plus becomes a minus (animated, as live). */
.faq__question::after {
  content: "";
  flex: none;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background:
    linear-gradient(var(--red), var(--red)) center / 15px 2px no-repeat,
    var(--cream);
}

/* Centred on the circle: 20px right padding plus half the circle, less half
   the bar; 5px above the middle, as the row has 10px more padding below. */
.faq__question::before {
  content: "";
  position: absolute;
  top: calc(50% - 5px - 7.5px);
  right: calc(20px + 11.5px - 1px);
  width: 2px;
  height: 15px;
  background: var(--red);
}

.faq__item[open] > .faq__question::before {
  transform: rotate(90deg);
}

@media (prefers-reduced-motion: no-preference) {
  .faq__question::before {
    transition: transform 0.3s ease-in-out;
  }
}

.faq__answer {
  padding: 18px 20px 17px;
  font-size: 16px;
  line-height: 1.5;
}

.faq__answer > :last-child {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .faq {
    padding-block: 60px 50px;
  }

  .faq__title {
    margin-bottom: 42px;
    text-align: center;
  }

  .faq__item {
    margin-bottom: 27px;
  }

  .faq__question::after {
    width: 27px;
    height: 27px;
  }

  .faq__question::before {
    right: calc(20px + 13.5px - 1px);
  }
}

/* ---------- Photo viewer links (js/photo-viewer.js) ----------
   The script wraps each product photo in a link that opens it full screen.
   The link takes the photo's place without changing the layout. */
.photo-link {
  display: block;
  border-radius: var(--radius);
  cursor: zoom-in;
}

/* ---------- Product grid (partials/product-grid.njk) ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.product__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
}

.product__body {
  padding: 15px;
  background: rgb(255 255 255 / 0.9);
}

.product__name {
  margin-bottom: 0;
  font-weight: 400;
  text-align: center;
}

.product__text {
  font-size: 14px;
  line-height: 1.2;
}

.product__text p {
  margin: 0;
}

.product__text p + p {
  margin-top: 1em;
}

@media (min-width: 1025px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .product__img {
    height: 250px;
    aspect-ratio: auto;
  }

  .product__name {
    text-align: left;
  }
}

/* ---------- Blog cards (partials/blog-card.njk) ---------- */
.blog-grid {
  display: grid;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.blog-card__img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-button);
}

.blog-card__title {
  margin: 15px 0 10px;
  color: var(--red);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.5;
}

.blog-card__title a {
  text-decoration: none;
}

.blog-card__title a:hover {
  text-decoration: underline;
}

.blog-card__text {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}

.blog-card__more {
  color: var(--text);
  font-size: 18px;
  text-decoration: none;
}

.blog-card__more:hover {
  text-decoration: underline;
}

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

/* ---------- Long text: blog posts (layouts/post.njk) ---------- */
.prose {
  max-width: calc(1100px + 2 * var(--gutter));
}

.prose h2 {
  margin-top: 1em;
}

.prose h3 {
  margin-top: 1em;
}

/* ---------- Reviews (partials/reviews.njk) ---------- */
.reviews {
  text-align: center;
}

.reviews__title {
  margin: 0;
}

@media (min-width: 768px) {
  .reviews {
    padding-block: 80px;
  }
}

/* ---------- Bottom of every page (partials/footer.njk) ---------- */
.site-bottom {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: var(--green);
  color: var(--white);
}

.site-bottom a {
  color: var(--white);
}

.site-bottom h2 {
  color: var(--white);
}

/* "Get the Right Soil for Your Project" */
.footer-cta__panel {
  padding: 50px var(--gutter);
  background: var(--green-90);
}

.footer-cta__text p {
  line-height: 2;
}

@media (min-width: 768px) {
  .footer-cta {
    padding-top: 267px; /* shows the photo above the green panel */
  }

  /* Two equal halves, as live: text on the left, the button centred on the
     right, level with the heading. */
  .footer-cta__panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    max-width: 1200px;
    padding: 80px 0;
    border-top-right-radius: var(--radius);
  }

  .footer-cta__text {
    padding: 0 25px 0 80px;
  }

  .footer-cta__text h2 {
    margin-bottom: 4px;
  }

  .footer-cta__text p {
    margin-bottom: 0;
  }

  .footer-cta__action {
    margin-top: 49px;
    padding-inline: 10px;
    text-align: center;
  }

  .footer-cta__button {
    min-width: min(362px, 100%);
  }
}

/* Photo strip: five photos in a row; hidden on phones, as live. */
.photo-strip {
  display: none;
}

@media (min-width: 768px) {
  .photo-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
  }

  .photo-strip__img {
    width: 100%;
    height: 258px;
    object-fit: cover;
  }
}

/* Footer columns */
.site-footer__main {
  padding: 50px var(--gutter) 30px;
  background: var(--green-90);
}

.site-footer__columns {
  display: grid;
  gap: 30px;
}

.site-footer__logo {
  display: none;
}

.site-footer__title {
  margin-bottom: 10px;
  font-size: 20px;
}

.site-footer__phone {
  margin: 0;
  font-size: 18px;
  line-height: 2;
}

.site-footer__address {
  font-size: 16px;
  line-height: 2;
}

.site-footer__links {
  padding: 4px 0 0; /* first link a little lower than the first hours row, as live */
  list-style: none;
}

.site-footer__links a {
  display: inline-block;
  padding-block: 5px;
  font-size: 16px;
  letter-spacing: 0.03em;
  text-decoration: none;
}

/* The page you are on is underlined in red, as live. */
.site-footer__links a:hover,
.site-footer__links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.site-footer__links a[aria-current="page"] {
  text-decoration-color: var(--red);
}

.site-footer__hours {
  font-size: 16px;
}

/* Day and time share a line when they fit; otherwise the time moves to the
   next line whole, so neither breaks in the middle. */
.site-footer__hours div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  column-gap: 10px;
  padding-block: 5px;
}

/* The first row sits right under the heading, as live. */
.site-footer__hours div:first-child {
  padding-top: 0;
}

.site-footer__hours dt,
.site-footer__hours dd {
  margin: 0;
  white-space: nowrap;
}

.site-footer__hours dd {
  text-align: right;
}

.site-footer__copyright {
  margin: 22px 0 0;
  padding: 25px 0 0;
  border-top: 1px solid var(--white);
  font-size: 16px;
  text-align: center;
}

/* Tablets and desktop: four equal columns with no gap, as live; the logo is
   in the first. */
@media (min-width: 768px) {
  .site-footer__main {
    padding: 70px 80px 30px;
  }

  .site-footer__columns {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 0;
  }

  .site-footer__logo {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-top: -10px;
  }

  .site-footer__logo-img {
    width: 100px;
  }
}

@media (min-width: 1025px) {
  .site-footer__logo-img {
    width: 141px;
  }
}
