.webpulse-hero {
  --wp-hero-signal-red: #F4382D;
  --wp-hero-wine: #602F32;
  --wp-hero-near-black: #0C0A0B;
  --wp-hero-bone: #F0EDE6;

  /* Per-element text/button colours, fonts, and sizes — each overridden
     inline per instance from Settings → Web Pulse Hero. Defaults below
     match the original look, so nothing changes until customised. */
  --wp-hero-mark-color: var(--wp-hero-bone);
  --wp-hero-eyebrow-right-color: #B8B5AE;
  --wp-hero-eyebrow-color: var(--wp-hero-signal-red);
  --wp-hero-headline-color: var(--wp-hero-bone);
  --wp-hero-headline-highlight-color: var(--wp-hero-signal-red);
  --wp-hero-sub-color: #C7C3BC;
  --wp-hero-hint-color: #ABA79F;
  --wp-hero-cta-text-color: var(--wp-hero-bone);
  --wp-hero-cta-color: var(--wp-hero-signal-red);

  --wp-hero-mark-font: 'IBM Plex Mono', monospace;
  --wp-hero-eyebrow-right-font: 'IBM Plex Mono', monospace;
  --wp-hero-eyebrow-font: 'IBM Plex Mono', monospace;
  --wp-hero-headline-font: 'Bricolage Grotesque', sans-serif;
  --wp-hero-subcopy-font: 'Bricolage Grotesque', sans-serif;
  --wp-hero-hint-font: 'IBM Plex Mono', monospace;
  --wp-hero-cta-font: 'IBM Plex Mono', monospace;

  --wp-hero-mark-size: 13px;
  --wp-hero-eyebrow-right-size: 12px;
  --wp-hero-eyebrow-size: 12px;
  --wp-hero-headline-size: 84px;
  --wp-hero-subcopy-size: 17px;
  --wp-hero-hint-size: 11px;
  --wp-hero-cta-size: 12px;

  --wp-hero-max-width: none;
  --wp-hero-aspect-ratio: 16 / 9;

  position: relative;
  width: 100%;
  max-width: var(--wp-hero-max-width);
  margin-left: auto;
  margin-right: auto;
  height: 100vh;
  height: 100dvh; /* accounts for mobile browser chrome so content isn't pushed off-screen */
  min-height: 480px;
  background: var(--wp-hero-near-black);
  overflow: hidden;
  touch-action: pan-y;
  font-family: 'Bricolage Grotesque', sans-serif;
}

/* Sized to fit inside a smaller page-builder element (an Avada
   Container/Column, for example) instead of always filling the
   viewport — the full-height rules above are overridden here. */
.webpulse-hero.wp-hero-height-aspect {
  height: auto;
  aspect-ratio: var(--wp-hero-aspect-ratio, 16 / 9);
  min-height: 160px;
}

.webpulse-hero *,
.webpulse-hero *::before,
.webpulse-hero *::after {
  box-sizing: border-box;
}

.webpulse-hero .wp-hero-fallback-img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  display: block;
  z-index: 1;
}

.webpulse-hero .wp-hero-canvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  display: block;
  cursor: none;
  z-index: 2;
}

.webpulse-hero .wp-hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  z-index: 3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.webpulse-hero .wp-hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(20px, 4vw, 56px);
  z-index: 5;
}

.webpulse-hero .wp-hero-row-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-shrink: 0;
}

.webpulse-hero .wp-hero-mark {
  font-family: var(--wp-hero-mark-font);
  font-size: var(--wp-hero-mark-size);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wp-hero-mark-color);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.webpulse-hero .wp-hero-eyebrow-right {
  font-family: var(--wp-hero-eyebrow-right-font);
  font-size: var(--wp-hero-eyebrow-right-size);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wp-hero-eyebrow-right-color);
  text-align: right;
  margin: 0;
}

.webpulse-hero .wp-hero-row-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}

.webpulse-hero .wp-hero-headline-block {
  max-width: 720px;
}

.webpulse-hero .wp-hero-eyebrow {
  font-family: var(--wp-hero-eyebrow-font);
  font-size: var(--wp-hero-eyebrow-size);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wp-hero-eyebrow-color);
  margin: 0 0 14px;
}

.webpulse-hero .wp-hero-headline-block h1 {
  font-family: var(--wp-hero-headline-font);
  font-weight: 600;
  font-size: clamp(34px, 6.4vw, var(--wp-hero-headline-size));
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: var(--wp-hero-headline-color);
  margin: 0;
}

.webpulse-hero .wp-hero-headline-block h1 em {
  font-style: normal;
  color: var(--wp-hero-headline-highlight-color);
}

.webpulse-hero .wp-hero-sub {
  margin: 18px 0 0;
  max-width: 460px;
  font-family: var(--wp-hero-subcopy-font);
  font-size: clamp(14px, 1.4vw, var(--wp-hero-subcopy-size));
  line-height: 1.5;
  color: var(--wp-hero-sub-color);
  font-weight: 400;
}

.webpulse-hero .wp-hero-cta-row {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.webpulse-hero .wp-hero-cta {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border: 1px solid var(--wp-hero-cta-color);
  border-radius: 999px;
  color: var(--wp-hero-cta-text-color);
  font-family: var(--wp-hero-cta-font);
  font-size: var(--wp-hero-cta-size);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  background: rgba(12, 10, 11, 0.25);
  backdrop-filter: blur(6px);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.webpulse-hero .wp-hero-cta:hover {
  background: var(--wp-hero-cta-color);
  border-color: var(--wp-hero-cta-color);
  transform: translateY(-2px);
}

.webpulse-hero .wp-hero-hint {
  font-family: var(--wp-hero-hint-font);
  font-size: var(--wp-hero-hint-size);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wp-hero-hint-color);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  transition: opacity 0.8s ease;
}

.webpulse-hero .wp-hero-hint svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.webpulse-hero .wp-hero-hint.wp-hero-faded {
  opacity: 0;
}

/* On desktop the headline block is deliberately anchored to the bottom
   of the hero. On smaller screens — where a long headline, sub-copy,
   button(s) and hint can add up to a lot of stacked height — that same
   bottom-anchoring left the text looking cramped against the bottom
   edge (or clipped on short/landscape screens). Below the breakpoint,
   the headline block instead centres itself in the space left under
   the top row, which stays comfortable no matter how much text it holds. */
@media (max-width: 640px) {
  .webpulse-hero .wp-hero-overlay {
    justify-content: flex-start;
  }

  .webpulse-hero .wp-hero-row-bottom {
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 18px;
    padding: 24px 0;
    min-height: 0;
  }

  .webpulse-hero .wp-hero-eyebrow-right {
    display: none;
  }
}
