/* =========================================================================
   Additive refinements, including About page margins.
   Loaded after v094.css on every page.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. About page: same left and right margins as the rest of the site.
   Every other page starts its text at the standard content edge (.wrap =
   --content-width, 1240px, with 3rem side padding on desktop). About ran its
   text in a narrower centered column, so its margins were wider. These
   rules put About on the same edges. Scoped to About only.
   ------------------------------------------------------------------------- */
body[data-route="about"] .about-col { max-width: var(--content-width); }

/* Photos keep their original size and width (only the TEXT uses the wider edges). The figure
   widths come from v092/v094.css, exactly as in v09.36. */
/* Disclosure text runs the full width like every other body text on the site */
body[data-route="about"] .gov-disclosure__body { max-width: none; }
body[data-route="about"] .gov-disclosure__body p + p { margin-top: 0.9em; }

/* Council: adapts to any number of directors */
.council-row {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start;
  gap: var(--space-7) var(--space-6); max-width: var(--content-width);
  grid-template-columns: none;
}
.council-member { flex: 0 1 17rem; }

/* The practitioner invitation after the biographies (distinct from the Council) */
.walk-invite {
  max-width: var(--content-width); margin: var(--space-8) auto 0; text-align: center;
  background: var(--warm-parchment); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-4);
}
.walk-invite h3 { font-size: var(--text-2xl); }
.walk-invite p { margin: var(--space-3) auto 0; max-width: 46rem; color: var(--ink-soft); font-size: var(--text-md); line-height: 1.7; }
.walk-invite .btn { margin-top: var(--space-5); }

/* -------------------------------------------------------------------------
   2. Walk With Us: secondary "Have a question?" text link under the primary button
   ------------------------------------------------------------------------- */
.join-item .join-item__secondary { margin-top: var(--space-3); font-size: var(--text-sm); }
.join-item .join-item__secondary a { font-weight: 700; }

/* -------------------------------------------------------------------------
   3. Contact page
   ------------------------------------------------------------------------- */
.contact-discovery { padding-block: var(--space-6) 0; }
.discovery-invite {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-4) var(--space-6);
  background: var(--warm-parchment); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-4);
}
@media (min-width: 900px) { .discovery-invite { padding: var(--space-5) var(--space-6); } }
.discovery-invite__text { flex: 1 1 28rem; }
.discovery-invite h2 { font-size: var(--text-xl); }
.discovery-invite p { margin-top: 0.5em; color: var(--ink-soft); }

.contact-main { padding-top: var(--space-6); }
.contact-grid { display: grid; gap: var(--space-6); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 7fr 5fr; gap: var(--space-8); } }
.concern-card { background: var(--warm-parchment); }
.concern-card h2 { font-size: var(--text-lg); }
.concern-card p { margin-top: 0.8em; color: var(--ink-soft); line-height: 1.7; }

