/*
 * CM Coaching — site stylesheet. Mobile-first.
 * Brand rules (PROJECT_MEMORY.md → Brand): navy text on white; crimson for headings,
 * buttons and links on light backgrounds only; white text on navy, never crimson.
 */

/* ---------- Fonts (self-hosted, OFL) ---------- */

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/barlow-condensed-latin-800-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2");
}

/* ---------- Tokens ---------- */

:root {
  --color-crimson: #cb1152;
  --color-navy: #033b54;
  --color-white: #ffffff;
  --color-neutral: #f3f5f7;
  --color-border: #c9d3da;
  --color-amber-bg: #ffe08a;
  --color-amber-text: #4d3600;
  --color-crimson-tint: rgb(203 17 82 / 0.07);
  --color-navy-tint: rgb(3 59 84 / 0.08);
  --shadow-card: 0 14px 32px -20px rgb(3 59 84 / 0.4);

  --color-text: var(--color-navy);
  --color-focus: var(--color-navy);

  --font-heading: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "Barlow", Arial, sans-serif;

  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-h3: 1.625rem;
  --text-h2: clamp(2.125rem, 1.6rem + 2.4vw, 3rem);
  --text-h1: clamp(3rem, 2.2rem + 4.4vw, 5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  --section-pad: clamp(var(--space-8), 3rem + 3vw, var(--space-9));
  --container: 72rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-white);
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-heading);
  line-height: 1.05;
  color: var(--color-navy);
}

h1 {
  font-size: var(--text-h1);
  font-weight: 800;
}

h2 {
  font-size: var(--text-h2);
  font-weight: 800;
}

h3 {
  font-size: var(--text-h3);
  font-weight: 700;
}

p {
  margin: 0 0 var(--space-4);
}

a {
  color: var(--color-crimson);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

[id] {
  scroll-margin-top: var(--space-5);
}

/* Visually hidden until focused, so keyboard users can jump past the header. */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  color: var(--color-white);
  background: var(--color-navy);
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-pad);
}

.section--neutral {
  background:
    radial-gradient(40rem 28rem at 100% 0%, var(--color-crimson-tint), transparent 70%),
    radial-gradient(36rem 26rem at 0% 100%, var(--color-navy-tint), transparent 70%),
    var(--color-neutral);
}

.section--navy {
  --color-focus: var(--color-white);
  color: var(--color-white);
  background: var(--color-navy);
}

.section--navy h2,
.section--navy h3 {
  color: var(--color-white);
}

.section-intro {
  max-width: 40rem;
  margin-bottom: var(--space-6);
}

.section-intro > :last-child {
  margin-bottom: 0;
}

.lead {
  font-size: var(--text-lg);
}

.grid {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 40rem) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 48rem) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Components ---------- */

/* Marks draft or placeholder content. Remove every instance before launch. */
.preview-label {
  display: inline-block;
  margin: 0 0 var(--space-4);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-amber-text);
  background: var(--color-amber-bg);
  border-radius: var(--radius-sm);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn--primary {
  color: var(--color-white);
  background: var(--color-crimson);
}

.btn--primary:hover {
  background: #a90d43;
}

.btn--secondary {
  color: var(--color-navy);
  background: transparent;
  border-color: var(--color-navy);
}

.btn--secondary:hover {
  color: var(--color-white);
  background: var(--color-navy);
}

.btn--light {
  color: var(--color-navy);
  background: var(--color-white);
}

.btn--light:hover {
  background: var(--color-neutral);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.btn-group--stack {
  flex-direction: column;
  align-items: flex-start;
}

/* Lets the email address wrap on the narrowest screens instead of overflowing. */
.btn-group--stack .btn {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.btn .icon {
  margin-right: var(--space-2);
}

.card {
  padding: var(--space-5);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.card > :last-child {
  margin-bottom: 0;
}

.card__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-5);
}

.tag {
  display: inline-block;
  margin-bottom: var(--space-3);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-navy);
  border-radius: 999px;
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 10;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-neutral);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding-block: var(--space-3);
}

.site-header__logo {
  display: block;
  padding: var(--space-1) 0;
}

.site-header__logo img {
  width: 96px;
}

