/* Home: screen-to-screen light shell composition */

.home-main-bleed {
  max-width: none !important;
  width: 100%;
  padding: 0 !important;
  margin: 0;
}

.home-hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: flex-end;
  color: #f8fafc;
  overflow: hidden;
  background: #0b1c2c;
}

.home-hero-stage {
  position: absolute;
  inset: 0;
}

.home-hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.1s ease, transform 6s ease;
}

.home-hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.home-hero-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

/* Quick-forming author mosaic interlude */
.home-hero-mosaic {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
  background: #0b1c2c;
}

.home-hero-mosaic.is-on {
  opacity: 1;
  pointer-events: auto;
}

.home-hero-stage.is-mosaic .home-hero-slide {
  opacity: 0 !important;
}

.home-hero-mosaic-cell {
  position: relative;
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: #fff;
  background: #1a2d42;
  opacity: 0;
  transform: scale(0.86);
  transition:
    opacity 0.35s ease var(--mh-delay, 0ms),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1) var(--mh-delay, 0ms);
}

.home-hero-mosaic-cell.is-in {
  opacity: 1;
  transform: scale(1);
}

.home-hero-mosaic-cell:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.home-hero-mosaic-cell:nth-child(5) { grid-column: span 2; }
.home-hero-mosaic-cell:nth-child(10) { grid-column: span 2; grid-row: span 2; }

.home-hero-mosaic-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-hero-mosaic.is-hymnals .home-hero-mosaic-cell {
  background: #102536;
}

.home-hero-mosaic.is-hymnals .home-hero-mosaic-cell img {
  object-fit: contain;
  background: #0b1c2c;
}

.home-hero-mosaic-initial {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  font-weight: 700;
  background: linear-gradient(135deg, #1b5fa0, #0d3b66);
}

.home-hero-mosaic-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.45rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.home-hero-mosaic-cell:hover .home-hero-mosaic-name {
  opacity: 1;
}

@media (max-width: 700px) {
  .home-hero-mosaic {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
  }
  .home-hero-mosaic-cell:nth-child(n+13) { display: none; }
  .home-hero-mosaic-cell:nth-child(1),
  .home-hero-mosaic-cell:nth-child(5),
  .home-hero-mosaic-cell:nth-child(10) {
    grid-column: span 1;
    grid-row: span 1;
  }
}

.home-hero-veil {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(90deg, rgba(8, 18, 30, 0.88) 0%, rgba(8, 18, 30, 0.55) 48%, rgba(8, 18, 30, 0.28) 100%),
    linear-gradient(180deg, rgba(8, 18, 30, 0.2) 0%, rgba(8, 18, 30, 0.72) 100%);
}

.home-hero-copy {
  position: relative;
  z-index: 4;
  width: 100%;
  max-width: 100%;
  padding: 3.5rem 1.25rem 2.75rem;
  box-sizing: border-box;
}

.home-hero-brand {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.15rem, 7.2vw, 4.2rem);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 0.75rem;
  max-width: 12ch;
}

.home-hero-lead {
  max-width: 34rem;
  font-size: 1.08rem;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.92);
  margin: 0 0 1.35rem;
}

.home-hero-search {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(140px, 0.7fr) auto;
  gap: 0.5rem;
  max-width: 720px;
  width: 100%;
}

.home-hero-search .form-control,
.home-hero-search .form-select {
  min-height: 50px;
  width: 100%;
  max-width: 100%;
  border-radius: 0.65rem;
  border: 0;
  font-size: 1rem;
}

.home-hero-search .btn {
  min-height: 50px;
  border-radius: 0.65rem;
  font-weight: 700;
  padding-inline: 1.2rem;
}

