/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-line);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem var(--space-sm);
  padding-block: 0.875rem;
}

/* Logo on the left, menu (or the phone menu button) on the right, in one row */
.site-header__logo {
  display: flex;
}

.site-header__logo img {
  display: block;
  width: auto;
  height: 3.5rem;
}

@media (max-width: 56rem) {
  .site-header__logo img {
    height: 2.75rem;
  }
}

/* Hero */
.hero {
  background: var(--color-tint);
  border-bottom: 1px solid var(--color-tint-line);
}

.hero__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3.5rem;
  padding-block: clamp(3rem, 8vw, 6rem);
}

.hero__copy {
  flex: 1 1 30rem;
  max-width: 46rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero__title {
  font-size: clamp(2.25rem, 4.2vw, 3.5rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

/* The second half of the headline softly fades in, in brand blue, to suggest a change for the better */
.hero__turn {
  display: block;
  color: var(--color-accent-strong);
  animation: hero-turn 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.9s both;
}

@keyframes hero-turn {
  from {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(0.3em);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__turn {
    animation: none;
  }
}

.hero__lead {
  max-width: 32.5rem;
  font-size: 1.1875rem;
}

/* "connect" stands out in brand blue, and an underline draws in under it once the headline has settled */
.hero__connect {
  color: var(--color-accent-strong);
  font-weight: 700;
  background: linear-gradient(var(--color-accent), var(--color-accent)) no-repeat left bottom / 100% 2px;
  animation: hero-connect 0.8s cubic-bezier(0.22, 1, 0.36, 1) 3.4s both;
}

@keyframes hero-connect {
  from {
    background-size: 0% 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__connect {
    animation: none;
  }
}

/* A second intro paragraph sits closer to the first than the usual banner spacing */
.hero__lead--follow {
  margin-top: -0.75rem;
}

/* The single booking button sits at its natural width under the intro, with a little extra breathing room */
.hero__cta {
  align-self: flex-start;
  margin-top: 0.5rem;
}

/* Booking button with the opening hours badge beside it (below it on narrow phones) */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md) var(--space-lg);
  margin-top: 0.5rem;
}

.hero__actions .hero__cta {
  align-self: auto;
  margin-top: 0;
}

.hero__actions .hours-badge--inline {
  position: static;
}

.hero__media {
  position: relative;
  flex: 1 1 25rem;
  min-width: 0;
}

.hero__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-xl);
  background: var(--color-placeholder);
}

.hours-badge {
  position: absolute;
  left: -1.25rem;
  bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1.125rem 1.375rem;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-float);
}

.hours-badge__text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  font-size: var(--text-xs);
}

.hours-badge__text strong {
  font-size: var(--text-sm);
  color: var(--color-ink);
}

@media (max-width: 40rem) {
  .hours-badge {
    left: var(--space-sm);
    bottom: var(--space-sm);
  }
}

/* Two tidy columns: the longer items on the left, the shorter on the right */
.ticks {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 0.75rem 2rem;
  padding-top: var(--space-2xs);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-ink);
}

@media (max-width: 30rem) {
  .ticks {
    grid-template-columns: max-content;
  }
}

.ticks li {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
}

.ticks li::before {
  content: "";
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  background: var(--color-accent);
  mask: url("../img/tick.svg") center / contain no-repeat;
}

/* About */
.feature-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xl);
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: 2rem;
  background: var(--color-ink);
  color: var(--color-on-navy);
}

.feature-card h2 {
  color: var(--color-surface);
}

.feature-card__media {
  position: relative;
  flex: 1 1 18.75rem;
  min-width: 0;
}

.feature-card__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 40%;
  border-radius: 1.5rem;
  background: var(--color-navy-raised);
}

.feature-card__body {
  flex: 1.5 1 27.5rem;
  min-width: 0;
}

/* Contact */
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.contact-card {
  flex: 1 1 22.5rem;
  min-width: 0;
  padding: clamp(1.75rem, 4vw, 3rem);
  border-radius: var(--radius-xl);
  background: var(--color-ink);
  color: var(--color-on-navy);
}

.contact-card h2,
.contact-card strong {
  color: var(--color-surface);
}

