/* ==========================================================================
   Artificial Turf St Catharines — "Niagara resort relaxed"
   Teal + warm sand + green on soft white. DM Serif Display / DM Sans.
   ========================================================================== */

:root {
  --ink: #27413d;
  --ink-soft: #4c625d;
  --teal: #1f7a78;
  --teal-deep: #14534f;
  --teal-mist: #e3f0ee;
  --green: #488255;
  --green-deep: #3a6f47;
  --sand: #f3e7d3;
  --sand-soft: #faf4e9;
  --white: #fdfcf9;
  --card: #ffffff;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 40px -18px rgba(20, 83, 79, 0.25);
  --font-head: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.15;
  color: var(--teal-deep);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.3rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p { margin: 0 0 1.2em; }

a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-deep); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--teal-deep);
  color: #fff;
  padding: 0.6rem 1.2rem;
  z-index: 200;
  border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  padding: 0.8rem 1.9rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-deep); color: #fff; }

.btn-sun { background: var(--green); color: #fff; }
.btn-sun:hover { background: var(--green-deep); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--teal-deep);
  border-color: var(--teal);
}
.btn-ghost:hover { background: var(--teal); color: #fff; }

.btn-sm { padding: 0.55rem 1.2rem; font-size: 0.95rem; white-space: nowrap; }

/* --- Header -------------------------------------------------------------- */

.site-header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(31, 122, 120, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.7rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--teal-deep);
  margin-right: auto;
}
.brand img { width: 52px; height: 52px; }
.brand-name {
  font-family: var(--font-head);
  font-size: 1.18rem;
  line-height: 1.1;
  display: block;
}
.brand-tag {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-deep);
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  padding: 0.3rem 0.1rem;
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--teal);
  box-shadow: 0 2px 0 var(--green);
}

/* dropdown sub-nav (desktop: hover / focus-within reveal an absolute panel) */
.primary-nav .has-sub { position: relative; }
.sub-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0.1rem;
}
.sub-toggle:hover,
.has-sub:hover > .sub-toggle,
.has-sub:focus-within > .sub-toggle {
  color: var(--teal);
  box-shadow: 0 2px 0 var(--green);
}
.sub-toggle .caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.2s ease;
}
.has-sub:hover > .sub-toggle .caret,
.sub-toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }
/* higher specificity than ".primary-nav ul{display:flex}" so the panel stacks vertically */
.primary-nav .sub-menu {
  display: block;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  z-index: 200;
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  background: var(--white);
  border: 1px solid rgba(31, 122, 120, 0.15);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}
.sub-menu::before { content: ""; position: absolute; bottom: 100%; left: 0; right: 0; height: 12px; }
.has-sub:hover > .sub-menu,
.has-sub:focus-within > .sub-menu,
.sub-toggle[aria-expanded="true"] + .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.primary-nav .sub-menu a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  white-space: nowrap;
  color: var(--ink);
  font-weight: 500;
}
.primary-nav .sub-menu a:hover,
.primary-nav .sub-menu a[aria-current="page"] {
  /* deeper teal (same hue) for AA contrast on the --teal-mist hover fill */
  color: #1e7674;
  background: var(--teal-mist);
  box-shadow: none;
}

.header-call {
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  color: var(--teal-deep);
  background: var(--sand);
  border-radius: var(--radius-pill);
  padding: 0.55rem 1.2rem;
}
.header-call:hover { background: var(--teal); color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--teal);
  border-radius: 12px;
  padding: 0.45rem 0.7rem;
  color: var(--teal-deep);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .primary-nav {
    display: none;
    position: absolute;
    inset: 100% 0 auto 0;
    background: var(--white);
    border-bottom: 1px solid rgba(31, 122, 120, 0.15);
    box-shadow: var(--shadow-soft);
  }
  .primary-nav.open { display: block; }
  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1rem;
  }
  .primary-nav a {
    display: block;
    padding: 0.8rem 0.2rem;
    border-bottom: 1px solid rgba(31, 122, 120, 0.08);
  }
  /* mobile accordion sub-nav */
  .primary-nav .has-sub { position: static; }
  .sub-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 0.8rem 0.2rem;
    border-bottom: 1px solid rgba(31, 122, 120, 0.08);
  }
  .sub-toggle:hover,
  .has-sub:hover > .sub-toggle,
  .has-sub:focus-within > .sub-toggle { box-shadow: none; }
  .primary-nav .sub-menu {
    position: static;
    min-width: 0;
    opacity: 1;
    visibility: hidden;
    transform: none;
    background: rgba(31, 122, 120, 0.05);
    border: none;
    border-radius: 10px;
    box-shadow: none;
    padding: 0.2rem 0 0.4rem 0.8rem;
    margin: 0 0 0.3rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, visibility 0.25s ease;
  }
  .sub-toggle[aria-expanded="true"] + .sub-menu { visibility: visible; max-height: 420px; }
  .primary-nav .sub-menu a { border-bottom: none; padding: 0.6rem 0.2rem; }
  .header-call,
  .header-quote { display: none; }
}

