html { scroll-behavior: smooth; }
body { margin: 0; background: #121e25; }
input, select, textarea, button { font-family: 'Barlow', sans-serif; }

@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-20px) rotate(3deg); }
}

/* About-section blobs: breathing pulse, alternating phases */
@keyframes blobPulseA {
  0%, 100% { transform: rotate(-4deg) scale(1); opacity: 0.16; }
  50% { transform: rotate(-4deg) scale(1.07); opacity: 0.3; }
}
@keyframes blobPulseB {
  0%, 100% { transform: rotate(5deg) scale(1.06); opacity: 0.26; }
  50% { transform: rotate(5deg) scale(1); opacity: 0.14; }
}
.about-blob-a { animation: blobPulseA 5s ease-in-out infinite; }
.about-blob-b { animation: blobPulseB 5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .about-blob-a, .about-blob-b { animation: none; }
}

[data-reveal] { will-change: opacity, transform; }

/* ---------- Mobile nav ---------- */
.nav-mobile-panel {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: #121e25;
  border-bottom: 1px solid rgba(195, 162, 110, 0.18);
  padding: 10px 24px 20px;
}
.nav-mobile-panel.is-open { display: flex; }
.nav-mobile-panel a {
  color: #dfe7ec;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(243, 241, 233, 0.08);
}
.nav-mobile-panel a:last-child { border-bottom: none; }
.nav-mobile-panel .nav-mobile-phone { color: #c3a26e; font-weight: 700; }
.nav-mobile-panel .nav-mobile-cta {
  margin-top: 8px;
  background: #e0872f;
  color: #121e25;
  font-weight: 800;
  border-radius: 8px;
  text-align: center;
  padding: 14px;
}

/* ---------- Footer (ported from Island Touch Construction) ---------- */
.ft {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom, #121e25, #0c161c);
  color: rgba(243, 241, 233, 0.8);
  font-size: 15.5px;
}
.ft-blades {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("img/footer-blades.jpg");
  background-position: right center;
  background-size: cover;
  background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.5) 46%, transparent 82%);
  mask-image: linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.5) 46%, transparent 82%);
  opacity: 0.92;
}
.ft-tint { position: absolute; inset: 0; pointer-events: none; background: rgba(18, 30, 37, 0.35); }
.ft-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
}
.ft-inner { position: relative; z-index: 10; max-width: 1240px; margin: 0 auto; padding: 90px 24px 40px; }
.ft-grid { display: grid; grid-template-columns: 1.15fr 0.85fr 0.95fr; gap: 64px; }

.ft-pill {
  display: inline-flex;
  align-items: center;
  margin: 0;
  background: #e0872f;
  color: #121e25;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.ft-heading {
  margin: 20px 0 0;
  font-family: 'Zilla Slab', serif;
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  line-height: 1.02;
  color: #f3f1e9;
}
.ft-copy { margin: 16px 0 0; max-width: 420px; color: rgba(243, 241, 233, 0.7); line-height: 1.6; }

.ft-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  background: #e0872f;
  color: #121e25;
  font-weight: 800;
  font-size: 17px;
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 8px 8px 24px;
  box-shadow: 0 12px 32px -4px rgba(224, 135, 47, 0.25);
  transition: background 0.2s ease;
}
.ft-cta:hover { background: #f09a42; }
.ft-cta-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  width: 36px;
  border-radius: 50%;
  background: #121e25;
  color: #f3f1e9;
  transition: transform 0.2s ease;
}
.ft-cta-circle svg { height: 20px; width: 20px; }
.ft-cta:hover .ft-cta-circle { transform: rotate(45deg); }

