/* ============================================================================
   MAIN: layout, surfaces and components for Clear Case Management.
   Type lives in type.css and nowhere else: this file sets no font-size,
   font-weight, font-family, letter-spacing or text-transform, and every text
   colour is a var(), so the deep-blue bands swap tokens instead of adding
   treatments.

   The look, from the client's questionnaire:
   - "Look professional": calm, credential-led, no carousels, no video, no motion.
   - bushco.co.uk, liked for "the pages being at the top" and "the option to
     enquire and email from the home page", disliked as "busy": so every page
     sits in the header on desktop, a top row carries the phone, the email and
     the referral button, and the home page ends in a referral band with the
     email address and the phone number beside a short form.
   - apple.com/uk, liked for its simplicity, but "the plain white background
     slightly boring": one message per band, and the bands alternate the
     client's ivory, a soft-blue tint and a sand tint, closing on deep blue.
   Palette (the brand board's five swatches): Deep Blue #062D3F, Warm Blue
   #5D8497, Soft Blue #B2C6D1, Warm Neutral #D6BE9E, Ivory #F6F3EE.
   ========================================================================== */

:root {
  --deep  : #062D3F;     /* Deep Blue: ink, the top row, closing bands, footer   */
  --warm  : #5D8497;     /* Warm Blue: lines, icons, focus (3.6:1, never text)   */
  --soft  : #B2C6D1;     /* Soft Blue                                            */
  --sand  : #D6BE9E;     /* Warm Neutral: short rules and quote marks            */
  --page  : #F6F3EE;     /* Ivory: the page                                      */
  --tint  : #E8EEF1;     /* a soft-blue band (ink 12.3:1, soft ink 8.0:1)        */
  --sandy : #EFE8DC;     /* a sand band (ink 11.9:1, soft ink 7.7:1)             */
  --card  : #FBFAF7;     /* a card on a tinted band                              */
  --rule  : rgba(6, 45, 63, 0.16);
  --edge  : #5D7886;     /* form borders: 4.3:1 on ivory (UI needs 3:1)          */

  --btn-bg : var(--deep);
  --btn-ink: #F6F3EE;
  --btn-hover: #2E4A5A;   /* a tone lighter than the deep blue: ivory on it 8.5:1 */

  --gutter: clamp(1.25rem, 4.5vw, 4rem);
  --wrap  : 76rem;
  --band  : clamp(4rem, 8vw, 7rem);
  --bar   : 4.75rem;     /* the logo row                                         */
  --top   : 2.75rem;     /* the top row (desktop and tablet)                     */
  --ease  : cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* A deep-blue band swaps the ink tokens. On #062D3F: ivory 13.0:1, #C9D7DF 9.8:1. */
.on-dark {
  --ink     : #F6F3EE;
  --ink-soft: #C9D7DF;
  --link    : #F6F3EE;
  --rule    : rgba(246, 243, 238, 0.22);
  --edge    : #C9D7DF;
  --btn-bg  : #F6F3EE;
  --btn-ink : #062D3F;
  --btn-hover: #C9D7DF;
  --card    : rgba(246, 243, 238, 0.06);
  background: var(--deep);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--page); scroll-padding-top: calc(var(--bar) + 1rem); }
@media (max-width: 47.9375em) { html { scroll-padding-bottom: 5.75rem; } }
/* lock the root only: hiding body's overflow made body the scroll box, and the
   sticky header (with the menu in it) jumped to the top of the document (LESSONS #41) */
html.menu-locked { overflow: hidden; }
body { margin: 0; background: var(--page); color: var(--ink); }
img { display: block; max-width: 100%; height: auto; }
ul, ol { padding: 0; list-style: none; }
figure { margin: 0; }

:focus-visible { outline: 3px solid var(--warm); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: var(--soft); }
::selection { background: var(--soft); color: var(--deep); }
input, textarea, select { caret-color: var(--deep); }
html { scrollbar-color: var(--warm) var(--page); }