/* --- Waves --------------------------------------------------------------- */

.wave { display: block; line-height: 0; }
.wave svg { display: block; width: 100%; height: 64px; }
@media (max-width: 640px) { .wave svg { height: 38px; } }

/* --- Hero ----------------------------------------------------------------- */

.hero { background: var(--sand-soft); padding: 3.5rem 0 1rem; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: start;
}

.eyebrow {
  display: inline-block;
  background: var(--teal-mist);
  color: var(--teal-deep);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  padding: 0.35rem 1.1rem;
  margin-bottom: 1.1rem;
}

.hero-lede { font-size: 1.18rem; color: var(--ink-soft); max-width: 34rem; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1.4rem 0 2rem;
}

.hero-photo img {
  border-radius: var(--radius-lg) var(--radius-lg) 70px var(--radius-lg);
  box-shadow: var(--shadow-soft);
  width: 100%;
  object-fit: cover;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.2rem; }
}

/* --- Quote form ----------------------------------------------------------- */

.quote-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 2rem 1.8rem;
  border-top: 6px solid var(--green);
}

.quote-card h2, .quote-card h3 { margin-bottom: 0.3em; }
.quote-card .form-note { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 1.2rem; }

.quote-form label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.3rem;
  color: var(--teal-deep);
}

.quote-form .field { margin-bottom: 1rem; }

.quote-form input,
.quote-form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--sand-soft);
  border: 1.5px solid rgba(31, 122, 120, 0.25);
  border-radius: 14px;
  padding: 0.7rem 0.9rem;
}
.quote-form input:focus,
.quote-form textarea:focus {
  border-color: var(--teal);
  background: #fff;
}

.quote-form fieldset { border: 0; padding: 0; margin: 0; }
.quote-form legend {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.3rem;
  color: var(--teal-deep);
  padding: 0;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.field-row > div { min-width: 0; }
.quote-form input, .quote-form textarea { min-width: 0; }
.sub-label {
  display: block;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 0.25rem;
}

.quote-form button[type="submit"] { width: 100%; border: none; }

/* Honeypot — visually removed, still in DOM */
.hp-wrap {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-confirmation {
  background: var(--teal-mist);
  border: 1.5px solid var(--teal);
  border-radius: var(--radius-md);
  color: var(--teal-deep);
  font-weight: 600;
  padding: 1rem 1.2rem;
  margin-top: 1rem;
}

.form-error {
  background: #fbeee6;
  border: 1.5px solid #c0613b;
  border-radius: var(--radius-md);
  color: #8a4527;
  font-weight: 600;
  padding: 1rem 1.2rem;
  margin-top: 1rem;
}

/* --- Sections -------------------------------------------------------------- */

.section { padding: 4.5rem 0; }
.section-sand { background: var(--sand-soft); }
.section-teal { background: var(--teal-deep); color: #e9f3f1; }
.section-teal h2 { color: #fff; }

.section-intro { max-width: 44rem; color: var(--ink-soft); }

.center { text-align: center; }
.center .section-intro { margin-inline: auto; }

/* Services */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
  margin-top: 2.4rem;
}
.service-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 2rem 1.4rem 1.7rem;
  text-align: center;
  box-shadow: 0 10px 30px -18px rgba(20, 83, 79, 0.35);
  border-bottom: 5px solid var(--sand);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.service-card:hover { transform: translateY(-6px); border-bottom-color: var(--green); }
.service-card .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--teal-mist);
  display: grid;
  place-items: center;
  color: var(--teal);
}
.service-card h3 { margin-bottom: 0; }

@media (max-width: 900px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .service-grid { grid-template-columns: 1fr; } }

/* Split rows (image + copy) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.split-photo img {
  border-radius: 70px var(--radius-lg) var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-soft);
  width: 100%;
  object-fit: cover;
}
.split.flip .split-photo img {
  border-radius: var(--radius-lg) 70px var(--radius-lg) var(--radius-lg);
}
@media (max-width: 860px) {
  .split, .split.flip { grid-template-columns: 1fr; gap: 2rem; }
}

/* Benefits checklist */
.benefit-list {
  list-style: none;
  margin: 1.4rem 0 1.8rem;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1.4rem;
}
.benefit-list li {
  position: relative;
  padding-left: 1.9rem;
  font-weight: 500;
}
.benefit-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--green) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') center / 62% no-repeat;
}
@media (max-width: 640px) { .benefit-list { grid-template-columns: 1fr; } }

