/* ==========================================================================
   Home: page-specific layout only. Everything shared lives in styles.css.

   This page follows design/home-mockup.html. Widths, paddings and type sizes
   below are the comp's own numbers. Where a value differs there is a comment
   saying why, and there are only two of those: the label colour on the green
   band, which the comp sets to the lime and fails AA at 3.79:1, and the
   heading gaps, which come from the shared --space tokens.
   ========================================================================== */

/* The comp sets no gap between an eyebrow and the heading under it: the
   heading's own top margin does that work. */
main .eyebrow { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Hero: centred, on cream, with the collage hanging into the band below
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  text-align: center;
  padding: 44px 0 0;
}

/* The hero's locator, in the eyebrow slot above the headline. The sitewide
   .eyebrow is inline-flex at line-height 1, which is right for a two-word label
   and wrong for this one: it is long enough to wrap at phone widths, and a
   wrapped flex label at line-height 1 collides with itself. This instance is
   inline-block with real leading, and it balances its own lines. The h1 below
   carries the spacing, so the label adds none of its own.
   The sitewide 0.22em tracking is kept. Measured against the real woff2: the
   label sets 444px, so it is one line everywhere down to 480px and two lines at
   320px. Easing the tracking does not win back a line, so it is not eased. */
.hero__where {
  display: inline-block;
  line-height: 1.5;
  margin-bottom: 0;
  text-wrap: balance;
}

.hero h1 {
  font-size: 44px;
  line-height: 1.06;
  margin: 26px auto 28px;
  /* Without this the phone widths leave "here," alone on a line. Balance evens
     the lines out instead. The em below is its own block, so each half of the
     headline balances on its own. */
  text-wrap: balance;
}
/* The one italic line in the headline, on its own line, in the rose. */
.hero h1 em { display: block; }

.hero .lead {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 34ch;
  margin: 0 auto 34px;
}

.hero .btn-row {
  justify-content: center;
  gap: 22px;
  margin-top: 0;
}

.hero__call {
  margin: 22px 0 0;
  max-width: none;
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

/* Sprigs flanking the headline. Decorative, aria-hidden, and hidden outright
   below the width where they would crowd the copy. */
.hero__sprig { display: none; top: 120px; width: 120px; }
.hero__sprig--left  { left: calc(50% - 560px); transform: rotate(-14deg); }
.hero__sprig--right { right: calc(50% - 560px); top: 150px; width: 110px; transform: scaleX(-1) rotate(-10deg); }

/* --------------------------------------------------------------------------
   Collage: three crops, staggered, pulled down into the mission band
   -------------------------------------------------------------------------- */

.collage {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 16px;
  max-width: 520px;
  margin: 52px auto -90px;
  padding: 0 var(--container-pad);
}
.collage figure { margin: 0; position: relative; }
.collage img { width: 100%; border-radius: var(--radius); object-fit: cover; }

.collage__a img { aspect-ratio: 4 / 3; object-position: 30% 40%; }
.collage__b img { aspect-ratio: 4 / 5; }
.collage__c img { aspect-ratio: 4 / 3; object-position: 50% 50%; }

/* The stagger. These need the .collage ancestor to outweigh the margin reset
   on .collage figure above. */
.collage .collage__a { margin-bottom: 40px; }
.collage .collage__c { margin-bottom: 96px; }
.collage__c { display: none; }

/* The soft colour block offset behind the centre photograph. This is the
   site's photo treatment: an offset block, never a drop shadow. */
.collage__b::before {
  content: "";
  position: absolute;
  inset: -10px -10px 10px 10px;
  background: var(--rose);
  opacity: 0.35;
  border-radius: var(--radius);
  z-index: -1;
}

/* --------------------------------------------------------------------------
   Mission band: blush, centred, Kathy's own sentence
   -------------------------------------------------------------------------- */

.mission {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 140px 0 76px;
}
.mission .script {
  display: block;
  font-size: 50px;
  margin-bottom: 18px;
}
.mission blockquote {
  margin: 0 auto;
  max-width: 28ch;
  font-family: var(--font-head);
  font-size: clamp(26px, 3.1vw, 38px);
  font-weight: 400;
  line-height: 1.38;
  color: var(--ink);
}
.mission .dots { margin: 44px auto 0; }

/* --------------------------------------------------------------------------
   What we facilitate
   -------------------------------------------------------------------------- */

.facilitate { padding: var(--section-pad-sm) 0; }

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

.facilitate h2 { margin: 22px 0; }
.facilitate__intro p { font-size: 19px; max-width: 30ch; }

.facilitate__closing {
  position: relative;
  margin-top: 28px;
  padding-top: 34px;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  max-width: 24ch;
}
.facilitate__closing .dots { position: absolute; top: 0; left: 0; }
/* The comp leaves the normal paragraph space under this line. At the stacked
   widths it is the gap before the four groups, so it is not decoration. */
.facilitate__intro .facilitate__closing { margin-bottom: 19px; }

/* The meeting photograph closes the intro column and leads into the band
   below it. Its real width is 640px and the column never reaches that. */
.facilitate__figure { margin: 44px 0 0; }

/* The offset block sits 26px outside the frame on the right. Stacked, the frame
   already fills the container, so the block would push the page 6px wider than
   the viewport. Pulling the frame in by the offset keeps it on screen. */
.facilitate__figure .frame { margin-right: 26px; }

.facilitate .groups {
  grid-template-columns: 1fr;
  gap: 44px;
}
.facilitate .group { max-width: none; }
.facilitate .group__num {
  display: block;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  color: var(--rose-deep);
  margin-bottom: 14px;
}
.facilitate .group h3 { font-size: 28px; line-height: 1.15; margin-bottom: 16px; }

/* --------------------------------------------------------------------------
   The weekly recovery meeting

   The flyer is the ministry's own and carries its details as baked-in type,
   which nobody on a screen reader can read. The day, the time and the address
   are therefore set again beside it as real text, and that text is the one
   that has to be right.
   -------------------------------------------------------------------------- */

.meeting { padding: var(--section-pad-sm) 0; }

.meeting .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}

