/* Tidy Fresh marketing site. One stylesheet, no build step.
   Palette (John, 11/13: "blue signifies clean"): deep navy ink, clean blue for
   actions and accents, a cool white page, and sky blue on dark backgrounds.
   The variable names pine/sun are kept from v1; their values are blue now. */

:root {
  --ink: #0b2545;
  --pine: #1565c0;
  --pine-deep: #0d47a1;
  --paper: #f4f8fc;
  --card: #ffffff;
  --line: #cfdbe8;
  --muted: #44566c;
  --sun: #4fc3f7;
  --sun-deep: #29b6f6;
  --err: #b3261e;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  --r-field: 8px;
  --r-card: 14px;
  --r-video: 28px;
  --wrap: 73rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  /* context colors, swapped by .on-dark */
  --fg: var(--ink);
  --fg-soft: var(--muted);
  --rule: var(--line);
  --focus: var(--ink);
  --err-fg: var(--err);
  --ghost-line: var(--ink);
  --ghost-hover: rgba(11, 37, 69, 0.08);
}

.on-dark {
  --fg: #ffffff;
  --fg-soft: #dce8f5;
  --rule: rgba(255, 255, 255, 0.28);
  --focus: var(--sun);
  --err-fg: #ffc9c2;
  --ghost-line: rgba(255, 255, 255, 0.85);
  --ghost-hover: rgba(255, 255, 255, 0.14);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, video, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}
h1 { font-size: clamp(1.75rem, 1.15rem + 2.9vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.7vw, 2.5rem); }
h3 { font-size: 1.125rem; letter-spacing: -0.01em; line-height: 1.25; }

a { color: inherit; text-underline-offset: 0.18em; }
a[href^="tel:"] { white-space: nowrap; }
a, button, select, summary, label[for] { cursor: pointer; }
button:disabled { cursor: not-allowed; }

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

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

.vh {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 0.75rem; top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--sun);
  color: var(--ink);
  font-weight: 700;
  border-radius: var(--r-field);
}
.skip:focus { top: 0.75rem; }

/* ---------- header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem var(--gutter);
  color: var(--fg);
}
.site-header.over-hero {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: calc(var(--wrap) - 2 * var(--gutter));
  margin-inline: auto;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--display);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--fg);
}
.wordmark span { color: var(--pine); }
.on-dark .wordmark span { color: var(--sun); }

.header-side { display: flex; align-items: center; gap: 1.5rem; }
.header-phone {
  display: none;
  min-height: 44px;
  align-items: center;
  font-weight: 700;
  text-decoration: none;
}
.header-phone:hover { text-decoration: underline; }

.lang { display: flex; align-items: center; gap: 0.25rem; font-size: 0.9375rem; }
.lang a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.5rem;
  text-decoration: none;
  color: var(--fg-soft);
  border-radius: 6px;
}
.lang a:hover { text-decoration: underline; color: var(--fg); }
.lang a[aria-current="true"] {
  color: var(--fg);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

/* ---------- hero: phone state (video on top, form right under it) ----------
   John, 11/13: the cleaning has to be seen. The video gets the top half of the
   screen with no tint except a short fade behind the header; the headline and
   the form sit on the light page below it, phone field first. */

.hero {
  /* light context: the form is on the page, not over the video */
  --fg: var(--ink);
  --fg-soft: var(--muted);
  --rule: var(--line);
  --focus: var(--ink);
  --err-fg: var(--err);
  --ghost-line: var(--ink);
  --ghost-hover: rgba(11, 37, 69, 0.08);

  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 0 2.5rem;
  background: var(--paper);
  color: var(--fg);
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 37rem;
  padding: 1.125rem var(--gutter) 0;
}
.hero-inner h1 { font-size: clamp(1.5rem, 1.1rem + 2.2vw, 2.25rem); }
.hero-copy > p {
  display: none; /* very small screens: straight to the form */
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--fg-soft);
  max-width: 34rem;
}

.hero-media {
  position: relative;
  order: -1;
  width: 100%;
  height: clamp(300px, 50svh, 560px);
  overflow: hidden;
  background: #2f5d7c; /* solid stand-in if the poster is missing */
}
.hero-media img,
.hero-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 48%; /* keeps her face, the desk and the floor in frame */
}
/* only a short fade at the top so the header stays readable */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6rem;
  background: linear-gradient(180deg, rgba(11, 37, 69, 0.72) 0%, rgba(11, 37, 69, 0) 100%);
  pointer-events: none;
}

.video-toggle {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: rgba(11, 37, 69, 0.78);
  color: #fff;
}
.video-toggle:hover { background: var(--ink); }
.video-toggle:active { transform: scale(0.94); }
.video-toggle:focus-visible { outline-color: var(--sun); border-radius: 50%; }
.video-toggle svg { width: 16px; height: 16px; fill: currentColor; }
.video-toggle .i-play { display: none; }
.video-toggle[aria-pressed="true"] .i-play { display: block; }
.video-toggle[aria-pressed="true"] .i-pause { display: none; }

/* ---------- lead form ---------- */