.skip-link {
  position: absolute; left: 1rem; top: -5rem; z-index: 100;
  padding: 0.75rem 1rem; background: var(--deep); color: var(--btn-ink);
}
.skip-link:focus { top: 1rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Layout ------------------------------------------------------------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.band { padding-top: var(--band); padding-bottom: var(--band); }
.band--tint  { background: var(--tint); }
.band--sand  { background: var(--sandy); }
/* two plain ivory bands in a row share their space; a band of another colour keeps its own */
.band:not(.band--tint):not(.band--sand):not(.on-dark) + .band:not(.band--tint):not(.band--sand):not(.on-dark) { padding-top: 0; }
/* home: George's opening paragraphs continue the opening, on the same ivory */
.hero + .band--intro { padding-top: 0; }
/* round 3: the opening line beside a photo. Words come first in the source, so a phone shows them before the
   picture (never two photos in a row); wider screens put the photo on the left, opposite the hero's. */
.intro__photo { margin: 0; }
.intro__photo img { display: block; width: 100%; height: auto; border-radius: 4px; }
@media (min-width: 60em) { .split--photo-first { align-items: center; } .split--photo-first > .intro__photo { order: -1; } }
.intro__more { margin-top: 2.5rem; row-gap: 1.25rem; }
@media (min-width: 60em) { .intro__more { margin-top: 3.5rem; } }
.stack > * + * { margin-top: 1.25rem; }
.stack > h2 + * { margin-top: 1.25rem; }
.stack > * + h2, .stack > * + h3 { margin-top: 2.75rem; }
.section-head { max-width: var(--col); }
.section-head > * + * { margin-top: 1rem; }
.section-head + * { margin-top: 2.5rem; }
/* a short sand rule above a section heading: the one ornament on the site */
.ruled::before { content: ""; display: block; width: 3rem; height: 3px; margin-bottom: 1.5rem; background: var(--sand); }
.on-dark .ruled::before { background: var(--sand); }

/* ---- Links and buttons -------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.7rem;
  min-height: 52px; padding: 0.7rem 1.5rem; border-radius: 3px;
  background: var(--btn-bg); color: var(--btn-ink); border: 2px solid var(--btn-bg);
  text-decoration: none; text-align: center; overflow-wrap: normal; cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: var(--btn-ink); }
.btn--quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--quiet:hover { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn[aria-disabled="true"] { cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; margin-top: 2rem; }
a[href^="tel:"]:not(.btn) { white-space: nowrap; }   /* a number never splits */

/* a link that ends a card or a section: ink, underlined, a small arrow drawn in CSS */
.go { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; color: var(--ink);
      text-decoration: underline; text-decoration-thickness: max(1px, 0.06em); text-underline-offset: 0.2em; }
.go::after { content: ""; width: 0.5rem; height: 0.5rem; flex: none; border-top: 2px solid var(--warm); border-right: 2px solid var(--warm); transform: rotate(45deg); transition: transform 0.3s var(--ease); }
.go:hover { text-decoration-thickness: max(2px, 0.12em); }
@media (hover: hover) { .go:hover::after { transform: translateX(3px) rotate(45deg); } }

/* ---- Header -------------------------------------------------------------
   Two rows on tablet and desktop: a thin deep-blue top row (the role line, the
   phone, the email and the referral button) that scrolls away, and the logo
   row with every page in it, which stays at the top. Phones: the logo row and
   the menu button; the call and the referral sit in the bar at the foot.
   Breakpoints in em, so larger browser text gets the compact layout sooner
   (LESSONS #42). */
.site-header { position: sticky; top: calc(-1 * var(--top)); z-index: 50; background: var(--page); }
.topbar .wrap { display: flex; align-items: center; justify-content: flex-end; gap: 1.5rem; min-height: var(--top); }
.topbar__links { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.25rem 1.25rem; }
.tb-long { display: none; }
@media (min-width: 48em) { .tb-long { display: inline; } .tb-short { display: none; } .topbar__links { gap: 0.25rem 1.75rem; } }
.topbar a:not(.btn) { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; color: var(--ink); text-decoration: none; }
.topbar a:not(.btn):hover { text-decoration: underline; text-underline-offset: 0.2em; }
.topbar a svg { width: 1em; height: 1em; flex: none; color: var(--soft); }
.topbar .btn { min-height: 36px; padding: 0.3rem 1rem; border-width: 1px; }
.bar { border-bottom: 1px solid var(--rule); background: var(--page); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: var(--bar); }
.site-logo { display: block; flex: none; }
.site-logo img { width: auto; height: 46px; }
.site-nav { display: none; }
.site-nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.35rem; height: 2px;
  background: var(--warm); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease);
}
.site-nav a:hover::after, .site-nav a[aria-current]::after { transform: scaleX(1); }