.meeting h2 { margin: 22px 0 28px; }
.meeting p { font-size: 18px; max-width: 40ch; margin-bottom: 22px; }

.meeting__details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 28px;
}
.meeting__details dt {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--rose-deep);
  margin-bottom: 8px;
}
.meeting__details dd {
  margin: 0;
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
}

/* The flyer is 1152px wide and never needs to be shown near that size. The
   cap keeps it off its own upper bound at the wide breakpoints. */
.meeting__graphic { margin: 0; max-width: 520px; }
.meeting__graphic .frame { margin-right: 26px; }

/* The offset block is drawn at z-index -1, which on a band that paints its own
   background would put it behind the band. Giving the frame its own stacking
   context keeps the block inside the frame and above the cream-deep. */
.meeting .frame { z-index: 0; }

/* --------------------------------------------------------------------------
   Where to start: the full-width green band
   -------------------------------------------------------------------------- */

.start { position: relative; overflow: hidden; padding: var(--section-pad-sm) 0; }

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

.start h2 { margin: 22px 0 26px; }
.start p { font-size: 18px; max-width: 40ch; }

.start__photos { position: relative; height: 320px; order: 2; }
.start__photos figure { margin: 0; position: absolute; }
.start__photos img { border-radius: var(--radius); width: 100%; }
.start__photo--large { left: 0; top: 0; width: 70%; }
.start__photo--large img { aspect-ratio: 4 / 5; object-fit: cover; }
.start__photo--small {
  right: 0;
  bottom: 0;
  width: 44%;
  /* Not a drop shadow: a solid ring in the band's own colour, so the small
     photograph reads as sitting on top of the large one. */
  box-shadow: 0 0 0 10px var(--nsm-green-deep);
}
.start__photo--small img { aspect-ratio: 1 / 1; object-fit: cover; }

.start__find {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  margin-top: 40px;
  padding-top: 34px;
}
.start__find::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(201, 226, 101, 0.45);
}
/* The comp sets these labels in the lime, which is 3.79:1 on this ground and
   fails AA. Cream is 5.12:1 and is the only value changed from the comp. */
.start__find h3 {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 12px;
}
.start__find p { font-size: 15.5px; line-height: 1.65; margin: 0; max-width: 46ch; }

.start__sprig {
  right: -30px;
  bottom: -40px;
  width: 220px;
  color: #A9BC6E;
  opacity: 0.45;
  transform: rotate(18deg);
}

/* --------------------------------------------------------------------------
   Who we are
   -------------------------------------------------------------------------- */

