/* Compatibility for saved af-home-* homepage blocks.
 * New page patterns use modules.css; existing page content still needs these rules.
 */
.af-home {
  --af-home-accent: #f47b20;
  --af-home-charcoal: #181818;
  --af-home-cloud: #f3f4f5;
  --af-home-deep: #063a54;
  --af-home-line: #dedede;
  --af-home-muted: #767676;
  background: #fff;
  color: #262626;
  overflow: clip;
  width: 100%;
}

main .wp-block-post-content > .af-home.alignfull {
  margin-inline: calc(50% - 50vw);
  max-width: 100vw;
  width: 100vw;
}

.af-home :where(h1, h2, h3, p) {
  margin-block: 0;
}

.af-home :where(a) {
  overflow-wrap: anywhere;
}

.af-home .wp-block-button__link {
  align-items: center;
  background: var(--af-home-accent);
  border: 2px solid var(--af-home-accent);
  border-radius: 0;
  color: #fff;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0.04em;
  line-height: 1.1;
  min-height: 3rem;
  padding: 0.9rem 1.55rem;
  text-decoration: none;
  text-transform: uppercase;
}

.af-home .is-style-outline > .wp-block-button__link {
  background: #fff;
  border-color: #cfcfcf;
  color: var(--af-home-accent);
}

.af-home .wp-block-button__link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.af-home-section__inner,
.af-home-hero__inner {
  margin-inline: auto;
  max-width: 1240px;
  width: min(100%, calc(100vw - 2rem));
}

.af-home-hero {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.54) 46%, rgba(0, 0, 0, 0.2) 100%),
    url("../images/reef-tank-hero.png") center / cover no-repeat;
  color: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: clamp(38rem, 84vh, 52rem);
  padding: clamp(7rem, 13vw, 10rem) 1rem clamp(3rem, 7vw, 5rem);
}

.af-home-hero__copy {
  display: grid;
  gap: 1rem;
  max-width: 45rem;
}

.af-home-eyebrow {
  color: currentColor;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.25;
  text-transform: uppercase;
}

.af-home-hero h1 {
  color: #fff;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.98;
  max-width: 11ch;
}

.af-home-hero h1 strong {
  display: inline;
  font-weight: 700;
}

.af-home-hero__lede {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  font-weight: 600;
  line-height: 1.55;
  max-width: 36rem;
}

.af-home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block-start: 0.6rem;
}

.af-home-brand-marquee {
  background: rgba(0, 0, 0, 0.58);
  margin-block-start: clamp(3rem, 8vw, 5rem);
  overflow: hidden;
  padding-block: 0.85rem;
  position: relative;
}

.af-home-brand-marquee::before,
.af-home-brand-marquee::after {
  content: "";
  inset-block: 0;
  pointer-events: none;
  position: absolute;
  width: clamp(2rem, 8vw, 7rem);
  z-index: 2;
}

.af-home-brand-marquee::before {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.72), transparent);
  left: 0;
}

.af-home-brand-marquee::after {
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.72), transparent);
  right: 0;
}

.af-brand-marquee {
  overflow: hidden;
}

.af-brand-marquee__track {
  display: flex;
  width: max-content;
}

.af-brand-marquee__group {
  animation: af-brand-marquee-scroll 34s linear infinite;
  display: flex;
  flex: 0 0 auto;
  gap: 0;
  min-width: max-content;
}

.af-brand-marquee:hover .af-brand-marquee__group,
.af-brand-marquee:focus-within .af-brand-marquee__group {
  animation-play-state: paused;
}

.af-brand-marquee__item {
  align-items: center;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 5px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 clamp(8rem, 14vw, 11.5rem);
  height: clamp(3.4rem, 8vw, 5.5rem);
  justify-content: center;
  margin-inline: 0.38rem;
  padding: 0.55rem 0.8rem;
  text-align: center;
  text-decoration: none;
}

.af-brand-marquee__item img {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
  height: 100%;
  max-height: 3.8rem;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.af-brand-marquee__item:focus-visible {
  outline: 3px solid #005c87;
  outline-offset: -4px;
}

@keyframes af-brand-marquee-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .af-brand-marquee__track {
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .af-brand-marquee__group {
    animation: none;
  }

  .af-brand-marquee__item {
    scroll-snap-align: center;
  }
}

.af-home-section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 1rem;
}

