/* ==========================================================================
   Willow Landscapes — stylesheet
   Mobile-first; restored brochure layout on desktop.

   Layout structure (desktop):
     body                — background image provides grey top / green band / grey bottom
       .mobile-header     — fixed top bar (mobile only, hidden on desktop)
       .page              — centred max-width container
         .title-row        — TRANSPARENT; body bg shows through. Has title+address.
         .frame            — white box, 10px white padding around inner contents
           .menu-row        — left padding (logo space) + nav row
           [page content slot — index.php inserts hero, main, footer here]
         .logo-float       — absolutely positioned, hangs over title-row/frame seam
   ========================================================================== */

:root {
  --green-dark:      #193d02;
  --green-deepest:   #003000;
  --green-mid:       #2d5a16;
  --text:            #212121;
  --text-muted:      #555;
  --white:           #ffffff;

  --content-max:     900px;
  --frame-pad:       10px;
  --header-height-mobile:  96px;
  --logo-size-desktop:    200px;   /* image size */
  --logo-gutter:          160px;   /* reserved column in the header grids — narrower than the logo image so title/nav can shift left under the logo's overhang */
  --logo-size-mobile:      42px;

  --font-display: "Sansation", "Trebuchet MS", sans-serif;
  --font-body:    "Sansation", "Trebuchet MS", sans-serif;
  --nav-font-size: 0.9rem;
}

/* ---------- Sansation ---------- */
@font-face { font-family: "Sansation"; src: url("fonts/Sansation_Light.ttf")   format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Sansation"; src: url("fonts/Sansation_Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Sansation"; src: url("fonts/Sansation_Bold.ttf")    format("truetype"); font-weight: 700; font-display: swap; }

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(15px, 1.6vw, 16px);
  line-height: 1.55;
  color: var(--text);
  /* Background image provides the grey-top / green-band / grey-bottom look.
     Fixed so it doesn't scroll vertically, centred horizontally,
     repeats horizontally only. Swap the filename for the real asset. */
  background: #d9d9d9 url("images/body-bg.jpg") repeat-x fixed top center;
  /* Push content below the fixed mobile header on mobile */
  padding-top: var(--header-height-mobile);
}

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

a { color: var(--green-dark); text-decoration: underline; text-underline-offset: 2px; }
a:hover, a:focus { color: var(--green-mid); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--green-dark);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(1.4rem, 3vw, 1.75rem); }
h2 { font-size: clamp(1.2rem, 2.4vw, 1.4rem); }
h3 { font-size: clamp(1.05rem, 2vw, 1.15rem); }
p  { margin: 0 0 1em; }

/* Title colour spans — apply at every viewport size */
.title-sheffield  { color: #4d8a29; }
.title-landscaper { color: #345f19; }
.title-tld        { color: #4d8a29; }

/* ==========================================================================
   MOBILE HEADER  —  fixed bar; hidden on desktop
   ========================================================================== */

.mobile-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height-mobile);
  background: var(--white);
  border-bottom: 1px solid #ddd;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: 60px 36px;
  grid-template-areas:
    "brand    toggle"
    "cta      cta";
  align-items: center;
  padding: 0 12px;
  column-gap: 10px;
}
.mobile-header__brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}
.mobile-header__logo {
  width: var(--logo-size-mobile);
  height: var(--logo-size-mobile);
  flex-shrink: 0;
}
.mobile-header__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.95rem, 4vw, 1.2rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  grid-area: toggle;
  background: transparent;
  border: 1px solid var(--green-dark);
  border-radius: 4px;
  width: 40px;
  height: 40px;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-toggle__bars {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--green-dark);
  position: relative;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--green-dark);
}
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after  { top:  7px; }

