/* Single post template.
   Colours come from the GeneratePress global palette. Only AA-safe pairings
   are used: --contrast (6.54:1 on white) for links, --darkblue (12.96:1) for
   headings, --accent (15.29:1) for body, white on the dark hero (12.96:1).
   --lightblue and --lightgreen are never used for text on light backgrounds —
   they fail at 3.18:1 and 1.60:1. */

/* ---------------------------------------------------------------- hero */
.genex-hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(320px, 46vh, 520px);
  display: flex;
  align-items: center;
  background-color: var(--darkblue);
}

.genex-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.genex-hero__wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.genex-hero__wash--1 {
  z-index: 1;
  background-image: linear-gradient(326deg, rgba(0, 159, 171, 0.42) 28%, rgba(0, 55, 64, 0) 1%);
}

.genex-hero__wash--2 {
  z-index: 2;
  background-image: linear-gradient(73deg, rgba(0, 55, 64, 0.78) 41%, rgba(0, 55, 64, 0.1) 78%);
}

.genex-hero__inner {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 888px;
  margin-right: auto;
  padding: clamp(3.5rem, 6vw, 6rem) 55px;
  box-sizing: border-box;
}

/* Never lets the video show through enough to threaten the 4.5:1 on white text. */
.genex-hero__card {
  max-width: 760px;
  padding: 2.25rem 2rem;
  border-radius: 11px;
  background-image: linear-gradient(92deg, rgba(0, 55, 64, 0.88) 27%, rgba(0, 55, 64, 0.74) 100%);
}

.genex-hero__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.genex-hero__eyebrow a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

.genex-hero__eyebrow a:hover,
.genex-hero__eyebrow a:focus-visible {
  border-bottom-color: #fff;
}

.genex-hero__title {
  margin: 0 0 0.875rem;
  color: #fff;
  font-size: clamp(1.875rem, 4.2vw, 3.25rem);
  line-height: 1.05;
}

.genex-hero__meta {
  margin: 0;
  color: #fff;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.genex-hero__divider {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
  color: var(--base-3);
}

.genex-hero__divider svg {
  display: block;
  width: 100%;
  height: 55px;
  margin-bottom: -2px;
  fill: currentColor;
}

/* ------------------------------------------------------------- article */
.genex-article {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) 1.5rem 0;
}

.genex-article__body {
  color: var(--accent);
  font-size: 1.0625rem;
  line-height: 1.75;
}

.genex-article__body > * + * {
  margin-top: 1.5rem;
}

.genex-article__body h2 {
  color: var(--darkblue);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
  margin-top: 2.5rem;
}

.genex-article__body h3 {
  color: var(--contrast);
  font-size: 1.375rem;
  line-height: 1.2;
  margin-top: 2rem;
}

.genex-article__body a {
  color: var(--contrast);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.genex-article__body a:hover,
.genex-article__body a:focus-visible {
  color: var(--darkblue);
}

.genex-article__body img {
  max-width: 100%;
  height: auto;
  border-radius: 11px;
}

.genex-article__body blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 5px solid var(--lightgreen);
  color: var(--accent);
  font-style: italic;
}

/* The seeded placeholder banner on sample posts. */
.genex-article__body .yxc-sample-notice {
  background-color: var(--base-2);
  border-left: 5px solid var(--contrast-3);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--accent);
}

.genex-article__meta {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 55, 64, 0.15);
}

.genex-termlist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.genex-termlist a {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--contrast);
  border-radius: 11px;
  color: var(--contrast);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.genex-termlist a:hover,
.genex-termlist a:focus-visible {
  background-color: var(--contrast);
  color: #fff;
}

/* ------------------------------------------------------- prev / next */
.genex-postnav {
  max-width: 780px;
  margin: 3rem auto 0;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.genex-postnav__link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem;
  border: 1px solid rgba(0, 55, 64, 0.18);
  border-radius: 22px;
  text-decoration: none;
  background-color: var(--base-3);
}

.genex-postnav__link:hover,
.genex-postnav__link:focus-visible {
  border-color: var(--contrast);
}

.genex-postnav__link--next {
  text-align: right;
  grid-column: 2;
}

.genex-postnav__label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--contrast);
}

.genex-postnav__title {
  color: var(--darkblue);
  font-weight: 700;
  line-height: 1.3;
}

/* ---------------------------------------------------------- related */
.genex-related {
  margin-top: 4rem;
  padding: clamp(3rem, 6vw, 5rem) 1.5rem;
  background-color: var(--base-2);
}

.genex-related__inner {
  max-width: 1111px;
  margin: 0 auto;
}

.genex-related__eyebrow {
  margin: 0 0 0.75rem;
  color: var(--contrast);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.genex-related__heading {
  margin: 0 0 2rem;
  color: var(--darkblue);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.12;
}

.genex-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.genex-related__card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background-color: var(--base-3);
}

.genex-related__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.genex-related__body {
  padding: 1.25rem;
}

.genex-related__title {
  margin: 0 0 0.4rem;
  font-size: 1.125rem;
  line-height: 1.25;
}

.genex-related__title a {
  color: var(--contrast);
  text-decoration: none;
}

.genex-related__title a:hover,
.genex-related__title a:focus-visible {
  color: var(--darkblue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.genex-related__date {
  margin: 0;
  color: var(--accent);
  font-size: 0.8125rem;
}

.genex-related__all {
  display: inline-block;
  margin-top: 2rem;
  color: var(--contrast);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.genex-related__all:hover,
.genex-related__all:focus-visible {
  color: var(--darkblue);
}

/* --------------------------------------------------------- focus ring */
.genex-hero a:focus-visible,
.genex-article__body a:focus-visible,
.genex-termlist a:focus-visible,
.genex-postnav__link:focus-visible,
.genex-related__title a:focus-visible,
.genex-related__all:focus-visible {
  outline: 3px solid var(--contrast);
  outline-offset: 3px;
}

.genex-hero a:focus-visible {
  outline-color: #fff;
}

@media (max-width: 900px) {
  .genex-related__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .genex-hero__inner {
    padding: 3rem 1.5rem;
  }
  .genex-related__grid,
  .genex-postnav {
    grid-template-columns: 1fr;
  }
  .genex-postnav__link--next {
    grid-column: 1;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .genex-hero__video {
    display: none;
  }
}

/* ------------------------------------------------- GeneratePress post meta
   GP defaults `.entry-meta` to var(--contrast-2) (#739600), which is 3.45:1 on
   white and fails AA for this size. Same green family, dark enough to pass:
   var(--darkgreen) #3b512b is 8.76:1. Applies to archives and the blog index,
   where GP still renders its own meta line. */
.entry-meta,
.entry-meta .byline,
.entry-meta .posted-on,
.entry-meta time {
  color: var(--darkgreen);
}

.entry-meta a {
  color: var(--contrast);
}

.entry-meta a:hover,
.entry-meta a:focus-visible {
  color: var(--darkblue);
}