[hidden] { display: none !important; }
.form-note { font-size: var(--text-sm); color: var(--ink-soft); }
.optional { font-weight: 400; color: var(--ink-soft); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* -------------------------------------------------------------------------
   4. Offering join forms and thank-you pages (generated by build.py)
   Left-aligned on the same content edge as the page heading above.
   ------------------------------------------------------------------------- */
.page-hero--plain { padding-block: var(--space-8) var(--space-6); }
.page-hero--plain h1 { margin-top: var(--space-2); }
.join-form { max-width: 44rem; margin-inline: 0; }
.join-form__for { display: flex; flex-wrap: wrap; gap: 0.6em; align-items: center; margin-bottom: var(--space-5); }
.join-form form { margin-bottom: var(--space-4); }
.join-form .form-note { margin-top: var(--space-3); }
.join-form--thanks .thanks-message { font-family: var(--font-display); font-size: var(--text-xl); line-height: 1.5; margin-bottom: var(--space-5); }


/* ==========================================================================
   v09.38 — Images keep their natural proportions.
   Content images are never cropped or stretched: full image, full
   dimensions, width scales and height follows (width/height attributes in
   the markup reserve the space, so there is no layout shift).
   Full-bleed text-over-image bands and page-hero backgrounds are not
   covered here; they are backgrounds, not content images.
   ========================================================================== */
.photo-frame:not(.photo-frame--placeholder) { aspect-ratio: auto; height: auto; }
.photo-frame:not(.photo-frame--placeholder) img { width: 100%; height: auto; object-fit: contain; }
.about-story__community img,
.about-story__fern img,
.join-item__media img,
.door-card__media img,
.wwa-tile img,
.life-relationship__media img,
.embodiment-block__media img,
.wwu-pause img,
.gift-web img,
.gift-grid img,
.circulation-figure img,
.mystery__media img,
.photo-band img,
.council-member__photo img {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  display: block;
}
#tree-of-life .join-item__media img,
#grounded-vessel .join-item__media img { height: auto; min-height: 0; flex: 0 0 auto; align-self: center; }
#tree-of-life .join-item__media,
#grounded-vessel .join-item__media { align-items: center; }
.join-item, #tree-of-life, #grounded-vessel { align-items: center; }
.council-member__photo { aspect-ratio: auto; }
.council-member__photo--placeholder { aspect-ratio: 3 / 4; }
/* Cards keep each photo's own proportions, so they sit at their natural height instead of stretching to the tallest neighbour */
.door-grid { align-items: start; }
.steward-pair { align-items: start; }

/* v09.38/39 — Zeffy fallback block, centered under the giving card */
.gift-zeffy__alt { margin-top: var(--space-5); display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3); }
.gift-zeffy__alt-text { font-size: var(--text-md); font-weight: 700; margin: 0; text-wrap: balance; }
.gift-zeffy__alt .btn--give { justify-content: center; text-align: center; }
/* The giving button uses the site's giving green (same as the header "Be in the Gift" button), larger and bolder than a standard button */
.btn--give { background: var(--rooted-green); border-color: var(--rooted-green); color: #FDF8EF; font-size: var(--text-md); font-weight: 800; padding: 1em 1.75em; min-height: 56px; }
.btn--give:hover, .btn--give:focus-visible { background: var(--rooted-green-deep); border-color: var(--rooted-green-deep); color: #FDF8EF; }
.btn--give svg { flex: none; }

/* ==========================================================================
   v09.38 — Front-end audit fixes
   ========================================================================== */

/* WCAG 2.5.8: radio and checkbox targets were 13x13px. Now 24px, label stays clickable. */
.radio-row input[type="radio"],
.radio-row input[type="checkbox"],
.form-field input[type="radio"],
.form-field input[type="checkbox"] {
  width: 1.5rem; height: 1.5rem; flex: none; margin: 0; accent-color: var(--rooted-green);
}
.radio-row label { align-items: center; min-height: 2.75rem; }

/* FAQ group labels were 12px; raised to the small text size used elsewhere. */
.faq-group__heading { font-size: var(--text-sm); }

/* Short landscape screens (phone held sideways): keep the door's "Cross the Threshold"
   button and each page's headline on the first screen. */
@media (max-height: 520px) {
  :root { --immersive-h: calc(100svh - 56px); }
  .page-hero--image, .arrival { min-height: var(--immersive-h); align-items: center; }
  .hero-threshold__door { max-height: calc(100svh - 7rem); }
}


/* ==========================================================================
   v09.39 — giving panel (Be in the Gift > Offer a Gift)
   One card, one centered axis: campaign name, live progress, donation form.
   The thermometer sits directly above the amount buttons so progress is seen
   at the moment of choosing. Equal padding top and bottom (--give-pad).
   ========================================================================== */
:root {
  --give-surface: #FCFFF1;   /* MUST equal the form background set in Zeffy, so the card and the form read as one surface. Change both together. */
  --give-pad: 1.5rem;        /* 24px on phones, 44px from 640px up */
  --give-thermo-h: 120px;    /* Zeffy's own height for the thermometer embed */
  /* Zeffy form frame height. 604px (screens 640px and wider) is measured from the live desktop form: its content ends 552px down,
     plus about 50px of air below, matching the air above. The phone value (700px) is an ESTIMATE: check it once on a real phone.
     Zeffy offers no auto-resize, so this is a fixed number. */
  --give-form-h: 700px;
}
@media (min-width: 640px)  { :root { --give-pad: 2.75rem; --give-form-h: 604px; } }

.give-panel { background: var(--give-surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 1px 2px rgba(37, 40, 32, 0.05), 0 22px 44px -30px rgba(37, 40, 32, 0.38); }
.give-panel__head { padding: var(--give-pad) var(--give-pad) 0; text-align: center; }
.give-panel__eyebrow { margin: 0; font-size: var(--text-sm); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rooted-green); }
.give-panel__title { text-wrap: balance; margin: 0.35em 0 0; font-family: var(--font-display); font-size: var(--text-xl); line-height: 1.2; color: var(--ink); }
.give-panel__thermo { max-width: 32.5rem; margin: var(--space-4) auto 0; }
.give-panel__thermo-frame { display: block; width: 100%; height: var(--give-thermo-h); border: 0; background: transparent; }
.give-panel__rule { height: 1px; background: var(--line); margin: var(--space-2) var(--give-pad) 0; }
.give-panel__form-frame { display: block; width: 100%; height: var(--give-form-h); border: 0; background: transparent; }
.give-panel__noscript { margin: 0; padding: var(--give-pad); text-align: center; }