/* the menu button says "Menu" in words, as on bushco.co.uk: three lines alone are a puzzle to
   many older visitors */
.hamburger {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 48px; padding: 0 0.25rem 0 0.5rem;
  background: none; border: 0; cursor: pointer; color: var(--ink);
}
.hamburger__label { color: var(--ink); }
.hamburger__lines { display: inline-flex; flex-direction: column; justify-content: center; gap: 6px; width: 26px; }
.hamburger__lines span { display: block; height: 2px; background: var(--ink); transition: transform 0.3s var(--ease), opacity 0.3s; }
.hamburger[aria-expanded="true"] .hamburger__lines span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger[aria-expanded="true"] .hamburger__lines span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] .hamburger__lines span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* The phone menu hangs below the bar, out of the page flow, so opening it never
   moves the page the visitor was reading (LESSONS #41). */
.mobile-menu { display: none; }
.mobile-menu.is-open {
  display: block; position: absolute; inset: 100% 0 auto 0;
  max-height: calc(100svh - var(--bar)); overflow-y: auto; overscroll-behavior: contain;
  padding: 0.5rem var(--gutter) 2rem; background: var(--page); border-bottom: 1px solid var(--rule);
  box-shadow: 0 18px 30px -24px rgba(6, 45, 63, 0.5);
}
.mobile-menu a:not(.btn) { display: flex; align-items: center; min-height: 52px; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.mobile-menu .actions { margin-top: 1.5rem; }

@media (min-width: 48em) {
  .site-logo img { height: 60px; }
  :root { --bar: 5.25rem; }
}

@media (min-width: 74em) {
  .site-nav { display: flex; gap: 0 1.6rem; }
  .hamburger, .mobile-menu, .mobile-menu.is-open { display: none; }
}

/* ---- Breadcrumbs -------------------------------------------------------- */
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.25rem 0.6rem; margin: 0 0 1.25rem; }
.breadcrumbs li + li::before {
  content: ""; display: inline-block; width: 0.4rem; height: 0.4rem; margin-right: 0.6rem;
  border-top: 1.5px solid var(--ink-soft); border-right: 1.5px solid var(--ink-soft);
  transform: translateY(-0.1rem) rotate(45deg);
}
.breadcrumbs a { color: var(--ink-soft); }

/* ---- Opening: words on the left, the photograph on the right ------------
   The photograph is cut to 4:3 by tools/build_images.py and shown at its own
   shape (height: auto), so nothing is cropped by CSS and nothing re-fits as it
   loads on a phone (LESSONS #39). */
.hero { padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.hero__grid { display: grid; gap: 2.5rem; align-items: center; }
.hero__copy > * + * { margin-top: 1.25rem; }
.hero__copy h1 { max-width: 18em; }
.hero__copy .lead { max-width: 34rem; }
.hero__copy .section-label + h1 { margin-top: 0.75rem; }
.hero__photo img { width: 100%; height: auto; border-radius: 4px; }
.hero--plain .hero__grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 60em) {
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 4rem; }
}