@media (min-width: 56rem) {
  .site-header__logo img {
    width: 120px;
  }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 48px;
  min-height: 48px;
  padding: var(--space-2) var(--space-3);
  font: inherit;
  font-weight: 600;
  color: var(--color-navy);
  background: transparent;
  border: 2px solid var(--color-navy);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle[hidden] {
  display: none;
}

.site-nav {
  flex-basis: 100%;
}

.js .site-nav {
  display: none;
}

.js .site-nav.is-open {
  display: block;
}

.site-nav ul {
  margin: 0;
  padding: 0 0 var(--space-3);
  list-style: none;
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding-inline: var(--space-2);
  font-weight: 600;
  color: var(--color-navy);
  text-decoration: none;
  border-bottom: 1px solid var(--color-neutral);
}

.site-nav a:hover {
  color: var(--color-crimson);
}

/* 72rem: the eight header links need about 1,075px to sit on one row beside the logo. */
@media (min-width: 72rem) {
  .nav-toggle,
  .nav-toggle[hidden] {
    display: none;
  }

  .site-nav,
  .js .site-nav {
    display: block;
    flex-basis: auto;
  }

  .site-nav ul {
    display: flex;
    gap: var(--space-1);
    padding: 0;
  }

  .site-nav a {
    padding-inline: var(--space-3);
    border-bottom: 0;
  }
}

/* ---------- Hero ---------- */

.hero {
  overflow: hidden;
  padding-top: var(--space-7);
}

.hero__inner {
  display: grid;
  gap: var(--space-6);
  align-items: end;
}

.hero__content {
  max-width: 34rem;
}

.hero h1 {
  margin-bottom: var(--space-4);
}

.hero h1 span {
  display: block;
  color: var(--color-crimson);
}

.hero__services {
  font-size: var(--text-lg);
  font-weight: 600;
}

.hero .btn-group {
  margin-top: var(--space-5);
}

/* Compact Google rating badge under the hero buttons. */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-navy);
  text-decoration: none;
}

.trust-badge:hover {
  text-decoration: underline;
}

/* Cam's cut-out over layered brush artwork (the #brush-art symbol in the page). */
.photo-frame {
  position: relative;
  width: 100%;
  max-width: 20rem;
  margin-inline: auto;
}

.photo-frame__art {
  position: absolute;
  top: 4%;
  left: -6%;
  width: 112%;
  height: 96%;
}

.photo-frame__photo {
  position: relative;
  width: 80%;
  margin-inline: auto;
}

/* Group cut-out on the landscape brush sweep (the hero's portrait #brush-art would
   squash), with a soft navy floor glow so the group doesn't float. */
.results__group {
  max-width: 36rem;
  margin: 0 auto var(--space-7);
  padding: 4% 4% 0;
  background:
    radial-gradient(50% 14% at 50% 94%, rgb(3 59 84 / 0.28), transparent 100%),
    url("../images/brush-sweep.svg") no-repeat 50% 22% / 100% auto;
}

.results__group-photo {
  width: 100%;
}