.ft-nav { display: block; margin-top: 40px; max-width: 420px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.ft-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #f3f1e9;
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}
.ft-nav-row svg {
  height: 20px;
  width: 20px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.4);
  transition: transform 0.2s ease, color 0.2s ease;
}
.ft-nav-row:hover { color: #e0872f; }
.ft-nav-row:hover svg { color: #e0872f; transform: translate(2px, -2px); }

.ft-col-title { margin: 0 0 16px; font-size: 17px; font-weight: 700; color: #f3f1e9; }
.ft-links { margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.ft-links a { color: rgba(243, 241, 233, 0.7); text-decoration: none; transition: color 0.2s ease; }
.ft-links a:hover { color: #e0872f; }

.ft-contact { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; font-size: 14.5px; }
.ft-contact li { display: block; }
.ft-contact li > span:not(.ft-ico),
.ft-contact li { color: rgba(243, 241, 233, 0.8); }
.ft-contact li, .ft-contact a { display: inline-flex; align-items: flex-start; gap: 8px; }
.ft-contact a { color: rgba(243, 241, 233, 0.8); text-decoration: none; transition: color 0.2s ease; }
.ft-contact a:hover { color: #e0872f; }
.ft-ico { display: inline-flex; flex-shrink: 0; margin-top: 1px; color: #e0872f; }
.ft-ico svg { height: 16px; width: 16px; }

.ft-cred { display: inline-flex; align-items: center; gap: 8px; margin: 24px 0 0; font-size: 14.5px; color: rgba(243, 241, 233, 0.8); }
.ft-pay-label { margin: 24px 0 0; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(243, 241, 233, 0.5); }
.ft-pay { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.ft-pay li {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 4px 10px;
  color: rgba(243, 241, 233, 0.8);
}

.ft-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: rgba(243, 241, 233, 0.5);
}
.ft-bottom p { margin: 0; }
.ft-bottom-right { display: flex; align-items: center; gap: 16px; }
.ft-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  width: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(243, 241, 233, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease, color 0.2s ease;
}
.ft-social svg { height: 16px; width: 16px; }
.ft-social:hover { background: #e0872f; color: #121e25; }
.ft-legal { margin-left: 4px; display: flex; align-items: center; gap: 12px; }
.ft-legal a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
.ft-legal a:hover { color: #e0872f; }

/* Giant brand watermark — on desktop it sits in the open blade space beside
   the nav rows (two lines, lower-right); on mobile it falls back to a bottom
   band. */
.ft-wm-wrap { pointer-events: none; position: relative; z-index: 0; margin-top: -8px; overflow: hidden; }
.footer-watermark {
  display: block;
  user-select: none;
  white-space: nowrap;
  text-align: center;
  font-family: 'Zilla Slab', serif;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.8;
  letter-spacing: -0.01em;
  transform: translateY(12%);
  font-size: clamp(2.75rem, 14.5vw, 12rem);
}
.ft-wm-gap { display: inline-block; width: 0.28em; }
.ft-wm-br { display: none; }
.ft-wm-logo { display: none; }
@media (min-width: 901px) {
  .ft-wm-wrap { position: absolute; inset: 0; margin-top: 0; overflow: visible; }
  /* Giant leaf mark as a backdrop with the wordmark overlaid on top of it */
  .footer-watermark {
    position: absolute;
    bottom: 6%;
    right: 22%;
    transform: none;
    display: grid;
    place-items: center;
    text-align: center;
    line-height: 0.82;
    font-size: clamp(3rem, 7vw, 6.25rem);
  }
  .ft-wm-logo {
    display: block;
    grid-area: 1 / 1;
    height: clamp(18rem, 36vw, 32rem);
    width: auto;
    opacity: 0.5;
  }
  .ft-wm-text { grid-area: 1 / 1; position: relative; }
  .ft-wm-br { display: block; }
  .ft-wm-gap { display: none; }
}
.fw-letter { display: inline-block; }
/* Logo colors: "Tristate" slate-blue, "LAWNCARE" gold */
.ft-wm-l1 .fw-letter { color: #8ba0b0; }
.ft-wm-l2 .fw-letter { color: #c3a26e; }

/* Footer entrance animation — hidden states are gated behind .footer-anim-ready
   (added by JS) so the footer stays fully visible with JS disabled. */
.footer-anim-ready .foot-rise {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 0.06s);
}
.footer-anim-ready .fw-letter {
  opacity: 0;
  transform: translateY(110px) scale(0.4) rotate(16deg);
  transition: opacity 0.9s cubic-bezier(0.34, 1.4, 0.5, 1), transform 0.9s cubic-bezier(0.34, 1.4, 0.5, 1);
  transition-delay: calc(var(--i, 0) * 0.05s);
  will-change: transform, opacity;
}
.footer-anim-ready.footer-in .foot-rise { opacity: 1; transform: none; }
.footer-anim-ready .wm-in .fw-letter { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .footer-anim-ready .foot-rise,
  .footer-anim-ready .fw-letter { opacity: 1 !important; transform: none !important; transition: none !important; }
}
/* Hide the big "Tristate Lawncare" footer watermark entirely on phones/tablets
   — it read as glitchy there. Desktop keeps it (and its reveal animation). */
@media (max-width: 900px) {
  .footer-watermark { display: none !important; }
}

/* ---------- Responsive ---------- */

/* Global safety: never let anything cause sideways scroll, on any device. */
html, body { overflow-x: hidden; max-width: 100%; }
body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, svg, video, canvas { max-width: 100%; }

/* Tablet and below (<=900px): stack to one column, tighten the rhythm. */
@media (max-width: 900px) {
  .nav-links,
  .nav-phone { display: none !important; }
  .hamburger-btn { display: flex !important; }
  /* Push the hamburger (and CTA, where shown) to the far right once the
     inline links are gone. */
  .nav-actions { margin-left: auto !important; }

  .hero-grid,
  .services-grid,
  .about-grid,
  .gallery-grid,
  .reviews-grid {
    grid-template-columns: 1fr !important;
  }

  .gallery-slot.featured {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }

  /* Hero — shrink the oversized headline + trim the big top padding. */
  header .hero-grid {
    padding: 116px 20px 72px !important;
    gap: 36px !important;
  }
  header h1 { font-size: clamp(2.1rem, 8.4vw, 3.3rem) !important; }
  .hero-grid > div[data-reveal="left"] > p { font-size: 17px !important; }

  /* Section headings scale with the viewport instead of a fixed 40-46px. */
  section h2 { font-size: clamp(1.85rem, 6vw, 2.6rem) !important; line-height: 1.15 !important; }

  /* Trim left/right + vertical padding on the light sections. */
  #services, #about, #gallery,
  section[data-screen-label="Reviews"],
  section[data-screen-label="FAQ"] {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  #services { padding-top: 60px !important; padding-bottom: 72px !important; }
  #about    { padding-top: 64px !important; padding-bottom: 80px !important; }
  #gallery  { padding-top: 60px !important; }
  section[data-screen-label="Reviews"] { padding-top: 60px !important; padding-bottom: 72px !important; }
  section[data-screen-label="CTA"] > div[data-reveal="up"] {
    padding: 72px 20px !important;
  }

  /* Larger form controls so iOS doesn't zoom the page on focus. */
  input, select, textarea { font-size: 16px !important; }

  /* Footer stacks. */
  .ft-inner { padding-left: 20px !important; padding-right: 20px !important; }
  .ft-grid { grid-template-columns: 1fr; gap: 44px; }
  .footer-watermark { font-size: clamp(2.75rem, 15.5vw, 8rem); }
}

/* Tablet only (601-900px): 2 columns look better than 1 for the card grids. */
@media (min-width: 601px) and (max-width: 900px) {
  .services-grid,
  .reviews-grid,
  .gallery-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* Phones (<=600px). */
@media (max-width: 600px) {
  header h1 { font-size: clamp(1.9rem, 8.8vw, 2.6rem) !important; }
  .hero-grid > div[data-reveal="left"] > p { font-size: 16.5px !important; }

  /* Drop the nav CTA — it's in the hamburger menu; keeps the bar uncluttered. */
  .nav-actions a[href="#quote"] { display: none !important; }

  .hero-highlights { column-gap: 16px !important; row-gap: 14px !important; }
  .hero-highlights img { height: 40px !important; width: 40px !important; }
  .hero-highlights span { font-size: 14px !important; }

  /* Stack the 2x2 "Why Tristate" feature grid into one column. */
  .about-features { grid-template-columns: 1fr !important; gap: 20px !important; }

  .ft-wm-br { display: block; }
  .ft-wm-gap { display: none; }
  .footer-watermark { line-height: 0.9; }
}

/* Small phones (<=400px): tighten gutters further. */
@media (max-width: 400px) {
  nav [style*="padding: 0 24px"] { padding-left: 16px !important; padding-right: 16px !important; }
  #services, #about, #gallery,
  section[data-screen-label="Reviews"],
  section[data-screen-label="FAQ"] {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  header .hero-grid { padding-left: 16px !important; padding-right: 16px !important; }
  section[data-screen-label="CTA"] > div[data-reveal="up"] { padding-left: 16px !important; padding-right: 16px !important; }
  .ft-inner { padding-left: 16px !important; padding-right: 16px !important; }
}

/* ============================================================
   MOBILE STICKY CTA BAR
   Floating Call + Get Quote pills, phones & tablets only.
   Hidden by default; JS toggles .is-visible once the hero
   scrolls out of view. Desktop (>=1024px) never shows it —
   the nav already has a persistent phone + quote CTA.
   ============================================================ */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  padding: 0 14px calc(env(safe-area-inset-bottom, 0px) + 14px);
  pointer-events: none;                 /* dead space between pills stays click-through */
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.sticky-cta.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.sticky-cta-inner {
  display: flex;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
}
.sticky-cta-btn {
  flex: 1;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 18px;
  border-radius: 999px;
  font-family: 'Barlow', sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.3px;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(0,0,0,0.28);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.sticky-cta-btn svg {
  height: 20px;
  width: 20px;
  flex-shrink: 0;
}
.sticky-cta-btn:active { transform: scale(0.97); }
/* SECONDARY — Call: white pill, deep-green text + thin ring */
.sticky-cta-call {
  background: #ffffff;
  color: #3d7a34;
  box-shadow: 0 10px 26px rgba(0,0,0,0.22), inset 0 0 0 1.5px rgba(61,122,52,0.28);
}
/* PRIMARY — Get Quote: solid orange pill, navy text (matches site CTA) */
.sticky-cta-quote {
  background: #e0872f;
  color: #121e25;
}

/* Only relevant on phones/tablets; keep it off the desktop entirely. */
@media (min-width: 1024px) {
  .sticky-cta { display: none !important; }
}
