/* ==========================================================================
   Hope Centre — site.css
   New nav bar, homepage content blocks, scroll-reveal, parallax and
   hover-zoom effects. Plain CSS (no build step available), loaded after
   style.css. Reuses the existing colour palette / type scale / buttons
   defined in style.css rather than redefining them.
   ========================================================================== */

:root {
  --hc-white: #ffffff;
  --hc-lightblue: #F1F9FB;
  --hc-darkerlightblue: #D2EDF3;
  --hc-blue: #35B1C9;
  --hc-midblue: #227798;
  --hc-darkblue: #0D3E67;
  --hc-blackkblue: #072137;
}

/* --------------------------------------------------------------------
   Header / navigation bar
   -------------------------------------------------------------------- */

#header {
  padding: 0 !important;
  position: static;
  z-index: 200;
  background: var(--hc-white);
  box-shadow: 0 2px 12px rgba(13, 62, 103, 0.08);
}

#header:before {
  display: none !important;
}

#header .container {
  max-width: 1500px;
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.site-nav__logo {
  display: block;
  flex: 0 0 auto;
}

.site-nav__logo img {
  display: block;
  width: 120px;
  height: auto;
}

@media (max-width: 767px) {
  .site-nav__logo img {
    width: 64px;
  }
}

.site-nav__toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  z-index: 210;
}

.site-nav__toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--hc-darkblue);
  border-radius: 2px;
  transition: transform 250ms ease, opacity 250ms ease;
}

.site-nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.site-nav__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.site-nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

.site-nav__menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav__menu a {
  display: inline-block;
  color: var(--hc-darkblue);
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 20px;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 200ms ease, background-color 200ms ease;
}

.site-nav__menu a:hover,
.site-nav__menu a:focus-visible {
  color: var(--hc-blue);
  background-color: rgba(53, 177, 201, 0.12);
}

.site-nav__menu .button {
  color: var(--hc-white);
}

/* Below ~1100px the full desktop nav ("Family & Kids", "Get a Bible",
   "Support Us", etc.) no longer has room to sit on one line and starts
   wrapping/crowding the logo, so it switches to the same collapsible
   hamburger pattern used on phones well before that happens. */
@media (max-width: 1100px) {
  .site-nav__toggle {
    display: flex;
  }

  /* The menu drops into normal flow below the logo/toggle row instead of
     being fixed at a hardcoded pixel offset, so it can never overlap the
     row above it regardless of logo size or text wrapping. */
  .site-nav__inner {
    flex-wrap: wrap;
  }

  .site-nav__menu {
    order: 3;
    width: 100%;
    background: var(--hc-white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 20px;
    transition: max-height 300ms ease, opacity 250ms ease, padding 300ms ease;
  }

  .site-nav__menu.is-open {
    max-height: 70vh;
    overflow-y: auto;
    opacity: 1;
    padding: 10px 20px 24px;
  }

  .site-nav__menu a {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border-bottom: 1px solid var(--hc-lightblue);
    border-radius: 0;
    font-size: 22px;
  }

  .site-nav__menu a:hover,
  .site-nav__menu a:focus-visible {
    background-color: rgba(53, 177, 201, 0.08);
  }

  .site-nav__menu .button {
    margin-top: 16px;
    text-align: center;
  }
}

@media (min-width: 1101px) {
  .site-nav__toggle {
    display: none;
  }
}

/* Homepage only: nav bar floats transparently over the hero photo
   instead of sitting in its own solid bar. */

body.home #header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  box-shadow: none;
}

body.home .site-nav__menu a {
  color: var(--hc-white);
}

body.home .site-nav__menu a:hover,
body.home .site-nav__menu a:focus-visible {
  color: var(--hc-lightblue);
  background-color: rgba(255, 255, 255, 0.16);
}

body.home .site-nav__toggle span {
  background: var(--hc-white);
}

body.home .site-nav__logo img {
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.45));
}

/* Support Us button: reversed colours (white fill, blue text, white
   outline) so it stands out against the dark-blue nav on the homepage. */
body.home .site-nav__menu .button {
  background: var(--hc-white);
  color: var(--hc-blackkblue);
  border: 2px solid var(--hc-white);
}

body.home .site-nav__menu .button:hover,
body.home .site-nav__menu .button:focus-visible {
  background: transparent;
  color: var(--hc-white);
}

@media (max-width: 1100px) {
  body.home .site-nav__menu {
    background: var(--hc-blackkblue);
  }

  body.home .site-nav__menu a {
    border-bottom-color: rgba(255, 255, 255, 0.15);
  }
}

