/*
 * Washmates service standards, /service-standards/ (washmates-mvp 108, prototype C "Numbered list
 * + contents"), linked after styles.css by src/pages/service-standards/index.astro.
 *
 * Written against tokens.css only (no new tokens): the page is the light theme (body); the hero,
 * the "every job" panel, the guarantee panel, the fair-line button and the closing band carry
 * data-theme="teal", so their --surface is the brand teal and their --ink the white on it. The
 * fair-line panel is a sun fill with on-sun text, as tokens.css allows on light.
 *
 * Mobile first; nothing here may make a 360px page scroll sideways (every grid column that holds
 * text is minmax(0, …) or min-width: 0). No card grids (the owner's reason for picking C): lists
 * are hairline-ruled rows with big numbers. From 1024px the hero is two columns and the numbered
 * sections sit beside a 240px contents column; content is 1120px wide on large screens, padded by
 * max(--gutter, (100% - 1120px) / 2) as on the guarantee page (no max-width on top, see there).
 */

/* ---------- Shared ---------- */

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

/*
 * The page sets its own spacing: no UA margins on its own text blocks. In the reset layer, so the
 * FAQ answers' data-support gap (flow layer) still wins, and scoped to this page's blocks, so the
 * shared reviews band between them keeps its own rules.
 */
@layer reset {
  :is(.ss-hero, .ss-body, .ss-final) :is(p, h1, h2, h3, ol) {
    margin: 0;
  }
}

/* The small "01" section labels and the "On this page" label. */
.ss-label {
  font: 700 13px/18px var(--font-sans);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--aqua-ink);
}

.ss-h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  text-wrap: balance;
}

/* ---------- 1. Hero ---------- */

.ss-hero {
  background: var(--surface);
  color: var(--ink);
  padding-block: 28px;
}

.ss-hero__grid {
  display: grid;
  gap: 16px;
}

.ss-hero__grid > * {
  min-width: 0;
}

.ss-hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.ss-hero__line {
  display: block;
}

.ss-hero__line--accent {
  color: var(--aqua-ink);
}

.ss-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ss-hero__intro {
  color: var(--ink-muted);
}

.ss-hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Full width on phones, as drawn. */
.ss-hero__cta {
  width: 100%;
}

.ss-hero .ss-hero__reviews {
  font: var(--text-label);
}

/* The contents list, inside the hero on phones only. */
.ss-toc {
  margin-top: 8px;
}

.ss-toc__list {
  list-style: none;
  padding: 0;
}

.ss-toc__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding-block: 13px;
  border-top: 1px solid var(--border);
  color: var(--ink);
  font: 700 16px/22px var(--font-sans);
  text-decoration: none;
}

.ss-toc__link:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.ss-toc__num {
  flex: none;
  font: 400 14px/1 var(--font-display);
  color: var(--aqua-ink);
}

.ss-toc__text {
  flex: 1;
  min-width: 0;
}

.ss-toc__arrow {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ss-hero__updated {
  color: var(--ink-muted);
}

/* ---------- 2–4. The numbered sections ---------- */

/* The contents column: desktop only (the hero carries the list on phones). */
.ss-side {
  display: none;
}

.ss-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-wrap: break-word;
}

.ss-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-block: 32px;
  scroll-margin-top: 16px;
}

.ss-section__intro {
  margin-bottom: 6px;
  font: var(--text-body);
  color: var(--ink-muted);
}

/* Big-number rows: the checklist (01–07) and the four steps (1–4). */
.ss-rows {
  list-style: none;
  padding: 0;
}

.ss-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 4px 12px;
  padding-block: 18px;
  border-top: 1px solid var(--border);
}

.ss-row__num {
  grid-row: span 2;
  font: 400 30px/1 var(--font-display);
  color: var(--aqua-ink);
}

.ss-row__title {
  font: 700 17px/23px var(--font-sans);
  color: var(--ink);
}

.ss-row__text {
  font: 400 15px/22px var(--font-sans);
  color: var(--ink-muted);
}

.ss-row__text a {
  color: var(--aqua-ink);
}

/* The fair line (G2): a sun panel with the second quote button. */
.ss-fair {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--sun);
  color: var(--on-sun);
}

.ss-fair__text {
  font: 700 17px/25px var(--font-sans);
}

/* data-theme="teal" on the button: a teal fill with white text on the sun panel. */
.ss-fair__cta {
  width: 100%;
  background: var(--surface);
  color: var(--ink);
}

.ss-fair__cta:hover {
  filter: brightness(1.15);
}

/* The teal ring would vanish on the sun panel; the on-sun teal shows. */
.ss-fair__cta:focus-visible {
  outline-color: var(--on-sun);
}

/* 02: the teal "every job" panel, full bleed on phones (out through the wrapper's gutter). */
.ss-job {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-inline: calc(-1 * var(--gutter));
  padding: 32px var(--gutter);
  background: var(--surface);
  color: var(--ink);
  scroll-margin-top: 16px;
}

.ss-job__steps {
  list-style: none;
  margin-top: 4px;
  padding: 0;
}

.ss-job__step {
  display: flex;
  gap: 14px;
  padding-block: 12px;
  border-top: 1px solid var(--border);
  font: var(--text-body);
  color: var(--ink-muted);
}

