/*
 * Washmates site styles (index.html, privacy.html, 404.html).
 *
 * Mobile-first, no framework. Palette is "freshly rinsed": mist background, deep water ink,
 * a working water blue for actions, and moss green used only where it means dirt. The one
 * expressive element is the hero's paving patch being rinsed clean (.rinse); everything else
 * stays quiet.
 */

:root {
  --mist: #f1f7f7;
  --white: #ffffff;
  --ink: #0f2a30;
  --ink-soft: #3f5a60;
  --water: #0b6e8a;
  --water-deep: #08546a;
  --spray: #cdeef3;
  --stone: #dfe2da;
  --moss: #6b8f3a;
  --error: #b42318;
  --error-bg: #fdecea;
  --line: #c9dadc;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-s: 6px;
  --radius-m: 12px;
  --gutter: 16px;
  color-scheme: light;
}

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

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

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

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font: 17px/1.6 var(--font-body);
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  font-weight: 750;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--water);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--water-deep);
}

/* One focus style everywhere: thick, offset, never removed. */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  background: var(--ink);
  color: var(--white);
  padding: 10px 14px;
  border-radius: var(--radius-s);
  z-index: 100;
}

.skip-link:focus {
  top: 8px;
  color: var(--white);
}

/* Owner placeholders: deliberately loud so none ship unnoticed. */
.ph {
  background: #fff3a8;
  color: #5c4600;
  outline: 1px dashed #b38f00;
  padding: 0 3px;
  border-radius: 3px;
  font-weight: 600;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font: 700 1rem/1.2 var(--font-body);
  background: var(--water);
  color: var(--white);
  text-decoration: none;
  border: 2px solid var(--water);
  border-radius: 999px;
  padding: 0.7em 1.3em;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn:hover {
  background: var(--water-deep);
  border-color: var(--water-deep);
  color: var(--white);
}

.btn:disabled {
  opacity: 0.7;
  cursor: progress;
}

.btn--small {
  font-size: 0.9rem;
  padding: 0.5em 1em;
}

.btn--large {
  font-size: 1.1rem;
  padding: 0.85em 1.6em;
  min-height: 52px;
}

.btn--block {
  width: 100%;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
}

/* Spinner shown while the form is sending. */
.btn[aria-busy="true"] .btn__label::after {
  content: "";
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-left: 0.6em;
  vertical-align: -0.1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.linkish {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- Top bar ---------- */

.topbar {
  background: var(--mist);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.brand:hover {
  color: var(--ink);
}

.brand__mark {
  width: 28px;
  height: 28px;
  color: var(--water);
}

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

.hero {
  padding: 40px 0 48px;
}

.hero__inner {
  display: grid;
  gap: 32px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 1.4rem + 5vw, 4.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  max-width: 13ch;
}

.hero__lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 34rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin: 24px 0 16px;
}

.hero__secondary {
  font-weight: 600;
}

.hero__area {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0;
}

/*
 * The rinse patch. Two identical paving grids stacked: grimy underneath, clean on top.
 * The clean layer's clip-path sweeps from the right edge to leave a before/after split,
 * with a thin spray bar riding the edge. Runs once on load; reduced motion shows the end state.
 */
.rinse {
  --split: 42%;
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(15, 42, 48, 0.45);
}

.rinse__slabs {
  position: absolute;
  inset: 0;
  /* Grout lines: staggered paving, drawn with gradients so there is no image to download. */
  background-image:
    linear-gradient(to bottom, transparent calc(100% - 3px), var(--grout) 0),
    linear-gradient(to right, transparent calc(100% - 3px), var(--grout) 0);
  background-size: 100% 25%, 33.333% 50%;
}

.rinse__slabs--dirty {
  --grout: #3f4a33;
  background-color: #8b8d74;
  background-image:
    radial-gradient(ellipse 18% 12% at 20% 30%, rgba(107, 143, 58, 0.85), transparent 70%),
    radial-gradient(ellipse 22% 14% at 70% 70%, rgba(84, 110, 45, 0.8), transparent 70%),
    radial-gradient(ellipse 14% 10% at 45% 85%, rgba(60, 64, 45, 0.7), transparent 70%),
    radial-gradient(ellipse 16% 12% at 85% 20%, rgba(107, 143, 58, 0.7), transparent 70%),
    radial-gradient(ellipse 10% 8% at 10% 75%, rgba(60, 64, 45, 0.6), transparent 70%),
    linear-gradient(to bottom, transparent calc(100% - 3px), var(--grout) 0),
    linear-gradient(to right, transparent calc(100% - 3px), var(--grout) 0);
  background-size: auto, auto, auto, auto, auto, 100% 25%, 33.333% 50%;
}

.rinse__slabs--clean {
  --grout: #b9bdb1;
  background-color: var(--stone);
  clip-path: inset(0 0 0 var(--split));
  animation: rinse 2.2s cubic-bezier(0.6, 0, 0.2, 1) 0.3s both;
}

.rinse__wand {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 6px;
  margin-left: -3px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.95), transparent);
  box-shadow: 0 0 18px 6px var(--spray);
  animation: wand 2.2s cubic-bezier(0.6, 0, 0.2, 1) 0.3s both;
}

.rinse__tag {
  position: absolute;
  bottom: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.rinse__tag--before {
  left: 12px;
}

.rinse__tag--after {
  right: 12px;
}

@keyframes rinse {
  from {
    clip-path: inset(0 0 0 100%);
  }
  to {
    clip-path: inset(0 0 0 var(--split));
  }
}

@keyframes wand {
  from {
    left: 100%;
  }
  to {
    left: var(--split);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rinse__slabs--clean,
  .rinse__wand {
    animation: none;
  }
}

/* ---------- Sections ---------- */

.section {
  padding: 56px 0;
}

.section--tint {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Services: rows with an icon, not a card grid. */
.services {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}

.service {
  display: grid;
  align-content: start; /* keep icon and text together when a row is taller */
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.service__icon {
  width: 48px;
  height: 48px;
  color: var(--water);
}

.service h3 {
  margin-bottom: 0.3em;
}

.service p {
  margin: 0;
  color: var(--ink-soft);
}

.services__note {
  margin: 20px 0 0;
  font-weight: 600;
}

/* Steps: numbered because it is a real sequence. */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 28px;
}

.step {
  counter-increment: step;
  position: relative;
  padding-left: 60px;
}

.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -4px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--spray);
  color: var(--water-deep);
  font: 800 1.25rem/1 var(--font-display);
}

.step p {
  margin: 0;
  color: var(--ink-soft);
}

/* Why */
.why__list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.why__list li {
  padding-left: 20px;
  border-left: 4px solid var(--water);
  color: var(--ink-soft);
}

.why__list strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
}

/* ---------- Form ---------- */

.section--form {
  background: var(--ink);
  color: var(--white);
  scroll-margin-top: 60px;
}

.section--form:focus {
  outline: none;
}

.section--form :focus-visible {
  outline-color: var(--spray);
}

.form-intro p {
  color: #cfe0e3;
  max-width: 34rem;
}

.form-card {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-m);
  padding: 22px 18px;
  margin-top: 8px;
}