.lead-box { margin-top: 1rem; }
.lead { display: grid; gap: 0.625rem; }
.row { display: grid; gap: 0.625rem; }
.row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.field { display: grid; gap: 0.25rem; min-width: 0; }
.field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg);
}
.field label small { font-size: inherit; font-weight: 400; color: var(--fg-soft); }

.field input,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid #6b7f95;
  border-radius: var(--r-field);
  appearance: none;
}
.field select {
  padding-right: 2.25rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 1.1rem) 50%, calc(100% - 0.75rem) 50%;
  background-size: 0.36rem 0.36rem;
  background-repeat: no-repeat;
}
.field input:hover,
.field select:hover { border-color: var(--ink); }
.field input:focus-visible,
.field select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--ink);
  border-radius: var(--r-field);
}
.field [aria-invalid="true"] {
  border-color: var(--err);
  border-width: 2.5px;
}
.err {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--err-fg);
}
.err:empty, .form-status:empty { display: none; }
.err::before { content: "! "; font-weight: 800; }

.form-status {
  padding: 0.625rem 0.75rem;
  font-weight: 600;
  color: var(--ink);
  background: #ffe1dc;
  border: 2px solid var(--err);
  border-radius: var(--r-field);
}

/* honeypot: off-screen, out of the tab order, hidden from assistive tech */
.hp {
  position: absolute;
  left: -200vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.625rem 1.125rem;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border-radius: var(--r-field);
  border: 2px solid transparent;
  transition: background-color 120ms ease, transform 80ms ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  margin-top: 0.25rem;
  min-height: 52px;
  font-size: 1.0625rem;
  color: #ffffff;
  background: var(--pine);
  border-color: var(--pine);
}
.btn-primary:hover { background: var(--pine-deep); border-color: var(--pine-deep); }
.on-dark .btn-primary { color: var(--ink); background: var(--sun); border-color: var(--sun); }
.on-dark .btn-primary:hover { background: var(--sun-deep); border-color: var(--sun-deep); }
.btn-primary:disabled {
  color: #3d4f63;
  background: #e1e8f0;
  border-style: dashed;
  transform: none;
}

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

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 0.625rem;
}
.contact-row .btn { flex: 1 1 10rem; }

/* Texting is not switched on yet. To show every "Text us" button, change
   data-sms="off" to data-sms="on" on the <html> tag of each page. */
html[data-sms="off"] .sms { display: none; }

.proof {
  margin-top: 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--fg-soft);
}
.proof li { display: inline-block; }
.proof li:not(:last-child)::after { content: "\00B7"; margin-inline: 0.45em; }

.noscript {
  margin-top: 0.5rem;
  font-weight: 600;
  color: var(--fg);
}

/* ---------- sent state ---------- */

.sent:focus { outline: none; }
.sent-title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
}
.sent-title:focus-visible { outline-offset: 6px; }
.sent-check {
  display: grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  font-size: 1.125rem;
  line-height: 1;
  color: var(--ink);
  background: var(--sun);
  border-radius: 50%;
}
.sent-preview {
  margin-top: 0.75rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  background: #e3f2fd;
  border: 2px dashed var(--ink);
  border-radius: var(--r-field);
}
.sent-next {
  margin-top: 1rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--fg-soft);
}
.sent-when { margin-top: 1rem; font-weight: 600; }
.sent .contact-row { margin-top: 0.875rem; }

