/* ===== Mississippi Lawn Legends LLC — Branded Styles (clean) ===== */

:root {
  /* Brand */
  --brand-primary: #4ca31d;
  --brand-secondary: #002e17;
  --brand-accent: #d9d900;

  /* Greens for tiers */
  --tier-bright: #8eea53;
  --tier-light:  #c9f2b6;

  /* Neutrals */
  --neutral-900: #0a0a09;
  --neutral-700: #2a2a29;
  --neutral-500: #8a8a88;
  --neutral-300: #cfcfcd;
  --neutral-50:  #fefefe;

  /* Typography */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  --font-display: var(--font-sans);

  /* Buttons (unified) */
  --btn-radius: 12px;
  --btn-font-size: .95rem;
  --btn-pad-y: .75rem;
  --btn-pad-x: 1.1rem;

  /* Radius + Shadows */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-md: 0 8px 24px rgba(0,0,0,.12);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.16);

  /* Section overlay tints */
  --section-tint: rgba(255,255,255,.80);
  --section-tint-alt: rgba(76,163,29,.10);

  /* Banner aspect ratio */
  --banner-ar: 3 / 1;

  /* MENU button (light) */
  --menu-bg: #fff;
  --menu-fg: #000;

  /* Footer background image */
  --footer-bg: url("/img/LLfooter.svg");
}
@media (prefers-color-scheme: dark){
  :root{
    --neutral-50:  #0f1512;
    --neutral-900: #f0f3ed;
    --section-tint: rgba(0,0,0,.80);
    --section-tint-alt: rgba(0,0,0,.18);
    --menu-bg: #000;
    --menu-fg: #fff;
  }
}
:root[data-theme="dark"]{
  --neutral-50:  #0f1512;
  --neutral-900: #f0f3ed;
  --section-tint: rgba(0,0,0,.80);
  --section-tint-alt: rgba(0,0,0,.18);
  --menu-bg: #000;
  --menu-fg: #fff;
}

/* EXTRA transparency on small screens (mobile) */
@media (max-width: 640px){
  :root{
    --section-tint: rgba(255,255,255,.8);
    --section-tint-alt: rgba(255,255,255,.8);
  }
}
@media (max-width: 640px) and (prefers-color-scheme: dark){
  :root{
    --section-tint: rgba(0,0,0,.80);
    --section-tint-alt: rgba(0,0,0,.80);
  }
}

/* ==== Base / Resets ==== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior: auto; } }
body{
  background: var(--neutral-50);
  color: var(--neutral-900);
  font: 16px/1.5 var(--font-sans);
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: underline; }

/* ==== Sections & overlays ==== */
.section { position: relative; z-index: 0; padding: 3.5rem 1rem; background: transparent; }
.section .section-inner { max-width: 1100px; margin: 0 auto; }
.section .section-inner > h2 { text-align: center; }


h1,h2,h3 { font-family: var(--font-display); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin: 0 0 1rem; }
h3 { margin: 1rem 0 .5rem; }
.pad-top{ margin-top: 1rem; }

/* ==== CTA band ==== */
.cta-band .cta-title{ text-align:center; font-size: clamp(1.9rem, 5.2vw, 3rem); margin: 0; }
.cta-band .tagline{ text-align:center; margin:.4rem 0 0; color: var(--neutral-500); }
.cta-group, .cta-row{
  display:flex; flex-wrap:wrap; gap:.65rem; align-items:center; justify-content:center; margin-top:1rem;
}

