/* 6SD Template Library — components: nav, buttons, cards, forms, footer.
   Shared across directions; each direction may layer its own accents. */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-body); font-weight: var(--fw-semibold); font-size: var(--fs-body);
  padding: 0.85rem 1.6rem; border-radius: var(--radius-sm); border: 2px solid transparent;
  cursor: pointer; transition: all var(--transition); line-height: 1; text-align: center;
}
.btn--primary { background: var(--color-accent); color: var(--color-accent-contrast); }
.btn--primary:hover { background: var(--color-accent-hover); color: var(--color-accent-contrast); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--color-accent); border-color: var(--color-accent); }
.btn--ghost:hover { background: var(--color-accent); color: var(--color-accent-contrast); }
.btn--lg { padding: 1.05rem 2rem; font-size: 1.1rem; }
.btn--block { width: 100%; }

/* Header / nav */
.site-header {
  position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--color-bg) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--color-border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); padding-block: var(--space-4); }
.nav__brand { display: flex; align-items: center; gap: var(--space-3); font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 1.2rem; color: var(--color-text); }
.nav__brand img { height: 36px; width: auto; }
.nav__links { display: flex; align-items: center; gap: var(--space-6); list-style: none; padding: 0; margin: 0; }
.nav__links a { color: var(--color-text); font-weight: var(--fw-medium); }
.nav__links a:hover { color: var(--color-accent); }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: var(--space-2); color: var(--color-text); }
.nav__toggle svg { width: 28px; height: 28px; }

@media (max-width: 820px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 60;
    flex-direction: column; align-items: stretch;
    background: var(--color-bg); border-bottom: 1px solid var(--color-border);
    padding: var(--space-4) var(--space-4) var(--space-6); gap: var(--space-3);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    box-shadow: var(--shadow);
  }
  .nav__links[data-open="true"] { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav__links li { display: block; }
  /* Each item is a clearly visible, well-spaced button */
  .nav__links a:not(.btn) {
    display: block; padding: 1.05rem 1.25rem; font-size: 1.12rem; font-weight: 600;
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px;
    color: var(--color-text);
  }
  .nav__links a:not(.btn):hover, .nav__links a:not(.btn):focus { background: var(--color-border); }
  .nav__links a:not(.btn)[aria-current="page"] { border-color: var(--color-accent); color: var(--color-accent); }
  .nav__links .btn { margin-top: var(--space-1); text-align: center; padding-block: 1.05rem; font-size: 1.12rem; }
  .nav__links .btn--primary { color: var(--color-accent-contrast, #fff); }
}

/* Hero */
.hero { position: relative; }
.hero__inner { display: grid; gap: var(--space-8); align-items: center; padding-block: var(--space-16); }
@media (min-width: 880px) { .hero__inner--split { grid-template-columns: 1.1fr 0.9fr; } }
.hero h1 { font-size: var(--fs-hero); }
.hero__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; object-fit: cover; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* Trust bar */
.trust { display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: center; color: var(--color-text-muted); font-size: var(--fs-small); }
.trust strong { color: var(--color-text); }

/* Cards */
.card { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius); padding: var(--space-6); transition: transform var(--transition), box-shadow var(--transition); }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--color-accent) 12%, transparent); color: var(--color-accent); margin-bottom: var(--space-4); }
.card h3 { margin-bottom: var(--space-2); }

/* Reviews */
.review { background: var(--color-surface); border-radius: var(--radius); padding: var(--space-6); }
.review__stars { color: #f5a623; letter-spacing: 2px; }

/* Forms */
.form { display: grid; gap: var(--space-4); }
.form__row { display: grid; gap: var(--space-4); }
@media (min-width: 640px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: var(--space-2); }
.field label { font-weight: var(--fw-medium); font-size: var(--fs-small); }
.field input, .field select, .field textarea {
  font: inherit; padding: 0.8rem 0.9rem; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); background: var(--color-bg); color: var(--color-text); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--color-accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 22%, transparent); }