.header-call-cta {
  grid-area: cta;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  margin: 0 -12px;
  background: linear-gradient(to bottom, #569733 0%, #326018 100%);
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.95rem;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
  border-top: 1px solid #84c859;
  border-bottom: 1px solid #5d7e47;
}
.header-call-cta strong { font-weight: 400; }

/* ==========================================================================
   PAGE / TITLE-ROW / FRAME / LOGO  —  hidden or stripped on mobile
   ========================================================================== */

.page {
  position: relative;
  max-width: var(--content-max);
  margin: 0 auto;
}

.title-row {
  /* Hidden on mobile — mobile-header takes its place */
  display: none;
}

.frame {
  background: var(--white);
  padding: 0;
}

.logo-float {
  /* Hidden on mobile — mobile-header has its own small logo */
  display: none;
}

.menu-row {
  /* On mobile, holds only the slide-down nav (position:fixed),
     so this element itself is structural-only with no visible footprint. */
}

/* ==========================================================================
   PRIMARY NAV (mobile: slide-down panel)
   ========================================================================== */

.primary-nav {
  position: fixed;
  top: var(--header-height-mobile);
  left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid #ddd;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transform: translateY(-110%);
  visibility: hidden;
  transition: transform 0.25s ease, visibility 0s linear 0.25s;
  z-index: 99;
  /* Never taller than the space below the fixed header; scroll inside if needed */
  max-height: calc(100vh - var(--header-height-mobile));
  max-height: calc(100dvh - var(--header-height-mobile));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.primary-nav[data-open="true"] {
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.25s ease, visibility 0s linear 0s;
}
.primary-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav__list a {
  display: block;
  padding: 14px 18px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  background: var(--green-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--green-mid);
}
.primary-nav__has-submenu > a {
  padding-right: 60px;     /* room for the chevron toggle button */
}
.primary-nav__list a:hover,
.primary-nav__list a:focus,
.primary-nav__list a[aria-current="page"] {
  background: var(--green-mid);
}
.primary-nav__phone {
  display: block;
  padding: 14px 18px;
  background: var(--green-deepest);
  color: var(--white);
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
}
.primary-nav__phone-li { display: none; }

/* ---------- Submenu (mobile) ---------- */
.primary-nav__has-submenu {
  position: relative;
}
.primary-nav__submenu-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 50px;
  height: 50px;
  background: transparent;
  border: none;
  border-left: 1px solid var(--green-mid);
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
.primary-nav__has-submenu[data-submenu-open="true"] .primary-nav__submenu-toggle {
  transform: rotate(180deg);
}
.primary-nav__submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.primary-nav__has-submenu[data-submenu-open="true"] .primary-nav__submenu {
  max-height: 800px;  /* large enough to fit all items */
}
.primary-nav__submenu a {
  display: block;
  padding: 10px 18px 10px 36px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--white);
  background: var(--green-mid);
  text-decoration: none;
  border-bottom: 1px solid var(--green-dark);
}
.primary-nav__submenu a:hover,
.primary-nav__submenu a:focus {
  background: var(--green-dark);
}

@media (prefers-reduced-motion: reduce) {
  .primary-nav__submenu,
  .primary-nav__submenu-toggle { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .primary-nav { transition: none; }
}

/* ==========================================================================
   HERO / CAROUSEL
   ========================================================================== */

.hero {
  background: var(--green-deepest);
  position: relative;
  overflow: hidden;
}
.hero__slides {
  position: relative;
  width: 100%;
  /* Mobile: taller carousel — about twice the height of the desktop ratio.
     Desktop overrides this in the @media block below. */
  aspect-ratio: 898 / 590;
  max-width: 898px;
  margin: 0 auto;
}
.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: heroFade 20s infinite;
}
.hero__slide:nth-child(1) { animation-delay:  0s; }
.hero__slide:nth-child(2) { animation-delay:  5s; }
.hero__slide:nth-child(3) { animation-delay: 10s; }
.hero__slide:nth-child(4) { animation-delay: 15s; }
@keyframes heroFade {
  0%, 20%   { opacity: 1; }
  25%, 95%  { opacity: 0; }
  100%      { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__slide { animation: none; }
  .hero__slide:nth-child(1) { opacity: 1; }
  .hero__slide:not(:nth-child(1)) { display: none; }
}
.hero__caption {
  /* Hidden for now: original carousel images already have captions and the
     logo baked into them. Once clean images are available, remove `display:none`. */
  display: none;
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--white);
  text-align: center;
  font-size: clamp(0.85rem, 2vw, 1rem);
}

/* ==========================================================================
   MAIN  —  mobile: single column; desktop: 2-column grid
   ========================================================================== */

.main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.sidebar {
  display: none;     /* hidden on mobile — services live in the nav submenu instead */
  background: var(--green-dark) url("images/green-bg.jpg") center / cover no-repeat;
  color: var(--text);
  padding: 14px 16px;
}
.sidebar h2 {
  color: var(--white);
  font-size: 1rem;
  margin: 0 0 0.5em;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li {
  position: relative;
  padding: 4px 0 2px 20px;
  font-size: 0.85rem;
  line-height: 1.25;
  color: var(--text);
}
.sidebar li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 12px; height: 12px;
  background: #003000;
  border-radius: 50%;
}
.sidebar a { color: var(--text); text-decoration: none; }
.sidebar a:hover, .sidebar a:focus { text-decoration: underline; }

.content { padding: 20px; }

/* ---------- Project gallery (on individual service pages) ---------- */
.project-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0;
}
.project-gallery__item {
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
}
.project-gallery__item img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Service page call-to-action ---------- */
.service-cta {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e6e6e6;
}
.service-cta p {
  margin-bottom: 14px;
}
.btn-more--ghost {
  background: transparent;
  color: var(--green-dark);
  border-color: var(--green-dark);
  text-shadow: none;
  margin-left: 8px;
}
.btn-more--ghost:hover,
.btn-more--ghost:focus {
  background: var(--green-dark);
  color: var(--white);
}

