/* =========================================================
MULTI-SERVICE UI (HOME + QUOTE)
- checkbox grid (.svc-grid + .svc)
- services cards grid (.servicesGrid + .svcCard)
========================================================= */

/* =========================
   CHECKBOX MULTI-SERVICE GRID
========================= */
.svc-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--svc-gap);
}

@media (max-width: 980px){
  .svc-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .svc-grid{ grid-template-columns: 1fr; }
}

.svc{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--svc-pad-y) var(--svc-pad-x);
  border-radius: 10px; /* clean, not bubbly */
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  font-size: 13px;
}

.svc input{
  width: 14px;
  height: 14px;
}

.svc-other{
  display: grid;
  margin-top: 6px;
  gap: 7px;
  grid-template-columns: 110px 1fr;
  align-items: center;
}

.svc-other__input,
.svc-other__input--dark{
  width: 100%;
  height: var(--field-h);
  padding: var(--pad-y) var(--pad-x);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.92);
}

/* Dark helper (homepage hero) */
.svc--dark{
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.88);
}
.svc--dark input{
  accent-color: rgba(205, 154, 38, 0.95);
}
.svc-other__input--dark::placeholder{
  color: rgba(255, 255, 255, 0.45);
}


/* =========================
   SERVICES CARDS GRID (4x2 when space allows)
   IMPORTANT: your HTML wrapper should be:
   <div class="servicesGrid" data-reveal>
========================= */

/* Let the services section breathe on wide monitors */
.section#services .container{
  width: 100%;
  max-width: 1480px; /* big, but still controlled */
  margin: 0 auto;
  padding-left: clamp(16px, 3vw, 44px);
  padding-right: clamp(16px, 3vw, 44px);
}

/* Grid wrapper */
.servicesGrid{
  display: grid;
  gap: clamp(14px, 1.6vw, 22px);
  align-items: stretch;
}

/* 1 col on small phones */
@media (max-width: 640px){
  .servicesGrid{ grid-template-columns: 1fr; }
}

/* 2 cols on mobile/tablet */
@media (min-width: 641px) and (max-width: 1024px){
  .servicesGrid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 3 cols on laptops / small desktops */
@media (min-width: 1025px) and (max-width: 1439px){
  .servicesGrid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 3 cols on large screens (6 cards => 3 x 2) */
@media (min-width: 1440px){
  .servicesGrid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}


/* =========================
   BIG CLEAN SERVICE CARDS
   RULE: ALWAYS PORTRAIT (taller than wider)
========================= */
.svcCard{
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  width: 100%;
  max-width: none;
  max-height: none;

  /* Base sizing (portrait) */
  aspect-ratio: 4 / 5;                    /* ALWAYS taller than wider */
  min-height: clamp(220px, 22vw, 420px);  /* baseline height curve */

  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;

  padding: clamp(14px, 1.4vw, 22px);
  transform: translateZ(0);
  transition: transform 180ms ease, filter 180ms ease;
}

/* Image fills the whole card */
.svcCard__img{
  position: absolute;
  inset: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.001);
  transition: transform 280ms ease;
}

/* Dark overlay so white text reads well */
.svcCard__shade{
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.78),
    rgba(0,0,0,0.22) 58%,
    rgba(0,0,0,0.02) 100%
  );
  z-index: 1;
}

/* Text layers on top */
.svcCard__title,
.svcCard__desc,
.card__link{
  position: relative;
  z-index: 2;
  text-shadow: 0 10px 26px rgba(0,0,0,0.55);
  text-align: center;
}

.svcCard__title{
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.05;
  font-size: clamp(18px, 1.6vw, 26px);
  color: #fff;
}

.svcCard__desc{
  margin-top: 6px;
  font-size: clamp(13px, 1.05vw, 15px);
  color: rgba(255,255,255,0.92);
}

.card__link{
  margin-top: 8px;
  font-weight: 900;
  font-size: clamp(13px, 1.05vw, 14px);
  color: #8a6516; /* darker gold: brand gold is 2.5:1 on white */
}

/* Hover/focus */
@media (hover: hover){
  .svcCard:hover{
    transform: translateY(-3px);
    filter: saturate(1.04);
  }
  .svcCard:hover .svcCard__img{
    transform: scale(1.04);
  }
}

.svcCard:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(205, 154, 38,0.18);
}


