/* B&B Landscaping — shared styles (layered on top of Tailwind CDN utilities) */

:root {
  --brand: #1a56db;
  --brand-dark: #1446b8;
  --navy: #0f2460;
  --navy-deep: #0a1a47;
  --ink: #1f2937;
}

html { scroll-behavior: smooth; }
body { color: var(--ink); background: #ffffff; -webkit-font-smoothing: antialiased; }

/* Offset anchor targets for the sticky header */
[id] { scroll-margin-top: 96px; }

/* ---------- Hero ----------
   To use a real photo, set the variable on the section:
   <section class="hero" style="--hero-img: url('assets/img/hero.jpg')">            */
.hero {
  position: relative;
  isolation: isolate;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(10, 26, 71, 0.94) 0%, rgba(15, 36, 96, 0.86) 55%, rgba(26, 86, 219, 0.72) 100%),
    var(--hero-img, none) center / cover no-repeat,
    var(--navy);
  overflow: hidden;
}
.hero::before {
  /* subtle leaf pattern */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='0.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z'/%3E%3Cpath d='M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12'/%3E%3C/svg%3E");
  background-size: 120px 120px;
}
.hero::after {
  content: "";
  position: absolute;
  right: -10%;
  bottom: -40%;
  width: 60%;
  aspect-ratio: 1;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 86, 219, 0.45) 0%, rgba(26, 86, 219, 0) 70%);
}

/* ---------- Photo placeholder slots ---------- */
.photo-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 250px;
  padding: 1.5rem;
  border-radius: 1rem;
  background: var(--navy);
  background-image: radial-gradient(circle at 30% 20%, rgba(26, 86, 219, 0.35), transparent 60%);
  color: #fff;
  text-align: center;
  overflow: hidden;
}
.photo-slot::before {
  content: "";
  width: 52px;
  height: 52px;
  opacity: 0.55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z'/%3E%3Cpath d='M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12'/%3E%3C/svg%3E") center / contain no-repeat;
}
.photo-slot > .slot-label {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.85);
}
.photo-slot.tall { min-height: 360px; }
/* When a real photo is dropped in, it fills the slot */
.photo-slot > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-slot:has(> img)::before, .photo-slot:has(> img) > .slot-label { display: none; }

.ba-tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.95);
  color: var(--navy);
}
.ba-tag.after { background: var(--brand); color: #fff; }

/* ---------- Nav ---------- */
.nav-link { position: relative; }
.nav-link[aria-current="page"] { color: var(--brand); }
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}
#mobile-menu {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
#mobile-menu.open { grid-template-rows: 1fr; }
#mobile-menu > div { overflow: hidden; }
.mobile-link[aria-current="page"] { background: #e8effc; color: var(--brand); }

/* ---------- Reviews carousel ---------- */
.carousel-track { display: flex; transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.carousel-slide { flex: 0 0 100%; padding: 0 0.5rem; }
@media (min-width: 768px) { .carousel-slide { flex-basis: 50%; } }
@media (min-width: 1024px) { .carousel-slide { flex-basis: 33.3333%; } }
.carousel-dot[aria-current="true"] { background: var(--brand); width: 1.75rem; }

/* ---------- Form ---------- */
.field {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.6rem;
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.2); }
.field[aria-invalid="true"] { border-color: #dc2626; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .carousel-track, #mobile-menu { transition: none; }
}
