/* ==========================================================================
   HOME — the opening hero and the home-only compositions
   ========================================================================== */

/* ==========================================================================
   HERO — a single full-bleed photograph, blended into the page
   --------------------------------------------------------------------------
   One image spans the whole band. A veil sits over it carrying two effects at
   once — a backdrop blur and an ivory wash — both faded out towards the right
   by the same mask. The result: the headline sits on what reads as a soft
   ivory panel on the left, while he stays sharp and untouched on the right.

   Below 900px the composition stacks instead: a squarer crop of the same
   photograph above, the words below on plain ivory. A blur-behind-text effect
   has nowhere to go on a narrow screen.
   ========================================================================== */

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(540px, 72vh, 720px);
  overflow: hidden;
  background: var(--c-night);
  isolation: isolate;
}

/* ---- The photograph ------------------------------------------------------ */

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* He stands right of centre in the frame; the lectern and the statue of Our
     Lady fall on the left, which is exactly where the veil lands. */
  object-position: 50% 18%;
}

/* The foot of the photograph dissolves into the page, so the band has no hard
   edge and the dark furniture along the bottom of the frame never reads as a
   stripe. */
.hero__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 20%;
  background: linear-gradient(
    180deg,
    rgba(251, 248, 242, 0) 0%,
    rgba(251, 248, 242, 0.55) 55%,
    var(--c-ivory) 100%
  );
  pointer-events: none;
}

/* ---- The veil ------------------------------------------------------------ */

.hero__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;

  backdrop-filter: blur(26px) saturate(0.88);
  -webkit-backdrop-filter: blur(26px) saturate(0.88);

  /* The ivory wash. Not quite opaque even at the far left, so the shape of
     the sanctuary stays faintly legible behind the words. */
  background: linear-gradient(
    96deg,
    rgba(251, 248, 242, 0.97) 0%,
    rgba(251, 248, 242, 0.95) 26%,
    rgba(250, 243, 226, 0.88) 38%,
    rgba(251, 248, 242, 0.52) 47%,
    rgba(251, 248, 242, 0.14) 54%,
    rgba(251, 248, 242, 0) 60%
  );

  /* The same fall-off applied to the blur itself, so the two retreat
     together and there is no visible seam between them. */
  mask-image: linear-gradient(
    96deg,
    #000 0%,
    #000 34%,
    rgba(0, 0, 0, 0.7) 44%,
    rgba(0, 0, 0, 0.24) 52%,
    transparent 60%
  );
  -webkit-mask-image: linear-gradient(
    96deg,
    #000 0%,
    #000 34%,
    rgba(0, 0, 0, 0.7) 44%,
    rgba(0, 0, 0, 0.24) 52%,
    transparent 60%
  );
}

/* A thin gilded light along the very top of the band. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-gold-pale), transparent);
  z-index: 3;
}

/* ---- The words ----------------------------------------------------------- */

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero__copy {
  max-width: 30rem;
  padding-block: var(--s-7);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
  padding: 0.5rem 1rem 0.5rem 0.75rem;
  background: rgba(255, 253, 248, 0.7);
  border: 1px solid var(--c-gold-pale);
  border-radius: var(--r-pill);
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--c-ink-soft);
}

.hero__eyebrow svg {
  width: 14px;
  height: 14px;
  color: var(--c-gold);
  flex: none;
}

.hero__title {
  /* Deliberately smaller than --t-hero: the photograph is carrying the
     drama here, and the whole composition has to fit one laptop screen. */
  font-size: clamp(2.4rem, 1.4rem + 3.3vw, 4.25rem);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.hero__title em {
  font-style: italic;
  color: var(--c-oxblood);
}

.hero__lead {
  max-width: 44ch;
  margin-top: var(--s-5);
  font-size: var(--t-lead);
  line-height: var(--lh-loose);
  color: var(--c-ink-soft);
}

.hero__credentials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-5);
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--c-rule-soft);
  font-size: var(--t-caption);
  letter-spacing: 0.04em;
  color: var(--c-ink-mute);
}

.hero__credentials span {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
}

