/* ==========================================================================================================
   wp.css — WordPress-only adjustments for the "Contour" components (agent A2, .build/lib/components.js).

   dds.css stays the untouched source of truth (it is a copy of .build/design/final/dds.css). This file only
   bridges differences between the static mock markup and what GenerateBlocks actually renders, plus the
   footer pieces that exist only in WordPress (Business Info lines, social icons).

   Loads right after dds.css (handle dds-wp, wp_enqueue_scripts prio 15, inc/components.php) and BEFORE the
   GB Pro global styles (20) and per-block GB CSS (25), so a block's one-off GB style still wins. It is also
   added to the block editor styles. Same tone variables as dds.css; never hard-code colours here.
   ========================================================================================================== */

/* ---------- Trust strip: GB wraps the icon in span.gb-shape, so the grid child is the span, not the svg ---------- */
.dds-trust__item > .gb-shape{ grid-row:span 2; }
@media (max-width:767px){ .dds-trust__item > .gb-shape{ grid-row:auto; } }

/* ---------- Footer (GP site-footer Block Element, .build/content/site/footer.js) ---------- */
/* The logo is a GB Media block with a link wrapper: give the link a box so its focus ring hugs the logo. */
.dds-footer__brand > a:has(> img){ display:block; width:fit-content; margin-bottom:22px; }
.dds-footer__brand > a > img{ margin-bottom:0; }
/* Social icons: each link is removed until its Business Info URL is set; the row takes no space while empty. */
.dds-footer__social{ display:flex; flex-wrap:wrap; gap:8px; }
.dds-footer__social:has(a){ margin-top:10px; }
.dds-footer__social a{ display:grid; place-items:center; width:44px; height:44px; border:1px solid var(--line); border-radius:var(--radius); color:var(--base-3); text-decoration:none; transition:background-color var(--t), border-color var(--t), color var(--t); }
.dds-footer__social a:hover{ background:var(--base-3); border-color:var(--base-3); color:var(--contrast); text-decoration:none; }
.dds-footer__social svg{ width:20px; height:20px; stroke-width:1.75; }
/* Business Info lines under "Get in touch" (phone, service area, hours): hidden until set. */
.dds-footer__lines:has(> *){ display:grid; gap:2px; margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
.dds-footer__lines > *{ display:flex; align-items:flex-start; gap:8px; padding:5px 0; color:var(--sage); font-size:.9375rem; line-height:1.5; text-decoration:none; overflow-wrap:anywhere; }
.dds-footer__lines > a{ color:var(--base-3); }
.dds-footer__lines svg{ flex:none; width:18px; height:18px; margin-top:2px; color:var(--accent); stroke-width:1.75; }
/* Bottom block (R1, SH-02): © + Privacy policy on one line, the mapping scope note (industry §4.1) on its own line
   below, left-aligned at every width, in the footer's muted Sage. */
.dds-footer__bottom .dds-footer__scope{ flex-basis:100%; order:3; text-align:left; font-size:.8125rem; line-height:1.5; color:var(--muted); }

/* ---------- Business Info gates: a list whose items are all hidden (fields not set yet) takes no space ---------- */
.dds-checks:not(:has(li)), .dds-tags:not(:has(*)){ display:none; }

/* ---------- Resources cards from a GB Query (c.postCardsQuery): the contour fallback sits under the featured image.
   When the post has no featured image, GB removes the <img> (required tag) and the fallback is the only child. ---------- */
.dds-vf > .dds-post-card__fallback:not(:only-child){ position:absolute; inset:0; }
.dds-vf > .dds-post-card__fallback ~ img{ position:relative; }

/* ==========================================================================================================
   Fix pass (2026-10-01) — WordPress-side adjustments found in the foundation review. Tone variables only.
   ========================================================================================================== */

/* ---------- Footer bottom row vs GP's back-to-top (fixed 44 px square, 30 px from the bottom right) ----------
   Below 1440 the square sat on the right-aligned scope note; keep the row clear of it. */
@media (max-width:1439px){ .dds-footer__bottom{ padding-right:64px; } }
/* ≤ 767 px the back-to-top control is hidden (style.css, R1 SH-19), so the row needs no clearance there. */
@media (max-width:767px){ .dds-footer__bottom{ padding-right:0; } }

/* ---------- Footer texture: fade the 900×620 contour box out instead of ending in a straight edge once the footer
   is taller than the box (tablet and mobile). ---------- */
.dds-footer::before{ -webkit-mask-image:linear-gradient(#000 50%, transparent); mask-image:linear-gradient(#000 50%, transparent); }

/* Footer tagline (industry §4.1): with the brand, directly under the blurb (R1, SH-02). */
.dds-footer__brand p.dds-footer__tagline{ margin:-6px 0 14px; font:500 1.0625rem/1.4 var(--f-head); color:var(--base-3); }

/* ---------- Sticky left columns clear the admin bar (32 px) + sticky header (93 px) for logged-in editors ---------- */
@media (min-width:1025px){ .admin-bar .dds-sticky{ top:152px; } }

/* ---------- Text-only page heroes: 14ch split sentences ("Planned on the / ground. Clear / from above.") and left
   most of the 8-column cell empty. The plate variant keeps DESIGN's 14ch. ---------- */
.dds-page-hero__grid--text h1{ max-width:20ch; }

/* ---------- Steps on mobile: the dashed flight path ends at the last waypoint instead of running past the last text.
   One segment per step, from its dot to the next one (row gap 32 px). ---------- */
@media (max-width:767px){
  .dds-steps::before{ display:none; }
  .dds-step:not(:last-child)::before{ content:""; position:absolute; left:10px; top:12px; bottom:-44px; border-left:2px dashed rgba(169,189,176,.55); }
}

/* ---------- 404 (GP Block Element site-404, .build/content/site/404.js): the quick links under the lead ---------- */
.dds-links{ display:flex; flex-wrap:wrap; gap:14px 28px; margin:24px 0 0; padding:0; list-style:none; }

/* ==========================================================================================================
   Review round 1 (2026-10-01, shared fix agent). Tone variables only.
   ========================================================================================================== */

/* ---------- FAQ toggles: no one-word widows in the questions (SH-18) ---------- */
.dds-faq .gb-accordion__toggle{ text-wrap:balance; }

/* ---------- Stacked text heroes (≤ 900 px, the D13 stacking point): the grid row gap already separates the lead from
   the right column, so the buttons there don't add their own top margin (lead → buttons was ≈ 67 px at 390). ---------- */
@media (max-width:900px){
  .dds-page-hero__grid--text{ row-gap:28px; }
  .dds-page-hero__grid--text > :last-child > .dds-btns:first-child{ margin-top:0; }
}
