/* ==========================================================================
   Town Green — Lawn Care & Tick Control
   Shared stylesheet. Tailwind (CDN) handles layout; this file holds the nav,
   dropdowns, buttons, and the brand patterns Tailwind can't express cleanly:
   the arch silhouette, the brass hairline, and the radiating mow-stripe field.
   Palette + type follow tokens.css / brand-guide.html.
   ========================================================================== */

:root {
  --tg-pine:   #0F2E1E;
  --tg-green:  #1E4D33;
  --tg-field:  #3D7A50;
  --tg-bright: #5FB87C;
  --tg-cream:  #F4EEDC;
  --tg-cream-hi: #FBF7EE;
  --tg-linen:  #E2D8C0;
  --tg-brass:  #A9803F;
  --tg-ink-muted: #4A5D50;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

/* Fraunces is a variable face — set soft and optically large so it reads
   hand-painted rather than laser-cut. Brand guide: opsz 96-144, SOFT 30. */
.font-display,
h1, h2, h3 {
  font-variation-settings: 'opsz' 144, 'SOFT' 30, 'WONK' 0;
  letter-spacing: -0.015em;
}

/* --------------------------------------------------------------------------
   Desktop navigation
   NOTE: .sss-nav sets display:flex, which beats Tailwind's `hidden`.
   Always wrap this <ul> in a <div class="hidden md:flex"> container.
   -------------------------------------------------------------------------- */
.sss-nav {
  display: flex;
  align-items: stretch;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.sss-nav > li { position: relative; }
.sss-nav > li > a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 18px 16px;
  font-family: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  transition: color 140ms ease, background-color 140ms ease;
}
.sss-nav > li > a:hover,
.sss-nav > li:hover > a { color: var(--tg-cream); background: rgba(244, 238, 220, 0.09); }
.sss-nav > li > a[aria-current='page'] { color: var(--tg-bright); }

/* Dropdowns */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  min-width: 268px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: var(--tg-cream-hi);
  border: 1px solid var(--tg-linen);
  border-top: 2px solid var(--tg-brass);
  box-shadow: 0 12px 32px -10px rgba(15, 46, 30, 0.34);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms;
}
.has-dropdown:hover > .dropdown-menu,
.has-dropdown:focus-within > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a {
  display: block;
  padding: 9px 18px;
  font-family: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--tg-pine);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.dropdown-menu a:hover {
  background: var(--tg-cream);
  border-left-color: var(--tg-brass);
  color: var(--tg-green);
}

/* Quote button in the nav bar */
.sss-quote-btn {
  align-self: center;
  display: inline-block;
  padding: 10px 22px;
  font-family: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tg-pine);
  background: var(--tg-cream);
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 140ms ease, color 140ms ease;
}
.sss-quote-btn:hover { background: var(--tg-bright); color: var(--tg-pine); }

/* --------------------------------------------------------------------------
   Brand patterns
   -------------------------------------------------------------------------- */

/* The arch: flat bottom, domed top. Same silhouette as the mark. */
.tg-arch { border-radius: 999px 999px 10px 10px; overflow: hidden; }
.tg-arch-sm { border-radius: 999px 999px 6px 6px; overflow: hidden; }

/* Radiating mow stripes converging on a vanishing point — the field from the
   logo's lower half, and from the OG image. Used as a footer/hero base band. */
.tg-field {
  background:
    repeating-conic-gradient(from 92deg at 50% 0%,
      rgba(244, 238, 220, 0.00) 0deg 2.4deg,
      rgba(244, 238, 220, 0.075) 2.4deg 4.8deg);
  /* fade the stripes in so the band has no hard top edge */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 58%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 58%);
}
.tg-field-strong {
  background:
    repeating-conic-gradient(from 92deg at 50% 0%,
      var(--tg-green) 0deg 2.4deg,
      var(--tg-field) 2.4deg 4.8deg);
}

