/* Additions for the static copy: mobile menu, scrolled header, form notice */
header.is-scrolled { box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); }

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background-color: #f9f6f1;
  padding: 0.5rem 1rem 1rem;
}
.mobile-menu.is-open { display: block; }
.mobile-menu a {
  display: block;
  padding: 0.75rem 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1a1a1a;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.mobile-menu a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 1024px) { .mobile-menu { display: none !important; } }

.form-notice {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 2px;
  font-size: 0.875rem;
  background-color: rgba(61, 90, 62, 0.1);
  color: #3d5a3e;
}
.form-notice.is-error { background-color: rgba(185, 28, 28, 0.08); color: #b91c1c; }

/* Hero banner: always show the whole image, never crop its sides */
section[aria-label="Welcome"] {
  min-height: 0 !important;
}
section[aria-label="Welcome"] > img:first-child {
  object-fit: contain;
}
@media (min-width: 1100px) {
  /* Wide screens: the section takes the banner's exact shape, text sits over the left side */
  section[aria-label="Welcome"] {
    aspect-ratio: 3840 / 1779;
    margin-top: 72px; /* start below the fixed header so the top of the image shows */
  }
  section[aria-label="Welcome"] > div.relative {
    min-height: 0 !important;
    height: 100%;
    padding-top: 0 !important;
    align-items: center; /* centre the welcome block vertically on the banner */
  }
}
@media (max-width: 1099.98px) {
  /* Tablets and phones: the whole banner under the header, with the logo and
     welcome title over its left side; the verse and buttons follow below. */
  section[aria-label="Welcome"] {
    display: grid;
    grid-template-columns: auto 1fr;
    margin-top: 64px;
  }
  section[aria-label="Welcome"] > img:first-child {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    grid-area: 1 / 1 / 2 / 3;
  }
  section[aria-label="Welcome"] > div.absolute {
    position: static;
    grid-area: 1 / 1 / 2 / 3;
    background: linear-gradient(to right, rgba(249, 246, 241, 0.85) 0%, rgba(249, 246, 241, 0.6) 40%, rgba(249, 246, 241, 0.1) 65%, transparent 75%) !important;
  }
  section[aria-label="Welcome"] > div.relative,
  section[aria-label="Welcome"] > div.relative > div,
  section[aria-label="Welcome"] .text-center {
    display: contents;
  }
  /* Logo and divider */
  section[aria-label="Welcome"] > div.relative > div > div:first-child {
    grid-area: 1 / 1;
    z-index: 1;
    align-self: center;
    flex-direction: row;
    gap: 1.25rem;
    padding-left: 2rem;
  }
  section[aria-label="Welcome"] > div.relative > div > div:first-child img {
    width: clamp(90px, 15vw, 150px) !important;
    height: clamp(90px, 15vw, 150px) !important;
  }
  section[aria-label="Welcome"] .w-px {
    display: block;
    align-self: center !important;
    min-height: 0 !important;
    height: clamp(70px, 12vw, 130px);
  }
  section[aria-label="Welcome"] .hero-title {
    grid-area: 1 / 2;
    z-index: 1;
    align-self: center;
    text-align: left;
    padding: 0 1.25rem;
  }
  section[aria-label="Welcome"] .hero-title p:first-child { font-size: clamp(0.75rem, 2.4vw, 1.125rem); margin-bottom: 0.1rem; }
  section[aria-label="Welcome"] .hero-title h1 { font-size: clamp(1.2rem, 4.6vw, 2.6rem) !important; margin-bottom: 0.25rem; white-space: normal; }
  section[aria-label="Welcome"] .hero-title p:last-child { font-size: clamp(0.8rem, 2.5vw, 1.4rem) !important; margin-bottom: 0; }
  section[aria-label="Welcome"] blockquote,
  section[aria-label="Welcome"] blockquote + p,
  section[aria-label="Welcome"] blockquote + p + div {
    grid-column: 1 / -1;
    text-align: center;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  section[aria-label="Welcome"] blockquote { margin: 2rem auto 0.25rem; max-width: 30rem; }
  section[aria-label="Welcome"] blockquote + p + div { justify-content: center; padding-bottom: 3rem; }
}
@media (min-width: 500px) and (max-width: 1099.98px) {
  /* Tablets: the whole hero (logo, title, verse and buttons) sits on the banner */
  section[aria-label="Welcome"] .text-center {
    display: block;
    grid-area: 1 / 2;
    z-index: 1;
    align-self: center;
    text-align: left;
    padding: 0 1.25rem;
  }
  section[aria-label="Welcome"] .hero-title { padding: 0; }
  section[aria-label="Welcome"] blockquote,
  section[aria-label="Welcome"] blockquote + p,
  section[aria-label="Welcome"] blockquote + p + div {
    text-align: left;
    padding: 0;
  }
  section[aria-label="Welcome"] blockquote { margin: clamp(0.4rem, 1.6vw, 1rem) 0 0; max-width: 26rem; }
  section[aria-label="Welcome"] blockquote p { font-size: clamp(0.7rem, 1.8vw, 0.95rem) !important; line-height: 1.45; }
  section[aria-label="Welcome"] blockquote + p { margin: 0.2rem 0 clamp(0.5rem, 2vw, 1.25rem); font-size: clamp(0.6rem, 1.4vw, 0.72rem) !important; }
  section[aria-label="Welcome"] blockquote + p + div {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.6rem;
    padding-bottom: 0;
  }
  section[aria-label="Welcome"] blockquote + p + div a {
    padding: clamp(0.4rem, 1.2vw, 0.75rem) clamp(0.9rem, 2.6vw, 1.75rem);
    font-size: clamp(0.72rem, 1.6vw, 0.875rem);
  }
}
@media (min-width: 768px) and (max-width: 1099.98px) {
  section[aria-label="Welcome"] { margin-top: 72px; }
}
@media (max-width: 499.98px) {
  /* Phones (up to the largest iPhones, about 440px wide): big logo hidden,
     title alone over the banner */
  section[aria-label="Welcome"] { grid-template-columns: 100%; }
  section[aria-label="Welcome"] > img:first-child,
  section[aria-label="Welcome"] > div.absolute { grid-area: 1 / 1; }
  section[aria-label="Welcome"] > div.relative > div > div:first-child { display: none; }
  section[aria-label="Welcome"] .hero-title {
    grid-area: 1 / 1;
    padding: 0 1rem;
    max-width: 62%;
  }
  section[aria-label="Welcome"] .hero-title p:first-child { font-size: clamp(0.75rem, 2.6vw, 1.125rem); }
  section[aria-label="Welcome"] .hero-title h1 { font-size: clamp(1.2rem, 5.2vw, 3rem) !important; }
  section[aria-label="Welcome"] .hero-title p:last-child { font-size: clamp(0.8rem, 2.8vw, 1.5rem) !important; }
}

/* Header menu sits on the left, next to the logo */
nav[aria-label="Main navigation"] {
  justify-content: flex-start !important;
  margin-left: 1.5rem;
}

/* Verse: "the old has gone, the new has come!" always on its own second line */
section[aria-label="Welcome"] blockquote br { display: inline !important; }
@media (max-width: 1099.98px) {
  section[aria-label="Welcome"] blockquote p { white-space: nowrap; }
}

@media (max-width: 499.98px) {
  /* Phones: title, verse and buttons all sit on the banner */
  section[aria-label="Welcome"] .text-center {
    display: block;
    grid-area: 1 / 1;
    z-index: 1;
    align-self: center;
    text-align: left;
    padding: 0 0.9rem;
  }
  section[aria-label="Welcome"] .hero-title { padding: 0; max-width: none; }
  section[aria-label="Welcome"] .hero-title p:first-child { font-size: 0.66rem; margin-bottom: 0; }
  section[aria-label="Welcome"] .hero-title h1 { font-size: clamp(1.05rem, 5vw, 1.35rem) !important; margin-bottom: 0.1rem; }
  section[aria-label="Welcome"] .hero-title p:last-child { font-size: clamp(0.68rem, 3vw, 0.82rem) !important; }
  section[aria-label="Welcome"] blockquote,
  section[aria-label="Welcome"] blockquote + p,
  section[aria-label="Welcome"] blockquote + p + div {
    text-align: left;
    padding: 0;
  }
  section[aria-label="Welcome"] blockquote { margin: 0.35rem 0 0; max-width: none; }
  section[aria-label="Welcome"] blockquote p { font-size: clamp(0.58rem, 2.55vw, 0.7rem) !important; line-height: 1.35; }
  section[aria-label="Welcome"] blockquote + p { margin: 0.1rem 0 0.4rem; font-size: 0.52rem !important; letter-spacing: 0.14em; }
  section[aria-label="Welcome"] blockquote + p + div {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.4rem;
    padding-bottom: 0;
  }
  section[aria-label="Welcome"] blockquote + p + div a {
    padding: 0.3rem 0.75rem;
    font-size: 0.62rem;
    border-width: 1.5px;
  }
  section[aria-label="Welcome"] blockquote + p + div a svg { width: 11px; height: 11px; }
}