/* the four steps, used in the sent state and in "How it works" */
.steps { counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  font-family: var(--display);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.steps-compact { margin-top: 0.5rem; }
.steps-compact li {
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  align-items: baseline;
  padding: 0.5rem 0;
  font-weight: 600;
  border-top: 1px solid var(--rule);
}
.steps-compact li:last-child { border-bottom: 1px solid var(--rule); }
.steps-compact li::before { color: var(--fg-soft); }

/* ---------- sections ---------- */

.band { padding-block: clamp(3rem, 2rem + 5vw, 6rem); }
.band-ink { background: var(--ink); color: var(--fg); }
.band-tint { background: #e6eef7; }
.lede { margin-top: 0.75rem; max-width: 34rem; color: var(--fg-soft); font-size: 1.0625rem; }

.split { display: grid; gap: 1.75rem; }

/* buildings: a ruled list, not cards. The content is six short names. */
.types { display: grid; grid-template-columns: 1fr; }
.types li {
  padding: 0.875rem 0;
  border-top: 1px solid var(--rule);
}
.types p { margin-top: 0.125rem; color: var(--fg-soft); }

/* included: big plain lines on the dark band */
.included {
  font-family: var(--display);
  font-size: clamp(1.25rem, 1rem + 1.4vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.included li {
  padding: 0.75rem 0;
  border-top: 1px solid var(--rule);
}
.included li:last-child { border-bottom: 1px solid var(--rule); }
.aside-note { margin-top: 1.25rem; max-width: 30rem; color: var(--fg-soft); }

/* how it works: one column on phones, four across when there is room */
.steps-wide { display: grid; gap: 0; margin-top: 1.75rem; }
.steps-wide li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  column-gap: 0.5rem;
  padding: 1rem 0;
  border-top: 2px solid var(--ink);
}
.steps-wide li::before {
  grid-row: span 2;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--pine);
}
.steps-wide p { margin-top: 0.25rem; color: var(--fg-soft); }

.areas-list {
  font-family: var(--display);
  font-size: clamp(2rem, 1.2rem + 4.6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--pine-deep);
}
.areas-list li + li { margin-top: 0.15em; }

.cta-grid { display: grid; gap: 1.75rem; }
.cta-grid .lead-box { margin-top: 0; max-width: 34rem; }

/* ---------- footer ---------- */

.site-footer {
  padding-block: 1.75rem;
  background: var(--ink);
  color: var(--fg);
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.footer-inner p { color: var(--fg-soft); }

/* ---------- text pages (privacy, 404) ---------- */

.page { padding-block: clamp(2rem, 1.5rem + 3vw, 4rem) clamp(3rem, 2rem + 5vw, 6rem); }
.prose { max-width: 42rem; }
.prose h1 { font-size: clamp(1.875rem, 1.4rem + 2vw, 2.75rem); }
.prose h2 { margin-top: 2.25rem; font-size: 1.375rem; }
.prose p, .prose ul { margin-top: 0.75rem; }
.prose ul { padding-left: 1.25rem; list-style: disc; }
.prose li + li { margin-top: 0.25rem; }
.prose .updated { color: var(--muted); font-size: 0.9375rem; }
.prose .btn { margin-top: 1.5rem; }
.prose hr { margin-block: 2.5rem; border: 0; border-top: 1px solid var(--line); }

/* ---------- very narrow phones: one field per row ---------- */

@media (max-width: 22.4rem) {
  .row.two { grid-template-columns: 1fr; }
}

/* ---------- room for two columns of buildings ---------- */

@media (min-width: 34rem) {
  .types { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
  .hero-copy > p { display: block; font-size: 1.0625rem; }
  .field label, .proof { font-size: 0.875rem; }
}

/* ---------- tablet: video still behind, more air ---------- */

@media (min-width: 48rem) {
  .hero-inner { margin-left: max(0px, calc((100vw - var(--wrap)) / 2)); }
  .steps-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
  .header-phone { display: inline-flex; }
}

/* ---------- desktop: form left, tall 9:16 video card right ---------- */

@media (min-width: 60rem) {
  .hero {
    /* back to the light context */
    --fg: var(--ink);
    --fg-soft: var(--muted);
    --rule: var(--line);
    --focus: var(--ink);
    --err-fg: var(--err);
    --ghost-line: var(--ink);
    --ghost-hover: rgba(11, 37, 69, 0.08);

    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: clamp(2rem, 5vw, 5rem);
    max-width: var(--wrap);
    min-height: 0;
    margin-inline: auto;
    padding: 5.5rem var(--gutter) 3.5rem;
    background: var(--paper);
  }
  .site-header.over-hero {
    --fg: var(--ink);
    --fg-soft: var(--muted);
    --focus: var(--ink);
  }
  .site-header.over-hero .wordmark span { color: var(--pine); }

  .hero-inner {
    flex: 1 1 auto;
    justify-content: center;
    max-width: 35rem;
    margin-left: 0;
    padding: 0;
  }
  .hero-inner h1 { font-size: clamp(1.75rem, 1.15rem + 2.9vw, 3.5rem); }
  .hero-copy > p { display: block; margin-top: 0.875rem; font-size: 1.125rem; line-height: 1.5; }
  .lead-box { margin-top: 1.5rem; }
  .lead, .row { gap: 0.875rem; }

  .hero-media {
    position: relative;
    inset: auto;
    flex: none;
    order: 2;
    width: auto;
    height: min(46rem, calc(100vh - 9rem));
    min-height: 30rem;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: var(--r-video);
    background: #2f5d7c;
    /* the one shadow on the page: lifts the video card off the paper */
    box-shadow: 0 24px 48px -24px rgba(11, 37, 69, 0.45);
  }
  .hero-media img,
  .hero-media video { object-position: 50% 50%; }
  .hero-media::after { content: none; }
  .video-toggle { right: 1rem; bottom: 1rem; }

  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; align-items: start; }
  .split-flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .split-flip > :first-child { order: 2; }
  .steps-wide { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 1.75rem; }
  .steps-wide li { grid-template-columns: 1fr; align-content: start; padding-top: 1.125rem; }
  .steps-wide li::before { grid-row: auto; margin-bottom: 0.75rem; font-size: 3rem; }
  .cta-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 4rem; align-items: start; }
}

/* ---------- people who asked for less motion get the still poster ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media video, .video-toggle { display: none; }
  .btn, .video-toggle { transition: none; }
  .btn:active, .video-toggle:active { transform: none; }
}

@media (forced-colors: active) {
  .hero-media::after { forced-color-adjust: none; }
  .btn { border-color: ButtonText; }
}

/* the hidden attribute always wins over a display rule above */
[hidden] { display: none !important; }
