/* Homepage block layout. Core blocks keep the approved section design. */

.wp-block-columns.split,
.wp-block-columns.restore-grid,
.wp-block-columns.cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.wp-block-columns.restore-grid { grid-template-columns: 1.15fr 0.85fr; }

.wp-block-columns.card-row,
.card-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.services .services-more {
  display: flex;
  justify-content: center;
  margin: 36px 0 0;
}

.wp-block-columns.project-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.wp-block-columns.card-row > .wp-block-column,
.wp-block-columns.project-grid > .wp-block-column,
.wp-block-columns.split > .wp-block-column,
.wp-block-columns.restore-grid > .wp-block-column,
.wp-block-columns.cta-row > .wp-block-column {
  margin: 0;
  padding: 0;
  min-width: 0;
}

.hero-slides .wp-block-image {
  position: absolute;
  inset: 0;
  margin: 0;
  height: 100%;
}

.hero-slides .wp-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.who .wp-block-image img,
.community .wp-block-image img {
  width: 100%;
  height: 460px;
  object-fit: cover;
}

.jsg-section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  color: var(--jsg-black);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.jsg-section-label::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--jsg-gold);
}

.emblem {
  display: block;
  width: 84px;
  height: 84px;
  object-fit: contain;
  background: transparent;
}

.service-card .emblem { transition: transform 0.35s ease; }
.service-card:hover .emblem { transform: scale(1.06); }

.way .emblem {
  width: 78px;
  height: 78px;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 50%;
  transition: box-shadow 0.45s ease;
}

.way-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 6px 2px 0;
  border: 0;
  background: transparent;
  color: var(--jsg-black);
  cursor: pointer;
}

.way-highlight {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  box-sizing: border-box;
  border: 2px solid #b20731;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #ffffff;
  pointer-events: none;
  transition: transform 0.55s ease;
}

.way li.is-active,
.way li:hover,
.way li:focus-within { color: #b20731; }

.way li:hover .emblem,
.way li:focus-within .emblem {
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px #b20731;
}

.way li.is-active h3,
.way li:hover h3,
.way li:focus-within h3 {
  border-bottom: 2px solid #b20731;
  color: #b20731;
}

.way-rule,
.gold-line {
  display: block;
  width: 48px;
  height: 2px;
  background: var(--jsg-gold);
}

.way-rule { margin: 16px auto 0; }
.gold-line { margin: 0 0 16px; }

.umbrella-frame {
  width: 100%;
  margin: 0;
  aspect-ratio: 630 / 390;
  overflow: hidden;
  background: #ffffff;
}

.umbrella-frame .umbrella-art {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: left center;
}

.restore em {
  font-style: normal;
  font-weight: 700;
  color: #b20731;
}

.restore .hero-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  width: 100%;
}

.restore .hero-actions .btn {
  width: 100%;
  min-height: 52px;
  height: 100%;
  text-align: center;
}

.gold-frame {
  position: absolute;
  inset: 12px;
  z-index: 2;
  border: 1px solid var(--jsg-gold);
  pointer-events: none;
}

.gold-frame::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--jsg-gold);
}

.section.projects .section-head { align-items: center; }

.section.projects .section-head h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  margin-top: 16px;
  background: var(--jsg-gold);
}

.section.projects .project-card > span:not(.gold-frame) { z-index: 3; }

.photo-frame,
.partner-photo { position: relative; margin: 0; }

.photo-frame img,
.community .photo-frame img,
.who img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  object-position: center;
}

.partner-block { margin-top: 72px; }
.partner-block h2,
.community .partner-block h2 { max-width: 22em; }

.partner-photo { min-width: 0; }
.partner-stage .partner-photo img,
.community .partner-stage img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}

.partner-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.partner-list img,
.community .partner-list img {
  width: auto;
  max-width: 168px;
  height: 72px;
  object-fit: contain;
  object-position: left center;
}

.partner-list h3 {
  margin: 14px 0 8px;
  font-family: Manrope, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-transform: none;
}

.partner-list p { margin: 0; color: var(--jsg-charcoal); }
.partner-list a {
  display: inline-block;
  margin-top: 10px;
  color: var(--jsg-red);
  font-size: 14px;
  font-weight: 700;
}

.footer-brand {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
}

.footer-brand svg { width: 42px; height: 42px; display: block; }