/* ---- Prose ------------------------------------------------------------- */
.prose > * + * { margin-top: 1.25rem; }
.prose > * + h2 { margin-top: 3rem; }
.prose > * + h3 { margin-top: 2.25rem; }
.prose > h2 + *, .prose > h3 + * { margin-top: 1rem; }
.split { display: grid; gap: 2.5rem; }
@media (min-width: 60em) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5rem; align-items: start; } }

/* the IRCM definition, quoted and cited */
.hero__aside { align-self: center; }
.pull { margin: 0; padding: 2.25rem 2rem; background: var(--tint); border-radius: 4px; }
.pull blockquote { margin: 0; }
.pull figcaption { margin-top: 1.25rem; }
.pull figcaption::before { content: ""; display: block; width: 3rem; height: 3px; margin-bottom: 1rem; background: var(--sand); }
.note { max-width: var(--measure); margin-top: 2rem; }

/* "or call 07951 741887" beside the one button in the opening */
.or-call { margin: 0; }
.or-call a { color: var(--ink); text-decoration: underline; text-decoration-thickness: max(1px, 0.06em); text-underline-offset: 0.2em; }

/* ---- Cards: the three services -------------------------------------------- */
.rows { border-top: 1px solid var(--rule); }
.rows li { display: grid; gap: 0.5rem; padding-top: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--rule); }
@media (min-width: 56em) { .rows li { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 3rem; align-items: baseline; } }
.rows__title { justify-self: start; color: var(--ink); text-decoration: underline; text-decoration-thickness: max(1px, 0.04em); text-underline-offset: 0.18em; text-decoration-color: var(--warm); }
.rows__title:hover { text-decoration-thickness: max(2px, 0.08em); }
.rows p { max-width: var(--measure); }
/* home: each service led by a small photo, wide and short on a phone, 4:3 beside the title on wider screens */
.rows__photo img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 4px; }
.rows__photo { margin-bottom: 0.75rem; }
@media (min-width: 56em) {
  .rows--photo li { grid-template-columns: 13rem minmax(0, 18rem) minmax(0, 1fr); align-items: center; }
  .rows__photo { margin-bottom: 0; }
  .rows__photo img { aspect-ratio: 4 / 3; }
}

