/* ==========================================================================
   Robert Spencer — Trusted Labourer & Electrician
   Stylesheet
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------ */
:root {
  /* Brand colour palette */
  --color-primary: #17324D;
  --color-primary-dark: #0f2237;
  --color-secondary: #E9A23B;
  --color-secondary-dark: #c8822a;
  --color-text: #263238;
  --color-accent: #C95D24;
  --color-accent-dark: #a44a1b;
  --color-surface: #F7F5F0;
  --color-surface-alt: #E8E4DC;
  --color-border: #CDD2D4;
  --color-white: #FFFFFF;

  /* Semantic aliases */
  --color-bg: var(--color-surface);
  --color-bg-alt: var(--color-surface-alt);
  --color-heading: var(--color-primary);
  --color-link: var(--color-primary);
  --color-focus: #1c6fd6;

  /* Typography */
  --font-heading: "Roboto Slab", "Georgia", serif;
  --font-label: "Inter", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  /* Fluid type scale (clamp: min, preferred, max) */
  --fs-sm: clamp(0.85rem, 0.82rem + 0.15vw, 0.95rem);
  --fs-body: clamp(1.0625rem, 1rem + 0.3vw, 1.125rem); /* 17-18px */
  --fs-lead: clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem);
  --fs-h6: clamp(1rem, 0.95rem + 0.25vw, 1.15rem);
  --fs-h5: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  --fs-h4: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
  --fs-h3: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --fs-h2: clamp(1.9rem, 1.5rem + 1.6vw, 2.75rem);
  --fs-h1: clamp(2.3rem, 1.7rem + 2.6vw, 3.75rem);

  /* Spacing / layout */
  --space-xs: clamp(0.5rem, 0.45rem + 0.2vw, 0.65rem);
  --space-sm: clamp(0.85rem, 0.75rem + 0.4vw, 1.1rem);
  --space-md: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  --space-lg: clamp(2.25rem, 1.8rem + 1.8vw, 3.5rem);
  --space-xl: clamp(3.5rem, 2.8rem + 2.8vw, 5.5rem);

  --container-max: 1180px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(23, 50, 77, 0.08);
  --shadow-md: 0 10px 30px rgba(23, 50, 77, 0.14);
  --transition: 180ms ease;
}

/* ---- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-heading);
  line-height: 1.2;
  margin: 0 0 var(--space-sm);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h5 { font-size: var(--fs-h5); }
h6 { font-size: var(--fs-h6); }

p { margin: 0 0 var(--space-sm); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--color-link);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}
a:hover { color: var(--color-accent); }

ul, ol { padding-left: 1.25em; }

/* ---- Accessibility -------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.75em 1.25em;
  border-radius: 0 0 var(--radius-sm) 0;
  font-family: var(--font-label);
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

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

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

/* ---- Layout helpers -------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 0.9rem + 1vw, 2rem);
}

.section {
  padding-block: var(--space-xl);
}
.section--alt { background: var(--color-bg-alt); }
.section--dark {
  background: var(--color-primary);
  color: rgba(255,255,255,0.92);
}
.section--dark h2, .section--dark h3, .section--dark h4 { color: var(--color-white); }
.section--dark a { color: var(--color-secondary); }

.section-head {
  max-width: 760px;
  margin: 0 auto var(--space-lg);
  text-align: center;
}
.section-head .eyebrow { display: block; margin-bottom: var(--space-xs); }
.section-head p { color: #4b5a63; font-size: var(--fs-lead); }
.section--dark .section-head p { color: rgba(255,255,255,0.85); }

.eyebrow {
  font-family: var(--font-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: var(--fs-sm);
  color: var(--color-accent);
}

.grid {
  display: grid;
  gap: var(--space-md);
}
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1150px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: 0.01em;
  padding: 0.9em 1.5em;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  line-height: 1.1;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--accent {
  background: var(--color-accent);
  color: var(--color-white);
  font-family: var(--font-label);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.btn--accent:hover { background: var(--color-accent-dark); color: var(--color-white); box-shadow: var(--shadow-md); }

.btn--secondary {
  background: var(--color-secondary);
  color: var(--color-primary-dark);
}
.btn--secondary:hover { background: var(--color-secondary-dark); color: var(--color-primary-dark); }

.btn--outline {
  background: transparent;
  border-color: currentColor;
  color: var(--color-white);
}
.btn--outline:hover { background: rgba(255,255,255,0.12); color: var(--color-white); }

.btn--ghost {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-primary);
}
.btn--ghost:hover { border-color: var(--color-accent); color: var(--color-accent); }

.btn--block { width: 100%; }
.btn--sm { padding: 0.6em 1.1em; font-size: var(--fs-sm); }

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ---- Site header ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-block: 0.6rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6em;
  text-decoration: none;
  color: var(--color-primary);
}
.brand img {
  height: clamp(38px, 3.4vw + 24px, 52px);
  width: auto;
}
.brand:hover { color: var(--color-primary); }

.main-nav {
  display: none;
}
.main-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 0.6rem + 1.2vw, 1.75rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-primary);
  text-decoration: none;
  padding: 0.4em 0.1em;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 0.3rem + 0.6vw, 0.9rem);
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  color: var(--color-primary);
  text-decoration: none;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition);
  flex-shrink: 0;
}
.icon-link:hover,
.icon-link:focus-visible {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}
.icon-link svg { width: 20px; height: 20px; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-primary);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (min-width: 900px) {
  .main-nav { display: block; }
  .nav-toggle { display: none; }
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--color-border);
  background: var(--color-white);
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: var(--space-sm) 0;
  display: flex;
  flex-direction: column;
}
.mobile-nav a {
  display: block;
  padding: 0.75em 0;
  font-family: var(--font-label);
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
}
.mobile-nav li:last-child a { border-bottom: none; }

@media (min-width: 900px) {
  .mobile-nav { display: none !important; }
}

/* ---- Hero -------------------------------------------------------------------- */
.hero {
  background:
    linear-gradient(120deg, rgba(23,50,77,0.94), rgba(23,50,77,0.86)),
    linear-gradient(120deg, #17324D 0%, #1f4266 100%);
  color: var(--color-white);
  padding-block: clamp(3rem, 2.2rem + 4vw, 6.5rem);
}
.hero__grid {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
}
@media (min-width: 960px) {
  .hero__grid { grid-template-columns: 1.15fr 0.85fr; }
}
.hero h1 { color: var(--color-white); margin-bottom: var(--space-sm); }
.hero__lead {
  font-size: var(--fs-lead);
  color: rgba(255,255,255,0.9);
  max-width: 46ch;
}
.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
  margin: var(--space-md) 0;
  padding: 0;
  list-style: none;
}
.hero__badges li {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--color-white);
  font-family: var(--font-label);
  font-weight: 600;
  font-size: var(--fs-sm);
  padding: 0.5em 0.9em;
  border-radius: 999px;
}
.hero__badges svg { width: 16px; height: 16px; color: var(--color-secondary); flex-shrink: 0; }