/* A full rectangular photo in the photo-split column, in place of a cut-out. */
.photo-card {
  width: 100%;
  margin-inline: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* Content beside a smaller photo-frame: photo below the content until there's room for a side column. */
.photo-split {
  display: grid;
  gap: var(--space-6);
}

.photo-split__media {
  max-width: 17rem;
}

@media (min-width: 64rem) {
  .photo-split {
    grid-template-columns: minmax(0, 1fr) 18rem;
    gap: var(--space-7);
    align-items: center;
  }

  .photo-split__media {
    max-width: none;
  }

  /* Four approach cards go 2 x 2 beside the photo instead of one narrow row. */
  .photo-split .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

@media (min-width: 48rem) {
  .hero {
    padding-top: var(--space-6);
  }

  .hero__inner {
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-5);
  }

  .hero__content {
    padding-bottom: var(--space-9);
  }

  .hero__media {
    max-width: 26rem;
    margin-inline: 0 auto;
  }
}

/* ---------- Results and reviews ---------- */

.results__stories {
  align-items: start;
}

/* Two columns on tablets: three leave the before/after photos too small to read. */
@media (min-width: 40rem) {
  .results__stories {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .results__stories {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Each photo is one image of two equal halves (before | after), so the labels sit at 0 and 50%. */
.result-card__photo {
  position: relative;
  margin-bottom: var(--space-4);
}

.result-card__photo img {
  width: 100%;
  border-radius: var(--radius-sm);
}

.result-card__label {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-white);
  background: var(--color-navy);
  border-radius: 999px;
}

.result-card__label--after {
  left: calc(50% + var(--space-2));
  background: var(--color-crimson);
}

.result-card__more summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  color: var(--color-crimson);
  cursor: pointer;
  list-style: none;
}

.result-card__more summary::-webkit-details-marker {
  display: none;
}

.result-card__more summary::after {
  content: "";
  width: 0.5em;
  height: 0.5em;
  margin: -0.2em 0 0 var(--space-2);
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.result-card__more[open] summary::after {
  margin-top: 0.3em;
  transform: rotate(-135deg);
}

.result-card__more > p:last-child {
  margin-bottom: 0;
}

.results__note {
  margin: var(--space-6) 0 0;
  font-size: var(--text-sm);
  text-align: center;
}

.testimonial {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.stars {
  display: inline-flex;
  gap: 2px;
}

.stars--crimson {
  color: var(--color-crimson);
}

.stars--navy {
  color: var(--color-navy);
}

.star {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.testimonial .stars {
  margin-bottom: var(--space-3);
}

.testimonial .star {
  width: 1.25rem;
  height: 1.25rem;
}

.testimonial blockquote {
  flex: 1;
  margin: 0 0 var(--space-4);
  font-size: var(--text-lg);
}

.testimonial blockquote p {
  margin: 0;
}

.testimonial figcaption {
  font-weight: 600;
}

.reviews__links {
  margin-top: var(--space-6);
}

/* ---------- Offer and approach ---------- */

.offer-card h3 {
  color: var(--color-crimson);
}

.offer-card__where {
  font-weight: 600;
}

.approach-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.approach-item {
  padding-top: var(--space-4);
  border-top: 4px solid var(--color-crimson);
}

.approach-item h3 {
  margin-bottom: var(--space-2);
}

.approach-item p {
  margin: 0;
}

/* ---------- About ---------- */

.about__inner {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}

.about__aside {
  display: grid;
  gap: var(--space-7);
  align-content: start;
}

/* Same size as the other secondary photos, centred under the Qualifications card. */
.about__aside .photo-frame {
  max-width: 18rem;
}

.qualifications-card,
.card--accent {
  border-top: 4px solid var(--color-crimson);
}

.qualifications,
.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.qualifications li,
.check-list li {
  position: relative;
  padding: var(--space-2) 0 var(--space-2) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.qualifications li:last-child,
.check-list li:last-child {
  border-bottom: 0;
}

.qualifications li::before,
.check-list li::before {
  content: "";
  position: absolute;
  top: 0.95em;
  left: 0.25rem;
  width: 0.75rem;
  height: 0.75rem;
  background: var(--color-crimson);
  border-radius: 50%;
}

@media (min-width: 48rem) {
  .about__inner {
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-7);
  }
}

/* ---------- Calculator teaser (the one section divider) ---------- */

.divider {
  display: block;
  width: 100%;
  height: 28px;
  margin-bottom: -1px;
  fill: var(--color-navy);
}

/* Matches the section above (The CM Coaching approach), so the torn edge reads as one shape. */
.calculator-teaser {
  background: var(--color-neutral);
}

.calculator-teaser .container {
  max-width: 48rem;
  text-align: center;
}

.calculator-teaser .btn-group {
  justify-content: center;
}

/* ---------- Gallery ---------- */

/* Sideways-scrolling strip. Slides snap to the centre, and the part-visible
   neighbours show there's more to see. Tile sizes use container units so the
   track's side padding can let the first and last slides reach the centre. */
.gallery {
  position: relative;
  container-type: inline-size;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--color-crimson) var(--color-neutral);
  border-radius: var(--radius-sm);
}

.gallery__track {
  --tile-gap: var(--space-3);
  --tile: 75cqi;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--tile);
  gap: var(--tile-gap);
  width: max-content;
  margin: 0;
  padding: 0 calc((100cqi - var(--tile)) / 2) var(--space-3);
  list-style: none;
}

.gallery__track li {
  scroll-snap-align: center;
}

.gallery img {
  width: 100%;
  border-radius: var(--radius-sm);
}

@media (min-width: 40rem) {
  .gallery__track {
    --tile: calc((100cqi - 2 * var(--tile-gap)) / 2.5);
  }
}

@media (min-width: 64rem) {
  .gallery__track {
    --tile: calc((100cqi - 3 * var(--tile-gap)) / 3.5);
  }
}

/* Floating effect: the centred slide is full size, its neighbours shrink, tilt
   and fade as they move away. Browsers without scroll-driven animations keep the
   plain strip, and reduced motion switches it off. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .gallery__track li {
      animation: gallery-float linear both;
      animation-timeline: view(inline);
    }
  }
}

@keyframes gallery-float {
  0% {
    opacity: 0.6;
    scale: 0.86;
    rotate: -3deg;
  }

  50% {
    opacity: 1;
    scale: 1;
    rotate: 0deg;
  }

  100% {
    opacity: 0.6;
    scale: 0.86;
    rotate: 3deg;
  }
}

.gallery__controls {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  justify-content: center;
  margin-top: var(--space-4);
}

.gallery__status {
  min-width: 4.5rem;
  margin: 0;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.gallery__controls[hidden] {
  display: none;
}

.gallery__btn {
  padding-inline: var(--space-4);
}

.gallery__btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: default;
}

/* ---------- Socials ---------- */

.gallery__follow {
  margin-top: var(--space-6);
}

.social-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-list a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  font-weight: 600;
  color: var(--color-navy);
}

.social-list a:hover {
  color: var(--color-crimson);
}

/* ---------- Contact form ---------- */

.contact__inner {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 56rem) {
  .contact__inner {
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--space-8);
  }
}

.form {
  display: grid;
  gap: var(--space-4);
}

.form__field {
  display: grid;
  gap: var(--space-2);
}

.form__field label {
  font-weight: 600;
}

.form__optional {
  font-weight: 400;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3);
  font: inherit;
  color: var(--color-navy);
  background: var(--color-white);
  border: 2px solid var(--color-navy);
  border-radius: var(--radius-sm);
}