/* --------------------------------------------------------------------
   Scroll reveal — headings/text/cards fade + rise into view
   -------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
  will-change: opacity, transform;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --------------------------------------------------------------------
   Welcome hero — full-bleed photo behind the headline, sitting right
   under the (transparent, overlapping) nav bar.
   -------------------------------------------------------------------- */

.hero-welcome {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 640px;
  padding: 170px 20px 100px;
}

.hero-welcome__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-welcome__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.12);
  animation: hero-img-in 2.4s ease-out forwards, hero-img-drift 20s ease-in-out 2.4s infinite alternate;
}

@keyframes hero-img-in {
  from { opacity: 0; transform: scale(1.12); }
  to   { opacity: 1; transform: scale(1.05); }
}

@keyframes hero-img-drift {
  from { transform: scale(1.05); }
  to   { transform: scale(1.13); }
}

.hero-welcome__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(7, 33, 55, 0.78) 0%, rgba(7, 33, 55, 0.32) 42%, rgba(7, 33, 55, 0.75) 100%);
}

.hero-welcome__content {
  position: relative;
  z-index: 2;
  max-width: 920px;
}

.hero-welcome__headline {
  color: var(--hc-white);
  font-size: clamp(32px, 5.2vw, 56px);
  line-height: 1.2;
  margin: 0 0 22px;
}

.hero-welcome__lead {
  max-width: 640px;
  margin: 0 auto;
  color: var(--hc-white);
  font-size: clamp(17px, 2vw, 21px);
}

@media (prefers-reduced-motion: reduce) {
  .hero-welcome__img {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

@media (max-width: 767px) {
  .hero-welcome {
    min-height: 520px;
    padding: 130px 20px 70px;
  }
}

/* Hand-drawn circle around a highlighted word (hero headline). Draws
   itself on load, slightly after the headline has faded in. */

.circle-word {
  position: relative;
  display: inline-block;
  padding: 0 6px;
}

.circle-word__svg {
  position: absolute;
  left: 50%;
  top: 60%;
  width: 128%;
  height: 112%;
  transform: translate(-50%, -50%);
  overflow: visible;
  pointer-events: none;
}

.circle-word__svg path {
  fill: none;
  stroke: var(--hc-blue);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 640;
  stroke-dashoffset: 640;
  animation: circle-draw 1.1s ease-out 1.1s forwards;
}

@keyframes circle-draw {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .circle-word__svg path {
    stroke-dashoffset: 0;
    animation: none;
  }
}

/* Wave divider — the mint background of Church Life sweeps up into
   the hero photo above it, instead of a hard edge. */

.wave-divider {
  position: relative;
  margin-top: -90px;
  height: 92px;
  line-height: 0;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: 100%;
}

.wave-divider path {
  fill: var(--hc-lightblue);
}

@media (max-width: 767px) {
  .wave-divider {
    margin-top: -50px;
    height: 56px;
  }
}

/* --------------------------------------------------------------------
   Church Life — full-width mint section holding a rounded, gapped
   grid of photo tiles linking through to the site's key pages/actions.
   -------------------------------------------------------------------- */

.church-life {
  padding: 20px 0 90px;
  background: var(--hc-lightblue);
}

.church-life__intro {
  max-width: 720px;
  margin: 0 auto 46px;
  padding: 0 20px;
  text-align: center;
}

.church-life__intro h2 {
  color: var(--hc-darkblue);
}

.church-life__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

.church-life__tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
}

.church-life__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 600ms ease;
}

.church-life__overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 33, 55, 0.22);
  transition: background 350ms ease;
}

.church-life__title {
  position: relative;
  z-index: 1;
  color: var(--hc-white);
  font-weight: 800;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.2;
  text-align: center;
  padding: 0 20px;
  text-shadow: 0 2px 12px rgba(7, 33, 55, 0.45);
}

.church-life__tile:hover .church-life__img,
.church-life__tile:focus-visible .church-life__img {
  transform: scale(1.08);
}

.church-life__tile:hover .church-life__overlay,
.church-life__tile:focus-visible .church-life__overlay {
  background: rgba(53, 177, 201, 0.55);
}

@media (max-width: 991px) {
  .church-life__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .church-life__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 0 20px;
  }

  .church-life__tile {
    height: 150px;
    border-radius: 14px;
  }

  .church-life__title {
    font-size: 17px;
    padding: 0 10px;
    text-shadow: 0 1px 8px rgba(7, 33, 55, 0.55);
  }
}

/* --------------------------------------------------------------------
   Homepage content blocks
   -------------------------------------------------------------------- */