/* ---------- Portfolio grid ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.portfolio-grid__item {
  display: block;
  overflow: hidden;
  border-radius: 15px;
  aspect-ratio: 4 / 3;
}
.portfolio-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.portfolio-grid__item:hover img { transform: scale(1.05); }
.portfolio-empty {
  padding: 20px;
  background: #f4f4f0;
  border-radius: 8px;
  text-align: center;
}

/* ---------- Testimonials ----------
   Each testimonial is a 3-column grid sitting on the green-bg texture:
   polaroid cut-out (left) | quote (middle) | silhouette cut-out (right).
   The polaroids and silhouettes are transparent PNGs so they sit cleanly
   on the shared green background.
   Mobile: green-bg fills the block, polaroid above the text, silhouette hidden. */
.testimonials {
  display: grid;
  gap: 18px;
  margin: 24px 0;
}
.testimonial {
  position: relative;
  margin: 0;
  display: grid;
  grid-template-columns: 190px 1fr 150px;
  align-items: end;          /* polaroid + figure sit on the bottom edge */
  gap: 8px;
  padding: 0;
  background: var(--green-dark) url("testimonials/green-bg.jpg") center / cover no-repeat;
  color: var(--white);
  border-radius: 12px;
  overflow: hidden;
}

/* Polaroid project photo (transparent PNG cut-out) — touches the bottom edge */
.testimonial__photo {
  width: 100%;
  height: auto;
  display: block;
  align-self: end;
}

/* Quote text — keeps its own padding since the block padding is now 0 */
.testimonial__body {
  position: relative;
  z-index: 1;
  padding: 20px 12px;
  font-size: 0.92rem;
}
.testimonial__body p { margin: 0 0 0.5em; }
.testimonial__body cite {
  display: block;
  margin-top: 0.3em;
  font-style: normal;
  font-weight: 700;
  color: var(--white);
  font-size: 0.95rem;
}

/* Silhouette figure (transparent PNG cut-out) — flush to bottom AND right */
.testimonial__figure {
  width: 100%;
  height: auto;
  display: block;
  align-self: end;
}

