/* ==========================================================================
   Responsive alignment, audited across every section.

   Rule (Jannel, 26/11):
     1. Centre only once a section has actually STACKED into one column.
     2. Each section has its own stacking breakpoint, not one site-wide number.
     3. Centre headings and a single intro line only. Blocks of body copy stay
        left aligned (client's change 12: 'Body paragraphs stay left-aligned').

   Audited from the concept's own grid rules. Three breakpoints are in play:

     stacks below 768   .band .wrap, .people, .cx-list
     stacks below 900   .matters, .ftr-head
     stacks below 1024  .hero-body, .dates .wrap, .proof-grid, .process .head,
                        .st-switch, .head.split, .wy-grid, .cx-grid, .enq-grid,
                        .tr-grid, .faq-grid, .closing .wrap

   This file loads after concept-r2-feedback.css and is the single place where
   alignment is decided, so the per-section patches do not drift apart again.
   ========================================================================== */

@media (max-width: 767px){
  /* NOT justify-items:center on .band .wrap: .cta-wrap uses container queries,
     and centring it as a grid item shrinks its container, which collapses the
     buttons into circles. Centre with text-align and an auto margin on a
     fit-content wrapper instead, so the CTA keeps its own width. */
  .band .wrap{justify-items:stretch;text-align:center}
  .band .band-lead{text-align:center;margin-inline:auto;max-width:none}
  .band .clg-cta-band{display:flex;justify-content:center}
  .band .cta-wrap{width:100%;max-width:520px;margin-inline:auto}
  .people .intro{text-align:center;justify-items:center}
  .people .intro .text-link{justify-self:center}
}
@media (min-width: 768px){
  .band .band-lead{text-align:left;margin-inline:0}
  .band .wrap{justify-items:stretch}
}

@media (max-width: 899px){
  .outcomes .m-foot{justify-items:center;text-align:center}
}

@media (max-width: 1023px){
  .clg-hero-h1,.clg-hero-sub,
  .dates .wrap,
  .why-us .wy-head,
  .enquiry .enq-side h2,
  .proof .head.split,.proof-head,
  .charges .head,
  .trusted-sec .tr-copy h2,
  .process .head h2,
  .outcomes .head,
  .faq-side h2,
  .closing .wrap,
  .blog .blog-head{text-align:center}
  .dates .chips,.closing .chips{justify-content:center}
  .process .head .lede-stack,.process .head .lede-stack p,
  .trusted-sec .tr-copy .lede,.trusted-sec .tr-copy .body,.trusted-sec .tr-copy .body p,
  .st-panel p,.acc .panel p,
  .faq-list .bde-frequently-asked-questions .bde-faq__answer p,
  .outcomes .m-foot p{text-align:left;margin-inline:0;max-width:none}
}

/* Same container-query caution for every other .cta-wrap on the page: centre
   the wrapper, never the grid that holds it. */
@media (max-width: 1023px){
  .closing .cta-wrap,.faq-side .cta-wrap,.clg-enq-m-cta .cta-wrap{width:100%;max-width:520px;margin-inline:auto}
  .closing .wrap{justify-items:stretch}
}

/* ==========================================================================
   Sections pushed to stack at 1024 (Jannel, 26/11).

   The concept switches these to two columns at min-width:1024, which leaves
   1024 itself cramped: the hero copy sits beside a narrow CTA column, and the
   section heads put a heading next to its own intro paragraph. These now stack
   at 1024 and go two-column from 1025 up.

   Their centring follows to 1024 as well, so the alignment rule still holds:
   centre only once the section has stacked.
   ========================================================================== */

@media (max-width: 1024px){
  /* The grid stacks, but the hero content carries its own caps for the narrow
     two-column layout: h1 15ch, sub 38ch, CTA 360px, note 35ch. Left in place
     they keep the content at about half the width once stacked, so they are
     lifted here and the blocks centred. */
  .clg-hero-body,.hero-body{grid-template-columns:minmax(0,1fr)}
  .clg-hero-copy,.clg-hero-right{width:100%}
  .clg-hero-h1{max-width:none;text-align:center}
  .clg-hero-sub{max-width:none;text-align:center;margin-inline:auto}
  .clg-hero-points{justify-content:center}
  .clg-gbadge{justify-self:center}
  .clg-hero-cta{max-width:none;width:fit-content;margin-inline:auto;justify-items:center}
  .clg-hero-note,.clg-hero-priv{max-width:none;text-align:center;margin-inline:auto}
  .clg-hero-avail{justify-self:center;margin-left:0}
  .tr-grid{grid-template-columns:minmax(0,1fr)}
  .trusted-sec .tr-copy h2{text-align:center}
  .charges .head.split{grid-template-columns:minmax(0,1fr)}
  .charges .head.split .lede{margin-top:14px}
  .charges .head{text-align:center}
  .process .head{grid-template-columns:minmax(0,1fr)}
  .process .head h2{text-align:center}
  .process .head .lede-stack{margin-top:14px;text-align:left;max-width:none}
  .closing .wrap{grid-template-columns:minmax(0,1fr);justify-items:stretch}
  .closing h2{text-align:center;max-width:none}
  .closing .cta-wrap{width:100%;max-width:520px;margin-inline:auto}
  .closing .chips{justify-content:center}
  .closing .or,.closing .cl-fine{text-align:center}
}

