/* ============================================================
   BES HERO — Ultra-responsive (mobile-first)
   Breakpoints: 280 / 360 / 480 / 640 / 768 / 900 / 1024 / 1440
   Fills full viewport height; content distributed top/middle/bottom.
   ============================================================ */

/* ─── 1. SHELL ───────────────────────────────────────────── */
.bes-hero5 {
  --bes-header-h: 68px;

  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #000;
  color: var(--bes-text-on-dark);

  display: flex;
  flex-direction: column;

  min-height: clamp(400px, calc(100svh - var(--bes-header-h)), 1000px);
}

@supports not (min-height: 100svh) {
  .bes-hero5 {
    min-height: clamp(400px, calc(100vh - var(--bes-header-h)), 1000px);
  }
}

@media (min-width: 1024px) {
  .bes-hero5 {
    --bes-header-h: 112px;
  }
}

/* ─── 2. BACKGROUND ──────────────────────────────────────── */
.bes-hero5::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 80% 55% at 18% 12%,
      rgba(234, 193, 23, 0.06) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 60% 50% at 88% 88%,
      rgba(234, 193, 23, 0.035) 0%,
      transparent 60%
    );
  pointer-events: none;
  z-index: 0;
}

.bes-hero5::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(219, 219, 219, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(219, 219, 219, 0.028) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: radial-gradient(
    ellipse 90% 75% at 50% 45%,
    black 25%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 90% 75% at 50% 45%,
    black 25%,
    transparent 100%
  );
}

/* ─── 3. WORDMARK ────────────────────────────────────────── */
.bes-hero5__wordmark {
  position: absolute;
  left: 50%;
  bottom: -4%;
  transform: translateX(-50%);
  font-family: var(--bes-font-head);
  font-weight: 700;
  font-size: clamp(9rem, 36vw, 34rem);
  letter-spacing: -0.055em;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(234, 193, 23, 0.055);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 0;
}

@media (max-width: 639px) {
  .bes-hero5__wordmark {
    font-size: 10rem;
    bottom: -3%;
    opacity: 0.6;
  }
}

@media (max-width: 359px) {
  .bes-hero5__wordmark {
    display: none;
  }
}

/* ─── 4. CONTAINER — fills the parent & distributes space ── */
.bes-hero5 > .bes-container {
  position: relative;
  z-index: 2;
  width: 100%;
  flex: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(20px, 3.5vh, 40px);
  padding-block: clamp(24px, 4vh, 56px);
}

/* ─── 5. TOP (eyebrow + certs) ───────────────────────────── */
.bes-hero5__top {
  display: flex;
  align-items: center;
  gap: 12px 24px;
  flex-wrap: wrap;
  justify-content: space-between;
  opacity: 0;
  animation: bes-fade-up 700ms var(--bes-ease-out) 100ms forwards;
}

.bes-hero5__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--bes-font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bes-gold);
  flex-shrink: 0;
}

.bes-hero5__eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--bes-gold);
  flex-shrink: 0;
}

.bes-hero5__certs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bes-hero5__certs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-family: var(--bes-font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bes-gold);
  background: rgba(234, 193, 23, 0.06);
  border: 1px solid rgba(234, 193, 23, 0.3);
  transition:
    background var(--bes-dur-fast) var(--bes-ease),
    border-color var(--bes-dur-fast) var(--bes-ease),
    transform var(--bes-dur-fast) var(--bes-ease);
  cursor: default;
}

.bes-hero5__certs li:hover {
  background: rgba(234, 193, 23, 0.14);
  border-color: var(--bes-gold);
  transform: translateY(-1px);
}

.bes-hero5__certs svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  color: var(--bes-gold);
}

/* ─── 6. BODY ────────────────────────────────────────────── */
.bes-hero5__body {
  display: flex;
  flex-direction: column;
  justify-content: center; /* centers vertically in the 1fr row */
  gap: clamp(16px, 2.5vh, 32px);
  width: 100%;
  min-height: 0;
}

/* ─── 7. TITLE ───────────────────────────────────────────── */
.bes-hero5__title {
  font-family: var(--bes-font-head);
  font-weight: 700;
  font-size: clamp(2rem, 5.5vw + 1.5vh, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.018em;
  text-transform: uppercase;
  color: var(--bes-white);
  margin: 0;
  max-width: 18ch;
}

.bes-hero5__title .bes-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.05em;
  line-height: 1.02;
}