@media (min-width: 768px) {
  .way-viewport { height: auto; overflow: visible; }
  .way-track {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    position: relative;
    height: auto;
    gap: 10px;
  }
  .way li {
    position: static;
    left: auto;
    top: auto;
    width: auto;
    opacity: 1;
    transform: none;
  }
  .way .way-prev,
  .way .way-next { display: none; }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .way .emblem { width: 62px; height: 62px; }
  .way h3,
  .way li.is-active h3 {
    max-width: 100%;
    font-size: 0.62rem;
    letter-spacing: 0.02em;
    line-height: 1.25;
  }
}

@media (min-width: 1101px) {
  .way h3,
  .way li.is-active h3,
  .way li:hover h3,
  .way li:focus-within h3 {
    max-width: none;
    font-size: 0.72rem;
    letter-spacing: 0.045em;
    white-space: nowrap;
  }
}

.band-break {
  display: grid;
  align-items: center;
  height: 72px;
  background: linear-gradient(#ffffff, #f7f4ee 55%, #ffffff);
}

.band-break::before {
  content: "";
  display: block;
  width: 75%;
  height: 1px;
  margin: 0 auto;
  background: var(--jsg-gold);
}

.section.projects .section-head h2::after {
  content: none;
  display: none;
}

.restore h2.restore-title {
  max-width: 18em;
  color: var(--jsg-gold);
  font-size: clamp(2.15rem, 3.3vw, 3.35rem);
}

.restore-message {
  display: block;
  max-width: 28em;
  margin: 14px 0 0;
  color: var(--jsg-black);
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(1.28rem, 1.7vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-transform: none;
}

.umbrella-frame { position: relative; }

.rain {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 64%;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 0%, #000 36%, transparent 88%);
  mask-image: linear-gradient(#000 0%, #000 36%, transparent 88%);
}

.who h2.who-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
  overflow: visible;
  container-type: normal;
  font-size: clamp(1.55rem, 6.4vw, 3.2rem);
  line-height: 0.98;
}

.who-still {
  display: block;
  max-width: 100%;
  color: #0a0a0a;
}

.rolodex {
  display: block;
  width: max-content;
  max-width: 100%;
  height: 1.5em;
  overflow: hidden;
  color: #b20731;
  line-height: 1.2;
}

.rolodex-window { display: block; height: 1.5em; overflow: hidden; }

.rolodex-track { display: flex; flex-direction: column; }

.rolodex-track span {
  display: block;
  box-sizing: border-box;
  height: 1.5em;
  line-height: 1.2;
  padding: 0.08em 0.08em 0 0;
  white-space: nowrap;
}

.who figure,
.section.community .photo-frame {
  width: fit-content;
  max-width: 100%;
  justify-self: end;
}

.service-card[href="/construction/"] .emblem {
  width: 112px;
  height: 112px;
}

.section.projects .project-preview {
  width: 100%;
  margin-inline: auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.section.projects .project-card {
  min-width: 0;
}

.section.projects .project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 1100px) {
  .section.projects .project-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .section.projects .project-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
    scroll-snap-type: none;
  }

  .section.projects .project-preview .project-card {
    flex: none;
    width: auto;
    min-width: 0;
  }

  .section.projects .strip-btn {
    display: none;
  }
}

.community-title .gold { color: #c9a15b; }

.section-pause {
  display: grid;
  align-items: center;
  height: 72px;
}

.section-pause::before {
  content: "";
  width: 75%;
  height: 1px;
  margin: 0 auto;
  background: var(--jsg-gold);
}

.section.way {
  background: #f3f0ea;
  padding-block: clamp(56px, 7vw, 104px);
}

.section.restore { padding-bottom: clamp(36px, 5vw, 72px); }

.section.projects { padding-top: clamp(28px, 4vw, 64px); }

.section.community { padding-top: clamp(40px, 5vw, 80px); }

.project-card { aspect-ratio: 3 / 2; }

.btn:hover,
.btn:focus-visible {
  background: #b20731;
  border-color: #b20731;
  color: #ffffff;
}

.btn-red:hover,
.btn-red:focus-visible {
  background: #b20731;
  border-color: #b20731;
  color: #ffffff;
}

.rain span {
  position: absolute;
  top: -40%;
  width: 1px;
  height: 220%;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 26px,
    rgba(70, 78, 86, 0.38) 26px 40px
  );
  animation: rain-fall 2s linear infinite;
  will-change: transform;
}

@keyframes rain-fall {
  to { transform: translate3d(0, 40px, 0); }
}