.contact-card__details {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Phone and email: a small icon in place of a label */
.contact-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-line svg {
  flex-shrink: 0;
  color: var(--color-on-navy-accent);
}

.contact-line a {
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-card__details a {
  color: var(--color-on-navy-accent);
  font-weight: 600;
}

.contact-card__details a:hover {
  color: var(--color-surface);
}

.contact-card__cta {
  align-self: flex-start;
  margin-top: auto;
}

.contact-form {
  flex: 1.4 1 27.5rem;
  min-width: 0;
  padding: clamp(1.75rem, 4vw, 3rem);
  border-radius: var(--radius-xl);
  background: var(--color-tint);
}

.contact-form .button {
  align-self: flex-start;
}

.contact-form__status {
  font-weight: 600;
  color: var(--color-accent-strong);
}

.contact-form__status:empty {
  display: none;
}

.contact-form__status[data-state="error"] {
  color: var(--color-error);
}

/* After sending: the form's contents give way to a thank-you message */
.contact-form.is-sent > :not(.contact-form__thanks) {
  display: none;
}

.contact-form__thanks {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  text-align: center;
  animation: thanks-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.contact-form__thanks h3:focus {
  outline: none;
}

.contact-form__thanks p {
  max-width: 26rem;
}

.contact-form__tick {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-ink);
  animation: thanks-tick 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

.contact-form__tick svg {
  width: 1.75rem;
  height: 1.75rem;
}

.contact-form__again {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

@keyframes thanks-in {
  from { opacity: 0; transform: translateY(0.75rem); }
}

@keyframes thanks-tick {
  from { opacity: 0; transform: scale(0.4); }
}

@media (prefers-reduced-motion: reduce) {
  .contact-form__thanks,
  .contact-form__tick { animation: none; }
}

/* Simple pages (thanks, 404) */
.notice {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.notice .stack-md {
  align-items: center;
  max-width: 36rem;
}

.notice .button-row {
  justify-content: center;
}

/* Footer */
.site-footer {
  background: var(--color-footer);
  color: var(--color-footer-text);
  font-size: var(--text-xs);
}

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

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

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-block: 1.75rem;
}

/* Facebook and Instagram icons, centred under the map with a small heading */
.social-heading {
  padding-top: var(--space-sm);
  font-size: 1.125rem;
  font-weight: 800;
  text-align: center;
  color: var(--color-ink);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
}

.social-links a {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-pill);
  background: var(--color-ink);
  color: var(--color-surface);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  background: var(--color-accent);
  color: var(--color-ink);
}

/* Privacy policy and other long-form pages */
.policy {
  max-width: 44rem;
}

.policy h2 {
  margin-top: var(--space-sm);
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--color-ink);
}

.policy ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 1.25rem;
  list-style: disc;
}

.policy a {
  color: var(--color-accent-ink);
}

.policy__updated {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

/* Statistics: four white cards with big counting percentages */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: var(--space-sm);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.75rem;
  border-radius: var(--radius-lg, 1.25rem);
  background: var(--color-surface);
}

.stat__number {
  font-size: clamp(2.75rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--color-accent-strong);
}

/* A small bump as each number lands */
.stat.is-counted .stat__number {
  animation: stat-land 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes stat-land {
  50% {
    transform: scale(1.12);
  }
}

.stat__text {
  font-size: var(--text-sm);
  color: var(--color-text);
}


/* Consultation prices: name and length on the left, price on the right; each card opens the booking page */
.price-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-block: var(--space-2xs);
}

.price-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 1rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.price-list__item:hover,
.price-list__item:focus-visible {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.price-list__name {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  color: var(--color-ink);
}

.price-list__name span {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-muted);
}

.price-list__price {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--color-accent-strong);
}

/* Evening mood: blend the logo's white background into the cream header */
[data-mood="evening"] .site-header__logo img {
  mix-blend-mode: multiply;
}

/* Statistics references: small numbers after each statistic, and a quiet source list underneath */
.stat__ref {
  margin-left: 0.15em;
  font-size: 0.7em;
  line-height: 0;
}

.stat__ref a {
  color: var(--color-muted);
  text-decoration: none;
}

.stat__ref a:hover {
  color: var(--color-accent-strong);
}

.stat-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  list-style: none;
  font-size: var(--text-xs);
  color: var(--color-muted);
}

.stat-sources a {
  color: inherit;
  text-underline-offset: 2px;
}

.stat-sources a:hover {
  color: var(--color-accent-strong);
}

/* Contact now sits on the light blue band, so its question form switches to white to keep its contrast */
.section--tint .contact-form {
  background: var(--color-surface);
}

/* FAQ: a short centred band with one button that drops down the questions */
.faq {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
}

/* The "peek": when the section first scrolls into view, the list briefly slides open to show
   the first few questions, then tucks away again behind the button */
.faq__toggle.is-peeking .faq__list {
  overflow: hidden;
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  animation: none;
  transition:
    max-height 1.1s cubic-bezier(0.45, 0, 0.2, 1),
    margin-top 1.1s cubic-bezier(0.45, 0, 0.2, 1),
    opacity 0.7s ease;
  -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent);
  mask-image: linear-gradient(to bottom, #000 75%, transparent);
}

.faq__toggle.is-peeking.is-peek-open .faq__list {
  max-height: var(--peek-height, 12rem);
  margin-top: var(--space-md);
  opacity: 1;
}

.faq__toggle.is-peeking.is-peek-closing .faq__list {
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  transition:
    max-height 1s cubic-bezier(0.5, 0, 0.3, 1),
    margin-top 1s cubic-bezier(0.5, 0, 0.3, 1),
    opacity 0.6s ease 0.4s;
}

.faq__toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 46rem;
  margin-top: var(--space-xs);
}

.faq__toggle > summary {
  list-style: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.faq__toggle > summary::-webkit-details-marker {
  display: none;
}

.faq__toggle > summary::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  margin-left: 0.75rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq__toggle[open] > summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.faq__toggle > summary:hover,
.faq__toggle > summary:focus-visible {
  box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 3px var(--color-accent);
  transform: translateY(-2px);
}

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  width: 100%;
  margin-top: var(--space-md);
  text-align: left;
  animation: faq-in 0.3s ease-out both;
}