.bes-hero5__title .bes-line > span {
  display: inline-block;
  transform: translateY(120%);
  animation: bes-line-reveal 1000ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  animation-delay: calc(var(--bes-line-i, 0) * 140ms + 300ms);
}

.bes-hero5__title .bes-gold,
.bes-hero5__title em {
  font-style: normal;
  color: var(--bes-gold);
  position: relative;
  display: inline-block;
  padding-right: 0.05em;
}

.bes-hero5__title .bes-gold::after,
.bes-hero5__title em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0.05em;
  bottom: 0.06em;
  height: 5px;
  background: var(--bes-gold);
  transform: scaleX(0);
  transform-origin: left center;
  animation: bes-draw-line 900ms var(--bes-ease-out) forwards;
  animation-delay: 1200ms;
  opacity: 0.9;
}

/* ─── 8. SUBTITLE ────────────────────────────────────────── */
.bes-hero5__subtitle {
  font-size: clamp(0.9375rem, 1.1vw + 0.4vh, 1.125rem);
  line-height: 1.65;
  color: var(--bes-silver);
  max-width: 56ch;
  margin: 0;
  opacity: 0;
  animation: bes-fade-up 800ms var(--bes-ease-out) 1000ms forwards;
}

/* ─── 9. CTAs ────────────────────────────────────────────── */
.bes-hero5__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  opacity: 0;
  animation: bes-fade-up 800ms var(--bes-ease-out) 1200ms forwards;
}

/* ─── 10. BOTTOM STRIP ───────────────────────────────────── */
.bes-hero5__bottom {
  display: flex;
  flex-direction: column;
  gap: 18px;
  opacity: 0;
  animation: bes-fade-in 900ms var(--bes-ease-out) 1500ms forwards;
}

.bes-hero5__rule {
  display: block;
  height: 1px;
  width: 100%;
  background: linear-gradient(
    90deg,
    rgba(234, 193, 23, 0.6) 0%,
    rgba(234, 193, 23, 0.2) 55%,
    transparent 100%
  );
  position: relative;
  overflow: hidden;
}

.bes-hero5__rule::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60px;
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bes-gold), transparent);
  animation: bes-hero5-scan 6s ease-in-out infinite;
}

@keyframes bes-hero5-scan {
  0% {
    left: -60px;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

/* Data strip — 2×2 on mobile, 4-col on tablet+ */
.bes-hero5__data {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bes-hero5__data li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.bes-hero5__data span {
  font-family: var(--bes-font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bes-grey);
  line-height: 1.35;
}

.bes-hero5__data strong {
  font-family: var(--bes-font-head);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--bes-white);
  line-height: 1.2;
  word-break: break-word;
}

@media (min-width: 1024px) {
  .bes-hero5__data strong {
    font-size: 1.0625rem;
  }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE (< 768px) — centered layout, data strip visible
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  .bes-hero5 > .bes-container {
    gap: 20px;
    padding-block: 20px;
  }

  .bes-hero5__top {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
  }

  .bes-hero5__eyebrow {
    font-size: 0.6875rem;
    letter-spacing: 0.18em;
    justify-content: center;
  }

  .bes-hero5__certs {
    justify-content: center;
  }

  .bes-hero5__certs li {
    padding: 5px 10px;
    font-size: 0.625rem;
    letter-spacing: 0.1em;
    gap: 5px;
  }
  .bes-hero5__certs svg {
    width: 9px;
    height: 9px;
  }

  /* Body: centered stack */
  .bes-hero5__body {
    max-width: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 18px;
  }

  .bes-hero5__title {
    max-width: 100%;
    font-size: clamp(1.875rem, 7.5vw + 0.5vh, 2.75rem);
    letter-spacing: -0.02em;
    line-height: 1;
  }

  .bes-hero5__subtitle {
    max-width: 42ch;
    font-size: 0.9375rem;
    line-height: 1.6;
  }

  /* CTAs: full width, stacked */
  .bes-hero5__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 340px;
    margin-inline: auto;
    gap: 10px;
  }

  .bes-hero5__actions .bes-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    min-height: 52px;
    padding-block: 16px;
  }

  /* Bottom strip — 2×2 grid */
  .bes-hero5__bottom {
    display: flex;
    gap: 14px;
    margin-top: 4px;
  }

  .bes-hero5__data {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 14px;
  }

  .bes-hero5__data li + li::before {
    display: none;
  }

  .bes-hero5__data span {
    font-size: 0.625rem;
    letter-spacing: 0.12em;
  }

  .bes-hero5__data strong {
    font-size: 0.875rem;
  }
}