/* CTA band */
.cta-band { text-align: center; padding: 4rem 0; }
.cta-band h2 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); }
.cta-band p { color: #cfe5e2; max-width: 38rem; margin: 0 auto 1.6rem; }
.cta-band a.branded { color: #fff; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.cta-call {
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.5rem;
  text-decoration: none;
}
.cta-call:hover { color: var(--sand); }

/* --- Page header (inner pages) -------------------------------------------- */

.page-header { background: var(--sand-soft); padding: 3.2rem 0 0.5rem; }
.page-header h1 { margin-bottom: 0.4rem; }
.breadcrumbs { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 0.8rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: 0.4rem; color: var(--green); }

.contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 2.5rem;
  margin: 1.2rem 0 2rem;
}
.contact-strip .item strong { display: block; color: var(--teal-deep); }
.contact-strip .item span { color: var(--ink-soft); font-size: 0.95rem; }

/* --- Content pages --------------------------------------------------------- */

.content-narrow { max-width: 46rem; }

.post-meta { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 2rem; }

.post-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 2.2rem 2rem;
  border-left: 6px solid var(--green);
  max-width: 46rem;
}
.post-card h2 { margin-bottom: 0.2em; }
.post-card .post-meta { margin-bottom: 1rem; }

/* --- Footer ----------------------------------------------------------------- */

.site-footer {
  background: var(--teal-deep);
  color: #d8e9e6;
  padding: 4rem 0 6.5rem;
  font-size: 0.98rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr;
  gap: 2.5rem;
}
.site-footer h2 {
  color: var(--sand);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.9rem;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--sand); }
.footer-brand img { width: 64px; margin-bottom: 0.8rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer-contact p { margin-bottom: 0.45rem; }
.footer-bottom {
  border-top: 1px solid rgba(243, 231, 211, 0.25);
  margin-top: 2.5rem;
  padding-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #b9d4d0;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* --- Sticky mobile call bar --------------------------------------------------- */

.mobile-cta {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  z-index: 120;
  background: var(--teal-deep);
  padding: 0.65rem 0.9rem calc(0.65rem + env(safe-area-inset-bottom));
  gap: 0.7rem;
  box-shadow: 0 -8px 24px rgba(20, 83, 79, 0.35);
}
.mobile-cta a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 0.75rem 0.5rem;
}
.mobile-cta .call { background: var(--green); color: #fff; }
.mobile-cta .quote { background: var(--sand); color: var(--teal-deep); }
@media (max-width: 860px) { .mobile-cta { display: flex; } }

/* --- Misc ------------------------------------------------------------------- */

.error-page { text-align: center; padding: 6rem 0; }
.error-page h1 { font-size: clamp(2.5rem, 7vw, 4rem); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover, .service-card:hover { transform: none; }
}

/* Mobile overflow guards: prevent horizontal scroll from long words and wide tables */
h1, h2, h3, h4 { overflow-wrap: break-word; }
main table { display: block; overflow-x: auto; max-width: 100%; }
