/*
 * PBVM Homepage
 *
 * Existing Divi prototype can remain in place while the theme is activated.
 * Move the hero markup to the class names below when convenient.
 */

.pbvm-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    background-color: var(--pbvm-ink);
    background-position: center;
    background-size: cover;
    color: #fff;
}

.pbvm-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(22,27,29,0.94) 0%,
        rgba(22,27,29,0.76) 35%,
        rgba(22,27,29,0.28) 68%,
        rgba(22,27,29,0.05) 100%
    );
}

.pbvm-hero__content {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: inherit;
    flex-direction: column;
    justify-content: center;
    width: min(56%, 650px);
    padding: clamp(3rem, 7vw, 6rem) 0;
}

.pbvm-hero__title {
    margin: 1.4rem 0 1.8rem;
    color: #fff;
    font-size: clamp(4rem, 7vw, 6.5rem);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 0.92;
}

.pbvm-hero__lede {
    max-width: 590px;
    margin-bottom: 2rem;
    color: rgba(255,255,255,0.86);
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    line-height: 1.55;
}

.pbvm-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pbvm-hero__meta {
    margin-top: 2.5rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.60);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.17em;
    line-height: 1.5;
    text-transform: uppercase;
}

@media (max-width: 980px) {
    .pbvm-hero__content {
        width: min(75%, 650px);
    }
}

@media (max-width: 767px) {
    .pbvm-hero {
        min-height: 560px;
    }

    .pbvm-hero::before {
        background: rgba(22,27,29,0.72);
    }

    .pbvm-hero__content {
        width: 100%;
    }

    .pbvm-hero__title {
        font-size: clamp(3.3rem, 16vw, 5rem);
    }
}

/* v1.0.1 — remove Divi's prototype-page whitespace above the homepage hero.
 * The first homepage section/row is the hero wrapper on the current staging
 * build. Keeping this front-page-only prevents the rule from touching archive
 * and interior pages.
 */
body.home .et-l--post > .et_builder_inner_content > .et_pb_section:first-child {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.home .et-l--post > .et_builder_inner_content > .et_pb_section:first-child > .et_pb_row:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* When the hero Code module uses the PBVM class, make its width line up with
 * the header and keep the photograph from acquiring module-level whitespace. */
body.home .pbvm-hero {
    width: 100%;
    margin-top: 0;
}


/* v1.0.2 — intentional breathing room between masthead and hero.
 * Divi 5 can place the front-page modules in slightly different wrappers than
 * Divi 4, so target the Theme Builder body rather than relying only on the
 * legacy et_builder_inner_content selector used in v1.0.1.
 */
body.home .et-l--body > .et_builder_inner_content > .et_pb_section:first-child,
body.home .et-l--body .et_pb_section:first-child {
    margin-top: 0 !important;
    padding-top: 50px !important;
}

body.home .et-l--body .et_pb_section:first-child > .et_pb_row:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Preserve enough room for the archival metadata line at the bottom of the
 * hero instead of allowing a tightly-sized Divi wrapper to crop it. */
body.home .pbvm-hero {
    min-height: 620px;
    height: auto;
    overflow: hidden;
}

body.home .pbvm-hero__content {
    box-sizing: border-box;
    padding-bottom: 48px;
}

/* Shared vertical rhythm for the homepage sections that follow the hero. */
body.home .pbvm-home-section {
    padding-block: clamp(64px, 7vw, 96px);
}

body.home .pbvm-home-section + .pbvm-home-section {
    border-top: 1px solid var(--pbvm-line);
}

@media (max-width: 980px) {
    body.home .et-l--body > .et_builder_inner_content > .et_pb_section:first-child,
    body.home .et-l--body .et_pb_section:first-child {
        padding-top: 32px !important;
    }
}


/* v1.1.0 — Explore the Archive homepage section */
body.home .pbvm-explore {
    width: min(1026px, calc(100% - 40px));
    margin-inline: auto;
    padding-top: clamp(44px, 5vw, 70px);
    padding-bottom: clamp(52px, 6vw, 82px);
}

.pbvm-explore__intro {
    margin-bottom: clamp(24px, 3vw, 38px);
}

.pbvm-explore__intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: end;
    margin-top: 14px;
}