/* ── Very narrow phones (< 360px) ── */
@media (max-width: 359px) {
  .bes-hero5 > .bes-container {
    padding-block: 18px;
    gap: 16px;
  }

  .bes-hero5__eyebrow {
    font-size: 0.625rem;
    letter-spacing: 0.14em;
  }

  .bes-hero5__certs li {
    padding: 4px 8px;
    font-size: 0.5625rem;
    letter-spacing: 0.08em;
  }

  .bes-hero5__title {
    font-size: clamp(1.625rem, 9vw, 2rem);
  }

  .bes-hero5__subtitle {
    font-size: 0.875rem;
  }

  .bes-hero5__actions {
    max-width: 100%;
  }

  .bes-hero5__data {
    gap: 14px 12px;
  }
  .bes-hero5__data span {
    font-size: 0.5625rem;
    letter-spacing: 0.1em;
  }
  .bes-hero5__data strong {
    font-size: 0.8125rem;
  }
}

/* ── Small-to-mid phones (360-479px) ── */
@media (min-width: 360px) and (max-width: 479px) {
  .bes-hero5__title {
    font-size: clamp(2rem, 8.5vw, 2.5rem);
  }
}

/* ── Mid phones (480-639px) — CTAs side-by-side, 4-col data ── */
@media (min-width: 480px) and (max-width: 639px) {
  .bes-hero5__actions {
    flex-direction: row;
    flex-wrap: nowrap;
    max-width: none;
  }
  .bes-hero5__actions .bes-btn {
    flex: 1 1 0;
    min-width: 0;
  }
  .bes-hero5__title {
    font-size: clamp(2.25rem, 7vw, 3rem);
  }

  .bes-hero5__data {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }
  .bes-hero5__data li {
    padding-inline: 14px;
  }
  .bes-hero5__data li:first-child {
    padding-left: 0;
  }
  .bes-hero5__data li:last-child {
    padding-right: 0;
  }

  .bes-hero5__data li + li::before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 1px;
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(234, 193, 23, 0.28) 40%,
      rgba(234, 193, 23, 0.28) 60%,
      transparent 100%
    );
  }

  .bes-hero5__data strong {
    font-size: 0.8125rem;
  }
  .bes-hero5__data span {
    font-size: 0.5625rem;
    letter-spacing: 0.1em;
  }
}

/* ═══════════════════════════════════════════════════════════
   TABLET (768px+) — left-aligned, 4-col data strip
   ═══════════════════════════════════════════════════════════ */

@media (min-width: 768px) {
  .bes-hero5__top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  .bes-hero5__certs {
    justify-content: flex-end;
  }

  .bes-hero5__certs li {
    padding: 6px 12px;
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    gap: 8px;
  }
  .bes-hero5__certs svg {
    width: 11px;
    height: 11px;
  }

  .bes-hero5__body {
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    max-width: 22ch;
  }

  .bes-hero5__title {
    max-width: 18ch;
  }

  .bes-hero5__actions {
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
    max-width: none;
    margin-inline: 0;
  }
  .bes-hero5__actions .bes-btn {
    width: auto;
    min-height: 0;
    padding-block: var(--bes-btn-pad-y, 14px);
  }

  .bes-hero5__data {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }
  .bes-hero5__data li {
    padding-inline: 20px;
  }
  .bes-hero5__data li:first-child {
    padding-left: 0;
  }
  .bes-hero5__data li:last-child {
    padding-right: 0;
  }

  .bes-hero5__data li + li::before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 1px;
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(234, 193, 23, 0.28) 40%,
      rgba(234, 193, 23, 0.28) 60%,
      transparent 100%
    );
  }

  .bes-hero5__data strong {
    font-size: 1rem;
  }
  .bes-hero5__data span {
    font-size: 0.6875rem;
    letter-spacing: 0.16em;
  }
}

/* ═══════════════════════════════════════════════════════════
   900px+ — 2-column body layout
   ═══════════════════════════════════════════════════════════ */

@media (min-width: 900px) {
  .bes-hero5__body {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 6.5fr) minmax(0, 4.5fr);
    grid-template-rows: auto auto;
    grid-template-areas:
      "title subtitle"
      "title actions";
    align-items: end;
    justify-content: stretch;
    column-gap: clamp(40px, 5vw, 88px);
    row-gap: clamp(20px, 3vh, 32px);
  }

  .bes-hero5__title {
    grid-area: title;
  }
  .bes-hero5__subtitle {
    grid-area: subtitle;
    align-self: end;
  }
  .bes-hero5__actions {
    grid-area: actions;
    align-self: start;
  }

  .bes-hero5__data li {
    padding-inline: 22px;
  }
}