/* Faint decorative quote mark behind the figure */
.testimonial::after {
  content: "\201D";
  position: absolute;
  right: 150px;
  bottom: -28px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 7rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.16);
  pointer-events: none;
  z-index: 0;
}

/* Mobile: single column — polaroid on top, text below, no silhouette */
@media (max-width: 640px) {
  .testimonial {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 4px;
    padding: 0 0 16px;
  }
  .testimonial__photo {
    width: 220px;
    margin: 0 auto;
  }
  .testimonial__body { padding: 16px; }
  .testimonial__figure { display: none; }
  .testimonial::after { right: 16px; }
}

/* ---------- Contact page ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-top: 20px;
}
.contact-details h2,
.contact-form-wrap h2 {
  font-size: 1.2rem;
  margin-bottom: 0.6em;
}
.contact-details p { margin: 0 0 1em; }
.contact-form label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin: 12px 0 4px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #bbb;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--green-mid);
  outline-offset: 1px;
  border-color: var(--green-mid);
}
.contact-form .btn-more {
  margin-top: 16px;
  border: 1px solid;
  border-top-color: #84c859;
  border-right-color: #5f973c;
  border-bottom-color: #5d7e47;
  border-left-color: #224a0b;
  cursor: pointer;
}
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-banner {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
}
.form-banner--ok {
  background: #e3f3d8;
  border: 1px solid #8fc46a;
  color: #2c5016;
}
.form-banner--error {
  background: #f7e0e0;
  border: 1px solid #d39a9a;
  color: #6e2020;
}

/* ---------- Simple lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 1000;
  padding: 20px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
.lightbox__caption {
  color: #fff;
  margin-top: 12px;
  font-size: 0.95rem;
  text-align: center;
}
.lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-grid__item img { transition: none; }
}

/* Contact: two columns on wider screens */
@media (min-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr 1.3fr;
  }
}

/* ---------- Page hero (inner pages) ----------
   Used on services, portfolio, contact, individual services etc.
   Rounded bottom-left and top-right corners match the original site's
   brochure look. */
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--green-deepest);
  border-radius: 0 20px 0 20px;
}
.page-hero__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* Mobile: hero matches the homepage hero's 485:319 ratio, corners flush */
@media (max-width: 767px) {
  .page-hero {
    aspect-ratio: 485 / 319;
    border-radius: 0;
  }
}
/* Desktop: hero takes the image's natural height (no aspect-ratio constraint) */
@media (min-width: 768px) {
  .page-hero__image {
    height: auto;
  }
}

/* ---------- Single-column layout for inner pages ---------- */
.single-column {
  padding: 20px;
}
.single-column .page-h1,
.single-column h1 {
  font-family: var(--font-display);
  color: var(--green-dark);
  font-size: clamp(1.3rem, 2.8vw, 1.6rem);
  margin: 0 0 0.6em;
}

/* ---------- More Information button ---------- */
.btn-more {
  display: inline-block;
  margin-top: 4px;
  padding: 8px 22px;
  background: linear-gradient(to bottom, #569733 0%, #326018 100%);
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.95rem;
  border: 1px solid;
  border-top-color:    #84c859;
  border-right-color:  #5f973c;
  border-bottom-color: #5d7e47;
  border-left-color:   #224a0b;
  border-radius: 20px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
  transition: filter 0.2s ease;
}
.btn-more:hover,
.btn-more:focus {
  filter: brightness(1.1);
  color: var(--white);
}

/* ---------- Service list (used on services.php hub page) ---------- */
.service-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}
.service-list__item {
  display: grid;
  grid-template-columns: 200px 1fr;
  column-gap: 20px;
  padding: 18px 0;
  align-items: start;
  border-bottom: 1px solid #e6e6e6;
}
.service-list__item:last-child { border-bottom: none; }
.service-list__thumb {
  display: block;
  width: 200px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  text-decoration: none;
  border-radius: 20px;
}
.service-list__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.service-list__thumb:hover img { transform: scale(1.05); }
.service-list__body h3 {
  font-size: 1.1rem;
  color: var(--green-dark);
  margin: 0 0 0.5em;
}
.service-list__body p {
  margin: 0 0 0.8em;
  font-size: 0.92rem;
}
@media (prefers-reduced-motion: reduce) {
  .service-list__thumb img { transition: none; }
  .btn-more { transition: none; }
}