@media (max-width: 700px) {
  .home-hero {
    min-height: min(68vh, 520px);
    align-items: flex-end;
  }

  .home-hero-copy {
    padding: 2rem 1.1rem 1.5rem;
  }

  .home-hero-brand {
    font-size: clamp(1.85rem, 8.5vw, 2.45rem);
    max-width: none;
    margin-bottom: 0.55rem;
  }

  .home-hero-lead {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    max-width: 28rem;
  }

  .home-hero-search {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .home-hero-search .form-control,
  .home-hero-search .form-select,
  .home-hero-search .btn {
    min-height: 44px;
    font-size: 0.94rem;
    border-radius: 0.55rem;
  }

  .home-hero-search .btn {
    width: 100%;
    padding-inline: 1rem;
  }
}

@media (max-width: 380px) {
  .home-hero-copy {
    padding: 1.65rem 0.9rem 1.25rem;
  }

  .home-hero-brand {
    font-size: 1.7rem;
  }

  .home-hero-lead {
    font-size: 0.9rem;
  }
}

.home-screen {
  padding: clamp(2.75rem, 5vw, 4rem) 0;
  border-top: 1px solid #e5ecf5;
}

.home-screen.is-tint {
  background: linear-gradient(180deg, #f5f8fc 0%, #ffffff 100%);
}

.home-screen.is-soft { background: #f7f9fc; }

.home-screen-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  margin-bottom: 1.35rem;
}

.home-screen-head .home-section-kicker { margin-bottom: 0.35rem; }

.home-screen-head .home-section-title { margin-bottom: 0.25rem; }

.home-screen-lead {
  margin: 0;
  color: #5f7081;
  max-width: 38rem;
}

.home-paths {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (max-width: 900px) {
  .home-paths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.home-path {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 0.85rem;
  align-items: start;
  padding: 1rem 1.05rem;
  border-radius: 0.85rem;
  border: 1px solid #e1e8f0;
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.home-path:hover {
  border-color: #bcd0e6;
  transform: translateY(-2px);
  color: inherit;
}

.home-path-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(27, 95, 160, 0.1);
  color: #1b5fa0;
  font-size: 1.15rem;
  grid-row: span 2;
}

.home-path strong {
  font-size: 1.05rem;
  color: #122033;
  grid-column: 2;
}

.home-path span {
  font-size: 0.84rem;
  color: #6b7c8d;
  grid-column: 2;
}

.home-tools {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr 0.95fr;
  gap: 0.85rem;
}

@media (max-width: 991px) {
  .home-tools { grid-template-columns: 1fr; }
}

.home-tool {
  border: 1px solid #e1e8f0;
  border-radius: 1rem;
  background: #fff;
  padding: 1.15rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.home-tool h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.45rem;
  color: #122033;
  margin: 0 0 0.35rem;
}

.home-tool p {
  color: #5f7081;
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
}

.home-tool-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.home-tool-date {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.home-tool-date .form-control,
.home-tool-date .btn {
  min-height: 44px;
  border-radius: 0.6rem;
}

.home-tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.home-tool-chip {
  display: inline-flex;
  flex-direction: column;
  padding: 0.45rem 0.65rem;
  border-radius: 0.55rem;
  border: 1px solid #d6e1ee;
  background: #f8fafc;
  color: #1e3348;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.82rem;
}

.home-tool-chip:hover {
  background: #0d3b66;
  border-color: #0d3b66;
  color: #fff;
}

.home-tool-chip small {
  font-weight: 500;
  opacity: 0.72;
  font-size: 0.68rem;
}

.home-tool-chip:hover small { color: #fff; opacity: 0.95; }

.home-hymn-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (max-width: 991px) {
  .home-hymn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .home-hymn-grid { grid-template-columns: 1fr; }
}

.home-hymn-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e4ebf3;
  border-radius: 0.9rem;
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  height: 100%;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.home-hymn-card:hover {
  transform: translateY(-3px);
  border-color: #bcd0e6;
  color: inherit;
}

.home-hymn-card img,
.home-hymn-card .home-hymn-fallback {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  background: #e8eef5;
}

.home-hymn-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: #0d3b66;
}

.home-hymn-card-body {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.home-hymn-card-body strong {
  color: #122033;
  font-size: 0.98rem;
  line-height: 1.3;
}

.home-hymn-card-body span {
  color: #6b7c8d;
  font-size: 0.8rem;
}

.home-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

@media (max-width: 900px) {
  .home-split { grid-template-columns: 1fr; }
}

.home-rail-card {
  border: 1px solid #e1e8f0;
  border-radius: 0.9rem;
  background: #fff;
  padding: 0.9rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  height: 100%;
}

.home-rail-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #122033;
  margin: 0 0 0.75rem;
}

.home-rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.home-rail-list a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 0.35rem;
  border-radius: 0.55rem;
}

.home-rail-list a:hover {
  background: #f7fafc;
  color: inherit;
}

.home-rail-thumb {
  width: 44px;
  height: 44px;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #e8eef5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  color: #0d3b66;
}

.home-rail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-rail-copy strong {
  display: block;
  font-size: 0.9rem;
  color: #122033;
}

.home-rail-copy small {
  color: #6b7c8d;
  font-size: 0.75rem;
}

.home-ad {
  text-align: center;
  padding: 0.5rem 0 0;
}

.home-connect-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (max-width: 991px) {
  .home-connect-grid { grid-template-columns: 1fr; }
}

.home-connect-card {
  border: 1px solid #e1e8f0;
  border-radius: 0.9rem;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  height: 100%;
  min-height: 0;
}

.home-connect-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: #122033;
}

.home-x-fallback {
  margin: 0.65rem 0 0;
  font-size: 0.86rem;
  color: #5f7081;
}

.home-x-fallback a {
  color: #1b5fa0;
  font-weight: 600;
}

/* About · Support · Subscribe — one section */
.home-unity {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (max-width: 900px) {
  .home-unity { grid-template-columns: 1fr; }
}

.home-unity-card {
  border: 1px solid #e1e8f0;
  border-radius: 1rem;
  background: #fff;
  padding: 1.25rem 1.3rem 1.35rem;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.home-unity-card.is-support {
  background:
    linear-gradient(160deg, #0d3b66 0%, #1b5fa0 55%, #163a5c 100%);
  border-color: transparent;
  color: #f8fafc;
}

.home-unity-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7c8d;
}

.home-unity-card.is-support .home-unity-kicker {
  color: rgba(226, 232, 240, 0.78);
}

.home-unity-card h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.45rem;
  margin: 0 0 0.55rem;
  color: #122033;
}

.home-unity-card.is-support h2 {
  color: #fff;
}

.home-unity-card p {
  color: #5f7081;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0 0 1rem;
  flex: 1;
}

.home-unity-card.is-support p {
  color: rgba(226, 232, 240, 0.9);
}

.home-unity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.home-subscribe-form .form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #3d4a5a;
  margin-bottom: 0.25rem;
}

.home-subscribe-form .form-control {
  border-radius: 0.55rem;
  border-color: #d6e1ee;
  min-height: 42px;
}

.home-subscribe-form .form-control:focus {
  border-color: #1b5fa0;
  box-shadow: 0 0 0 0.2rem rgba(27, 95, 160, 0.12);
}

.home-subscribe-form .btn {
  border-radius: 0.55rem;
  font-weight: 700;
  min-height: 44px;
}

.home-subscribe-note {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  color: #6b7c8d;
}

.home-footer-cta {
  text-align: center;
  padding: 1.25rem 0;
  background: #f5f8fc;
  border-top: 1px solid #e5ecf5;
}
