/* ==========================================================================
   Sweigart Lawn Care
   Redesign. Dark-dominant, inverted from the previous light layout.
   Palette sampled from the client's own logo. Green is the only accent.
   Bold device, used sparingly: the cut line that draws itself across a
   heading as it enters the viewport. Animated in site.js.
   ========================================================================== */

@font-face {
  font-family: 'Oswald';
  src: url('../fonts/oswald-var.woff2') format('woff2-variations');
  font-weight: 200 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('../fonts/source-sans-3-var.woff2') format('woff2-variations');
  font-weight: 200 900; font-style: normal; font-display: swap;
}

:root {
  --night:  #0F1310;
  --field:  #1A211A;
  --ridge:  #2A342A;
  --moss:   #6E8A3A;
  --moss-d: #55702B;
  --turf:   #A3C94E;
  --sand:   #EDE8DC;
  --sand-d: #B9B5A6;
  --flag:   #A32A2E;

  --display: 'Oswald', 'Arial Narrow', sans-serif;
  --text: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --shell: 76rem;
  --pad: clamp(1.15rem, 4vw, 2.5rem);
  --band: clamp(3.5rem, 8vw, 7rem);
  --r: 4px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }

body {
  margin: 0;
  background: var(--night);
  color: var(--sand);
  font-family: var(--text);
  font-size: clamp(1.0625rem, .35vw + 1rem, 1.1875rem);
  line-height: 1.62;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--display);
  text-transform: uppercase;
  line-height: 1.02;
  letter-spacing: .01em;
  margin: 0 0 .5em;
  text-wrap: balance;
  color: #fff;
}
h1 { font-size: clamp(2.35rem, 6vw, 4.25rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.85rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 1.4vw, 1.35rem); font-weight: 600; letter-spacing: .03em; }

p { margin: 0 0 1.1em; max-width: 62ch; }
p:last-child { margin-bottom: 0; }