/* ═══════════════════════════════════════════════════════════
   1440px+ — large desktop
   ═══════════════════════════════════════════════════════════ */

@media (min-width: 1440px) {
  .bes-hero5__title {
    font-size: clamp(3.5rem, 4vw + 1.5vh, 6rem);
  }
  .bes-hero5__body {
    column-gap: clamp(64px, 6vw, 120px);
  }
}

/* ═══════════════════════════════════════════════════════════
   HEIGHT / ORIENTATION
   ═══════════════════════════════════════════════════════════ */

@media (max-height: 720px) and (min-width: 900px) {
  .bes-hero5 > .bes-container {
    padding-block: 20px;
    gap: 16px;
  }
  .bes-hero5__body {
    row-gap: 14px;
  }
  .bes-hero5__title {
    font-size: clamp(2rem, 4.5vw + 1.5vh, 3.75rem);
  }
}

@media (max-height: 500px) {
  .bes-hero5 {
    min-height: auto;
  }
}

/* ── Landscape phones ── */
@media (orientation: landscape) and (max-height: 500px) {
  .bes-hero5 {
    min-height: auto;
  }

  .bes-hero5 > .bes-container {
    padding-block: 14px;
    gap: 12px;
  }

  .bes-hero5__top {
    flex-direction: row;
    justify-content: space-between;
  }

  .bes-hero5__certs {
    margin-top: 0;
  }

  .bes-hero5__body {
    align-items: flex-start;
    text-align: left;
    max-width: none;
    gap: 10px;
  }

  .bes-hero5__title {
    max-width: 22ch;
    font-size: clamp(1.75rem, 4vw + 1vh, 2.75rem);
  }

  .bes-hero5__subtitle {
    font-size: 0.875rem;
    max-width: 60ch;
  }

  .bes-hero5__actions {
    flex-direction: row;
    width: auto;
    max-width: none;
    gap: 8px;
  }

  .bes-hero5__actions .bes-btn {
    width: auto;
    min-height: 44px;
  }

  .bes-hero5__bottom {
    display: flex;
    gap: 12px;
  }

  .bes-hero5__data {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }
  .bes-hero5__data li {
    padding-inline: 12px;
  }
  .bes-hero5__data li:first-child {
    padding-left: 0;
  }
  .bes-hero5__data li:last-child {
    padding-right: 0;
  }
  .bes-hero5__data li + li::before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 1px;
    background: rgba(234, 193, 23, 0.28);
  }
  .bes-hero5__data strong {
    font-size: 0.8125rem;
  }
  .bes-hero5__data span {
    font-size: 0.5625rem;
    letter-spacing: 0.1em;
  }

  .bes-hero5__wordmark {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   ACCESSIBILITY + PRINT
   ═══════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .bes-hero5__top,
  .bes-hero5__subtitle,
  .bes-hero5__actions,
  .bes-hero5__bottom {
    animation: none !important;
    opacity: 1 !important;
  }
  .bes-hero5__title .bes-line > span,
  .bes-hero5__title .bes-gold::after,
  .bes-hero5__title em::after {
    animation: none !important;
    transform: none !important;
  }
  .bes-hero5__rule::after {
    display: none;
  }
}

@media (prefers-contrast: more) {
  .bes-hero5__eyebrow,
  .bes-hero5__certs li,
  .bes-hero5__title .bes-gold,
  .bes-hero5__title em {
    color: #ffd700;
  }
  .bes-hero5__certs li {
    border-color: #ffd700;
  }
  .bes-hero5__subtitle {
    color: #e5e5e5;
  }
}

@media print {
  .bes-hero5 {
    min-height: auto;
    background: #fff;
    color: #000;
    padding: 20pt;
  }
  .bes-hero5::before,
  .bes-hero5::after,
  .bes-hero5__wordmark,
  .bes-hero5__rule,
  .bes-hero5__actions {
    display: none !important;
  }
  .bes-hero5__title {
    color: #000;
    font-size: 24pt;
  }
  .bes-hero5__title .bes-gold,
  .bes-hero5__title em {
    color: #b8860b;
  }
  .bes-hero5__subtitle,
  .bes-hero5__data strong {
    color: #000;
  }
  .bes-hero5__eyebrow,
  .bes-hero5__certs li {
    color: #333;
    border-color: #999;
    background: none;
  }
}