.hero__panel {
  background: var(--color-white);
  color: var(--color-text);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-md);
}
.hero__panel h2 { font-size: var(--fs-h4); margin-bottom: var(--space-xs); }
.hero__panel p { color: #4b5a63; }
.hero__contact-list {
  list-style: none;
  margin: var(--space-sm) 0;
  padding: 0;
  display: grid;
  gap: 0.6em;
}
.hero__contact-list a {
  display: flex;
  align-items: center;
  gap: 0.6em;
  text-decoration: none;
  font-family: var(--font-label);
  font-weight: 600;
  color: var(--color-primary);
}
.hero__contact-list svg { width: 20px; height: 20px; color: var(--color-accent); flex-shrink: 0; }

/* ---- Trust strip --------------------------------------------------------------- */
.trust-strip {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--space-md);
}
.trust-strip__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-lg);
  align-items: center;
  justify-content: space-between;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-primary);
}
.trust-item svg { width: 22px; height: 22px; color: var(--color-accent); flex-shrink: 0; }

/* ---- Cards ------------------------------------------------------------------- */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  height: 100%;
}
.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-alt);
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { font-size: var(--fs-h5); }
.card ul { margin: var(--space-xs) 0 0; padding-left: 1.1em; }
.card li { margin-bottom: 0.4em; }
.card li:last-child { margin-bottom: 0; }

.section--dark .card {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.92);
}
.section--dark .card h3 { color: var(--color-white); }
.section--dark .card__icon { background: rgba(255,255,255,0.12); color: var(--color-secondary); }

/* ---- About / experience --------------------------------------------------- */
.about-grid {
  display: grid;
  gap: var(--space-lg);
  align-items: start;
}
@media (min-width: 900px) {
  .about-grid { grid-template-columns: 1fr 1fr; }
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 3px solid var(--color-secondary);
}
.timeline li {
  position: relative;
  padding: 0 0 var(--space-md) var(--space-md);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 4px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid var(--color-white);
  box-shadow: 0 0 0 1px var(--color-secondary);
}
.timeline .timeline__meta {
  display: block;
  font-family: var(--font-label);
  font-weight: 700;
  color: var(--color-accent);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15em;
}
.timeline h3 { font-size: var(--fs-h5); margin-bottom: 0.2em; }