a { color: var(--turf); text-underline-offset: 3px; }
a:hover { color: #fff; }

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

body.is-locked {
  position: fixed;
  left: 0; right: 0;
  width: 100%;
  overflow: hidden;
}

.skip {
  position: absolute; left: -9999px; z-index: 200;
  background: var(--turf); color: var(--night);
  padding: .8rem 1.3rem; font-weight: 700; text-decoration: none;
}
.skip:focus { left: .5rem; top: .5rem; }

.shell { width: min(100% - var(--pad) * 2, var(--shell)); margin-inline: auto; }
.band { padding-block: var(--band); }
.band-raised { background: var(--field); }
.band-light { background: var(--sand); color: #1A211A; }
.band-light h2, .band-light h3 { color: #12160F; }
.band-light a { color: var(--moss-d); }
.band-light a:hover { color: #12160F; }
.band-light p { color: #333C30; }

.lede { font-size: clamp(1.1rem, .6vw + 1rem, 1.3rem); max-width: 52ch; color: var(--sand-d); }
.band-light .lede { color: #414B3D; }

/* ------------------------------------------------- the cut line (JS drawn) */

.cutline { display: block; width: 100%; max-width: 340px; height: 8px; margin: 0 0 1.6rem; overflow: visible; }
.cutline line { stroke: var(--ridge); stroke-width: 8; stroke-linecap: butt; }
.band-light .cutline line { stroke: #CFC9B8; }
.cutline .cut-b { stroke: var(--turf); }
.band-light .cutline .cut-b { stroke: var(--moss-d); }
.js .cutline .cut-b { stroke-dasharray: 340; stroke-dashoffset: 340; }
.js .cutline.is-cut .cut-b { transition: stroke-dashoffset 1.1s var(--ease); stroke-dashoffset: 0; }

/* ------------------------------------------------------------------ header */

.hdr {
  position: sticky; top: 0; z-index: 90;
  background: var(--night);
  border-bottom: 1px solid var(--ridge);
}
.hdr-in { display: flex; align-items: center; gap: 1rem; padding-block: .9rem; transition: padding .25s var(--ease); }
.hdr.is-stuck .hdr-in { padding-block: .5rem; }
.brand { flex: 0 0 auto; margin-right: auto; display: block; }
.brand img { width: clamp(140px, 20vw, 190px); transition: width .25s var(--ease); }
.hdr.is-stuck .brand img { width: clamp(120px, 16vw, 150px); }

.nav { display: flex; gap: clamp(.8rem, 1.8vw, 1.5rem); align-items: center; }
.nav a {
  touch-action: manipulation;
  color: var(--sand); text-decoration: none; font-family: var(--display);
  font-weight: 500; font-size: 1rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .3rem 0; border-bottom: 2px solid transparent;
}
.nav a:hover,
.nav a[aria-current="page"],
.nav a.is-active { color: #fff; border-bottom-color: var(--turf); }
.nav a[aria-current="page"].is-dimmed { color: var(--sand); border-bottom-color: transparent; }
.nav a[aria-current="page"].is-dimmed:hover { color: #fff; border-bottom-color: var(--turf); }

.hdr-tel {
  font-family: var(--display); font-weight: 600; font-size: 1.2rem;
  color: #fff; text-decoration: none; white-space: nowrap; letter-spacing: .02em;
}
.hdr-tel:hover { color: var(--turf); }

.burger {
  display: none; width: 46px; height: 44px; touch-action: manipulation; border: 1px solid var(--ridge);
  border-radius: var(--r); background: transparent; cursor: pointer; padding: 0;
}
.burger span { display: block; width: 20px; height: 2px; background: var(--sand); margin: 4px auto; transition: transform .25s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Close button lives inside the drawer. On desktop the drawer does not
   exist, so neither does the button. */
.nav-close { display: none; }

@media (max-width: 54rem) {
  .js .burger { display: block; }
  .js .nav-close {
    display: block; position: absolute;
    top: calc(.65rem + env(safe-area-inset-top)); right: var(--pad);
    width: 44px; height: 44px; padding: 0;
    background: transparent; color: var(--sand);
    border: 1px solid var(--ridge); border-radius: var(--r);
    font-size: 1.1rem; line-height: 1; cursor: pointer;
    touch-action: manipulation;
  }
  .js .nav-close:hover { color: #fff; border-color: var(--turf); }
  .hdr-tel { display: none; }
  .js .nav {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100vh; height: 100dvh;
    background: var(--field); border-left: 1px solid var(--ridge);
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 1.5rem; padding: calc(2rem + env(safe-area-inset-top)) var(--pad)
                        calc(2rem + env(safe-area-inset-bottom));
    overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(100%); transition: transform .3s var(--ease), visibility .3s;
    visibility: hidden; z-index: 95;
  }
  .js .nav.is-open { transform: translateX(0); visibility: visible; }
  .js .nav a { font-size: 1.5rem; }
  .nav { flex-wrap: wrap; gap: .6rem 1rem; }
  .nav-scrim {
    position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 80;
    opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
  }
  .nav-scrim.is-open { opacity: 1; pointer-events: auto; }
}
@media (min-width: 54.01rem) { .nav-scrim { display: none; } }

/* -------------------------------------------------------------------- hero */

.hero { position: relative; min-height: min(86vh, 42rem); display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(15,19,16,.97) 0%, rgba(15,19,16,.9) 44%, rgba(15,19,16,.4) 100%);
}
.hero-in { position: relative; z-index: 2; padding-block: clamp(3rem, 9vw, 6rem); }
.hero h1 { max-width: 15ch; margin-bottom: .4em; }
.hero .lede { margin-bottom: 2rem; }
.hero-logo { width: clamp(180px, 28vw, 280px); margin-bottom: 1.8rem; }

.badges { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.badges li {
  font-family: var(--display); font-weight: 500; font-size: .85rem;
  letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--ridge); border-radius: 100px;
  padding: .35rem .9rem; color: var(--sand-d);
}
.badges li:first-child { border-color: var(--flag); color: #fff; }

/* ----------------------------------------------------------------- buttons */

.actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.btn {
  touch-action: manipulation;
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--display); font-weight: 600; font-size: 1.15rem;
  letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  padding: .75rem 1.5rem; border-radius: var(--r);
  border: 2px solid transparent; cursor: pointer; line-height: 1.3;
  transition: background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-go { background: var(--moss-d); color: #fff; }
.btn-go:hover { background: var(--moss); color: #fff; }
.btn-line { background: transparent; color: #fff; border-color: var(--ridge); }
.btn-line:hover { border-color: var(--turf); color: var(--turf); }
.band-light .btn-line { color: #12160F; border-color: #B3AC99; }
.band-light .btn-line:hover { border-color: var(--moss-d); color: var(--moss-d); }

/* --------------------------------------------------------- services (tabs) */

.tabs { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
@media (min-width: 56rem) { .tabs { grid-template-columns: 19rem 1fr; gap: 2.5rem; } }

.tablist { display: none; flex-direction: column; }
.js .tablist { display: flex; }
.tablist button {
  font-family: var(--display); font-weight: 600; font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  letter-spacing: .03em; text-transform: uppercase;
  background: transparent; color: var(--sand-d); cursor: pointer;
  border: 0; border-left: 3px solid var(--ridge);
  padding: 1rem 0 1rem 1.1rem; text-align: left;
  transition: color .2s var(--ease), border-color .2s var(--ease), padding-left .2s var(--ease);
}
.band-light .tablist button { color: #55604F; border-left-color: #CFC9B8; }
.tablist button:hover { color: #fff; }
.band-light .tablist button:hover { color: #12160F; }
.tablist button[aria-selected="true"] { color: #fff; border-left-color: var(--turf); padding-left: 1.5rem; }
.band-light .tablist button[aria-selected="true"] { color: #12160F; border-left-color: var(--moss-d); }
@media (max-width: 55.99rem) {
  .js .tablist { display: none; }
  .tabpanel[hidden] { display: grid; }
  .tabpanel + .tabpanel { margin-top: 2.5rem; }
}

.tabpanel[hidden] { display: none; }
.tabpanel + .tabpanel { margin-top: 2.5rem; }
.js .tabpanel + .tabpanel { margin-top: 0; }
.tabpanel { display: grid; gap: 1.5rem; }
@media (min-width: 40rem) { .tabpanel { grid-template-columns: 1fr 1fr; align-items: center; } }
/* The tab button already shows the name, so hide the in-panel heading, but
   only where the tab strip exists. Below that width the panels stack and each
   one needs its own visible heading. */
@media (min-width: 56rem) {
  .js .tabpanel h3 {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
}
.tabpanel img { border-radius: var(--r); width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.js .tabpanel:not([hidden]) { animation: fadeUp .45s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.plainlist { list-style: none; margin: 1rem 0 0; padding: 0; }
.plainlist li { padding: .55rem 0; border-bottom: 1px solid var(--ridge); font-size: 1rem; }
.band-light .plainlist li { border-bottom-color: #CFC9B8; }

/* ------------------------------------------------------------ area checker */

.checker { max-width: 34rem; }
.checker-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.checker input {
  flex: 1 1 14rem; font: inherit; padding: .75rem .85rem;
  border: 2px solid var(--ridge); border-radius: var(--r);
  background: var(--night); color: var(--sand);
}
.band-light .checker input { background: #fff; color: #12160F; border-color: #B3AC99; }
.checker input:focus { border-color: var(--moss); outline: none; }
.checker-out { margin-top: 1rem; min-height: 1.6rem; font-weight: 600; }
.checker-out[data-state="yes"] { color: var(--turf); }
.band-light .checker-out[data-state="yes"] { color: var(--moss-d); }
.band-light .checker-out { color: #333C30; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.chips li {
  border: 1px solid var(--ridge); border-radius: 100px; padding: .4rem 1rem;
  font-family: var(--display); font-weight: 500; letter-spacing: .05em;
  text-transform: uppercase; font-size: .9rem;
}
.chips li[data-core] { background: var(--moss-d); border-color: var(--moss-d); color: #fff; }
.band-light .chips li { border-color: #B3AC99; }

/* ----------------------------------------------------------------- gallery */

.tiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-top: 2rem; }
.tile { position: relative; border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: var(--r); overflow: hidden; }
.tile img { width: 100%; aspect-ratio: 3/2; object-fit: cover; transition: transform .4s var(--ease); }
.tile:hover img { transform: scale(1.04); }

.lightbox {
  position: fixed; inset: 0; z-index: 120; display: none;
  background: rgba(8,10,8,.95); padding: var(--pad);
  align-items: center; justify-content: center;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: min(100%, 68rem); max-height: 78vh; width: auto; border-radius: var(--r); }
.lightbox button {
  position: absolute; background: var(--field); color: #fff; border: 1px solid var(--ridge);
  border-radius: var(--r); cursor: pointer; font-size: 1.4rem; line-height: 1;
  width: 3rem; height: 3rem; font-family: var(--display);
}
.lightbox button:hover { border-color: var(--turf); color: var(--turf); }
.lb-close { top: var(--pad); right: var(--pad); }
.lb-prev { left: var(--pad); top: 50%; transform: translateY(-50%); }
.lb-next { right: var(--pad); top: 50%; transform: translateY(-50%); }
.lb-cap {
  position: absolute; bottom: calc(var(--pad) + env(safe-area-inset-bottom));
  left: 0; right: 0; text-align: center; color: var(--sand-d);
  font-size: .95rem; padding-inline: 4.5rem; margin: 0;
}
@media (max-width: 40rem) {
  .lightbox { padding: 4.5rem .75rem calc(7rem + env(safe-area-inset-bottom)); }
  .lightbox img { max-height: 56vh; }
  .lightbox button { width: 3rem; height: 3rem; }
  .lb-prev, .lb-next {
    top: auto; transform: none;
    bottom: calc(1rem + env(safe-area-inset-bottom));
  }
  .lb-prev { left: 1rem; }
  .lb-next { right: 1rem; }
  .lb-cap {
    bottom: calc(4.75rem + env(safe-area-inset-bottom));
    padding-inline: 1rem; font-size: .875rem;
  }
}

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

.form { display: grid; gap: 1rem; max-width: 34rem; }
.field { display: grid; gap: .3rem; }
.field label { font-weight: 600; font-size: 1rem; }
.field .hint { font-weight: 400; color: var(--sand-d); }
.band-light .field .hint { color: #5A6353; }
.field input, .field select, .field textarea {
  font: inherit; padding: .7rem .8rem; border-radius: var(--r);
  border: 2px solid var(--ridge); background: var(--night); color: var(--sand); width: 100%;
}
.band-light .field input, .band-light .field select, .band-light .field textarea {
  background: #fff; color: #12160F; border-color: #B3AC99;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--moss); outline: none; }
.field textarea { min-height: 7rem; resize: vertical; }
.field .err { color: #F2A0A2; font-size: .92rem; min-height: 1.2em; }
.band-light .field .err { color: #8C2125; }
.field[data-invalid] input, .field[data-invalid] textarea { border-color: var(--flag); }
.hp { position: absolute; left: -9999px; opacity: 0; }

.toast {
  position: fixed; left: 50%; bottom: 5.5rem; transform: translate(-50%, 1rem);
  background: var(--turf); color: var(--night); font-weight: 700;
  padding: .7rem 1.2rem; border-radius: var(--r); z-index: 130;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ pieces */

.split { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (min-width: 56rem) { .split { grid-template-columns: 1fr 1fr; } }
@media (min-width: 56rem) { .split-flip > :first-child { order: 2; } }
.split img { border-radius: var(--r); }
.split .tall img { aspect-ratio: 4 / 3; object-fit: cover; }

.banner-band { background: #0A0D09; padding-block: clamp(2rem, 5vw, 3.5rem); }
.banner-band img { margin-inline: auto; border-radius: var(--r); width: 100%; max-width: 1206px; }

.tel-xl {
  font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 5.5vw, 3.25rem);
  color: inherit; text-decoration: none; display: inline-block; letter-spacing: .01em;
}
.tel-xl:hover { color: var(--turf); }
.band-light .tel-xl:hover { color: var(--moss-d); }

.note { border-left: 3px solid var(--moss); padding-left: 1rem; font-size: 1rem; }
.mt2 { margin-top: 2rem; } .mt3 { margin-top: 3rem; }
.stack > * + * { margin-top: 1.2rem; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem); border-bottom: 1px solid var(--ridge); }

/* ------------------------------------------------------------------ footer */

.ftr { background: #0A0D09; border-top: 1px solid var(--ridge); padding-block: var(--band) 6.5rem; color: var(--sand-d); }
.ftr a { color: var(--sand); }
.ftr h2 { color: #fff; font-size: 1rem; letter-spacing: .1em; font-weight: 600; margin-bottom: .9rem; }
.ftr-grid { display: grid; gap: 2rem; }
@media (min-width: 56rem) { .ftr-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.ftr ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.ftr-legal { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid var(--ridge); font-size: .9rem; }
.ftr-legal p { max-width: none; }

/* -------------------------------------------------------------- call strip */

.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 85;
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--night); border-top: 2px solid var(--turf);
  padding-bottom: env(safe-area-inset-bottom);
  transition: transform .3s var(--ease);
}
.callbar.is-down { transform: translateY(110%); }
.callbar a {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .9rem .5rem; text-decoration: none; color: #fff;
  font-family: var(--display); font-weight: 600; font-size: 1.1rem;
  letter-spacing: .05em; text-transform: uppercase;
}
.callbar a:first-child { background: var(--moss-d); }
.callbar a + a { border-left: 1px solid var(--ridge); }
@media (min-width: 54rem) { .callbar { display: none; } }
@media (max-width: 53.99rem) { .ftr { padding-bottom: 6.5rem; } }

/* --------------------------------------------------------------- reveal fx */

.js [data-reveal] { opacity: 0; transform: translateY(18px); }
.js [data-reveal].is-in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .cutline .cut-b { stroke-dashoffset: 0; }
  .tile:hover img { transform: none; }
}


/* --------------------------------------------------------------------- FAQ */

.faq { margin-top: 2rem; border-top: 1px solid var(--ridge); max-width: 54rem; }
.band-light .faq { border-top-color: #CFC9B8; }
.faq details { border-bottom: 1px solid var(--ridge); }
.band-light .faq details { border-bottom-color: #CFC9B8; }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 2.5rem 1.1rem 0;
  position: relative; font-family: var(--display); font-weight: 600;
  font-size: clamp(1.05rem, 1.3vw, 1.2rem); letter-spacing: .02em;
  text-transform: uppercase; color: #fff; min-height: 44px;
}
.band-light .faq summary { color: #12160F; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .35rem; top: 50%;
  width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid var(--turf); border-bottom: 2px solid var(--turf);
  transform: rotate(45deg); transition: transform .25s var(--ease);
}
.band-light .faq summary::after { border-color: var(--moss-d); }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:hover { color: var(--turf); }
.band-light .faq summary:hover { color: var(--moss-d); }
.faq .answer { padding: 0 0 1.3rem; margin: 0; color: var(--sand-d); }
.band-light .faq .answer { color: #333C30; }

/* -------------------------------------------------------------- breadcrumb */

.crumb { font-size: .9rem; color: var(--sand-d); margin-bottom: 1rem; }
.crumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.crumb li + li::before { content: "/"; margin-right: .4rem; color: var(--ridge); }
.crumb a { color: var(--sand-d); }
.crumb a:hover { color: var(--turf); }