.hero__credentials span + span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--c-gold);
  margin-right: var(--s-2);
}

/* ---- Stacked composition on narrow screens ------------------------------ */

@media (max-width: 900px) {
  .hero {
    display: block;
    min-height: 0;
    background: linear-gradient(180deg, var(--c-gold-wash) 0%, var(--c-ivory) 70%);
  }

  .hero__media {
    position: relative;
    inset: auto;
  }

  .hero__media img {
    aspect-ratio: 5 / 4;
    object-position: 56% 16%;
  }

  .hero__veil,
  .hero__media::after,
  .hero::after {
    display: none;
  }

  .hero__copy {
    max-width: none;
    padding-block: var(--s-7) var(--s-8);
  }
}

/* ==========================================================================
   DEVOTION PANEL — the Sacred Heart beside an introduction
   ========================================================================== */

.devotion {
  position: relative;
  background: var(--c-night);
  color: var(--c-parchment);
  overflow: hidden;
}

.devotion__inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  padding-block: clamp(3.5rem, 2rem + 5vw, 6.5rem);
}

.devotion__image {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.devotion__image img {
  width: 100%;
  height: auto;
}

.devotion__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    70% 55% at 50% 45%,
    rgba(255, 226, 160, 0.18),
    transparent 72%
  );
}

.devotion h2 {
  color: var(--c-paper);
}

.devotion p {
  margin-top: var(--s-5);
  max-width: 58ch;
  font-size: var(--t-lead);
  line-height: var(--lh-loose);
  color: rgba(244, 238, 226, 0.72);
}

.devotion .eyebrow::after {
  background: linear-gradient(90deg, rgba(176, 141, 63, 0.5), transparent);
}

@media (max-width: 860px) {
  .devotion__inner {
    grid-template-columns: 1fr;
  }

  .devotion__image {
    max-width: 420px;
  }
}

/* ==========================================================================
   FEATURED WRITING — the book, given its own composition
   ========================================================================== */

.featured-book {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
}

/* A rendered spine-and-cover, since no cover photograph exists yet. */
.book-cover {
  position: relative;
  aspect-ratio: 3 / 4.4;
  background:
    linear-gradient(100deg, var(--c-oxblood-deep) 0 7%, var(--c-oxblood) 7% 100%);
  border-radius: 2px 6px 6px 2px;
  box-shadow:
    var(--shadow-lg),
    inset -1px 0 0 rgba(255, 255, 255, 0.08);
  padding: var(--s-6) var(--s-5) var(--s-6) calc(7% + var(--s-5));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #f6ece0;
  overflow: hidden;
}

.book-cover::before {
  content: "";
  position: absolute;
  inset: 14px 12px 14px calc(7% + 12px);
  border: 1px solid rgba(212, 184, 106, 0.4);
  border-radius: 2px;
  pointer-events: none;
}

.book-cover__mark {
  width: 28px;
  height: 28px;
  color: var(--c-gold-bright);
}

.book-cover__title {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 500;
  line-height: 1.3;
  text-wrap: balance;
}

.book-cover__author {
  font-size: 0.625rem;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: rgba(246, 236, 224, 0.75);
}

@media (max-width: 760px) {
  .featured-book {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .book-cover {
    width: 240px;
  }
}

/* ==========================================================================
   MINISTRY TILES
   ========================================================================== */

.tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--c-night);
  min-height: 300px;
  color: var(--c-paper);
}

.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
  transition: transform var(--d-vast) var(--e-sacred), opacity var(--d-slow) var(--e-out);
}

.tile:hover img {
  transform: scale(1.05);
  opacity: 0.44;
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(26, 16, 9, 0.9) 100%);
}

.tile__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  min-height: 300px;
  padding: var(--s-6);
}

.tile__eyebrow {
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--c-gold-bright);
  margin-bottom: var(--s-3);
}

.tile__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: var(--lh-snug);
  color: var(--c-paper);
}

.tile__text {
  margin-top: var(--s-3);
  font-size: var(--t-small);
  line-height: var(--lh-body);
  color: rgba(244, 238, 226, 0.78);
  max-width: 40ch;
}
