/* ============================================================
   default.css — GardenSoft site base styles
   Replaces: foundation.css, foundation-6/css/app.css, jQuery,
             what-input.js, foundation.js, foundation-6/js/app.js
   ============================================================ */

/* --- Box-model baseline --- */
*, *::before, *::after {
  box-sizing: border-box;
}

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

/* --- Site header --- */
.site-header {
  background: white;
  border-bottom: 1px solid #e8e8e8;
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  max-width: 75rem;
  margin: 0 auto;
  padding: 0.4rem 1rem;
}

/* --- Hamburger button (mobile only) --- */
.hamburger {
  display: none;
  background: none;
  border: 1px solid #ccc;
  border-radius: 3px;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  color: #333;
  font: inherit;
  font-size: 0.9rem;
  align-items: center;
  gap: 0.4rem;
  line-height: 1;
}

.hamburger-bars {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  position: relative;
  flex-shrink: 0;
}
.hamburger-bars::before,
.hamburger-bars::after {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
}
.hamburger-bars::before { top: -6px; }
.hamburger-bars::after  { top:  6px; }

/* --- Nav link list --- */
.nav-menu {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: #333;
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* Suppress the global a:focus outline inside the nav — we use background instead */
.nav-menu a:focus {
  outline: none;
}

/* Highlight on hover OR any focus (including touch taps) */
.nav-menu a:hover,
.nav-menu a:focus {
  background-color: #2d5a16;
  color: #ffffff;
  text-decoration: none;
}

/* --- Grid system (replaces .grid-container / .grid-x.grid-margin-x / .cell) ---

   Usage mirrors Foundation 6:
     <div class="grid-container">
       <div class="grid-x grid-margin-x">
         <div class="cell small-4"> … </div>
       </div>
     </div>

   Fractions (gap: 1.5rem):
     small-3  = 25%   →  calc(25%    - 0.75rem)   [1 gap shared with small-9]
     small-4  = 33%   →  calc(33.333% - 1rem)      [2 gaps across 3 cols]
     small-9  = 75%   →  calc(75%    - 0.75rem)
     small-12 = 100%  →  100%                                                   */

.grid-container {
  max-width: 75rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* fluid variant removes max-width cap */
.grid-container.fluid {
  max-width: none;
}

.grid-x {
  display: flex;
  flex-wrap: wrap;
}

.grid-margin-x {
  gap: 1.5rem;
}

.cell {
  min-width: 0;
}

.small-3  { flex: 0 0 calc(25%    - 0.75rem); }
.small-4  { flex: 0 0 calc(33.333% - 1rem);   }
.small-9  { flex: 0 0 calc(75%    - 0.75rem); }
.small-12,
.large-12 { flex: 0 0 100%; }

/* medium-X: at medium+ breakpoint, full-width at mobile (no small- modifier set) */
.medium-6 { flex: 0 0 calc(50%    - 0.75rem); }
.medium-8 { flex: 0 0 calc(66.666% - 0.5rem);  }

/* Foundation utility: centre text only on small screens */
@media screen and (max-width: 39.9375em) {
  .small-only-text-center { text-align: center; }
}

/* --- Footer --- */
footer {
  text-align: center;
}

/* --- photocaption (used in feature cards; was in Foundation's default sheet) --- */
.photocaption {
  display: block;
  margin-top: 8px;
  margin-bottom: 8px;
  text-decoration: none;
  font-weight: bold;
}

/* --- text-center utility --- */
.text-center { text-align: center; }

/* ============================================================
   WCAG 2.1 AA accessibility helpers (carried over from original)
   ============================================================ */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: #2d5a16;
  color: #ffffff;
  padding: 0.6rem 1rem;
  z-index: 10000;
  text-decoration: underline;
  font-weight: bold;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid #ffd633;
  outline-offset: 2px;
}

a:focus, button:focus, [tabindex]:focus {
  outline: 3px solid #2d5a16;
  outline-offset: 2px;
}

footer { color: #333; }

/* Override mainfoundation.css: space above heading and below cards */
.LandingPages {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

/* ============================================================
   Mobile  (< 640px)
   ============================================================ */
@media screen and (max-width: 39.9375em) {

  /* Show hamburger, stack nav below it */
  .hamburger { display: flex; }

  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    border-top: 1px solid #e8e8e8;
    margin-top: 0.4rem;
  }

  .nav-menu.is-open { display: flex; }

  .site-header nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .nav-menu a {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #f0f0f0;
  }

  /* All cells go full-width on mobile */
  .small-3,
  .small-4,
  .small-9 {
    flex: 0 0 100%;
  }
}