.form textarea {
  min-height: 9rem;
  resize: vertical;
}

.form__honeypot {
  display: none;
}

.form__note {
  margin: 0;
  font-size: var(--text-sm);
}

.form .btn {
  justify-self: start;
}

/* ---------- Inner pages ---------- */

.page-hero {
  padding-block: var(--space-8) var(--space-7);
}

.page-hero .lead {
  max-width: 40rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  font-weight: 600;
}

.breadcrumb li + li::before {
  content: "/";
  margin-inline: var(--space-2);
}

.breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.service-details h2 {
  font-size: var(--text-h3);
}

.service-location {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin-top: var(--space-4);
  padding-top: var(--space-5);
  font-weight: 600;
  border-top: 1px solid var(--color-border);
}

.service-location .icon {
  color: var(--color-crimson);
}

.service-offers,
.services__start {
  margin-top: var(--space-6);
}

/* "The main difference" card sits above the closing call to action. */
.service-difference {
  margin-bottom: var(--space-7);
}

@media (min-width: 48rem) {
  .check-list--columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-7);
  }

  .check-list--columns li,
  .check-list--columns li:last-child {
    border-bottom: 0;
  }
}

.section--tight {
  padding-top: var(--space-6);
}

.prose {
  max-width: 48rem;
}

.prose h2 {
  margin-top: var(--space-7);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
  font-size: 1.375rem;
}

.prose ul {
  padding-left: var(--space-5);
}

.prose li {
  margin-bottom: var(--space-2);
}

/* ---------- Macro calculator ---------- */

.calc {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}

@media (min-width: 64rem) {
  .calc {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
}

.calc__heading {
  font-size: var(--text-h3);
}

.calc__note {
  font-weight: 600;
}

.calc__disclaimer {
  margin: var(--space-5) 0 0;
  font-size: var(--text-sm);
}

/* The page's own rules beat the browser's [hidden] when a display value is set. */
.calc [hidden] {
  display: none;
}

.calc-form {
  gap: var(--space-5);
}

.calc-form__group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.calc-form__group legend {
  margin-bottom: var(--space-2);
  padding: 0;
  font-weight: 600;
}

.calc-form__short {
  max-width: 10rem;
}

.calc-form__units {
  margin-top: var(--space-3);
}

.calc-form__pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 8rem));
  gap: var(--space-3);
}

.field-error {
  margin: var(--space-2) 0 0;
  font-weight: 600;
  color: var(--color-crimson);
}

.calc-form__status {
  margin: 0;
}

.form [aria-invalid="true"] {
  border-color: var(--color-crimson);
}

/* Radio options as large tap targets. */
.choices {
  display: grid;
  gap: var(--space-2);
}

@media (min-width: 30rem) {
  .choices--row {
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  }
}