.who { padding: var(--section-pad-sm) 0; }

.who .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}
.who h2 { margin: 22px 0 24px; }
.who p { max-width: 46ch; }
.who figure { margin: 0; max-width: 420px; }
/* The Christmas 2025 photograph Kathy chose on 2026-09-28 is landscape, 640x494.
   The old 4/5 portrait slot would have cropped away both flanking trees and
   crowded the two of them. 4/3 is within a few percent of the file's own
   ratio, so it is very close to an uncropped placement. */
.who figure img { aspect-ratio: 4 / 3; object-fit: cover; object-position: center 40%; }
.who .frame::before { inset: 18px -18px -18px 18px; }
.who figcaption { font-size: 14px; color: var(--ink-soft); margin-top: 46px; }

/* --------------------------------------------------------------------------
   Reach out
   -------------------------------------------------------------------------- */

.reach { padding: var(--section-pad-sm) 0; }

.reach .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: start;
}
/* One line, as the comp has it. In Ephesis the phrase measures 295px at 36px,
   which is why nowrap still holds inside a 320px viewport. */
.reach .script {
  display: block;
  font-size: 36px;
  white-space: nowrap;
  margin-bottom: 10px;
}
.reach h2 { font-size: clamp(38px, 4vw, 52px); line-height: 1.08; margin: 0 0 22px; }
.reach__intro p { font-size: 19px; max-width: 34ch; }
/* The comp holds this link on one line with an inline style. Same result, stated
   here instead, so the privacy link never breaks across two lines at 320px. */
.reach__note a { white-space: nowrap; }

/* The comp declares 15px here, but .reach .intro p outweighs it in the comp's
   own cascade, so what the comp renders, and what was approved, is 19px. */
.reach .reach__note { font-size: 19px; margin-top: 28px; margin-bottom: 19px; max-width: 34ch; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (min-width: 481px) {
  .hero h1 { font-size: var(--fs-h1); }
  .start__photos { height: 380px; }
}

@media (min-width: 901px) {
  .hero { padding-top: 64px; }
  .hero .lead { font-size: 20px; }

  /* The outer columns carry 250px and 460px photographs and the site never
     draws a photograph wider than its own pixels. At 1.25fr the outer pair
     measured 260px, ten over the smaller file. Shifting the ratio moves that
     width into the centre photograph, which has 480px to give. */
  .collage {
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: 28px;
    max-width: 980px;
    margin: 72px auto -150px;
  }
  .collage .collage__a { margin-bottom: 56px; }
  .collage__c { display: block; }
  .collage__b::before { inset: -14px -14px 14px 14px; }

  .mission { padding: 220px 0 120px; }
  .mission .script { font-size: 64px; }

  .facilitate .grid { grid-template-columns: 5fr 7fr; gap: 90px; }
  .facilitate__closing { margin-top: 40px; }
  .facilitate .groups { grid-template-columns: 1fr 1fr; gap: 64px 56px; }

  .facilitate__figure .frame { margin-right: 0; }

  .meeting { padding: 130px 0; }
  .meeting .grid { grid-template-columns: 6fr 6fr; gap: 90px; }
  .meeting__details { grid-template-columns: 1fr 1fr; gap: 36px; }
  .meeting__graphic .frame { margin-right: 0; }

  .start { padding: 130px 0; }
  .start .grid { grid-template-columns: 1fr 1fr; gap: 96px; }
  .start__photos { height: 560px; order: 0; }

  .who { padding: var(--section-pad) 0; }
  .who .grid { grid-template-columns: 1.05fr 0.95fr; gap: 100px; }
  .who figure { max-width: none; }
  .who .frame::before { inset: 26px -26px -26px 26px; }

  .reach { padding: 130px 0; }
  .reach .grid { grid-template-columns: 5fr 7fr; gap: 90px; }
  .reach .script { font-size: 42px; white-space: nowrap; }
}

@media (min-width: 1101px) {
  .hero__sprig { display: block; }
}

/* The two numbers in the hero run as one line of text. At phone width the lime
   dot between them becomes a 6px gap, which is what breaks the line. */
@media (max-width: 480px) {
  .hero__call .phones--inline li + li::before {
    display: block;
    width: 0;
    height: 6px;
    margin: 0;
    background: none;
  }
}
