/* =========================================================
   Bottom to Top Cleaning Service: site styles
   ========================================================= */

/* ---------- 1. Design tokens: colors, fonts, spacing ----------
   Change a value here and it updates everywhere it's used. */
:root {
  --teal: #123c44;      /* main ink: text, header, footer */
  --teal-soft: #2b5961; /* lines and borders */
  --lemon: #f4d23c;     /* the one accent: buttons and checks */
  --lemon-deep: #e2bd1c;
  --mist: #e8f1ef;      /* alternating section background */
  --white: #ffffff;
  --slate: #4b5b5f;     /* secondary text */

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;

  --radius: 10px;
  --max-width: 1120px;
  --gutter: 20px;
}

/* ---------- 2. Base: sensible defaults for every page ---------- */
*,
*::before,
*::after {
  box-sizing: border-box; /* widths include padding: much easier layouts */
}

html {
  scroll-behavior: smooth; /* menu links glide to their section */
  scroll-padding-top: 88px; /* ...and stop below the sticky header */
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.6;
  color: var(--teal);
  background: var(--white);
}

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

h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem); /* grows with the screen */
  font-weight: 800;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
  max-width: 65ch; /* keeps lines short enough to read comfortably */
}

a {
  color: inherit;
}

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

/* A clear outline when moving around with the keyboard (Tab key) */
:focus-visible {
  outline: 3px solid var(--lemon-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* Hidden until a keyboard user presses Tab */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--lemon);
  color: var(--teal);
  font-weight: 700;
  border-radius: var(--radius);
}
.skip-link:focus {
  top: 12px;
}

/* ---------- 3. Buttons ---------- */
.button {
  display: inline-block;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 0.15s, transform 0.15s;
}
.button:active {
  transform: translateY(1px); /* a small "press" when clicked */
}
.button-primary {
  background: var(--lemon);
  color: var(--teal);
}
.button-primary:hover {
  background: var(--lemon-deep);
}
.button-secondary {
  border-color: var(--teal);
  color: var(--teal);
}
.button-secondary:hover {
  background: var(--mist);
}

/* ---------- 4. Header ---------- */
.site-header {
  position: sticky; /* stays at the top while scrolling */
  top: 0;
  z-index: 10;
  background: var(--white);
  border-bottom: 1px solid var(--mist);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1;
}
.wordmark small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--slate);
  margin-top: 3px;
}

.site-nav {
  display: none; /* hidden on phones; shown on wider screens below */
  gap: 24px;
  margin-left: auto;
}
.site-nav a {
  text-decoration: none;
  font-weight: 700;
}
.site-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.header-phone {
  margin-left: auto;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- 5. Hero ---------- */
.hero {
  padding: 48px 0 56px;
}

.hero-inner {
  display: grid;
  gap: 40px;
}

.lead {
  font-size: 1.2rem;
  color: var(--slate);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 24px;
}

.trust {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  color: var(--slate);
}

/* The bottom-to-top checklist */
.ladder {
  margin: 0;
  padding: 28px 28px 24px;
  background: var(--teal);
  color: var(--white);
  border-radius: 18px;
  align-self: center;
}

.ladder ol {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

/* The vertical line joining the checks */
.ladder ol::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: var(--teal-soft);
}

.ladder li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 11px 0;
  font-size: 1.05rem;
}

/* The round check mark in front of each item */
.ladder li::before {
  content: "";
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--lemon)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23123C44' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 16px no-repeat;
  position: relative; /* sits above the vertical line */
}

.ladder figcaption {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--teal-soft);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--lemon);
}

/* Page-load moment: checks tick in from the bottom item up.
   (Skipped for anyone who has asked their computer to reduce motion.) */
@media (prefers-reduced-motion: no-preference) {
  .ladder li {
    opacity: 0;
    transform: translateY(8px);
    animation: tick-in 0.4s ease-out forwards;
  }
  .ladder li:nth-child(5) { animation-delay: 0.2s; }
  .ladder li:nth-child(4) { animation-delay: 0.45s; }
  .ladder li:nth-child(3) { animation-delay: 0.7s; }
  .ladder li:nth-child(2) { animation-delay: 0.95s; }
  .ladder li:nth-child(1) { animation-delay: 1.2s; }
}

