/* =========================================================
   MD Transfer design variations - shared mechanics only.
   Colours, fonts and layout live in each variation's styles.css.
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--font-head); line-height: 1.05; letter-spacing: -0.03em; }
p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
a { color: inherit; }
figure { margin: 0; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
:root { --gutter: 24px; --header-h: 80px; }

.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: #000; color: #fff; border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border: 1px solid transparent; border-radius: 999px;
  font-family: var(--font-btn, var(--font-body)); font-weight: 600; font-size: 1rem; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn .icon { width: 20px; height: 20px; stroke-width: 2; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: currentColor; }
.btn-lg { min-height: 60px; padding: 0 32px; font-size: 1.1rem; }
.btn-block { width: 100%; }

/* ---------- Header / nav mechanics ---------- */
.site-header { position: sticky; top: 0; z-index: 50; transition: background-color .25s ease, box-shadow .25s ease, border-color .25s ease; }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { margin-right: auto; display: flex; align-items: center; }
.brand img { height: 52px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; }
.nav-toggle {
  display: none; width: 48px; height: 48px; border-radius: 50%;
  align-items: center; justify-content: center; cursor: pointer;
  background: transparent; color: inherit; border: 1px solid currentColor;
}
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

/* ---------- Featured services slider mechanics ---------- */
.feature-viewport { position: relative; }
.feature-track {
  display: flex; gap: 24px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain;
  scrollbar-width: none; padding: 6px 2px 28px; margin: -6px -2px -28px;
}
.feature-track::-webkit-scrollbar { display: none; }
.feature {
  flex: 0 0 100%; scroll-snap-align: start;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center;
}
.feature-art svg { width: 100%; height: auto; }
.checks { display: grid; gap: 12px; margin: 0 0 32px; }
.checks li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.checks .icon { width: 26px; height: 26px; padding: 5px; border-radius: 50%; stroke-width: 2.6; }
.carousel-btn {
  position: absolute; top: calc(50% - 28px); z-index: 2;
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.carousel-btn .icon { width: 22px; height: 22px; stroke-width: 2.2; }
.carousel-prev { left: -28px; }
.carousel-next { right: -28px; }
.carousel-dots { display: flex; justify-content: center; gap: 4px; margin-top: 20px; }
.carousel-dots button { position: relative; width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; }
.carousel-dots button::before { content: ""; position: absolute; inset: 14px 8px; border-radius: 999px; background: var(--dot, #ccc); transition: background-color .25s ease, inset .25s ease; }
.carousel-dots button[aria-current="true"]::before { background: var(--red); inset: 14px 0; }

/* ---------- Form mechanics ---------- */
.book-form { display: grid; gap: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.book-form label { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; }
.book-form input, .book-form select, .book-form textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: 400 1rem/1.4 var(--font-body); color: inherit; border-radius: 12px;
}
.book-form textarea { resize: vertical; min-height: 96px; }
.form-status { font-size: .95rem; min-height: 1.2em; }
.form-status.is-success { color: #1E9A5F; font-weight: 600; }
.form-status.is-error { color: var(--red); font-weight: 600; }

/* ---------- Mobile call bar ---------- */
.mobile-call {
  display: none; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
  min-height: 56px; align-items: center; justify-content: center; gap: 10px;
  border-radius: 999px; background: var(--red); color: #fff;
  font-family: var(--font-btn, var(--font-body)); font-weight: 700; font-size: 1.075rem; text-decoration: none;
  box-shadow: 0 12px 28px -8px rgba(215, 38, 46, .6);
}
.mobile-call .icon { width: 22px; height: 22px; stroke-width: 2; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .feature-track { scroll-behavior: auto; }
}

/* ---------- Responsive mechanics ---------- */
@media (max-width: 1280px) {
  .carousel-prev { left: -16px; }
  .carousel-next { right: -16px; }
}
@media (max-width: 960px) {
  :root { --header-h: 72px; }
  .brand img { height: 44px; }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px var(--gutter) 24px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; transform: none; }
  .nav a:not(.btn) { padding: 16px 4px; font-size: 1.1rem; }
  .nav .btn { margin-top: 20px; min-height: 56px; }
  .feature { grid-template-columns: 1fr; }
  .feature-art { order: -1; max-width: 440px; width: 100%; margin: 0 auto; }
}
@media (max-width: 760px) {
  .mobile-call { display: inline-flex; }
  .feature-carousel { position: relative; }
  .feature-viewport { position: static; }
  .carousel-btn { top: auto; bottom: 0; width: 48px; height: 48px; }
  .carousel-prev { left: 0; }
  .carousel-next { right: 0; }
  .carousel-dots { margin-top: 28px; min-height: 48px; align-items: center; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 1rem; }
  .field-row { grid-template-columns: 1fr; }
  .btn-lg { width: 100%; }
}