.af-home-section--center {
  text-align: center;
}

.af-home-section--grey {
  background: #ededed;
}

.af-home-section--blue {
  background:
    linear-gradient(rgba(3, 62, 91, 0.88), rgba(3, 62, 91, 0.88)),
    url("../images/reef-tank-hero.png") center / cover no-repeat;
  color: #fff;
}

.af-home-section--split {
  background: #fff;
}

.af-home-section--image-cta {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.24)),
    url("../images/reef-tank-hero.png") center / cover no-repeat;
  color: #fff;
  padding-block: clamp(4rem, 9vw, 7rem);
}

.af-home-section__header {
  display: grid;
  gap: 0.8rem;
  margin-inline: auto;
  margin-block-end: clamp(2rem, 5vw, 3.25rem);
  max-width: 48rem;
}

.af-home-section__header h2,
.af-home-split h2,
.af-home-image-cta h2 {
  color: inherit;
  font-size: clamp(2rem, 4.8vw, 3.3rem);
  font-weight: 400;
  line-height: 1.08;
}

.af-home-section__header p,
.af-home-split p,
.af-home-image-cta p {
  color: var(--af-home-muted);
  font-size: clamp(1rem, 1.7vw, 1.12rem);
  line-height: 1.65;
}

.af-home-section--blue .af-home-section__header p,
.af-home-section--image-cta .af-home-image-cta p {
  color: rgba(255, 255, 255, 0.88);
}

.af-home-intro {
  display: grid;
  justify-items: center;
}

.af-home-intro__mark {
  background: #707070;
  height: 1rem;
  justify-self: start;
  margin-block-end: 1.5rem;
  width: 1rem;
}

.af-home-feature-grid,
.af-home-brand-grid,
.af-home-testimonial-grid,
.af-home-post-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.af-home-feature {
  display: grid;
  gap: 0.85rem;
  justify-items: center;
  text-align: center;
}

.af-home-feature__icon {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(244, 123, 32, 0.5);
  border-radius: 999px;
  color: var(--af-home-accent);
  display: inline-flex;
  font-size: 1.4rem;
  font-weight: 700;
  height: 4.25rem;
  justify-content: center;
  width: 4.25rem;
}

.af-home-feature:nth-child(2) .af-home-feature__icon {
  background: var(--af-home-accent);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
  color: #fff;
}