/* Mobile: stack the thumb above the text, everything centred */
@media (max-width: 600px) {
  .service-list__item {
    grid-template-columns: 1fr;
    column-gap: 0;
    justify-items: center;
    text-align: center;
  }
  .service-list__thumb {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1 / 1;
    margin-bottom: 14px;
  }
  .service-list__body {
    width: 100%;
  }
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 20px 0 10px;
}
.feature-card {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  text-decoration: none;
}
.feature-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.feature-card:hover img { transform: scale(1.05); }
.feature-card__label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}
@media (prefers-reduced-motion: reduce) {
  .feature-card img { transition: none; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background: linear-gradient(to bottom, #4e8b2a 0%, #335e18 100%);
  color: var(--white);
  text-align: center;
  padding: 14px 16px;
  font-size: 0.85rem;
  border-radius: 0 0 20px 20px;
}
.site-footer a { color: var(--white); }

/* ==========================================================================
   DESKTOP  —  restore the brochure layout
   ========================================================================== */

@media (min-width: 768px) {

  body {
    padding-top: 0;
  }

  /* Hide the mobile fixed bar */
  .mobile-header { display: none; }

  /* ---------- Title row: transparent, body bg shows through ---------- */
  .title-row {
    display: grid;
    grid-template-columns: var(--logo-gutter) 1fr auto;
    grid-template-areas: "logospace title address";
    column-gap: 20px;
    align-items: start;
    padding: 14px var(--frame-pad) 8px;
  }
  .title-row__title {
    grid-area: title;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    line-height: 1.1;
    margin: 0;
  }
  .title-row__tagline {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 0.95rem;
    color: var(--text);
    margin-top: 2px;
  }
  .title-row__address {
    grid-area: address;
    font-size: 0.65rem;
    line-height: 1.3;
    color: var(--text);
    text-align: right;
    font-style: normal;
  }

  /* ---------- Frame: white box, 10px padding all around ---------- */
  .frame {
    background: var(--white);
    padding: var(--frame-pad);
    border-radius: 5px 5px 20px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  /* ---------- Menu row: empty logo gutter on the left, nav on the right ---------- */
  .menu-row {
    display: grid;
    grid-template-columns: var(--logo-gutter) 1fr;
    grid-template-areas: "logospace nav";
    align-items: center;
    column-gap: 20px;
    padding-bottom: 10px;
  }

  /* ---------- Floating logo ---------- */
  .logo-float {
    display: block;
    position: absolute;
    top: 23px;
    left: -29px;
    width: var(--logo-size-desktop);
    height: var(--logo-size-desktop);
    z-index: 50;
  }
  .logo-float img {
    width: 100%;
    height: 100%;
  }

  /* ---------- Primary nav: horizontal pill row ---------- */
  .primary-nav {
    grid-area: nav;
    position: static;
    top: auto; left: auto; right: auto;
    transform: none;
    visibility: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: stretch;
    gap: 0;
    z-index: 10;
    max-height: none;        /* undo the mobile scroll cap */
    overflow: visible;       /* let the hover dropdown escape */
  }
  .primary-nav__list {
    display: flex;
    gap: 0;
    width: 100%;
  }
  .primary-nav__list > li {
    display: flex;       /* so anchor stretches to li's height */
    align-items: stretch;
  }
  .primary-nav__list > li > a {
    display: flex;
    align-items: center;
    padding: 5px 16px;
    background: linear-gradient(to bottom, #569733 0%, #326018 100%);
    color: var(--white);
    text-decoration: none;
    font-size: var(--nav-font-size);
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1;
    border-style: solid;
    border-width: 1px;
    border-top-color:    #84c859;
    border-right-color:  #5f973c;
    border-bottom-color: #5d7e47;
    border-left-color:   #224a0b;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
  }
  .primary-nav__list > li:not(.primary-nav__phone-li) > a {
    border-radius: 0;
  }
  .primary-nav__list > li:first-child > a {
    border-radius: 6px 0 0 6px;
  }
  .primary-nav__list > li > a:hover,
  .primary-nav__list > li > a:focus,
  .primary-nav__list > li > a[aria-current="page"] {
    background: linear-gradient(to bottom, #326018 0%, #569733 100%);
    border-top-color:    #224a0b;
    border-right-color:  #5d7e47;
    border-bottom-color: #84c859;
    border-left-color:   #5f973c;
  }

  /* Phone "menu item" — special two-line button; expands to fill the rest of the row */
  .primary-nav__phone-li {
    display: flex;
    align-items: stretch;
    flex: 1;
  }
  .primary-nav__phone {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    width: 100%;
    padding: 0 14px;
    background: linear-gradient(to bottom, #569733 0%, #326018 100%);
    color: var(--white);
    text-decoration: none;
    font-size: calc(var(--nav-font-size) * 0.75);
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
    border-style: solid;
    border-width: 1px;
    border-top-color:    #84c859;
    border-right-color:  #5f973c;
    border-bottom-color: #5d7e47;
    border-left-color:   #224a0b;
    border-radius: 0 6px 6px 0;
  }
  .primary-nav__phone strong {
    display: block;
    font-size: var(--nav-font-size);
    font-weight: 400;
  }

  /* ---------- Hero, main, footer keep their default styling but
     they're now inside .frame which gives them 10px padding all round. ---------- */
  .hero__slides {
    aspect-ratio: 898 / 295;   /* original brochure-wide ratio on desktop */
  }
  .main {
    grid-template-columns: 240px 1fr;
  }
  .sidebar {
    display: block;
    padding: 14px 16px;
  }

  /* Hide the mobile-only toggle button on desktop */
  .primary-nav__submenu-toggle { display: none; }

  /* Desktop: convert the submenu to a hover-revealed dropdown */
  .primary-nav__has-submenu {
    position: relative;
  }
  .primary-nav__submenu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    margin: 0;
    padding: 0;
    background: var(--green-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    list-style: none;
    /* Hidden by default — shown on hover/focus of the parent */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
    z-index: 50;
    max-height: none;
    overflow: visible;
  }
  .primary-nav__has-submenu:hover .primary-nav__submenu,
  .primary-nav__has-submenu:focus-within .primary-nav__submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0s;
  }
  .primary-nav__submenu a {
    display: block;
    padding: 8px 14px;
    background: var(--green-dark);
    color: var(--white);
    text-decoration: none;
    font-size: 0.85rem;
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.3;
    border: none;
    border-bottom: 1px solid #2a5a14;
    border-radius: 0;
    text-shadow: none;
    white-space: normal;
  }
  .primary-nav__submenu a:hover,
  .primary-nav__submenu a:focus {
    background: var(--green-mid);
  }
  .content { padding: 24px 18px; }
}

/* ==========================================================================
   IN-BETWEEN RANGE  —  desktop layout, narrower viewport, shrink nav text
   ========================================================================== */

@media (min-width: 768px) and (max-width: 899px) {
  :root {
    --nav-font-size: 0.7rem;
  }
}

/* ==========================================================================
   PRINT
   ========================================================================== */

@media print {
  body { background: white; padding: 0; }
  .mobile-header, .primary-nav, .nav-toggle, .hero, .logo-float { display: none; }
  .frame, .page { background: white; max-width: 100%; padding: 0; }
}