/* ==========================================================================
   1024 pass, second round.

   Measure caps are the recurring cause here: the concept caps copy in ch or px
   for the narrow column each block occupies from 1025 up, and those caps stay
   on once the block stacks, leaving text at roughly half width. Every cap in a
   stacked block is lifted below.
   ========================================================================== */

@media (max-width: 1024px){
  .proof-grid{grid-template-columns:minmax(0,1fr);gap:36px}
  .proof .score{justify-items:center;text-align:center}
  .proof .score .g-brand,.proof .score .stars,.proof .score .src{justify-content:center;margin-inline:auto}
  .proof-head,.proof .head.split{max-width:none;text-align:center}
  .proof-head .lede,.proof .head .lede{max-width:none;margin-inline:auto}
  .charges .head .lede,.charges .head.split .lede{max-width:none;margin-inline:auto}
  .trusted-sec .tr-copy,.trusted-sec .tr-copy .lede,.trusted-sec .tr-copy .body,.trusted-sec .tr-copy .body p{max-width:none;margin-inline:0;text-align:left}
  .process .head .lede-stack,.process .head .lede-stack p,.process .head .lede{max-width:none;margin-inline:0;text-align:left}
  .closing .wrap{grid-template-columns:minmax(0,1fr);justify-items:stretch;gap:36px;text-align:center}
  .closing h2{max-width:none;text-align:center;margin-inline:auto}
  .closing .cta-wrap{width:100%;max-width:520px;margin-inline:auto}
  .closing .cl-fine,.closing .or{max-width:none;text-align:center;margin-inline:auto}
  .closing .chips{grid-template-columns:repeat(2,minmax(0,1fr));justify-content:center;max-width:560px;margin-inline:auto}
}

/* The hero Google badge is an inline-flex <a> inside .clg-hero-copy, which is a
   block, so justify-self does nothing to it. Centred with an auto margin on a
   fit-content box instead. */
@media (max-width: 1024px){
  .clg-hero-copy{display:block}
  .clg-gbadge{display:inline-flex;width:fit-content;margin-inline:auto}
  .clg-hero-copy > .clg-gbadge{display:flex}
  .clg-hero-points{margin-inline:auto;width:fit-content}
}

/* The reviews head is a .head.split grid (7fr/5fr), so the heading sat beside
   its intro line. Stacked at 1024: heading on top, intro beneath. */
@media (max-width: 1024px){
  .proof .head.split{grid-template-columns:minmax(0,1fr);gap:14px}
  .proof .head.split .hl,.proof .head.split .lede{max-width:none;text-align:center;margin-inline:auto}
}

/* Sticky columns off at 1024.

   The concept makes three blocks sticky from min-width:1024 so one column stays
   in view while a longer one scrolls: the reviews score, the FAQ side and the
   enquiry card. At exactly 1024 those sections now stack, and a sticky element
   in a single column follows the scroll with nothing beside it. */
@media (max-width: 1024px){
  .proof .score,.faq-side,.tr-card{position:static;top:auto;align-self:auto}
}

/* Available now badge: no left offset at 1024. The concept's .avail is an
   inline-flex pill that inherits its position from whatever grid cell it sits
   in, so once a section stacks it can end up indented. Centred with an auto
   margin on a fit-content box, which works in a grid cell or a plain block. */
@media (max-width: 1024px){
  .clg-hero-avail,.avail{margin-left:auto;margin-right:auto;justify-self:center;width:fit-content}
  .clg-hero-right{justify-items:center}
}

/* The hero badge is nested one level deeper than I had allowed for:
     .clg-hero-cta > .clg-hero-cta-avail > .clg-hero-avail
   Centring only the badge left it at the left edge of a full-width wrapper, so
   the wrapper is centred too. Also tightens the gap between the Google badge
   in the copy column and the Available now badge once the hero has stacked. */