.af-home-feature h3,
.af-home-brand-card h3,
.af-home-post-card h3 {
  color: #222;
  font-size: clamp(1.25rem, 2.7vw, 1.75rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.af-home-feature p,
.af-home-brand-card p,
.af-home-post-card p {
  color: var(--af-home-muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

.af-home-audience-tab {
  background: #fff;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.13);
  color: var(--af-home-accent);
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  font-weight: 400;
  margin: -2.2rem auto clamp(2.75rem, 6vw, 4.25rem);
  max-width: 24rem;
  padding: 1rem 1.4rem;
  position: relative;
  text-align: center;
  z-index: 2;
}

.af-home-brand-card {
  background: #fff;
  border: 1px solid #dfdfdf;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100%;
  overflow: clip;
}

.af-home-brand-card__media {
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.45), transparent 25%),
    linear-gradient(135deg, #ddeef6, #1d85bd);
}

.af-home-brand-card:nth-child(2) .af-home-brand-card__media {
  background:
    radial-gradient(circle at 66% 30%, rgba(255, 255, 255, 0.45), transparent 23%),
    linear-gradient(135deg, #e8f7ec, #43a66c);
}

.af-home-brand-card:nth-child(3) .af-home-brand-card__media {
  background:
    radial-gradient(circle at 72% 70%, rgba(255, 255, 255, 0.46), transparent 22%),
    linear-gradient(135deg, #ffe1cf, #d96f45);
}

.af-home-brand-card:nth-child(4) .af-home-brand-card__media {
  background:
    radial-gradient(circle at 30% 35%, rgba(255, 255, 255, 0.48), transparent 24%),
    linear-gradient(135deg, #fff0bf, #bd861e);
}

.af-home-brand-card__body,
.af-home-post-card__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 0.8rem;
  padding: clamp(1.1rem, 3vw, 1.55rem);
}

.af-home-card-kicker,
.af-home-post-card time {
  color: var(--af-home-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.25;
  text-transform: uppercase;
}

.af-home-card-link,
.af-home-post-card a {
  color: #222;
  font-weight: 700;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
}

.af-home-testimonial-card {
  background: #fff;
  color: #222;
  display: grid;
  gap: 1rem;
  padding: clamp(1.2rem, 3vw, 1.7rem);
}

.af-home-testimonial-card p {
  color: #545454;
  font-size: 0.95rem;
  line-height: 1.55;
}

.af-home-testimonial-card strong {
  color: #222;
  display: block;
  font-size: 0.94rem;
}

.af-home-section--blue .af-reviews__empty,
.af-home-section--blue .af-reviews__card {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.af-home-split {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 6vw, 5rem);
  grid-template-columns: 1fr;
}

.af-home-split__copy {
  display: grid;
  gap: 1rem;
}

.af-home-split__image {
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.08)),
    url("../images/reef-tank-hero.png") center / cover no-repeat;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.2);
}

.af-home-image-cta {
  align-items: center;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.af-home-image-cta h2 {
  color: #fff;
}

.af-home-post-query .wp-block-post-template {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  list-style: none;
  margin: 0;
  padding: 0;
}

.af-home-post-query .wp-block-post {
  background: #fff;
  border: 1px solid #dfdfdf;
  display: grid;
  min-height: 100%;
}

.af-home-post-query .wp-block-post-title {
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  line-height: 1.16;
  margin: 0;
}

.af-home-post-query .wp-block-post-title a {
  color: #222;
  text-decoration: none;
}

.af-home-post-query .wp-block-post-title a:hover,
.af-home-post-query .wp-block-post-title a:focus-visible {
  color: var(--af-home-accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.af-home-post-query .wp-block-post-date {
  color: var(--af-home-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0;
  text-transform: uppercase;
}

.af-home-post-query .wp-block-post-excerpt {
  color: var(--af-home-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}

.af-home-post-query .wp-block-post-excerpt__excerpt {
  margin: 0;
}

.af-home-post-query .wp-block-group {
  display: grid;
  gap: 0.8rem;
  padding: clamp(1.1rem, 3vw, 1.55rem);
}

.af-home-post-query .wp-block-query-no-results {
  background: #fff;
  border: 1px solid #dfdfdf;
  color: var(--af-home-muted);
  padding: 1.25rem;
  text-align: center;
}

@media (min-width: 640px) {
  .af-home-feature-grid,
  .af-home-testimonial-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .af-home-brand-grid,
  .af-home-post-query .wp-block-post-template {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .af-home-hero,
  .af-home-section {
    padding-inline: 2rem;
  }

  .af-home-brand-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .af-home-brand-card:first-child {
    grid-column: span 2;
  }

  .af-home-split,
  .af-home-image-cta {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  }

  .af-home-image-cta .wp-block-buttons {
    justify-content: end;
  }

  .af-home-post-query .wp-block-post-template {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Current shared front-page media and post-card presentation. */
.af-home {
  background: #fff;
  color: var(--af-ink);
  overflow: clip;
  width: 100%;
}

main .wp-block-post-content > .af-home.alignfull {
  margin-inline: calc(50% - 50vw);
  max-width: 100vw;
  width: 100vw;
}

.af-home-hero {
  background-color: #001b33;
  background-image: linear-gradient(90deg, rgba(0, 27, 51, 0.96) 0%, rgba(0, 27, 51, 0.8) 52%, rgba(0, 27, 51, 0.38) 100%), url("../images/reef-tank-hero.png");
  background-position: center;
  background-size: cover;
}

.af-home .af-post-card .wp-block-post-excerpt__more-link {
  display: inline-block;
  margin-block-start: 0.75rem;
}