.form-card :focus-visible {
  outline-color: var(--ink);
}

.field {
  margin: 0 0 18px;
  min-width: 0;
}

fieldset.field {
  border: 0;
  padding: 0;
}

.field label,
.field legend {
  display: block;
  font-weight: 650;
  margin-bottom: 6px;
  padding: 0;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"] {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 2px solid #9fb4b8;
  border-radius: var(--radius-s);
  padding: 11px 12px;
  min-height: 48px;
}

.field input:focus-visible {
  border-color: var(--water);
  outline: 3px solid var(--spray);
  outline-offset: 0;
}

.field input[aria-invalid="true"] {
  border-color: var(--error);
}

#postcode {
  text-transform: uppercase;
}

.field-row {
  display: grid;
  gap: 0 16px;
}

.choices {
  display: grid;
  gap: 8px;
}

.field .choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 500;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius-s);
  cursor: pointer;
  margin: 0;
}

.choice:has(input:checked) {
  border-color: var(--water);
  background: #eef8fa;
}

.choice input {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--water);
}

.field .choice--consent {
  border: 0;
  padding: 0;
  font-size: 0.95rem;
}

.choice--consent:has(input:checked) {
  background: none;
}

.field[data-invalid="true"] .choice {
  border-color: var(--error);
}