.field textarea { min-height: 82px; resize: vertical; }
/* Address autocomplete dropdown */
.addr-ac { position: absolute; left: 0; right: 0; top: 100%; z-index: 6; margin-top: 4px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; display: none; }
.addr-ac.is-open { display: block; }
.addr-ac__item { display: block; width: 100%; text-align: left; padding: 12px 14px; background: none; border: 0; border-bottom: 1px solid var(--color-border); cursor: pointer; font: inherit; font-size: var(--fs-small); color: var(--color-text); line-height: 1.35; }
.addr-ac__item:last-child { border-bottom: 0; }
.addr-ac__item:hover, .addr-ac__item:focus { background: var(--color-surface); }
/* Honeypot — hidden from humans, catches bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { font-size: var(--fs-small); padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); display: none; }
.form__status[data-state="success"] { display: block; background: #e7f6ed; color: #18794e; }
.form__status[data-state="error"] { display: block; background: #fdecec; color: #b42318; }

/* Stat / proof band */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); text-align: center; align-items: start; }
.stat__num { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.05; color: var(--color-accent, #1a1a1a); }
.stat__label { font-size: var(--fs-small); color: var(--color-text-muted, #5b6470); margin-top: 6px; line-height: 1.3; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); gap: var(--space-8) var(--space-6); } }

/* Brand logo (real file when present, wordmark fallback otherwise) */
.brand-logo { height: 52px; width: auto; display: block; border-radius: 9px; }

/* Hero slideshow */
.hero-slides { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 4/3; box-shadow: 0 20px 50px rgba(0,0,0,.18); background: #111; }
.hero-slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; }
.hero-slides img.is-active { opacity: 1; }
.hero-slides__dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; gap: 8px; justify-content: center; z-index: 2; }
.hero-slides__dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); cursor: pointer; padding: 0; transition: all .25s ease; }
.hero-slides__dots button[aria-selected="true"] { background: #fff; width: 24px; border-radius: 5px; }
.hero-slides__tag { position: absolute; left: 14px; top: 14px; z-index: 2; background: var(--color-accent, #2f7d1f); color: #fff; font-weight: 700; font-size: .8rem; padding: 6px 13px; border-radius: 999px; font-family: var(--font-display); box-shadow: 0 6px 16px rgba(0,0,0,.25); }

/* Card hover lift (subtle, universal) */
.card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 38px rgba(0,0,0,.10); }

/* Footer */
.site-footer { background: var(--color-dark-bg); color: var(--color-dark-muted); padding-block: var(--space-12); }
.site-footer a { color: var(--color-dark-text); }
.site-footer .stack a { display: block; }
.site-footer .stack a + a { margin-top: var(--space-2); }
.footer__grid { display: grid; gap: var(--space-8); }
@media (min-width: 720px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer__bottom { margin-top: var(--space-8); padding-top: var(--space-6); border-top: 1px solid rgba(255,255,255,0.12); display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between; font-size: var(--fs-small); }

/* Booking modal (popup form over the page) */
.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-4);
}
.modal__backdrop {
  position: absolute; inset: 0; background: rgba(10, 14, 22, 0.62);
  opacity: 0; transition: opacity var(--transition);
}
/* Panel stays fully opaque and only slides in, so the page never bleeds through it */
.modal__panel {
  position: relative; z-index: 1; width: 100%; max-width: min(440px, 100%);
  display: flex; flex-direction: column;
  max-height: min(calc(100dvh - 3rem), 680px); overflow: hidden;
  background: var(--color-bg); color: var(--color-text);
  border-radius: 20px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  transform: translateY(18px) scale(0.985);
  transition: transform var(--transition);
}
.modal[data-open="true"] .modal__backdrop { opacity: 1; }
.modal[data-open="true"] .modal__panel { transform: none; }

/* Header: a branded band in the client's accent color, white title + close */
.modal__head {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-5) var(--space-6); border-bottom: 0;
  background: var(--color-accent); color: var(--color-accent-contrast, #fff);
}
.modal__head h2 { font-size: 1.4rem; line-height: 1.15; margin: 0; font-family: var(--font-display); color: var(--color-accent-contrast, #fff); }
.modal__body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: var(--space-6); }
.modal__sub { color: var(--color-text-muted); font-size: var(--fs-small); line-height: 1.5; margin: 0 0 var(--space-6); }
.modal__close {
  flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.18); border: 0;
  border-radius: 999px; cursor: pointer; color: var(--color-accent-contrast, #fff);
  transition: background var(--transition);
}
.modal__close:hover { background: rgba(255, 255, 255, 0.34); }

/* Booking form: crisp white fields, clear hierarchy, comfortable spacing */
.modal__body .form { gap: var(--space-5); }
.modal__body .field { gap: 8px; }
.modal__body .field label { font-size: 0.82rem; font-weight: 600; line-height: 1.3; color: var(--color-text); }
.modal__body .field input, .modal__body .field select, .modal__body .field textarea {
  padding: 0.82rem 0.95rem; background: var(--color-bg);
  border: 1.5px solid var(--color-border); border-radius: 12px; font-size: 1rem;
}
.modal__body .form__row--2 { gap: var(--space-4); }
.modal__body .field input:focus, .modal__body .field select:focus, .modal__body .field textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 18%, transparent);
}
.modal__body .field input::placeholder, .modal__body .field textarea::placeholder { color: color-mix(in srgb, var(--color-text) 36%, transparent); }
.modal__body .field textarea { min-height: 76px; }
.modal__body .form button[type="submit"] { margin-top: var(--space-3); padding-block: 0.95rem; font-size: 1.05rem; }

/* Mobile: bottom sheet with a grab handle; backdrop still shows at the top */
@media (max-width: 560px) {
  .modal { padding: 0; align-items: flex-end; }
  .modal__panel {
    max-width: 100%; width: 100%; border-radius: 22px 22px 0 0; max-height: 92dvh;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .modal__panel::before {
    content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    width: 40px; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.55); z-index: 2;
  }
  .modal__head { padding: calc(var(--space-4) + 12px) 22px var(--space-4); }
  .modal__body { padding: var(--space-4) 22px var(--space-6); }
  .modal__head h2 { font-size: 1.3rem; }
  .modal__panel { transform: translateY(100%); }
  .modal[data-open="true"] .modal__panel { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .modal__backdrop, .modal__panel { transition: none; }
}

/* Service-area chips */
.areas { display: flex; flex-wrap: wrap; gap: var(--space-3); list-style: none; padding: 0; }
.areas li { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 999px; padding: var(--space-2) var(--space-4); font-size: var(--fs-small); }

/* ============================================================
   6SD work galleries, lightbox, social links + projects map
   Additive + class-scoped: opt-in per page, never affects
   clients that don't use these classes. Added 2026-06.
   ============================================================ */

/* Footer social row (icon + label, low-pressure, keeps people on-site) */
.social-links { display: flex; flex-wrap: wrap; gap: 10px; }
.social-links a {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-weight: 600; font-size: var(--fs-small);
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--color-border, #e2e2e2);
  background: var(--color-surface, #f5f5f5); color: inherit;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.social-links a:hover { transform: translateY(-1px); border-color: var(--color-accent, #2f7d1f); }
.social-links svg { width: 18px; height: 18px; flex: 0 0 auto; }
.social-links .star { color: var(--color-gold, #efa81e); }

/* Responsive photo gallery (masonry-ish grid) */
.photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.photo-gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: 14px; background: #111; }
.photo-gallery img {
  width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4/3;
  cursor: zoom-in; transition: transform .45s ease; will-change: transform;
}
.photo-gallery figure:hover img { transform: scale(1.06); }
.photo-gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px;
  color: #fff; font-size: .82rem; font-weight: 600;
  background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
  opacity: 0; transition: opacity .3s ease;
}
.photo-gallery figure:hover figcaption { opacity: 1; }
.photo-gallery--featured figure:first-child { grid-column: span 2; grid-row: span 2; }

/* Horizontal photo strip for service pages (scroll-snap) */
.gallery-strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.gallery-strip figure { margin: 0; flex: 0 0 78%; max-width: 340px; scroll-snap-align: start; border-radius: 14px; overflow: hidden; background: #111; }
.gallery-strip img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; cursor: zoom-in; }
@media (min-width: 720px) { .gallery-strip figure { flex-basis: 32%; } }

/* Lightbox (shared, opens on any [data-lightbox] gallery image) */
.lightbox { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center;
  background: rgba(10,10,10,.92); padding: 24px; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lightbox__cap { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: #fff; font-size: .9rem; opacity: .9; }
.lightbox__btn { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 48px; height: 48px;
  border-radius: 50%; font-size: 24px; cursor: pointer; display: grid; place-items: center; transition: background .2s; }
.lightbox__btn:hover { background: rgba(255,255,255,.25); }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 18px; top: 50%; transform: translateY(-50%); }

/* Projects map showcase (Leaflet) */
.projects-map { width: 100%; height: 520px; border-radius: 18px; overflow: hidden; box-shadow: 0 18px 50px rgba(0,0,0,.16); z-index: 0; }
@media (max-width: 720px) { .projects-map { height: 420px; } }
.map-popup { font-family: var(--font-body, system-ui); max-width: 220px; }
.map-popup img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }
.map-popup strong { display: block; font-size: .95rem; }
.map-popup span { font-size: .8rem; opacity: .7; }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font-size: .85rem; }
.map-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: middle; }