/* Straight mow stripes — for turf illustrations and card fills. */
.tg-mow {
  background: repeating-linear-gradient(90deg,
    var(--tg-field) 0 22px, #46895a 22px 44px);
}

/* The engraved brass hairline. Rules only, never type. */
.tg-rule { border: 0; border-top: 1px solid var(--tg-brass); opacity: 0.55; }
.tg-rule-lite { border: 0; border-top: 1px solid var(--tg-linen); }

/* Tracked-out civic label */
.tg-eyebrow {
  font-family: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Plaque: a cream card with a brass keyline. The only ornament allowed. */
.tg-plaque {
  background: var(--tg-cream-hi);
  border: 1px solid var(--tg-linen);
  border-top: 2px solid var(--tg-brass);
  border-radius: 3px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.tg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 15px 28px;
  font-family: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height: 1;
  border: 1.5px solid transparent;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.tg-btn--primary { background: var(--tg-bright); color: var(--tg-pine); border-color: var(--tg-bright); }
.tg-btn--primary:hover { background: var(--tg-cream); border-color: var(--tg-cream); color: var(--tg-pine); }

.tg-btn--solid { background: var(--tg-green); color: var(--tg-cream); border-color: var(--tg-green); }
.tg-btn--solid:hover { background: var(--tg-pine); border-color: var(--tg-pine); color: var(--tg-cream); }

.tg-btn--ghost { background: transparent; color: var(--tg-cream); border-color: rgba(244, 238, 220, 0.45); }
.tg-btn--ghost:hover { background: var(--tg-cream); color: var(--tg-pine); border-color: var(--tg-cream); }

.tg-btn--ghost-dk { background: transparent; color: var(--tg-green); border-color: var(--tg-green); }
.tg-btn--ghost-dk:hover { background: var(--tg-green); color: var(--tg-cream); }

/* --------------------------------------------------------------------------
   Inner-page hero
   -------------------------------------------------------------------------- */
.inner-hero {
  position: relative;
  background: var(--tg-green);
  padding: 44px 0 52px;
  border-bottom: 1px solid var(--tg-brass);
}
.inner-hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  pointer-events: none;
  background:
    repeating-conic-gradient(from 92deg at 50% 0%,
      rgba(244, 238, 220, 0.00) 0deg 2.4deg,
      rgba(244, 238, 220, 0.06) 2.4deg 4.8deg);
}
.inner-hero > * { position: relative; z-index: 1; }

.breadcrumb {
  font-family: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 238, 220, 0.62);
  margin-bottom: 20px;
}
.breadcrumb a { color: rgba(244, 238, 220, 0.62); text-decoration: none; }
.breadcrumb a:hover { color: var(--tg-bright); }
.breadcrumb .sep { margin: 0 9px; color: var(--tg-brass); }

/* --------------------------------------------------------------------------
   Yard explorer — clickable property map
   -------------------------------------------------------------------------- */
.yard {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--tg-linen);
  box-shadow: 0 18px 46px -22px rgba(15, 46, 30, 0.4);
  background: var(--tg-field);
}
.yard svg { display: block; width: 100%; height: auto; }

.yard-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px 6px 8px;
  font-family: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.07em;
  line-height: 1;
  white-space: nowrap;
  color: var(--tg-pine);
  background: var(--tg-cream-hi);
  border: 1px solid rgba(15, 46, 30, 0.18);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 3px 10px -2px rgba(15, 46, 30, 0.45);
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}
.yard-pin::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tg-brass);
  flex: 0 0 auto;
  transition: background-color 140ms ease;
}
.yard-pin:hover { transform: translate(-50%, -50%) scale(1.06); box-shadow: 0 6px 16px -3px rgba(15, 46, 30, 0.5); }
.yard-pin[aria-pressed='true'] { background: var(--tg-pine); color: var(--tg-cream); border-color: var(--tg-pine); }
.yard-pin[aria-pressed='true']::before { background: var(--tg-bright); }

.yard-pin__n { display: none; font-variant-numeric: tabular-nums; }

/* Below md the labels would collide, so the pins collapse to numbered dots and
   the zone list below the map becomes the primary control. */
@media (max-width: 767px) {
  .yard-pin {
    width: 25px; height: 25px; padding: 0; gap: 0;
    justify-content: center; border-radius: 50%; font-size: 11px;
  }
  .yard-pin::before { display: none; }
  .yard-pin__label { display: none; }
  .yard-pin__n { display: block; }
}

/* Zone tabs (mobile) */
.yard-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px;
  font-family: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
  color: var(--tg-pine); background: var(--tg-cream-hi);
  border: 1px solid var(--tg-linen); border-radius: 999px; cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.yard-tab span { font-variant-numeric: tabular-nums; color: var(--tg-brass); font-weight: 700; }
.yard-tab[aria-pressed='true'] { background: var(--tg-green); color: var(--tg-cream); border-color: var(--tg-green); }
.yard-tab[aria-pressed='true'] span { color: var(--tg-bright); }

/* Active-zone highlight drawn over the plan */
.yard-hl { opacity: 0; transition: opacity 180ms ease; pointer-events: none; }
.yard-hl.is-on { opacity: 1; }

/* --------------------------------------------------------------------------
   Prose defaults for body content
   -------------------------------------------------------------------------- */
.tg-prose p { margin: 0 0 1.05em; max-width: 68ch; line-height: 1.62; }
.tg-prose p:last-child { margin-bottom: 0; }
.tg-prose a { color: var(--tg-green); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.tg-prose a:hover { color: var(--tg-field); }
.tg-prose ul { margin: 0 0 1.05em; padding-left: 1.15em; max-width: 68ch; }
.tg-prose li { margin-bottom: 0.45em; line-height: 1.6; }

/* --------------------------------------------------------------------------
   Focus + motion
   -------------------------------------------------------------------------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--tg-brass);
  outline-offset: 2px;
  border-radius: 3px;
}
.inner-hero :focus-visible,
.tg-on-dark :focus-visible { outline-color: var(--tg-bright); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