/* "Why Clear Case Management?": four short points, two to a row on wider screens */
.points { display: grid; gap: 2rem 4rem; margin-bottom: 0; }
@media (min-width: 48em) { .points { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.points > div { padding-top: 1.25rem; border-top: 2px solid var(--warm); }
.points dt, .points dd { margin: 0; }
.points dd { margin-top: 0.5rem; max-width: var(--measure); }

/* lists inside prose ("Our involvement may include:") */
.bullets { padding-left: 1.25em; list-style: disc; }
.bullets li { padding-left: 0.25em; }
.bullets li + li { margin-top: 0.5rem; }
.bullets li::marker { color: var(--warm); }

/* About: the heading above George's registrations */
.credentials-title + .credentials { margin-top: 1rem; }
.section-head + .credentials-title { margin-top: 2.5rem; }

/* a picture and a title, as on apple.com: the words centred above one wide photograph */
.feature__head { display: grid; justify-items: center; gap: 1rem; text-align: center; margin-inline: auto; max-width: var(--col); }
.feature__head .lead { max-width: 34rem; }
.feature__photo { margin-top: 2.5rem; }
.feature__photo img { width: 100%; height: auto; border-radius: 4px; }

/* the founder's referral journey: six short steps in a line on desktop */
.journey { display: grid; gap: 1rem 1.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 64em) { .journey { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.journey li { display: grid; gap: 0.75rem; align-content: start; padding-top: 1rem; border-top: 2px solid var(--warm); }
.journey .num { color: var(--ink-soft); }

/* ---- Steps: how a referral runs -------------------------------------------- */
.steps { display: grid; gap: 0 4rem; counter-reset: none; }
/* six steps (George's process, 23 Nov 2026): two columns of three on desktop */
@media (min-width: 60em) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, auto); grid-auto-flow: column; }
  .steps li:nth-child(3) { border-bottom: 1px solid var(--rule); } }
.steps li { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: 1.25rem; padding-top: 1.25rem; padding-bottom: 1.25rem; border-top: 1px solid var(--rule); }
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps .num { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 2px solid var(--warm); }
.steps .step { align-self: center; max-width: var(--measure); }
/* home: the first four steps in one row on wider screens, the number above its label */
@media (min-width: 48em) {
  .steps--row { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: none; grid-auto-flow: row; gap: 0 2rem; }
  .steps--row li, .steps--row li:nth-child(3), .steps--row li:last-child { grid-template-columns: none; gap: 1rem; align-content: start; border-bottom: 0; }
  .steps--row .step { align-self: start; }
}
.steps--row + .go { margin-top: 1.5rem; }
/* links standing alone under a heading (services: assessments and supervision) */
.go-list li + li { margin-top: 0.25rem; }

/* ---- Credentials (About) ----------------------------------------------------
   Registrations and memberships belong to George as an individual (IRCM and
   HCPC rules), so they sit beside his name, never as a company badge strip. */
.credentials { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.credentials > div { display: grid; gap: 0.35rem; padding-top: 1.1rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--rule); }
@media (min-width: 48em) { .credentials > div { grid-template-columns: 13rem minmax(0, 1fr); gap: 1.5rem; } }
.credentials dt, .credentials dd { margin: 0; }
.credentials dd { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.credentials dd > span:not(.badge) { flex: 1 1 18rem; }

/* George's professional marks: each body's own artwork on a white tile, with
   clear space around it (IRCM's rule), on white (HCPC's rule: blue on white),
   and only ever beside his name. Sized by height so no mark is out of
   proportion with the others; HCPC never below its 20mm minimum width. */
.badges { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.badge {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  height: 8.25rem; padding: 0.75rem 1.25rem; background: #FFFFFF; border: 1px solid var(--rule); border-radius: 4px;
}
.badge img { width: auto; height: 100%; max-width: 13rem; object-fit: contain; }
.badge--ircm img { height: 6.75rem; }   /* "REGISTRANT" is 9.7% of the mark: ~10.5px, readable */
.badge--babicm img { height: 2.75rem; }
.badge--cmsuk img { height: 4.25rem; }
.badge--hcpc { height: auto; }
.badge--hcpc img { width: max(84px, 22mm); height: auto; max-width: none; }
@media (max-width: 47.9375em) {   /* two marks to a row on a phone, not a 430px stack */
  .badge { padding: 0.75rem; }
  .badge--babicm img { height: 2.25rem; }
  .badge--cmsuk img { height: 3.5rem; }
}

/* ---- Counties ---------------------------------------------------------------- */
.counties { display: grid; gap: 1rem; }
@media (min-width: 40em) { .counties { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .counties--four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.counties a {
  display: grid; gap: 0.35rem; padding: 1.4rem 1.5rem; min-height: 44px; border-radius: 4px;
  background: var(--card); border: 1px solid var(--rule); color: var(--ink); text-decoration: none;
  transition: border-color 0.3s var(--ease);
}
.counties a:hover { border-color: var(--warm); }
.counties a span:first-child { text-decoration: underline; text-decoration-thickness: max(1px, 0.06em); text-underline-offset: 0.2em; }

/* ---- FAQ: questions between hairlines, a plus that turns --------------- */
.faq { border-top: 1px solid var(--rule); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex; justify-content: space-between; gap: 1.5rem; align-items: center;
  padding-top: 1.35rem; padding-bottom: 1.35rem; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 16px; height: 16px;
  background: linear-gradient(var(--warm), var(--warm)) center / 16px 2px no-repeat,
              linear-gradient(var(--warm), var(--warm)) center / 2px 16px no-repeat;
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding-bottom: 1.5rem; max-width: var(--measure); }

/* ---- Reviews: blank frames until real reviews arrive (Joseph, 21 Oct 2026) --
   The frames are drawn from tools/reviews.json; with no reviews they are empty
   and hidden from screen readers. A real review fills its frame word for word.
   The card is .review-card; the quote itself is blockquote.review, the marker
   gate 2 reads as a verbatim review (exempt from the copy checks). Once any real
   review exists, no blank frames are drawn anywhere (15 Nov 2026). */
.reviews { display: grid; gap: 1.5rem; }
/* Several reviews stack in columns, each card straight under the one above, so a long review no longer
   leaves a gap under its shorter neighbours (Joseph, 23 Nov 2026: "move the 4th and 5th reviews up").
   The source order, which a screen reader follows, is unchanged. */
@media (min-width: 48em) {
  .reviews:not(.reviews--single) { display: block; columns: 2; column-gap: 1.5rem; }
  .reviews:not(.reviews--single) > li { break-inside: avoid; margin-bottom: 1.5rem; }
}
@media (min-width: 72em) { .reviews:not(.reviews--single) { columns: 3; } }
.reviews.reviews--single { grid-template-columns: minmax(0, 1fr); max-width: 30rem; }
.review-card { display: grid; align-content: start; gap: 1rem; padding: 2rem 1.75rem; border-radius: 4px; background: var(--card); border: 1px solid var(--rule); }
.review-card svg { width: 40px; height: 30px; color: var(--sand); }
.review--blank { border-style: dashed; min-height: 14rem; }   /* empty frames only; real cards fit their words */
.review-card blockquote { margin: 0; }

/* ---- Referral form and contact details ------------------------------------- */
.contact-lines { display: grid; gap: 1rem; margin-top: 1.5rem; }
.contact-lines a { display: inline-flex; align-items: center; gap: 0.75rem; min-height: 44px; color: var(--ink); }
.contact-lines svg { width: 1.25em; height: 1.25em; flex: none; color: var(--warm); }
.on-dark .contact-lines svg { color: var(--soft); }

.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; max-width: 44rem; }
.form > *, .form fieldset > *, .field > * { min-width: 0; max-width: 100%; }
.form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 1.25rem; }
.form legend { padding: 0 0 0.5rem; }
.form h2 { margin-top: 1rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.form > h2:first-of-type, .error-summary + h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.field { display: grid; gap: 0.4rem; }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form input[type="date"],
.form select, .form textarea {
  font: inherit; width: 100%; min-height: 52px; padding: 0.75rem 0.9rem;
  border: 1px solid var(--edge); border-radius: 3px; background: var(--page); color: var(--deep);
}
.on-dark .form input, .on-dark .form select, .on-dark .form textarea { background: var(--page); color: var(--deep); border-color: var(--page); }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--deep); }
.form textarea { min-height: 9rem; resize: vertical; }
.form select {
  -webkit-appearance: none; appearance: none; padding-right: 2.75rem;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 1.45rem) 52%, calc(100% - 1.05rem) 52%;
  background-size: 0.4rem 0.4rem; background-repeat: no-repeat;
}
.form input[type="file"] { padding: 0.5rem 0; }
.form input[type="file"]::file-selector-button {
  font: inherit; margin-right: 1rem; padding: 0.55rem 1rem; min-height: 44px;
  background: transparent; color: var(--ink); border: 1px solid var(--ink); border-radius: 3px; cursor: pointer;
}
.choice { display: flex; gap: 0.7rem; align-items: flex-start; }
.choice a { color: var(--ink); }
.choice input { width: 1.5rem; height: 1.5rem; margin-top: 0.1rem; flex: none; accent-color: var(--deep); }
.choices { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; }
.honey { display: none; }
/* Errors, GOV.UK pattern in the client's own colours, never a stock red
   (LESSONS #46): a list at the top that takes focus and links to each field;
   each message above its field, after a visible "Error:", marked with a warm
   blue bar unlike the labels; the field's edge thickens, so colour is never
   the only cue. */
.error-summary { padding: 1.25rem 1.5rem; border: 3px solid var(--ink); border-radius: 3px; }
.error-summary:focus { outline-offset: 4px; }
.error-summary ul { margin-top: 0.75rem; display: grid; gap: 0.5rem; }
.error-summary a { color: var(--ink); }
.field-error { display: flex; align-items: baseline; gap: 0.6rem; margin: 0; color: var(--ink); }
.field-error::before { content: ""; width: 4px; align-self: stretch; flex: none; background: var(--warm); }
.form [aria-invalid="true"] { border-width: 3px; border-color: var(--ink); padding: calc(0.75rem - 2px) calc(0.9rem - 2px); }

/* ---- Closing band: the call and the email, deep blue ---------------------- */
.closing .wrap { display: grid; gap: 2rem; }
@media (min-width: 60em) { .closing .wrap { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; gap: 4rem; } }
.closing .actions { margin-top: 0; }

/* the referral page: the direct lines stay in view beside the long form */
@media (min-width: 60em) { .contact-aside { position: sticky; top: calc(var(--bar) + 2rem); } }

/* the referral band on the home page: words and direct lines, then the form */
.referral .wrap { display: grid; gap: 3rem; }
@media (min-width: 64em) { .referral .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 5rem; } }