.block-section {
  padding: 70px 0;
}

.block-section__intro {
  max-width: 720px;
  margin: 0 0 40px;
}

.block-section__intro h2 {
  color: var(--hc-darkblue);
}

.card {
  background: var(--hc-white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(13, 62, 103, 0.08);
  display: flex;
  flex-direction: column;
  transition: transform 350ms ease, box-shadow 350ms ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(13, 62, 103, 0.16);
}

.card__media {
  position: relative;
  overflow: hidden;
  height: 190px;
}

.card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 500ms ease;
}

.card:hover .card__media img,
.card:focus-within .card__media img {
  transform: scale(1.08);
}

.card__body {
  padding: 22px 24px 26px;
}

.card__when {
  display: inline-block;
  color: var(--hc-white);
  background: var(--hc-blue);
  font-weight: 600;
  font-size: 14px;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.card__body h3 {
  margin-bottom: 10px;
  color: var(--hc-darkblue);
}

.card__body p {
  margin-bottom: 0;
  font-size: 16px;
}

/* Generic hover-zoom utility for standalone images (e.g. map, gallery shots) */

.zoom-on-hover {
  overflow: hidden;
  display: block;
}

.zoom-on-hover img {
  transition: transform 500ms ease;
}

.zoom-on-hover:hover img,
.zoom-on-hover:focus-visible img {
  transform: scale(1.06);
}

@media (max-width: 767px) {
  .block-section {
    padding: 50px 0;
  }
}

/* --------------------------------------------------------------------
   Dedicated sub-pages (visit / church / family-kids) — zig-zag layout
   -------------------------------------------------------------------- */

.page-hero {
  padding-top: 90px;
}

.zigzag {
  padding: 20px 0 80px;
}

.zigzag-row {
  display: flex;
  align-items: center;
  gap: 50px;
  margin-bottom: 70px;
}

.zigzag-row:last-child {
  margin-bottom: 0;
}

.zigzag-row--reverse {
  flex-direction: row-reverse;
}

.zigzag-row__media,
.zigzag-row__content {
  flex: 1 1 50%;
  min-width: 0;
}

.zigzag-row__media {
  overflow: hidden;
  border-radius: 10px;
  height: 340px;
}

.zigzag-row__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 500ms ease;
}

.zigzag-row__media:hover img,
.zigzag-row__media:focus-within img {
  transform: scale(1.06);
}

.zigzag-row__content h2 {
  color: var(--hc-darkblue);
}

@media (max-width: 767px) {
  .page-hero {
    padding-top: 50px;
  }

  .zigzag-row,
  .zigzag-row--reverse {
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
  }

  .zigzag-row__media {
    height: 240px;
    width: 100%;
  }
}

/* --------------------------------------------------------------------
   Contact modals — Ask Us Anything / Get a Bible, opened from the
   Church Life tiles.
   -------------------------------------------------------------------- */

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 33, 55, 0.6);
  z-index: 500;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 501;
  width: 92%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--hc-lightblue);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 30px 60px rgba(7, 33, 55, 0.35);
}

.modal[hidden],
.modal-backdrop[hidden] {
  display: none;
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: 0;
  font-size: 30px;
  line-height: 1;
  color: var(--hc-darkblue);
  cursor: pointer;
}

.modal h2 {
  color: var(--hc-midblue);
  margin: 0 0 14px;
}

.modal > p {
  margin: 0 0 24px;
  color: var(--hc-blackkblue);
}

.modal__form label {
  display: block;
  color: var(--hc-midblue);
  font-weight: 700;
  margin: 18px 0 8px;
}

.modal__form label:first-of-type {
  margin-top: 0;
}

.modal__required {
  color: var(--hc-blackkblue);
  font-weight: 400;
}

.modal__form input,
.modal__form textarea {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 24px;
  padding: 14px 20px;
  font-size: 16px;
  font-family: inherit;
  background: var(--hc-white);
}

.modal__form textarea {
  border-radius: 18px;
  resize: vertical;
}

.modal__postcode-row {
  display: flex;
  gap: 10px;
}

.modal__postcode-row input {
  flex: 1 1 auto;
}

.modal__lookup {
  flex: 0 0 auto;
  white-space: nowrap;
}

.modal__hint {
  margin: 8px 4px 0;
  font-size: 14px;
  color: var(--hc-midblue);
  min-height: 18px;
}

.modal__submit {
  margin-top: 26px;
  border-radius: 24px;
}

@media (max-width: 600px) {
  .modal {
    padding: 56px 22px 30px;
  }

  .modal__postcode-row {
    flex-direction: column;
  }
}