@keyframes tick-in {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 6. Content sections ---------- */
.section {
  padding: 64px 0;
}

.section-mist {
  background: var(--mist);
}

.section-intro {
  color: var(--slate);
  margin-bottom: 32px;
}

/* Services, grouped by kind of place */
.service-groups {
  display: grid;
  gap: 28px 40px;
}

.service-group {
  padding-top: 16px;
  border-top: 3px solid var(--teal);
}

.service-group ul {
  margin: 0;
  padding-left: 1.1em;
}

.service-group li {
  padding: 3px 0;
}

.service-group li::marker {
  color: var(--lemon-deep);
}

/* How it works: numbered steps */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 28px;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 52px 1fr;
  column-gap: 16px;
}

.steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: var(--lemon);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
}

.steps h3 {
  margin: 4px 0 4px;
}

.steps p {
  margin: 0;
  color: var(--slate);
}

/* Why us */
.reasons {
  display: grid;
  gap: 24px 40px;
  margin: 32px 0 0;
}

.reasons dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
}

.reasons dd {
  margin: 4px 0 0;
  color: var(--slate);
}

/* Before & after photos */
.results {
  display: grid;
  gap: 32px 40px;
}

.result h3 {
  padding-bottom: 8px;
  border-bottom: 3px solid var(--teal);
}

.result-pair {
  display: grid;
  grid-template-columns: 1fr 1fr; /* before and after side by side */
  gap: 10px;
}

.result-pair figure {
  margin: 0;
}

.result-pair img {
  width: 100%;
  height: auto;
  aspect-ratio: 1; /* square, even before the image loads */
  object-fit: cover;
  border-radius: var(--radius);
}

.result-pair figcaption {
  margin-top: 6px;
  font-weight: 700;
  color: var(--slate);
}

/* "After" gets the lemon accent so the payoff stands out */
.result-pair figure:last-child figcaption {
  color: var(--teal);
}
.result-pair figure:last-child figcaption::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--lemon-deep);
}

.team-photo {
  margin: 40px 0 0;
  display: grid;
  gap: 16px;
  align-items: center;
}

.team-photo img {
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: var(--radius);
}

.team-photo figcaption {
  font-size: 1.1rem;
  max-width: 40ch;
}

/* Sits right under the photos section, so less space above */
.section-tight {
  padding-top: 0;
}

/* Reviews: one large featured quote, then the rest in a row */
.review {
  margin: 0;
}

.review blockquote {
  margin: 0;
}

.review p {
  margin: 0 0 12px;
}

.review figcaption {
  color: var(--slate);
  font-weight: 700;
}

.review-featured {
  margin: 32px 0 40px;
  padding-left: 24px;
  border-left: 6px solid var(--lemon);
}

.review-featured p {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  line-height: 1.35;
  max-width: 48ch;
}

.review-list {
  display: grid;
  gap: 28px 40px;
}

.review-list .review {
  padding-top: 16px;
  border-top: 3px solid var(--teal);
}

/* Service area */
.area-states {
  display: grid;
  gap: 24px 40px;
}

.area-states h3 {
  padding-bottom: 8px;
  border-bottom: 3px solid var(--teal);
}

.area-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2; /* the town names flow into two columns */
  column-gap: 24px;
}

.area-list li {
  padding: 6px 0;
  font-size: 1.1rem;
}

.area-note {
  margin: 32px 0 0;
  padding: 16px 20px;
  background: var(--mist);
  border-radius: var(--radius);
}