/* ==== Buttons ==== */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: var(--btn-radius); border:1px solid transparent;
  font: 700 var(--btn-font-size)/1 var(--font-sans);
  box-shadow: var(--shadow-md); cursor:pointer; text-decoration:none;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
  background:#f6f6f6; color:#111; width:180px; font-size:.95rem;
}
.btn-primary { background: var(--brand-primary); color:#fff; border-color: color-mix(in srgb, var(--brand-primary), black 12%); }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity:.6; cursor:not-allowed; box-shadow:none; }
.modal-actions .btn,
.modal-actions .btn-primary { font-size: var(--btn-font-size); padding: var(--btn-pad-y) var(--btn-pad-x); }

/* ==== MENU popover placement ==== */
.menu-fab{
  position: fixed; left: 1rem; bottom: var(--fab-bottom, 1rem); z-index: 1000;
  display: inline-grid; grid-auto-flow: row; align-items:center; justify-items:center;
  gap:.35rem; padding:.4rem .5rem; background: var(--menu-bg); color: var(--menu-fg);
  border:none; border-radius:10px; box-shadow:none; backdrop-filter:none; cursor:pointer;
}
.menu-fab img { width: 48px; height: 48px; display:block; }
.menu-label { font-weight:800; letter-spacing:.02em; font-size:.8rem; margin:0; color:var(--menu-fg); }
.nav-list { display:grid; gap:.4rem; }
.nav-list a { text-decoration: underline; }

/* ==== Hero / Banner ==== */
header.banner-image {
  width: 100%; height: auto; aspect-ratio: var(--banner-ar);
  background: url("/img/LLbanner.svg") center/cover no-repeat;
  max-width: 100vw;
}
@media (prefers-color-scheme: dark) {
  header.banner-image {background-image: url("/img/LLbanner.svg"); }
}
@media (max-width: 700px){
  header.banner-image{
    background-size: contain; background-repeat: no-repeat; background-position: center;
    height: 135px; aspect-ratio: var(--banner-ar); max-width:100svw; overflow: clip;
  }
}
@supports not (overflow: clip){ header.banner-image{ overflow: hidden; } }

/* ==== Services ==== */
.services-grid{ display:grid; gap:2rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.checklist{ margin:0; padding-left:1.2rem; }
.checklist li{ margin:.35rem 0; }

/* ==== Tiers ==== */


.tiers-grid {
  display: grid;
  grid-template-columns: 1fr; /* Mobile: 1 column */
  gap: 1.25rem;
  align-items: start;
}

.tier { margin: 0; padding: 0; }

.tier img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;   /* remove any card rounding */
  box-shadow: none;   /* remove any card shadow */
}

/* Desktop: 3 in a row */
@media (min-width: 992px) {
  .tiers-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

/* Optional desktop hover subtlety */
@media (hover: hover) {
  .tier img { transition: transform 160ms ease; }
  .tier img:hover { transform: translateY(-1px); }
}

/* Center the Monthly Membership line */
#subscriptions .muted { text-align:center; }

/* ==== Bundles ==== */
.bundle-list{ padding-left: 1.2rem; }

/* ==== Service Footnote ==== */
#service-footnote p{ margin:.25rem 0; }

/* ==== Carousel (single canonical block) ==== */
.carousel{
  /* must be scrollable for programmatic scroll to render on iOS */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: auto;   /* cancel momentum mode; keep compositor happy */
  touch-action: pan-x;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-300);
  background: #fff;
  line-height: 0;
  padding: 0;
  will-change: scroll-position;       /* promote to compositor */
  transform: translateZ(0);           /* force a layer on iOS */
}
.carousel::-webkit-scrollbar{ display: none; }

.carousel .track{
  display: flex;
  gap: 0;
  will-change: transform;             /* lightweight hint (track itself doesn’t transform, but helps compositing) */
}

.carousel .track > *{
  flex: 0 0 auto;
}

.carousel img{
  flex: 0 0 auto;
  height: clamp(180px, 42vw, 260px);
  width: auto;
  max-width: none;
  min-width: 260px;
  object-fit: cover;
}

/* Drag-state cursor feedback (desktop only) */
@media (hover: hover) and (pointer: fine){
  .carousel.dragging, .carousel.dragging *{ cursor: grabbing; }
}

/* Respect reduced motion: allow manual scroll */
@media (prefers-reduced-motion: reduce){
  .carousel{ scroll-snap-type: x proximity; }
}

/* ==== Video ==== */
.video-wrap{ max-width: 900px; margin: 1rem auto 0; }
video{ width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--neutral-300); background:#000; }
.transcript{ margin-top: 1rem; }

/* ==== Footer ==== */
.site-footer {
  position: relative;
  color: #d6d9b5;
  background-image: var(--footer-bg);
  background-size: cover; 
  background-position: center;
}

.footer-inner { 
  max-width: 1100px; margin: 0 auto; padding: 2rem 1rem; text-align: center;
  backdrop-filter: saturate(110%) brightness(1); position: relative; z-index: 1;
}
.footer-links a, .site-footer a { color: #d6d9b5; text-decoration: underline; }
.footer-links .sep, .copyright .sep { margin: 0 .5rem; opacity: .6; }

/* ==== Dialog / Modal (base) ==== */
.modal{ border: none; border-radius: 14px; padding: 0; width: min(640px, 92vw); }
.modal::backdrop{ background: rgba(0,0,0,.55); }
.modal-card{ display:flex; flex-direction:column; background:#fff; border-radius:14px; overflow:hidden; }
.modal-card header{ display:flex; justify-content:space-between; align-items:center; padding:1rem 1.2rem; border-bottom:1px solid var(--neutral-300); background: color-mix(in srgb, var(--brand-primary), white 90%); }
.modal-card h3{ margin:0; }
.modal-close{ background:transparent; border:none; font-size:1.6rem; cursor:pointer; }
.modal-body{ display:grid; gap:.75rem; padding:1rem 1.2rem; }
.modal-body label{ display:grid; gap:.35rem; font-weight:600; }
.modal-body input, .modal-body select, .modal-body textarea{
  font: inherit; padding:.65rem .7rem; border:1px solid var(--neutral-300); border-radius:10px; width:100%;
}
.modal-actions{ display:flex; gap:.5rem; justify-content:flex-end; padding:1rem 1.2rem; border-top:1px solid var(--neutral-300); background: color-mix(in srgb, var(--brand-primary), white 95%); }

/* Address fields layout */
.address-grid {
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .address-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.address-grid > label {
  font-weight: 600;
}
.address-grid input {
  width: 100%;
}


/* Popover modal positioning near MENU button */
.modal.pop { position: fixed; left: 1rem; bottom: calc(var(--fab-bottom, 1rem) + 70px); width: min(340px, 92vw); }

/* ==== Pop Nav: stripelawn body + footer-style links + header/footer color flip ==== */
/* Body background image only for the nav modal */
#nav-modal.modal.pop .modal-body{
  background: url("/img/stripedlawn.png") center/cover no-repeat;
  padding: 1rem 1.2rem;
  border-top: 1px solid var(--neutral-50);
  border-bottom: 1px solid var(--neutral-50);
}

/* Keep the modal card chrome solid; respect theme */
#nav-modal.modal.pop .modal-card{ background: #fff; }
@media (prefers-color-scheme: dark){
  #nav-modal.modal.pop .modal-card{ background: var(--neutral-700); }
}

/* Header / footer (actions) color scheme override for nav modal */
#nav-modal.modal.pop .modal-card header,
#nav-modal.modal.pop .modal-actions{
  background: var(--neutral-300);    /* Light mode default */
  color: var(--neutral-900);
}
#nav-modal.modal.pop .modal-close{ color: var(--neutral-700); }

@media (prefers-color-scheme: dark){
  #nav-modal.modal.pop .modal-card header,
  #nav-modal.modal.pop .modal-actions{
    background: var(--neutral-700);  /* Dark mode */
    color: var(--neutral-900);
  }
  #nav-modal.modal.pop .modal-close{ color: var(--neutral-900); }
}

/* Ensure links inside header/footer inherit text color and no underline noise */
#nav-modal.modal.pop .modal-card header a,
#nav-modal.modal.pop .modal-actions a{
  color: inherit;
  text-decoration: none;
}