@media (max-width: 1024px){
  .clg-hero-cta-avail{display:flex;justify-content:center;width:100%;margin-inline:0}
  .clg-hero-avail{margin-inline:auto}
  .clg-hero-body{gap:18px}
  .clg-hero-right{gap:12px;padding-bottom:0}
}

/* ==========================================================================
   .cta-wrap and the 420px container query.

   .cta-wrap declares `container: cta / inline-size` and is sized
   `flex: 1 1 420px; max-width: 520px`. Its query switches layout at 420px:

     @container cta (min-width:420px)  two columns, .btn min-width 204px
     @container cta (max-width:419px)  single column, .cta max-width 340px

   So ANY rule that shrinks .cta-wrap below 420px, including width:fit-content
   to centre it, flips the query and collapses the buttons into circles. Centre
   it with width:100% and max-width, never with fit-content or justify-items.
   ========================================================================== */

.cta-wrap{min-width:min(420px,100%)}
@media (max-width: 1024px){
  .closing .cta-wrap,.band .cta-wrap,.faq-side .cta-wrap,.clg-enq-m-cta .cta-wrap,.clg-hero-cta{width:100%;max-width:520px;margin-inline:auto}
}

/* Process step panel CTA at 1024.

   The panel CTAs use the small variant, which the concept caps at
   .cta{max-width:360px} so the pair sits neatly in a narrow panel. Once the
   section stacks the panel is much wider, so the cap is lifted and the buttons
   fill it. .cta-wrap itself is untouched: shrinking or stretching it is what
   flips the 420px container query. */
@media (max-width: 1024px){
  .st-panel .cta-wrap{width:100%;max-width:none}
  .st-panel .cta{max-width:none;width:100%}
  .st-panel .cta .btn{width:100%;min-width:0}
}

/* Closing: centre the Available now badge. Its .cta grid puts .avail in the
   'avail' area with justify-self:start from the 420px container query, so it
   sits at the left of the button pair; centred across the row here. */
@media (max-width: 1024px){
  .closing .cta .avail{justify-self:center;margin-left:0}
  .closing .cta-note{justify-self:center;text-align:center}
}

/* Tighter gap between the Call and Free consultation buttons once stacked.
   The concept's .cta uses gap:12px for the single-column layout, which reads as
   a lot of space when the buttons are full width. Row gap only: the column gap
   belongs to the two-column container-query variant. */
@media (max-width: 1024px){
  .cta{row-gap:8px}
  .closing .cta,.band .cta,.faq-side .cta,.clg-enq-m-cta .cta,.st-panel .cta{row-gap:8px}
}

/* Hero CTA gap, single source of truth. .clg-hero-cta is a two-column grid at
   1024 (1fr 1fr), so the gap between Call and Free consultation is a column
   gap, not a row gap. Both set here with the section class for specificity. */
@media (max-width: 1024px){
  /* The space between the buttons was never the gap: the grid is 1fr 1fr, so
     each column is about 256px while the buttons are 204px and sit left in
     their column. auto columns make each track hug its button, so the only
     space between them is the gap itself. */
  .clg-hero .clg-hero-cta{grid-template-columns:auto auto;justify-content:center;gap:10px;width:auto;max-width:none}
  .clg-hero .clg-hero-cta > .clg-hero-cta-avail{grid-column:1 / -1;justify-self:center}
  .clg-hero .clg-hero-cta-avail{margin-left:0;margin-bottom:0}
}

/* More breathing room above and below the hero button row once stacked. */
@media (max-width: 1024px){
  .clg-hero .clg-hero-right{gap:20px}
  .clg-hero .clg-hero-cta{margin-block:10px}
  .clg-hero .clg-hero-note{margin-top:4px}
}

/* ==========================================================================
   767 pass.

   Most of these are one cause: .cta-wrap is still wider than 420px at 767, so
   its container query keeps the two-column variant, which sets
   grid-template-areas with the badge in a left cell and
   .avail{margin-left:var(--cta-in)}. The variant is overridden here rather than
   shrinking .cta-wrap, which would collapse the buttons (see the 420px note).
   ========================================================================== */