.choice {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  min-height: 48px;
  padding: var(--space-3);
  line-height: 1.4;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.choice:has(input:checked) {
  background: var(--color-navy-tint);
  border-color: var(--color-navy);
}

.choice:has(input:focus-visible) {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.choice strong {
  display: block;
}

.form .choice input {
  flex: none;
  width: 1.25rem;
  min-height: 0;
  height: 1.25rem;
  margin: 0.1rem 0 0;
  padding: 0;
  border: 0;
  accent-color: var(--color-crimson);
}

.choice input:focus-visible {
  outline: none;
}

/* Unit switch: two radios styled as a segmented control. */
.unit-toggle {
  display: inline-flex;
  border: 2px solid var(--color-navy);
  border-radius: var(--radius-sm);
}

/* .form input would otherwise give these visually hidden radios full width. */
.form .unit-toggle input {
  width: 1px;
  min-height: 0;
  height: 1px;
  padding: 0;
  border: 0;
}

.unit-toggle label {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-4);
  font-weight: 600;
  cursor: pointer;
}

.unit-toggle input:checked + label {
  color: var(--color-white);
  background: var(--color-navy);
}

.unit-toggle input:focus-visible + label {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.calc-result__heading {
  font-size: var(--text-h3);
}

.calc-result__heading:focus {
  outline: none;
}

.calc-result__heading:focus-visible {
  outline: 3px solid var(--color-focus);
}

.calc-result__target {
  margin-bottom: var(--space-2);
  font-weight: 600;
}

.calc-result__number {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-h1);
  font-weight: 800;
  line-height: 1;
  color: var(--color-crimson);
}

.calc-result__maintenance {
  font-weight: 600;
}

.macro-tiles {
  display: grid;
  gap: var(--space-3);
  margin: 0 0 var(--space-5);
  padding: 0;
  list-style: none;
}

@media (min-width: 30rem) {
  .macro-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.macro-tiles__tile {
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
  text-align: center;
  background: var(--color-neutral);
  border-radius: var(--radius-sm);
}

.macro-tiles__label {
  font-weight: 600;
}

.macro-tiles__value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
}

.site-nav a[aria-current="page"] {
  color: var(--color-crimson);
}

/* ---------- Colour accents ---------- */

/* Short crimson brush stroke under section headings (decorative, CSS only). */
.section-intro h2::after,
.about__inner h2::after,
.contact__inner h2::after,
.calculator-teaser h2::after {
  content: "";
  display: block;
  width: 5rem;
  height: 0.75rem;
  margin-top: var(--space-2);
  background: var(--color-crimson);
  -webkit-mask: url("../images/brush-stroke.svg") no-repeat center / 100% 100%;
  mask: url("../images/brush-stroke.svg") no-repeat center / 100% 100%;
}

.calculator-teaser h2::after {
  margin-inline: auto;
}

.hero {
  background: radial-gradient(50rem 30rem at 0% 100%, var(--color-navy-tint), transparent 70%);
}

/* Brush strokes echo the hero artwork. Full strength, so they sit in empty space,
   never behind text: beside the breadcrumb on small screens, beside the intro on wide ones. */
.page-hero {
  --brush-inset: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  background:
    url("../images/brush-sweep.svg") no-repeat right var(--brush-inset) top var(--space-7) / 7rem auto,
    linear-gradient(180deg, var(--color-navy-tint), transparent);
}

@media (min-width: 64rem) {
  .page-hero {
    background-position: right var(--brush-inset) bottom var(--space-7), 0 0;
    background-size: 17rem auto, auto;
  }
}

.card {
  box-shadow: var(--shadow-card);
}

.offer-card {
  border-top: 4px solid var(--color-crimson);
}

.testimonial {
  background: url("../images/quote-mark.svg") no-repeat right var(--space-5) top var(--space-5) / 3rem auto, var(--color-white);
}

.approach-item {
  padding: var(--space-5);
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* ---------- Footer ---------- */

.site-footer {
  --color-focus: var(--color-white);
  padding-block: var(--space-8) var(--space-6);
  color: var(--color-white);
  background: var(--color-navy);
}

.site-footer a {
  color: var(--color-white);
}

.site-footer__inner {
  display: grid;
  gap: var(--space-6);
}

.site-footer__logo {
  width: 160px;
  margin-bottom: var(--space-4);
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
}

.site-footer__address {
  font-style: normal;
}

.site-footer__links .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.site-footer__heading {
  margin-bottom: var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
}

.site-footer__legal {
  margin: var(--space-6) 0 0;
  padding-top: var(--space-5);
  font-size: var(--text-sm);
  border-top: 1px solid rgb(255 255 255 / 0.25);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-5);
}

.site-footer__legal p {
  margin: 0;
}

@media (min-width: 48rem) {
  .site-footer__inner {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

/* Cookie banner (assets/js/consent.js). Functional layout only: style it with the
   client's brand tokens when the analytics module is switched on. */
.cookie-banner {
  position: fixed;
  inset: auto 1rem 1rem;
  z-index: 1000;
  max-width: 40rem;
  margin-inline: auto;
  padding: 1rem;
  background: Canvas;
  color: CanvasText;
  border: 1px solid currentColor;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookie-banner__btn {
  min-height: 44px;
}

.cookie-banner__options {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}

.cookie-banner__option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 0.5rem;
  margin-top: 0.5rem;
}

.cookie-banner__option span {
  grid-column: 2;
}

.cookie-settings-link {
  min-height: 44px;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  background: none;
  border: 0;
  cursor: pointer;
}