.ss-job__step strong {
  color: var(--ink);
}

.ss-job__num {
  flex: none;
  width: 20px;
  font-weight: 700;
  color: var(--aqua-ink);
}

/* 03's close: how we keep standards up (G4) and the guarantee panel (G7). */
.ss-proof {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.ss-proof > * {
  min-width: 0;
}

.ss-keep {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
}

.ss-keep__title {
  font: 700 17px/23px var(--font-sans);
}

.ss-keep__text {
  font: var(--text-body);
  color: var(--ink-muted);
}

.ss-guarantee {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-decoration: none;
}

.ss-guarantee:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Sun text is allowed on the teal theme (tokens.css). */
.ss-guarantee__title {
  font: 400 22px/1.1 var(--font-display);
  text-transform: uppercase;
  color: var(--sun);
}

.ss-guarantee__text {
  font: var(--text-body);
  color: var(--ink-muted);
}

.ss-guarantee:hover .ss-guarantee__text {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 6. Questions (after the reviews band, whose bottom margin is the gap above) ---------- */

.ss-faq {
  padding-top: 0;
  gap: 0;
}

.ss-faq .ss-h2 {
  margin-block: 8px;
}

/* ---------- 7. The closing band ---------- */

.ss-final {
  padding-block: 32px;
  background: var(--surface);
  color: var(--ink);
}

.ss-final__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ss-final__copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ss-final__copy p {
  color: var(--ink-muted);
}

.ss-final__cta {
  width: 100%;
}

/* ---------- From 640px: buttons size to their text ---------- */

@media (min-width: 640px) {
  .ss-hero__actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
  }

  .ss-hero__cta,
  .ss-final__cta {
    width: auto;
  }

  .ss-final__cta {
    align-self: flex-start;
  }

  .ss-fair {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 28px;
  }

  .ss-fair__cta {
    flex: none;
    width: auto;
  }
}

/* ---------- From 1024px: two-column hero, contents column beside the sections ---------- */

@media (min-width: 1024px) {
  .ss-wrap {
    padding-inline: max(var(--gutter), calc((100% - 1120px) / 2));
  }

  .ss-h2 {
    font-size: 40px;
  }

  .ss-hero {
    padding-block: 72px;
  }

  .ss-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
    align-items: end;
  }

  .ss-hero__title {
    font-size: 80px;
    line-height: 0.95;
    letter-spacing: -2px;
  }

  .ss-hero__copy {
    gap: 20px;
  }

  /* The side column carries the contents list from here. */
  .ss-toc--hero {
    display: none;
  }

  .ss-body {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 64px;
    align-items: start;
    padding-block: 64px;
  }

  .ss-body--tail {
    padding-block: 72px;
  }

  .ss-side {
    display: flex;
    flex-direction: column;
  }

  .ss-side .ss-label {
    margin-bottom: 8px;
  }

  .ss-side__list {
    list-style: none;
    padding: 0;
  }

  .ss-side__link {
    display: flex;
    gap: 12px;
    padding-block: 12px;
    border-top: 1px solid var(--border);
    color: var(--ink);
    font: 700 15px/21px var(--font-sans);
    text-decoration: none;
  }

  .ss-side__link:hover {
    color: var(--aqua-ink);
  }

  .ss-side__link:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
  }

  .ss-side__num {
    flex: none;
    font: 400 13px/21px var(--font-display);
    color: var(--aqua-ink);
  }

  .ss-side__cta {
    margin-top: 16px;
  }

  .ss-main {
    gap: 64px;
  }

  .ss-section {
    gap: 12px;
    padding-block: 0;
  }

  .ss-section__intro {
    margin-bottom: 8px;
    font: 400 18px/26px var(--font-sans);
  }

  .ss-row {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 6px 16px;
    padding-block: 22px;
  }

  .ss-row__num {
    font-size: 40px;
  }

  .ss-row__title {
    font-size: 19px;
    line-height: 25px;
  }

  .ss-row__text {
    font-size: 16px;
    line-height: 24px;
  }

  .ss-fair {
    margin-top: 8px;
  }

  .ss-fair__text {
    font-size: 18px;
    line-height: 26px;
  }

  .ss-job {
    gap: 16px;
    margin-inline: 0;
    padding: 36px;
    border-radius: var(--radius-lg);
  }

  .ss-job__steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 28px;
    margin-top: 0;
  }

  .ss-job__step {
    padding-block: 14px;
  }

  .ss-proof {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 20px;
    margin-top: 12px;
  }

  .ss-keep,
  .ss-guarantee {
    padding: 24px;
  }

  .ss-guarantee {
    gap: 8px;
  }

  .ss-keep__title {
    font-size: 19px;
    line-height: 25px;
  }

  .ss-guarantee__title {
    font-size: 24px;
  }

  .ss-faq .ss-h2 {
    margin-block: 12px 8px;
  }

  .ss-final {
    padding-block: 64px;
  }

  .ss-final__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
  }

  .ss-final__copy {
    gap: 10px;
  }

  .ss-final__cta {
    flex: none;
    align-self: center;
  }
}