@media (max-width: 767px){
  .cta{grid-template-columns:minmax(0,1fr);grid-template-areas:"avail" "call" "book" "note";max-width:none;width:100%;row-gap:10px}
  .cta .avail{justify-self:center;margin-left:0}
  .cta .btn{width:100%;min-width:0}
  .cta-note{justify-self:center;text-align:center;width:100%;max-width:none}
  .cta-wrap{width:100%;max-width:none;margin-inline:auto}
  .dates .chips,.closing .chips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;max-width:none}
  .dates .chip,.closing .chip{width:100%;justify-content:space-between}
  .proof .score{justify-items:center;text-align:center}
  .proof .score .cta,.proof .score .cta-wrap{width:100%}
  .outcomes .m-foot{justify-items:center;text-align:center;gap:14px}
  .outcomes .m-foot .m-cta,.outcomes .m-foot .btn{width:100%;justify-content:center}
  /* a text link with an underline should hug its text, not stretch the column */
  .outcomes .m-foot .text-link{width:auto;justify-content:flex-start;margin-inline:0;justify-self:start}
  .faq-side .cta-wrap,.faq-side .cta{max-width:none;width:100%}
  .faq-side .cta .avail{justify-self:center}
  .closing .cta{row-gap:14px}
  .closing .cta .avail{margin-bottom:4px}
  .blog .blog-head{text-align:left}
  .blog .blog-head h2{text-align:left;margin-inline:0}
}

/* The concept's badge rules live in a container query:
     @container cta (min-width:420px){ .cta .avail{justify-self:start;
                                        margin-left:var(--cta-in)} }
   A container query adds no specificity, so .cta .avail there and .cta .avail
   here are equal and source order decides. Rather than depend on that, these
   use .cta-wrap .cta .avail, which outranks it outright. */
@media (max-width: 767px){
  .cta-wrap .cta .avail{justify-self:center;margin-left:0;margin-right:0;grid-column:1 / -1}
  .cta-wrap .cta .cta-note{justify-self:center;text-align:center;grid-column:1 / -1;margin-left:0}
  .proof .score .cta-foot,.proof .score > .text-link{grid-column:1 / -1;justify-self:center}
  .proof .score{display:grid;grid-template-columns:minmax(0,1fr);justify-items:center;gap:16px}
  .proof .score .cta-wrap{width:100%}
  .proof .score .text-link{justify-content:center;width:100%}
}
@media (max-width: 1024px){
  .cta-wrap .cta .avail{justify-self:center;margin-left:0;margin-right:0}
}

/* FAQ side CTA: the same treatment up to 1024, not just 767. Once the FAQ grid
   stacks, the side column is full width, so the badge centres, the buttons fill
   the column and the note centres under them. */
@media (max-width: 1024px){
  .faq-side .cta-wrap{width:100%;max-width:none;margin-inline:auto}
  .faq-side .cta{grid-template-columns:minmax(0,1fr);grid-template-areas:"avail" "call" "book" "note";max-width:none;width:100%;row-gap:10px}
  .faq-side .cta-wrap .cta .avail{justify-self:center;margin-left:0;grid-column:1 / -1}
  .faq-side .cta .btn{width:100%;min-width:0}
  .faq-side .cta-wrap .cta .cta-note{justify-self:center;text-align:center;grid-column:1 / -1;margin-left:0;max-width:none}
}

/* Hero proof points stay left aligned on small screens: they are a list, and
   centred list items with bullets read as ragged on both edges. The list as a
   block is still centred in the column. */
@media (max-width: 1024px){
  .clg-hero-points{text-align:left}
  .clg-hero-points li{justify-content:flex-start;text-align:left}
}

/* Read More Case Studies stays left on small screens: it is a text link, not a
   button, and the disclaimer paragraph above it is left aligned too. */
@media (max-width: 1024px){
  .outcomes .m-foot{justify-items:start;text-align:left}
  .outcomes .m-foot p{text-align:left;margin-inline:0}
  .outcomes .m-foot .text-link{width:auto;justify-self:start;justify-content:flex-start;margin-inline:0}
  .outcomes .m-foot .m-cta,.outcomes .m-foot .btn{width:100%;justify-content:center}
}

/* ==========================================================================
   Site container width: 1420px.

   The concept sets .wrap to 1280px. The header had to grow to 1420 to fit the
   bigger logo that change 1 asks for, so every container follows, and the
   header, sections, hero and footer line up again at one measure.

   Set here rather than in the Breakdance selector sheet because concept-site.css
   loads after it and would win.
   ========================================================================== */

.wrap,.clg-ftr-wrap,.clg-hero-wrap{width:100%;max-width:calc(1420px + 2 * var(--gut));margin-inline:auto;padding-inline:var(--gut);box-sizing:border-box}