.field__error {
  color: var(--error);
  font-size: 0.92rem;
  font-weight: 600;
  margin: 6px 0 0;
}

.field__error:empty {
  display: none;
}

.form-alert {
  background: var(--error-bg);
  color: var(--error);
  border-left: 4px solid var(--error);
  padding: 12px 14px;
  border-radius: var(--radius-s);
  margin-bottom: 18px;
  font-weight: 600;
}

/* Honeypot: off-screen rather than display:none, so naive bots still see and fill it. */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.thanks {
  text-align: center;
  padding: 16px 4px;
}

.thanks:focus {
  outline: none;
}

.thanks__icon {
  width: 56px;
  height: 56px;
  color: var(--water);
  margin-bottom: 8px;
}

.thanks__ref strong {
  font-family: var(--font-display);
  font-size: 1.15em;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 48rem;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq details:first-of-type {
  border-top: 2px solid var(--ink);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 650;
  font-size: 1.05rem;
  padding: 18px 36px 18px 0;
  position: relative;
}

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

/* Plus / minus marker that reflects open state. */
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font: 700 1.5rem/1 var(--font-display);
  color: var(--water);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  color: var(--ink-soft);
  margin: 0 0 18px;
  max-width: 40rem;
}

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

.footer {
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 36px 0 110px; /* bottom room so the cookie banner never hides the legal links */
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.footer__inner {
  display: grid;
  gap: 20px;
}

.footer p {
  margin: 0 0 0.4em;
}

.footer__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ink);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer a,
.footer .linkish {
  color: var(--ink);
}

/* ---------- Cookie banner ---------- */

.cookie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 12px;
}

.cookie__inner {
  max-width: 40rem;
  margin: 0 auto;
  background: var(--white);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-m);
  padding: 16px;
  box-shadow: 0 12px 30px -12px rgba(15, 42, 48, 0.5);
  font-size: 0.95rem;
}

.cookie__title {
  font-weight: 700;
  margin-bottom: 0.3em;
}

.cookie__actions {
  display: flex;
  gap: 10px;
}

.cookie__actions .btn {
  flex: 1;
  min-height: 44px;
}

/* ---------- Plain content pages (privacy, 404) ---------- */

.page {
  padding: 40px 0 64px;
}

.page .wrap {
  max-width: 46rem;
}

.page h1 {
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem);
  font-weight: 800;
}

.page h2 {
  font-size: 1.4rem;
  margin-top: 1.6em;
}

.page ul {
  padding-left: 1.2em;
}

.page li {
  margin-bottom: 0.4em;
}

/* ---------- Larger screens ---------- */

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }

  .field-row {
    grid-template-columns: 1fr 1fr;
  }

  .field-row .field--grow {
    grid-column: auto;
  }

  .form-card {
    padding: 32px;
  }

  .choices--inline {
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }

  .step {
    padding-left: 0;
    padding-top: 60px;
  }

  .why__list {
    grid-template-columns: 1fr 1fr;
    gap: 24px 32px;
  }

  .footer__inner {
    grid-template-columns: repeat(3, 1fr);
  }

  .cookie__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 20px;
  }

  .cookie__title,
  .cookie__inner > p:not(.cookie__title) {
    grid-column: 1;
  }

  .cookie__actions {
    grid-column: 2;
    grid-row: 1 / span 2;
    flex-direction: column;
  }
}

@media (min-width: 960px) {
  .hero {
    padding: 72px 0 80px;
  }

  .hero__inner {
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
  }

  .services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 32px;
  }

  .service {
    grid-template-columns: 1fr;
    border-bottom: 0;
    padding-top: 28px;
  }

  .why {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 32px;
  }

  .why__list {
    margin-top: 0;
  }

  .form-wrap {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 56px;
    align-items: start;
  }

  .form-intro {
    position: sticky;
    top: 96px;
  }

  .footer {
    padding-bottom: 36px;
  }
}
