/* Phone fixes for the homeowner page (/landscaping/), loaded straight after /landing.css.
   Every rule sits under 640px wide, so the desktop and tablet layouts are untouched. */

/* The hero photograph's crop: the landscaper's face sits high in the frame (was an inline style) */
.hero__media img { --ly-pos: 50% 30%; }

@media (max-width: 639px) {
  /* Headings flow with the screen on a rem base, so they scale with the reader's text size */
  .hero h1 { font-size: clamp(1.75rem, 1.25rem + 2.5vw, 2rem); }
  .box-title { font-size: clamp(1.25rem, 0.875rem + 2vw, 1.375rem); }

  /* The hero's form sits on the page ground like the closing form: no card, so the ticks and the
     field get the full width of the column */
  .hero__text > .hero__box { margin-top: var(--s-4); }
  .hero .quote-box { padding: 0; border: 0; background: none; gap: var(--s-3); }

  /* The four jobs at body size, one job a line (the closing form's list too, which the kit's
     .footer ul would otherwise set at 14px) */
  .quote-box .box-ticks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 var(--gutter);
                          font-size: var(--t-body); line-height: 1.5; }

  /* The postcode above the button, both the full width: the placeholder shows whole and the
     button sits in the thumb's reach */
  .box-row { flex-direction: column; gap: var(--s-3); }
  .box-row input, .box-row .btn { width: 100%; min-height: 48px; }
  /* With no card behind it the field is drawn by its border alone: 3.52:1 on the ground (WCAG 1.4.11
     asks 3:1), and the placeholder at 5.18:1, still lighter than what the reader types */
  .box-row input { border-color: #86817a; }
  .box-row input::placeholder { color: #6b665f; opacity: 1; }

  /* The three points at body size, one a line */
  .hero-points { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 var(--gutter);
                 font-size: var(--t-body); line-height: 1.5; margin-top: var(--s-3); }
}

/* From 380 wide the short items pair up on the grid's two halves, so the hero stays one screen:
   the long item takes a whole row and the short one after it fills the gap beside the first */
@media (min-width: 380px) and (max-width: 639px) {
  .quote-box .box-ticks, .hero-points { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; }
  .box-ticks li:nth-child(2), .box-ticks li:nth-child(3), .hero-points li:nth-child(2) { grid-column: 1 / -1; }
  .box-ticks li, .hero-points li { white-space: nowrap; }
}

/* The page for landscapers (phone, and its spacing at every width). Every rule is scoped to body.for-pros,
   so the homeowner page above keeps its own look */

/* The photograph crops (were inline styles) */
body.for-pros .hero__media img { --ly-pos: 50% 70%; --ly-pos-phone: 50% 60%; }
body.for-pros .close__media img { --pos: 50% 82%; }

/* Tighter spacing, at JB's ask: every section after the hero takes the height of what it holds, not a
   whole screen, padded 96 above and 64 below (56 and 40 on a phone) */
body.for-pros main > section:not(.hero), body.for-pros footer.closing {
  height: auto; min-height: 0; padding-block: 96px 64px;
}
body.for-pros .lead-checks { margin-top: var(--s-7); }
body.for-pros .how-strip { margin-top: var(--s-7); }
body.for-pros #ask .mo-wh__text { margin-top: var(--s-7); }

@media (max-width: 639px) {
  body.for-pros main > section:not(.hero), body.for-pros footer.closing { padding-block: 56px 40px; }
  body.for-pros #ask .mo-wh__text { margin-top: var(--s-6); }

  /* The hero: the dark box keeps an equal 12px inset on the
     frame at every width, because the button may now wrap instead of pushing the box past the frame */
  body.for-pros .hero__over > :first-child { padding: 20px; }
  body.for-pros .hero .btn-row .btn { width: 100%; height: auto; min-height: 48px; padding: var(--s-3) var(--s-4);
                                      white-space: normal; text-align: center; line-height: 1.25; }
}

/* With sections at content height, the photographs set their own: the close's garden path no longer
   collapses to a strip, and the ferns stand as tall as the fine print beside them */
body.for-pros .close__media { flex: none; height: 360px; min-height: 0; }
@media (min-width: 1024px) { body.for-pros .fine-photo { min-height: 0; height: 440px; } }
@media (min-width: 640px) and (max-width: 1023px) { body.for-pros .close__media { height: 300px; } }
@media (max-width: 639px) { body.for-pros .close__media { height: 260px; } }