/* "Call or text" prompt at the end of a section */
.cta-line {
  margin: 36px 0 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.cta-line a,
.area-note a {
  text-decoration-color: var(--lemon-deep);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

/* FAQ: native <details> boxes that open and close */
.faq-list {
  margin-top: 28px;
  max-width: 760px;
  border-top: 1px solid #c9d8d5;
}

.faq-list details {
  border-bottom: 1px solid #c9d8d5;
}

.faq-list summary {
  list-style: none; /* hide the default triangle */
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
}

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

/* Our own +/− sign */
.faq-list summary::after {
  content: "+";
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: var(--lemon);
  font-size: 1.3rem;
  line-height: 1;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  margin: 0 0 20px;
  color: var(--slate);
}

/* ---------- 7. Contact ---------- */
.contact {
  background: var(--teal);
  color: var(--white);
}

.contact p {
  color: #cfe0dd;
}

.contact-inner {
  display: grid;
  gap: 32px;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Phones: label above the detail, so long email addresses fit */
.contact-list li {
  display: grid;
  gap: 2px;
  padding: 14px 0;
  border-bottom: 1px solid var(--teal-soft);
}

.contact-list span {
  color: #cfe0dd;
}

.contact-list a {
  font-weight: 700;
  text-decoration-color: var(--lemon);
  text-underline-offset: 4px;
  overflow-wrap: anywhere; /* long email address wraps on small phones */
}

.contact-list a:hover {
  color: var(--lemon);
}

/* Quote request form (on the dark teal background) */
.quote-form {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

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

.field label {
  font-weight: 700;
}

.optional {
  font-weight: 400;
  color: #cfe0dd;
}

.quote-form input,
.quote-form select,
.quote-form textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--teal);
  background: var(--white);
  border: 2px solid transparent;
  border-radius: var(--radius);
}

.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
  border-color: var(--lemon);
  outline: none;
}

/* ".contact .form-error" (two classes) outranks ".contact p", which
   would otherwise turn this text light-on-light */
.contact .form-error {
  margin: 0;
  padding: 10px 14px;
  background: #fff4c2;
  color: var(--teal);
  border-radius: var(--radius);
  font-weight: 700;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.form-actions .button {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.field-label {
  font-weight: 700;
}

/* Hidden from view but still usable by keyboards and screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The spam trap field: hidden from people */
.honeypot {
  display: none;
}

/* "Add photos" area */
.photo-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 16px;
  border: 2px dashed #5f8a90;
  border-radius: var(--radius);
  cursor: pointer;
}

.photo-picker:hover {
  border-color: var(--lemon);
}

/* Show the keyboard focus on the box when the hidden picker is focused */
.quote-form .field:has(#q-photos:focus-visible) .photo-picker {
  outline: 3px solid var(--lemon-deep);
  outline-offset: 3px;
}

.photo-picker-button {
  padding: 10px 18px;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--teal);
  font-weight: 700;
}

.photo-picker-hint {
  color: #cfe0dd;
  font-weight: 400;
}

.photo-previews {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.photo-previews li {
  display: grid;
  gap: 4px;
  width: 84px;
}

.photo-previews img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 8px;
}

.photo-previews button {
  font: inherit;
  font-size: 0.85rem;
  padding: 2px 0;
  background: none;
  border: none;
  color: #cfe0dd;
  text-decoration: underline;
  cursor: pointer;
}

.form-note {
  margin: 0;
  font-size: 0.9rem;
  color: #cfe0dd;
}

.form-actions .button:disabled {
  opacity: 0.7;
  cursor: wait;
}

/* ---------- 8. Footer ---------- */
.site-footer {
  padding: 24px 0 96px; /* extra space so the phone call bar doesn't cover it */
  font-size: 0.9rem;
  color: var(--slate);
}

.site-footer p {
  margin: 0;
}

/* ---------- 9. Phone-only call bar ---------- */
.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--white);
  border-top: 1px solid var(--mist);
}

.mobile-bar a {
  text-align: center;
  padding: 12px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--teal);
}

.mobile-bar a:first-child {
  background: var(--lemon);
  border-color: var(--lemon);
}

/* ---------- 10. Wider screens (tablets and laptops) ----------
   Everything above is designed for phones first; these rules
   rearrange the layout when there's more room. */
@media (min-width: 760px) {
  :root {
    --gutter: 32px;
  }


  .hero {
    padding: 72px 0 88px;
  }

  .hero-inner {
    grid-template-columns: 1.35fr 1fr;
    gap: 56px;
    align-items: center;
  }

  .section {
    padding: 88px 0;
  }

  .service-groups {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

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

  .team-photo {
    grid-template-columns: 280px 1fr;
    gap: 28px;
  }

  .section-tight {
    padding-top: 0;
  }

  .area-states {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-inner {
    grid-template-columns: 1.3fr 1fr;
    gap: 64px;
    align-items: start;
  }

  .contact-list {
    margin-top: 88px; /* lines up with the top of the form */
  }

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

  /* Wider screens: label and detail side by side */
  .contact-list li {
    grid-template-columns: 110px 1fr;
    gap: 12px;
  }

  /* No floating call bar on bigger screens */
  .mobile-bar {
    display: none;
  }

  .site-footer {
    padding-bottom: 24px;
  }
}

@media (min-width: 1040px) {
  .service-groups {
    grid-template-columns: repeat(4, 1fr);
  }

  /* The full menu only fits on wider screens */
  .site-nav {
    display: flex;
  }

  .header-phone {
    margin-left: 0;
  }
}