.credential-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75em;
}
.credential-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7em;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.9em 1em;
}
.credential-list svg {
  width: 24px; height: 24px;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 0.1em;
}
.credential-list strong { display: block; color: var(--color-primary); font-family: var(--font-label); }

/* ---- Service areas ----------------------------------------------------------- */
.area-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
}
.area-list li {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.5em 1.1em;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-primary);
}

/* ---- Clients ------------------------------------------------------------------ */
.client-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-sm);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.client-list li {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  gap: 0.7em;
  font-family: var(--font-label);
  font-weight: 700;
  color: var(--color-primary);
}
.client-list svg { width: 22px; height: 22px; color: var(--color-secondary-dark); flex-shrink: 0; }
.client-list span.role {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  color: #4b5a63;
  font-size: var(--fs-sm);
}

/* ---- FAQ accordion --------------------------------------------------------- */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm) 0.2em;
  font-family: var(--font-label);
  font-weight: 700;
  color: var(--color-primary);
  font-size: var(--fs-h6);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), background-color var(--transition);
}
.faq-item .faq-icon svg { width: 14px; height: 14px; color: var(--color-accent); }
.faq-item[open] .faq-icon { transform: rotate(45deg); background: var(--color-surface-alt); }
.faq-item p {
  padding: 0 0.2em var(--space-sm) 0.2em;
  color: #4b5a63;
  max-width: 70ch;
}

/* ---- Contact ------------------------------------------------------------------ */
.contact-grid {
  display: grid;
  gap: var(--space-lg);
}
@media (min-width: 960px) {
  .contact-grid { grid-template-columns: 0.9fr 1.1fr; }
}
.contact-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}
.field {
  margin-bottom: var(--space-sm);
}
.field label {
  display: block;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-primary);
  margin-bottom: 0.4em;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75em 0.9em;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-text);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--color-focus);
}
.field-hint { font-size: var(--fs-sm); color: #64727a; margin-top: 0.3em; }
.form-status {
  margin-top: var(--space-sm);
  padding: 0.8em 1em;
  border-radius: var(--radius-sm);
  font-family: var(--font-label);
  font-weight: 600;
  font-size: var(--fs-sm);
  display: none;
}
.form-status.is-success {
  display: block;
  background: #e5f4e9;
  color: #276238;
  border: 1px solid #b7ddc2;
}
.form-status.is-error {
  display: block;
  background: #fdecea;
  color: #92311c;
  border: 1px solid #f2c0b6;
}
.consent-field {
  display: flex;
  align-items: flex-start;
  gap: 0.6em;
}
.consent-field input { width: auto; margin-top: 0.3em; }
.consent-field label { font-weight: 400; font-family: var(--font-body); }

/* ---- Footer -------------------------------------------------------------------- */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.82);
  padding-block: var(--space-lg) var(--space-md);
}
.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: var(--color-secondary); }
.footer-grid {
  display: grid;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
}
.footer-brand p { color: rgba(255,255,255,0.7); max-width: 40ch; }
.footer-heading {
  font-family: var(--font-label);
  font-weight: 700;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: var(--fs-sm);
  margin-bottom: var(--space-sm);
}
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6em; }
.footer-list svg { width: 16px; height: 16px; margin-right: 0.4em; vertical-align: -2px; color: var(--color-secondary); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em var(--space-md);
  justify-content: space-between;
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.65);
}
.footer-bottom .legal-links { display: flex; gap: 1em; flex-wrap: wrap; }

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: var(--fs-sm);
}

/* ---- Utility --------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-lg { margin-top: var(--space-lg); }
.sticky-call {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 400;
  display: flex;
  background: var(--color-primary);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.18);
}
.sticky-call a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.9em 0.5em;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: var(--fs-sm);
  text-decoration: none;
  color: var(--color-white);
}
.sticky-call a:first-child { background: var(--color-accent); }
.sticky-call a:last-child { background: #22c55e; }
.sticky-call svg { width: 18px; height: 18px; }

@media (min-width: 900px) {
  .sticky-call { display: none; }
}
body { padding-bottom: 0; }
@media (max-width: 899px) {
  body { padding-bottom: 62px; }
}

/* Legal / policy page */
.policy-content h2 { margin-top: var(--space-lg); }
.policy-content h2:first-child { margin-top: 0; }
.policy-content ul { margin-bottom: var(--space-sm); }
.policy-content { max-width: 840px; margin: 0 auto; }
.updated-note {
  font-size: var(--fs-sm);
  color: #64727a;
  margin-bottom: var(--space-lg);
}