/* =========================================================
   iPad+ override: always 3 columns
   (keeps a 3x2 layout for the 6 cards)
========================================================= */
@media (min-width: 834px){
  .servicesGrid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* iPad tuning (you said: perfect sizing) */
@media (min-width: 834px) and (max-width: 1180px){
  .servicesGrid{
    gap: clamp(10px, 1.2vw, 16px);
  }
  .svcCard{
    /* keep portrait, keep "perfect" */
    aspect-ratio: 4 / 5;
    min-height: clamp(190px, 26vw, 320px);
  }
}


/* =========================================================
   HEIGHT TUNING BY SCREEN CLASS (PORTRAIT ONLY)
   - 13–16" laptops: taller
   - big screens: a bit shorter than laptops, still portrait
   - ultra-wide: slightly shorter still, still portrait
========================================================= */

/* 13–16" laptops / normal desktops (taller image area) */
@media (min-width: 1025px) and (max-width: 1599px){
  .svcCard{
    aspect-ratio: 4 / 5;
    min-height: clamp(300px, 23vw, 560px);
  }
}

/* Big desktop monitors (shorter than laptops but still portrait) */
@media (min-width: 1600px) and (max-width: 2199px){
  .servicesGrid{
    gap: clamp(18px, 1.8vw, 28px);
  }
  .svcCard{
    aspect-ratio: 4 / 5;
    min-height: clamp(260px, 14vw, 420px); /* shorter than laptop */
    padding: clamp(18px, 1.6vw, 28px);
    border-radius: 14px;
  }

  .svcCard__title{ font-size: clamp(22px, 1.6vw, 30px); }
  .svcCard__desc{
    font-size: clamp(14px, 1.1vw, 16px);
    max-width: 36ch;
    margin-left: auto;
    margin-right: auto;
  }
  .card__link{ font-size: clamp(14px, 1.1vw, 15px); }
}

/* Ultra-wide (2K/4K): keep portrait + keep it from getting too tall */
@media (min-width: 2200px){
  .section#services .container{
    max-width: 1900px; /* let the grid occupy more of the screen */
  }
  .svcCard{
    aspect-ratio: 4 / 5;
    min-height: clamp(260px, 10vw, 380px);
  }
}

/* ---- Shared service-page container alignment -----------------------------
   Several sections carry both .dksSection and .dksWrap. The later
   .dksSection `padding: <block> 0` shorthand otherwise zeroes the inline
   gutter supplied by .dksWrap, making headings touch the viewport edge. */
.dksSection.dksWrap{
  padding-inline: var(--page-pad);
}

/* Keep the two related-content blocks connected without the doubled section
   padding creating a large empty band between them. */
.dksSection.dksRelatedGuides{
  padding-bottom: clamp(18px, 2.2vw, 28px);
}
.dksSection.dksRelatedGuides + .dksSection[aria-label="Service areas"]{
  padding-top: clamp(18px, 2.2vw, 28px);
}

/* The link collections are intentionally narrower than the surrounding copy.
   Center those blocks within the page container while keeping their links
   left-aligned for quick scanning. Headings and lead text retain the shared
   left edge used by the rest of the service page. */
.dksRelatedGuides .area-list,
.dksSection[aria-label="Service areas"] .area-list{
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
}

/* ---- Service-areas block (service pages) ----------------------------------
   Reuses .area-list from the footer, but here each county is a LINK, not
   plain text. The 16px footer line-height is below the WCAG 2.2 AA minimum
   target size (24x24), so give the anchors a real tap target. */
.dksSection[aria-label="Service areas"] .area-list{
  gap: 2px 10px;
}
.dksSection[aria-label="Service areas"] .area-list li{
  font-size: 15px;
}
.dksSection[aria-label="Service areas"] .area-list a{
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 2px;
}
.dksSection[aria-label="Service areas"] .area-list a:hover,
.dksSection[aria-label="Service areas"] .area-list a:focus-visible{
  color: #8a6516;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Case-study "Project details" strip ----------------------------------
   Gives each case study a link to the service it belongs to and the county
   it was built in — both were zero before. */
.csMeta[aria-label="Project details"]{
  display: block;
  margin: 34px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid rgba(11,15,23,0.12);
}
.csMeta__title{
  width: min(100%, 760px);
  margin: 0 auto 14px;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #2c3a50;
}
.csMeta__grid{
  width: min(100%, 760px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
}
.csMeta__row{ margin: 0; }
.csMeta__row dt{
  margin: 0 0 3px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #8a6516;
}
.csMeta__row dd{
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: rgba(11,15,23,0.86);
}
.csMeta__row dd a{
  color: #2c3a50;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(205,154,38,0.6);
}
.csMeta__row dd a:hover{ color: #8a6516; }
/* WCAG 2.2 AA target size: these collapsed to an 18px line box at 375px. */
.csMeta__row dd a{
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

/* ---- Service page -> case study link -------------------------------------- */
.svcCaseLink{
  max-width: var(--page-max);
  margin: -18px auto 0;
  padding-inline: var(--page-pad);
  font-size: 15px;
  font-weight: 650;
}
.svcCaseLink a{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  color: #8a6516;
  text-decoration: none;
}
.svcCaseLink a:hover,
.svcCaseLink a:focus-visible{ text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 720px){
  .csMeta__grid{ grid-template-columns: 1fr; }
}


/* =========================================================
   Anchor offset for the on-page quote form (#quote)
   -------------------------------------------------------
   The hero "Request a Quote" chip scrolls to the form card on the
   same page rather than navigating to /quote/. The site header is
   position:sticky (66px at 390px, 59px at 1280px), so without a
   scroll-margin the card's "Request a Quote" heading lands
   underneath it. 84px clears the tallest measured header and
   leaves a little breathing room.

   html{scroll-behavior:smooth} is set in 01-reset-globals.css and
   already has a prefers-reduced-motion:reduce guard in
   10-page-sections.css, so this needs no motion handling of its own.
========================================================= */
#quote {
  scroll-margin-top: 84px;
}