.faq__item {
  border-radius: var(--radius-md);
  background: var(--color-tint);
}

.faq__item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 1rem 1.25rem;
  list-style: none;
  font-weight: 700;
  color: var(--color-ink);
  cursor: pointer;
}

.faq__item > summary::-webkit-details-marker {
  display: none;
}

.faq__item > summary::after {
  content: "+";
  flex: none;
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1;
  color: var(--color-accent-strong);
  transition: transform 0.2s ease;
}

.faq__item[open] > summary::after {
  transform: rotate(45deg);
}

.faq__item > p {
  padding: 0 1.25rem 1.125rem;
}

@keyframes faq-in {
  from { opacity: 0; transform: translateY(-0.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  .faq__list { animation: none; }
  .faq__toggle > summary,
  .faq__toggle > summary::after,
  .faq__item > summary::after { transition: none; }
}

/* Client testimonial video in "Kind words": tucked behind a button, drops down and plays when opened */
.testimonial-video {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 52rem;
  margin-inline: auto;
}

.testimonial-video > summary {
  gap: 0.625rem;
  list-style: none;
  text-align: center;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.testimonial-video > summary::-webkit-details-marker {
  display: none;
}

.testimonial-video > summary:hover,
.testimonial-video > summary:focus-visible {
  box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 3px var(--color-accent);
  transform: translateY(-2px);
}

.testimonial-video video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  margin-top: var(--space-md);
  border-radius: var(--radius-xl);
  background: var(--color-ink);
  box-shadow: var(--shadow-float);
  animation: video-drop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes video-drop {
  from { opacity: 0; transform: translateY(-0.75rem) scale(0.98); }
}

@media (max-width: 40rem) {
  .testimonial-video video {
    border-radius: var(--radius-lg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .testimonial-video video { animation: none; }
}

/* "Making it easy": keep the funding list fixed in place when the GP referral drop-down opens on the left,
   instead of re-centring and sliding down */
#payment .payment-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-self: flex-start;
  margin-top: 1.2rem;
}

/* The Medicare explainer sits under the funding list, and only shows while the GP referral drop-down is open */
#payment .referral__medicare--side {
  display: none;
  margin-top: 0;
}

#payment:has(.referral[open]) .referral__medicare--side {
  display: block;
}

/* Gentle pop on the Medicare box when "How it works" brings visitors to it */
#payment:has(.referral[open]) .referral__medicare--side.is-popping {
  animation: medicare-pop 1.5s both;
}

@keyframes medicare-pop {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgb(81 169 220 / 0), 0 0 0 0 rgb(81 169 220 / 0);
    animation-timing-function: cubic-bezier(0.33, 0, 0.2, 1);
  }
  35% {
    transform: scale(1.04);
    box-shadow: 0 0 0 4px rgb(81 169 220 / 0.55), 0 0 32px 8px rgb(81 169 220 / 0.45);
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgb(81 169 220 / 0), 0 0 0 0 rgb(81 169 220 / 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #payment:has(.referral[open]) .referral__medicare--side.is-popping { animation: none; }
}

/* "What is an exercise physiologist?" explainer in Who we help */
.ep-explainer {
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
  background: var(--color-tint);
}

.ep-explainer h3 {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.5rem;
  font-size: 1.0625rem;
  color: var(--color-ink);
}

.ep-explainer__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--color-accent);
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-ink);
}

.ep-explainer p {
  font-size: var(--text-sm);
}

/* Funding ticks now sit under the "Do you experience…" cards */
.ticks--under-grid {
  /* Same two columns as the cards above, with each tick lined up with the left edge of the card text */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--space-xs);
  margin-top: var(--space-xs);
}

.ticks--under-grid li {
  padding-left: 1.5rem;
}

@media (max-width: 30rem) {
  .ticks--under-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* "Exercise Physiology" sub heading above the prices */
.price-list__heading {
  margin-bottom: -0.25rem;
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-strong);
}

/* Who we help: line up the bottom of both sides. Whichever side is shorter pushes its last item
   (the explainer on the left, the funding ticks on the right) down to meet the other side's bottom edge */
#help .split__main > .ep-explainer,
#help .split__side > .ticks--under-grid {
  margin-top: auto;
}

/* Card contrast follows the section's background: on a light blue band, light blue cards switch to white;
   on a white band, white cards switch to light blue. This keeps every box visible wherever its section sits. */
.section--tint .card--tint {
  background: var(--color-surface);
}

.section--tint .step__icon {
  background: var(--color-tint);
}

.section--tint .step__visual .step__number {
  box-shadow: 0 0 0 3px var(--color-surface);
}

.section:not(.section--tint) .stat,
.section:not(.section--tint) .price-list__item,
.section:not(.section--tint) .payment-list__item,
.section:not(.section--tint) .referral__form,
.section:not(.section--tint) .referral__medicare {
  background: var(--color-tint);
}

.section:not(.section--tint) .payment-list__more {
  background: var(--color-surface);
}

.section--tint .pill {
  background: var(--color-surface);
}