/* ---- Footer ---------------------------------------------------------------- */
.site-footer { padding-top: clamp(3.5rem, 7vw, 5.5rem); padding-bottom: 2rem; border-top: 1px solid var(--rule); }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 60em) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 3rem; } }
.footer-brand img { width: 310px; height: auto; }
.footer-brand > * + * { margin-top: 1.25rem; }
.footer-links { display: grid; justify-items: start; margin-top: 0.5rem; }
.footer-links a, .footer-contact a, .footer-bottom a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover, .footer-contact a:hover, .footer-bottom a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; }
.footer-contact { display: grid; justify-items: start; }
.site-footer address { font-style: normal; }
.footer-bottom { display: grid; gap: 0.75rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
/* the credit, centred on the last line of every page (Joseph, 23 Nov 2026) */
.made-by { margin-top: 1rem; text-align: center; }
.made-by a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-soft); text-decoration: none; }
.made-by a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; }

/* ---- The bar at the foot of a phone: call George, or make a referral ------ */
.sticky-cta {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 0.5rem;
  padding: 0.6rem var(--gutter) calc(0.6rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(246, 243, 238, 0.2);
}
.sticky-cta .btn { padding: 0.4rem 0.6rem; min-height: 52px; white-space: normal; line-height: 1.2; }
body { padding-bottom: 4.75rem; }
/* very narrow in text terms (a 320px phone, or any phone at 150% text and up):
   the bar is the call alone, on one line; the referral stays in the menu */
@media (max-width: 22em) {
  .sticky-cta { grid-template-columns: 1fr; }
  .sticky-cta .sticky-referral { display: none; }
}
/* On the home page the bar waits until the opening's own button has scrolled away, so the first
   screen never shows the same two actions twice (critique P2); it also steps aside while the menu
   is open. Without JavaScript it simply stays, which is the safe failure (LESSONS #44). */
.sticky-cta { transition: transform 0.25s var(--ease), visibility 0.25s; }
.sticky-cta.is-tucked { transform: translateY(110%); visibility: hidden; }
@media (min-width: 48em) { .sticky-cta { display: none; } body { padding-bottom: 0; } }

/* ---- Cookie banner (only rendered when analytics is switched on) ---------- */
.cookie-banner { position: fixed; inset: auto 0 4.75rem 0; z-index: 60; padding: 1rem var(--gutter); }
.cookie-banner .actions { margin-top: 0.75rem; }
@media (min-width: 48em) { .cookie-banner { bottom: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .sticky-cta, .site-footer, .cookie-banner, .closing { display: none; }
  body { padding-bottom: 0; }
}