/* ==========================================================================
   Motion — hero load-in, scroll reveal, hover lift, header scroll shadow
   All gated behind prefers-reduced-motion so nothing is ever stuck hidden.
   ========================================================================== */

/* Sticky header gains a shadow once the page has scrolled */
.site-header { transition: box-shadow 220ms ease; }
.site-header--scrolled { box-shadow: 0 4px 18px rgba(23, 50, 77, 0.14); }

/* Hero load-in: staggered fade + rise for the text column and quote panel.
   Wrapped in the media query so with reduced motion everything just shows. */
@media (prefers-reduced-motion: no-preference) {
  .hero-anim > * {
    opacity: 0;
    transform: translateY(20px);
    animation: heroIn 700ms ease forwards;
  }
  .hero-anim > *:nth-child(1) { animation-delay: 60ms; }
  .hero-anim > *:nth-child(2) { animation-delay: 160ms; }
  .hero-anim > *:nth-child(3) { animation-delay: 260ms; }
  .hero-anim > *:nth-child(4) { animation-delay: 360ms; }
  .hero-anim > *:nth-child(5) { animation-delay: 460ms; }

  .hero-anim-panel {
    opacity: 0;
    transform: translateY(24px);
    animation: heroIn 700ms ease forwards;
    animation-delay: 320ms;
  }

  @keyframes heroIn {
    to { opacity: 1; transform: none; }
  }

  /* Slow ambient shift behind the hero copy */
  .hero {
    background-size: 160% 160%;
    animation: heroGradient 22s ease-in-out infinite;
  }
  @keyframes heroGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
  }
}

/* Scroll reveal: JS adds "reveal-ready" to <html> only when it will manage
   the reveal (and only when motion is allowed), then toggles "is-visible"
   per element via IntersectionObserver. Without that class every .reveal
   element is simply visible — so a JS failure never hides content. */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 650ms ease, transform 650ms ease;
}
.reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Staggered cascade for grouped reveals (service cards, town chips, client
   list, credentials, timeline) so groups animate in as a wave, not at once */
.grid > .reveal:nth-child(2),
.area-list > .reveal:nth-child(2),
.client-list > .reveal:nth-child(2),
.credential-list > .reveal:nth-child(2),
.timeline > .reveal:nth-child(2) { transition-delay: 70ms; }

.grid > .reveal:nth-child(3),
.area-list > .reveal:nth-child(3),
.client-list > .reveal:nth-child(3),
.credential-list > .reveal:nth-child(3),
.timeline > .reveal:nth-child(3) { transition-delay: 140ms; }

.grid > .reveal:nth-child(4),
.area-list > .reveal:nth-child(4),
.client-list > .reveal:nth-child(4),
.credential-list > .reveal:nth-child(4),
.timeline > .reveal:nth-child(4) { transition-delay: 210ms; }

.grid > .reveal:nth-child(5),
.area-list > .reveal:nth-child(5) { transition-delay: 280ms; }

.grid > .reveal:nth-child(6),
.area-list > .reveal:nth-child(6) { transition-delay: 350ms; }

.grid > .reveal:nth-child(7),
.area-list > .reveal:nth-child(7) { transition-delay: 420ms; }

.grid > .reveal:nth-child(8),
.area-list > .reveal:nth-child(8) { transition-delay: 490ms; }

.grid > .reveal:nth-child(9),
.area-list > .reveal:nth-child(9) { transition-delay: 560ms; }

.area-list > .reveal:nth-child(10) { transition-delay: 630ms; }
.area-list > .reveal:nth-child(11) { transition-delay: 700ms; }
.area-list > .reveal:nth-child(12) { transition-delay: 770ms; }

/* Hover lift / interactivity for cards and list chips */
.card {
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-secondary);
}
.card__icon { transition: transform 220ms ease, background-color 220ms ease; }
.card:hover .card__icon { transform: scale(1.08) rotate(-4deg); background: var(--color-secondary); color: var(--color-primary-dark); }

.credential-list li,
.client-list li {
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.credential-list li:hover,
.client-list li:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
  border-color: var(--color-secondary);
}

.area-list li {
  transition: transform 220ms ease, background-color 220ms ease, color 220ms ease, border-color 220ms ease;
}
.area-list li:hover {
  transform: translateY(-3px);
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: var(--color-primary-dark);
}

.trust-item svg { transition: transform 220ms ease; }
.trust-item:hover svg { transform: scale(1.15); }

/* Footer logo — sits on a light plate so the navy logo stays visible
   against the dark footer background */
.footer-logo-badge {
  display: inline-block;
  background: var(--color-white);
  padding: 0.7em 1em;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  box-shadow: var(--shadow-sm);
}
.footer-logo-badge img { height: 40px; margin: 0; display: block; }