/* Nav list links: match footer color, remove underline only inside nav modal */
#nav-modal .nav-list{ display: grid; gap: .4rem; }
#nav-modal .nav-list a{
  color: #d6d9b5;          /* footer link color */
  text-decoration: none;   /* remove underline */
  display: block;
  padding: .5rem .6rem;
  border-radius: 8px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,.35); /* legibility over photo */
}
/* Hover/focus states for accessibility */
#nav-modal .nav-list a:hover,
#nav-modal .nav-list a:focus-visible{
  background: rgba(0,0,0,.22);
  outline: none;
}

/* ==== Tile background ==== */
.tile-bg{
  position: fixed; inset: 0; z-index: -5; opacity: .18; pointer-events: none;
  display: grid; grid-template-columns: repeat(8, 1fr); grid-auto-rows: 12.5vw; gap: 0;
  transform: translateZ(0);
}
.tile-bg .tile{ width: 100%; height: 100%; background-size: 101% 101%; background-position: center; }

/* Center helpers */
.center{ text-align:center; }

/* ==== Motion safety ==== */
@media (prefers-reduced-motion: reduce){
  .btn:hover{ transform: none; }
  .carousel{ overflow-x: auto; } /* allow manual scroll, disables programmatic momentum */
}

/* ==== Mobile polish ==== */
.site-footer{ position: relative; overflow: hidden; }
.site-footer > *{ position: relative; z-index: 1; }