.pbvm-explore__intro h2 {
    max-width: 760px;
    margin: 0;
    color: var(--pbvm-ink);
    font-size: clamp(2rem, 3.2vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 1.1;
}

.pbvm-explore__intro p {
    margin: 0 0 6px;
    color: var(--pbvm-muted);
    font-size: clamp(1rem, 1.35vw, 1.15rem);
    line-height: 1.65;
}

@media (max-width: 767px) {
    body.home .pbvm-explore {
        width: min(100% - 28px, 1026px);
    }

    .pbvm-explore__intro-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* v1.2.4 — compact archive introduction. Scope to the homepage shortcode. */
body.home .pbvm-explore {
    padding-top: 20px !important;
    padding-bottom: 46px !important;
}
body.home .pbvm-explore__intro {
    margin-bottom: 24px !important;
}
body.home .pbvm-explore__intro-grid {
    display: block !important;
    margin-top: 12px !important;
}
body.home .pbvm-explore__intro h2 {
    max-width: none !important;
    margin: 0 0 10px !important;
    font-size: clamp(30px, 3.1vw, 40px) !important;
    line-height: 1.14 !important;
    letter-spacing: -0.035em !important;
    font-weight: 750 !important;
}
body.home .pbvm-explore__intro p {
    max-width: 790px !important;
    margin: 0 !important;
    font-size: clamp(15px, 1.25vw, 17px) !important;
    line-height: 1.6 !important;
}
/* Divi's surrounding row/section can add space outside the shortcode. */
body.home .et_pb_row:has(> .et_pb_column .pbvm-explore),
body.home .et_pb_row:has(.pbvm-explore) {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
@media (max-width: 767px) {
    body.home .pbvm-explore { padding-top: 12px !important; padding-bottom: 34px !important; }
    body.home .pbvm-explore__intro h2 { font-size: clamp(28px, 7vw, 34px) !important; }
    body.home .pbvm-explore__intro { margin-bottom: 20px !important; }
}

/* v1.3.2 — archive-heading detail only. */
.pbvm-explore .pbvm-explore__intro { position: relative; }
.pbvm-explore .pbvm-explore__intro::after { content: ""; display: block; width: min(180px,45%); height: 4px; margin-top: 18px; background: linear-gradient(to right,var(--pbvm-red) 0 34%,var(--pbvm-gold) 34% 67%,#36749a 67%); }

/* v1.4.3 — homepage archive photographic card refresh. Scoped to shortcode. */
body.home .pbvm-explore .pbvm-archive-grid {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px;
}
body.home .pbvm-explore .pbvm-archive-grid > .pbvm-archive-card,
body.home .pbvm-explore .pbvm-archive-grid > .pbvm-archive-card:nth-child(-n+2),
body.home .pbvm-explore .pbvm-archive-grid > .pbvm-archive-card:nth-child(6) {
  grid-column:auto; min-height:0; display:flex; flex-direction:column;
  padding:0; gap:0; background:#faf8f2; color:#20282d;
  border:1px solid #dcd6ca; border-radius:4px; overflow:hidden;
  box-shadow:0 2px 8px rgba(20,45,58,.04);
}
body.home .pbvm-explore .pbvm-archive-card::before {z-index:3;height:4px;}
body.home .pbvm-explore .pbvm-archive-card__photo {
  position:relative; height:auto; aspect-ratio:1.75; overflow:hidden; background:#e6e0d4;
}
body.home .pbvm-explore .pbvm-archive-card__photo img {
  width:100%;height:100%;display:block;object-fit:cover;
  transition:transform .35s ease;
}
body.home .pbvm-explore .pbvm-archive-card:hover .pbvm-archive-card__photo img {transform:scale(1.045);}
body.home .pbvm-explore .pbvm-archive-card__content {
  display:flex; flex-direction:column; flex:1; padding:19px 21px 20px;
}
body.home .pbvm-explore .pbvm-archive-card__top {gap:12px;align-items:center;}
body.home .pbvm-explore .pbvm-archive-card__number {font-size:11px;color:#a33d36;}
body.home .pbvm-explore .pbvm-archive-card__eyebrow {font-size:10px;color:#677179;letter-spacing:.12em;}
body.home .pbvm-explore .pbvm-archive-card__body,
body.home .pbvm-explore .pbvm-archive-grid > .pbvm-archive-card:nth-child(6) .pbvm-archive-card__body {
  margin:0;padding:14px 0 0;
}
body.home .pbvm-explore .pbvm-archive-card h3 {
  color:#20282d;font-size:clamp(20px,2vw,25px);line-height:1.13;letter-spacing:-.03em;margin:0 0 9px;
}
body.home .pbvm-explore .pbvm-archive-card p {
  color:#535d60;font-size:13px;line-height:1.52;opacity:1;
}
body.home .pbvm-explore .pbvm-archive-card__cta,
body.home .pbvm-explore .pbvm-archive-grid > .pbvm-archive-card:nth-child(6) .pbvm-archive-card__cta {
  margin-top:auto;padding-top:18px;border:0;color:#a33d36;
  font-size:10px;letter-spacing:.12em;grid-column:auto;
}
body.home .pbvm-explore .pbvm-archive-card:hover {border-color:#b9a996;box-shadow:0 12px 28px rgba(20,45,58,.13);}
@media(max-width:900px){body.home .pbvm-explore .pbvm-archive-grid {grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:580px){body.home .pbvm-explore .pbvm-archive-grid {grid-template-columns:1fr;gap:16px;} body.home .pbvm-explore .pbvm-archive-card__photo {aspect-ratio:2.15;} }
@media(prefers-reduced-motion:reduce){body.home .pbvm-explore .pbvm-archive-card__photo img {transition:none;}body.home .pbvm-explore .pbvm-archive-card:hover .pbvm-archive-card__photo img {transform:none;}}

/* v1.4.4 — five distinct destinations; responsive layout without blank sixth tile. */
@media (min-width:901px) {
 body.home .pbvm-explore .pbvm-archive-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }
 body.home .pbvm-explore .pbvm-archive-grid > .pbvm-archive-card { grid-column:span 2; }
 body.home .pbvm-explore .pbvm-archive-grid > .pbvm-archive-card:nth-child(4) { grid-column:2 / span 2; }
 body.home .pbvm-explore .pbvm-archive-grid > .pbvm-archive-card:nth-child(5) { grid-column:4 / span 2; }
}


/* v1.4.5 — sixth grid cell: independent History and About PBVM links. */
body.home .pbvm-explore .pbvm-archive-grid > .pbvm-archive-split {
  grid-column: auto; min-width: 0; min-height: 0;
  display: flex; flex-direction: column; overflow: hidden;
  background: #faf8f2; border: 1px solid #dcd6ca; border-radius: 4px;
  box-shadow: 0 2px 8px rgba(20,45,58,.04);
}
body.home .pbvm-explore .pbvm-archive-split__panel {
  position: relative; display: flex; flex: 1 1 50%; flex-direction: column;
  justify-content: center; min-height: 0; padding: 22px 23px;
  color: #20282d; text-decoration: none;
  transition: background-color .2s ease;
}
body.home .pbvm-explore .pbvm-archive-split__panel:hover,
body.home .pbvm-explore .pbvm-archive-split__panel:focus-visible { background-color: #eee9df; }
body.home .pbvm-explore .pbvm-archive-split__panel--history {
  border-bottom: 1px solid #dcd6ca;
  background: linear-gradient(115deg, #faf8f2 54%, rgba(191,58,49,.07));
}
body.home .pbvm-explore .pbvm-archive-split__panel--about {
  background: linear-gradient(115deg, #faf8f2 54%, rgba(31,92,128,.08));
}
body.home .pbvm-explore .pbvm-archive-split__eyebrow {
  display: block; margin-bottom: 7px; color: #6b7378;
  font-size: 10px; font-weight: 800; letter-spacing: .15em;
}
body.home .pbvm-explore .pbvm-archive-split h3 {
  padding: 0; margin: 0 0 7px; color: #20282d;
  font-size: clamp(19px,1.8vw,23px); line-height: 1.16; letter-spacing: -.025em;
}
body.home .pbvm-explore .pbvm-archive-split p {
  padding: 0; margin: 0 0 11px; color: #535d60;
  font-size: 12px; line-height: 1.45;
}
body.home .pbvm-explore .pbvm-archive-split__cta {
  color: #ae3f37; font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
}
body.home .pbvm-explore .pbvm-archive-split__panel--about .pbvm-archive-split__cta { color: #287092; }
@media (min-width:901px) {
  body.home .pbvm-explore .pbvm-archive-grid > .pbvm-archive-card:nth-child(4),
  body.home .pbvm-explore .pbvm-archive-grid > .pbvm-archive-card:nth-child(5) { grid-column: span 2; }
  body.home .pbvm-explore .pbvm-archive-grid > .pbvm-archive-split { grid-column: span 2; }
}
@media (max-width:580px) {
  body.home .pbvm-explore .pbvm-archive-split__panel { min-height: 170px; }
}
@media (prefers-reduced-motion:reduce) {
  body.home .pbvm-explore .pbvm-archive-split__panel { transition: none; }
}

/* v1.4.6 — correct grid span specificity: the first two cards had been
   reset to grid-column:auto by the v1.4.3 nth-child rule. */
@media (min-width: 901px) {
  body.home .pbvm-explore .pbvm-archive-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
  body.home .pbvm-explore .pbvm-archive-grid > .pbvm-archive-card,
  body.home .pbvm-explore .pbvm-archive-grid > .pbvm-archive-card:nth-child(-n+2),
  body.home .pbvm-explore .pbvm-archive-grid > .pbvm-archive-card:nth-child(4),
  body.home .pbvm-explore .pbvm-archive-grid > .pbvm-archive-card:nth-child(5),
  body.home .pbvm-explore .pbvm-archive-grid > .pbvm-archive-split {
    grid-column: auto;
  }
}
