:root {
   --bg: #f3f5f6;
   --surface: #ffffff;
   --ink: #1d2935;
   --muted: #64748b;
   --brand: #6495ed;
   --brand-dark: #3a6fd8;
   --accent: #ffa500;
   --line: #dbe2ea;
   --header-offset: 88px;

   /* Elevation */
   --shadow-xs: 0 1px 2px rgba(29, 41, 53, 0.06);
   --shadow-sm: 0 2px 6px rgba(29, 41, 53, 0.08), 0 1px 2px rgba(29, 41, 53, 0.04);
   --shadow-md: 0 4px 14px rgba(29, 41, 53, 0.10), 0 2px 4px rgba(29, 41, 53, 0.05);
   --shadow-lg: 0 8px 24px rgba(29, 41, 53, 0.12), 0 3px 6px rgba(29, 41, 53, 0.06);

   /* Transitions */
   --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
   --t-fast: 150ms;
   --t-base: 220ms;
}

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

html {
   scroll-behavior: smooth;
   scroll-padding-top: var(--header-offset);
}

section[id],
footer[id] {
   scroll-margin-top: var(--header-offset);
}

body {
   margin: 0;
   font-family: "Raleway", sans-serif;
   font-size: 1.5rem;
   background: linear-gradient(180deg, #eaf0fb 0%, #f8fafc 40%, #f3f5f6 100%);
   color: var(--ink);
   line-height: 1.55;
}

a {
   color: var(--brand-dark);
}

a:hover,
a:focus {
   color: var(--accent);
}

.container {
   width: min(1080px, 92%);
   margin: 0 auto;
}

.section {
   padding: 2.75rem 0;
}

.section-muted {
   background: #edf1fb;
   border-top: 1px solid var(--line);
   border-bottom: 1px solid var(--line);
}

.bio-layout {
   display: flex;
   gap: 2rem;
   align-items: flex-start;
}

.bio-photo {
   width: 200px;
   height: 200px;
   object-fit: cover;
   object-position: center top;
   border-radius: 50%;
   flex-shrink: 0;
}

.bio-text {
   flex: 1;
}

.bio-layout--secondary {
   margin-top: 2rem;
}

.bio-photo-pair {
   display: flex;
   width: 400px;
   height: 200px;
   border-radius: 12px;
   overflow: hidden;
   flex-shrink: 0;
}

.bio-photo-pair img {
   width: 50%;
   height: 100%;
   object-fit: cover;
   object-position: center top;
}

@media (max-width: 600px) {
   .bio-layout {
      flex-direction: column;
      align-items: center;
   }

   .bio-photo-pair {
      width: 300px;
      height: 150px;
   }
}

h1,
h2,
h3 {
   margin: 0 0 0.8rem 0;
}

h1 {
   font-size: clamp(1.8rem, 5vw, 2.6rem);
   line-height: 1.15;
}

h2 {
   font-size: clamp(1.5rem, 3.4vw, 2rem);
}

h3 {
   font-size: 1.5rem;
}

p {
   margin: 0 0 1rem 0;
}

ul {
   margin: 0;
   padding-left: 1.1rem;
}

@keyframes water-flow {
   0%   { background-position: 0% 50%; }
   50%  { background-position: 100% 50%; }
   100% { background-position: 0% 50%; }
}

.strapline-bar {
   background: linear-gradient(
      120deg,
      #a8d4f5 0%,
      #ffffff 25%,
      #6495ed 50%,
      #cce8ff 75%,
      #a8d4f5 100%
   );
   background-size: 300% 300%;
   animation: water-flow 6s ease infinite;
   color: #1d2935;
   text-align: center;
   font-size: 1.5rem;
   letter-spacing: 0.05em;
   padding: 0.7rem 1rem;
   font-style: italic;
   font-weight: 600;
}

.site-header {
   position: sticky;
   top: 0;
   z-index: 30;
   background: #6495ed;
   backdrop-filter: blur(6px);
   border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.topbar {
   min-height: 68px;
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 1rem;
}

.brand {
   color: #ffffff;
   text-decoration: none;
   font-weight: 700;
   letter-spacing: 0.2px;
}

.brand:hover,
.brand:focus {
   color: #ffa500;
}

.nav-toggle {
   width: 44px;
   height: 44px;
   display: inline-flex;
   flex-direction: column;
   justify-content: center;
   gap: 5px;
   border: 1px solid rgba(255, 255, 255, 0.25);
   border-radius: 10px;
   background: transparent;
   padding: 0 10px;
   cursor: pointer;
}

.nav-toggle span {
   display: block;
   width: 100%;
   height: 2px;
   background: #ffffff;
   transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
   transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
   opacity: 0;
   transform: scaleX(0);
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
   transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
   position: absolute;
   top: 68px;
   left: 0;
   right: 0;
   display: flex;
   flex-direction: column;
   gap: 0;
   background: #4a7be0;
   border-bottom: 1px solid rgba(255, 255, 255, 0.2);
   max-height: 0;
   opacity: 0;
   overflow: hidden;
   visibility: hidden;
   transition: max-height 0.3s ease, opacity 0.2s ease, visibility 0s linear 0.3s;
}

.site-nav.open {
   max-height: 400px;
   opacity: 1;
   visibility: visible;
   transition: max-height 0.3s ease, opacity 0.2s ease, visibility 0s linear 0s;
}

.site-nav a {
   color: #e2e8f0;
   text-decoration: none;
   padding: 0.95rem 1rem;
   border-top: 1px solid rgba(255, 255, 255, 0.08);
   font-weight: bold;
}

.site-nav a:hover,
.site-nav a:focus {
   color: #ffffff;
   background: #ffa500;
}

.hero {
   padding-top: 4rem;
   padding-bottom: 4rem;
   text-align: center;
   background: linear-gradient(
      135deg,
      #c8deff 0%,
      #edf4ff 25%,
      #f8fbff 50%,
      #dce9fd 75%,
      #c8deff 100%
   );
   background-size: 400% 400%;
   animation: hero-drift 16s ease infinite;
   border-bottom: 3px solid #6495ed;
}

@keyframes hero-drift {
   0%   { background-position: 0% 50%; }
   50%  { background-position: 100% 50%; }
   100% { background-position: 0% 50%; }
}

.subhead {
   font-size: clamp(1.5rem, 2.8vw, 1.9rem);
   color: var(--muted);
}

.hero-title {
   font-size: clamp(2.4rem, 7vw, 3.8rem);
   line-height: 1.1;
   color: #1d2935;
   margin-bottom: 0.6rem;
}

.hero-sub {
   font-size: clamp(1.2rem, 2.5vw, 1.6rem);
   color: #6495ed;
   font-weight: 700;
   letter-spacing: 0.3px;
   margin-bottom: 1.5rem;
}

.hero-email {
   margin: 0.5rem 0 1.25rem;
}

.hero-email a {
   display: inline-flex;
   align-items: center;
   gap: 0.5rem;
   background: rgba(100, 149, 237, 0.1);
   border: 1px solid rgba(100, 149, 237, 0.35);
   border-radius: 999px;
   padding: 0.95rem 1.5rem;
   font-size: 1.7rem;
   font-weight: 700;
   color: var(--brand-dark);
   text-decoration: none;
   letter-spacing: 0.2px;
}

.hero-email a:hover,
.hero-email a:focus {
   background: #ffa500;
   border-color: #ffa500;
   color: #ffffff;
}

.contact-line {
   margin-bottom: 0.25rem;
}

.cta-row {
   display: flex;
   flex-wrap: wrap;
   justify-content: center;
   gap: 0.75rem;
   margin: 1.25rem 0 1.5rem 0;
}

.button-link {
   display: inline-block;
   text-decoration: none;
   background: var(--brand);
   color: #ffffff;
   font-weight: 700;
   border-radius: 10px;
   padding: 0.75rem 1rem;
}

.button-link:hover,
.button-link:focus {
   background: #ffa500;
   color: #ffffff;
}

.button-secondary {
   background: #334155;
}

.button-secondary:hover,
.button-secondary:focus {
   background: #1e293b;
}

.cta-center {
   text-align: center;
}

.button-cta {
   display: inline-flex;
   align-items: center;
   gap: 0.5rem;
   font-size: 1.7rem;
   padding: 0.95rem 1.5rem;
}

.cta-icon {
   line-height: 1;
}

.value-grid {
   display: grid;
   grid-template-columns: 1fr;
   gap: 0.7rem;
}

.value-card {
   background: var(--surface);
   border: 1px solid var(--line);
   border-left: 6px solid var(--brand);
   border-radius: 10px;
   padding: 0.85rem;
   font-weight: 700;
}

.value-card-wide {
   grid-column: 1 / -1;
   text-align: center;
}

.checkatrade-panel {
   background: #eaf3ff;
   border: 2px solid #005bbb;
   border-radius: 12px;
   padding: 1rem;
   color: #0f172a;
}

.checkatrade-link {
   font-weight: 700;
   word-break: break-word;
   color: #005bbb;
}

.checkatrade-link-wrap {
   text-align: center;
}

.checkatrade-rating {
   font-weight: 700;
}

.checkatrade-benefits {
   display: grid;
   grid-template-columns: 1fr;
   gap: 0.6rem;
   margin-top: 0.8rem;
}

.check-badge {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 100%;
   padding: 0.55rem 0.8rem;
   border-radius: 999px;
   background: #e11d48;
   color: #ffffff;
   font-weight: 700;
   text-align: center;
}

.cards {
   display: grid;
   grid-template-columns: 1fr;
   gap: 1rem;
}

.badge-row {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
   gap: 0.6rem;
   margin: 1rem 0 1.2rem 0;
}

.service-badge {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 100%;
   padding: 0.45rem 0.8rem;
   border-radius: 999px;
   color: #fff;
   font-weight: 700;
   line-height: 1.2;
}

.service-badge:nth-child(6n + 1) {
   background: #6495ed;
}

.service-badge:nth-child(6n + 2) {
   background: #2563eb;
}

.service-badge:nth-child(6n + 3) {
   background: #7c3aed;
}

.service-badge:nth-child(6n + 4) {
   background: #be185d;
}

.service-badge:nth-child(6n + 5) {
   background: #ea580c;
}

.service-badge:nth-child(6n) {
   background: #15803d;
}

.card {
   background: var(--surface);
   border: 1px solid var(--line);
   border-radius: 12px;
   padding: 1rem;
}

.card-wide {
   grid-column: 1 / -1;
}

.site-footer {
   background: #111827;
   color: #dbe5f0;
   padding: 2.25rem 0;
   margin-top: 1rem;
}

.site-footer h2 {
   color: #ffffff;
}

.site-footer a {
   color: #93c5fd;
}

.site-footer a:hover,
.site-footer a:focus {
   color: #bfdbfe;
}

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

   .site-nav {
      position: static;
      display: flex;
      flex-direction: row;
      background: transparent;
      border-bottom: 0;
      gap: 0.35rem;
      max-height: none;
      opacity: 1;
      visibility: visible;
      overflow: visible;
   }

   .site-nav a {
      border-top: 0;
      border-radius: 8px;
      padding: 0.55rem 0.75rem;
   }

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

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

   .checkatrade-benefits {
      grid-template-columns: repeat(2, minmax(0, 1fr));
   }
}

/* =====================================================
   POLISH — subtle yet impressive
   ===================================================== */

/* Stage 2 — Universal transition base */
a,
.button-link,
.button-cta,
.button-secondary,
.value-card,
.card,
.bio-photo,
.bio-photo-pair,
.service-badge,
.site-nav a,
.checkatrade-panel {
   transition:
      background-color var(--t-base) var(--ease-out),
      border-color     var(--t-base) var(--ease-out),
      color            var(--t-base) var(--ease-out),
      box-shadow       var(--t-base) var(--ease-out),
      transform        var(--t-base) var(--ease-out),
      opacity          var(--t-fast) var(--ease-out);
}

/* Stage 3 — Header: true frosted glass */
.site-header {
   background: rgba(100, 149, 237, 0.88);
   backdrop-filter: blur(12px);
   -webkit-backdrop-filter: blur(12px);
   box-shadow: var(--shadow-sm);
}

.site-header::after {
   content: "";
   position: absolute;
   bottom: -6px;
   left: 0;
   right: 0;
   height: 6px;
   background: linear-gradient(to bottom, rgba(29, 41, 53, 0.06), transparent);
   pointer-events: none;
}

.site-nav a:hover,
.site-nav a:focus {
   transform: translateY(-1px);
}

/* Stage 4 — Buttons */
.button-link {
   box-shadow: var(--shadow-sm);
   transform: translateY(0);
}

.button-link:hover,
.button-link:focus {
   box-shadow: var(--shadow-md);
   transform: translateY(-2px);
}

.button-link:active {
   transform: translateY(0);
   box-shadow: var(--shadow-xs);
}

.hero-email a {
   box-shadow: var(--shadow-xs);
   transform: translateY(0);
}

.hero-email a:hover,
.hero-email a:focus {
   box-shadow: var(--shadow-md);
   transform: translateY(-2px);
}

/* Stage 5 — Value cards */
.value-card {
   box-shadow: var(--shadow-xs);
   transform: translateY(0);
}

.value-card:hover {
   box-shadow: var(--shadow-md);
   transform: translateY(-3px);
   border-left-color: var(--accent);
}

/* Stage 6 — Service cards */
.card {
   box-shadow: var(--shadow-sm);
   border-top: 3px solid var(--brand);
   transform: translateY(0);
}

.card:hover {
   box-shadow: var(--shadow-lg);
   transform: translateY(-4px);
   border-top-color: var(--accent);
}

/* Stage 7 — Section h2 accent rule */
.section h2,
.section-muted h2 {
   position: relative;
   padding-bottom: 0.6rem;
   margin-bottom: 1.2rem;
}

.section h2::after,
.section-muted h2::after {
   content: "";
   position: absolute;
   bottom: 0;
   left: 0;
   width: 2.5rem;
   height: 3px;
   background: var(--accent);
   border-radius: 2px;
}

.hero h2::after,
.site-footer h2::after {
   display: none;
}

.hero h2 {
   background: linear-gradient(
      90deg,
      var(--ink) 0%,
      var(--ink) 30%,
      var(--brand) 50%,
      var(--ink) 70%,
      var(--ink) 100%
   );
   background-size: 200% auto;
   -webkit-background-clip: text;
   background-clip: text;
   -webkit-text-fill-color: transparent;
   animation: fast-sweep 1.8s linear infinite;
   letter-spacing: -0.01em;
}

@keyframes fast-sweep {
   0%   { background-position: 200% center; }
   100% { background-position: -200% center; }
}

/* Stage 8 — Bio photos */
.bio-photo {
   border: 3px solid rgba(100, 149, 237, 0.35);
   box-shadow: var(--shadow-sm);
   transform: translateY(0);
}

.bio-photo:hover {
   border-color: var(--brand);
   box-shadow: var(--shadow-md);
   transform: translateY(-2px) scale(1.015);
}

.bio-photo-pair {
   box-shadow: var(--shadow-sm);
   border: 1px solid var(--line);
   transform: translateY(0);
}

.bio-photo-pair:hover {
   box-shadow: var(--shadow-md);
   transform: translateY(-2px);
}

/* Stage 9 — Service badges */
.service-badge {
   box-shadow: var(--shadow-xs);
}

.service-badge:hover {
   box-shadow: var(--shadow-sm);
   transform: translateY(-1px) scale(1.02);
   filter: brightness(1.08);
}

/* Stage 10 — Checkatrade panel */
.checkatrade-panel {
   box-shadow: var(--shadow-sm);
}

.checkatrade-panel:hover {
   box-shadow: var(--shadow-md);
   transform: translateY(-2px);
}

/* Stage 11 — Footer links */
.site-footer a:hover,
.site-footer a:focus {
   color: var(--accent);
   text-decoration: underline;
}

/* Hero tap illustration */
.hero-tap {
   display: flex;
   justify-content: center;
   margin-bottom: 1.5rem;
}

.tap-svg {
   width: 113px;
   height: auto;
   filter: drop-shadow(0 4px 10px rgba(100, 149, 237, 0.25));
}

@keyframes tap-drip {
   0%   { transform: translateY(0);   opacity: 0.8; }
   80%  { transform: translateY(28px); opacity: 0.4; }
   100% { transform: translateY(34px); opacity: 0; }
}

@keyframes stream-sway {
   0%, 100% { d: path("M83 64 Q82 80 84 96"); }
   50%       { d: path("M83 64 Q85 80 83 96"); }
}

.tap-drop-1 {
   animation: tap-drip 1.6s ease-in infinite;
}

.tap-drop-2 {
   animation: tap-drip 1.6s ease-in 0.55s infinite;
}

.tap-drop-3 {
   animation: tap-drip 1.6s ease-in 1.1s infinite;
}

.tap-stream {
   animation: stream-sway 2.4s ease-in-out infinite;
}

.tap-water {
   transition: opacity 0.5s var(--ease-out);
}

.hero-tap:hover .tap-water {
   opacity: 0;
}

.hero-tap:hover .tap-drop-1,
.hero-tap:hover .tap-drop-2,
.hero-tap:hover .tap-drop-3 {
   animation-play-state: paused;
}

.hero-tap:hover .tap-stream {
   animation-play-state: paused;
}

.tap-caption {
   display: inline-block;
   font-size: 1.56rem;
   font-style: italic;
   font-weight: 600;
   color: #fff;
   background: var(--brand);
   padding: 0.4rem 1rem;
   border-radius: 999px;
   letter-spacing: 0.03em;
   margin: 0 0 1rem;
   box-shadow: var(--shadow-sm);
}

/* Stage 12 — Reduced-motion guard */
@media (prefers-reduced-motion: reduce) {
   *,
   *::before,
   *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      transition-delay: 0ms !important;
   }
}