@media (max-width: 768px) {
  /* Contact section: hide first separator & force break after it */
  .contact-links .separator {
    display: block;        /* causes a line break */
    visibility: hidden;    /* hides the "|" */
    height: 0;
  }

  /* Ensure links stay inline except where we broke */
  .contact-links a {
    display: inline;
    margin: 0 0.25rem;
    text-align: center;
  }

  /* Optional: center the whole contact block */
  .contact-links {
    text-align: center;
  }

  /* Footer still breaks separator */
  footer .separator {
    display: block;
    visibility: hidden;
    height: 0;
  }
  footer p {
    text-align: center;
    margin-bottom: 0.5rem;
  }
}

/* ===== Services Grid (Images with Overlays) ===== */
.services-grid {
  padding: clamp(2rem, 3vw, 3rem) 0;
}

.services-grid .section-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.services-grid .section-header h2 {
  font-family: var(--font-display, ui-sans-serif);
  font-weight: 800;
  letter-spacing: 0.2px;
}

.services-grid .section-header .sub {
  color: var(--neutral-500, #8a8a88);
  margin-top: 0.25rem;
}

/* Grid */
.services-grid .cards {
  --min: 260px;
  --gap: 1rem;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--min), 1fr));
  gap: var(--gap);
  padding: 0;
  margin: 0;
}

/* Card */
.services-grid .card figure {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16 / 10; /* consistent cropping */
  background: var(--neutral-300, #cfcfcd);
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  isolation: isolate;
}

.services-grid .card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform .5s ease;
}

/* Overlay caption */
.services-grid .card figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  z-index: 2;
  transition: background 0.3s ease;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.services-grid .card .title {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-transform: none;
}

.services-grid .card .tag {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: rgba(76, 163, 29, 0.85); /* brand primary tint */
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.3rem;
}

/* Hover effect — subtle brightness lift */
@media (hover:hover) and (pointer:fine) {
  .services-grid .card:hover figcaption {
    background: rgba(0, 0, 0, 0.95);
  }
}

/* Shared section header (Services, Subscriptions, Bundles, etc.) */
.section-header{
  text-align: center;
  margin-bottom: 1.5rem;
}
.section-header h2{
  font-family: var(--font-display, ui-sans-serif);
  font-weight: 800;
  letter-spacing: 0.2px;
}
.section-header .sub{
  color: var(--neutral-500, #8a8a88);
  margin-top: 0.25rem;
}

/* Hide any legacy mosaic blocks if present on other pages */
.tile-bg{ display:none !important; }

/* === Unified background + single overlay (new) === */
.mainpage-bg{
  position: fixed;
  inset: 0;
  z-index: -2; /* deepest */
  background: url("/img/LLbackground.jpg") center/cover no-repeat;
  pointer-events: none;
  transform: translateZ(0);
}
.site-overlay{
  position: fixed;
  inset: 0;
  z-index: -1; /* above background, below header/main/footer */
  background: var(--section-tint);
  pointer-events: none;
}