.story-hero {
  --story-night: #10162b;
  --story-night-deep: #090d1b;
  --story-cream: #f6f0df;
  --story-solar: #ffcb38;
  --story-aqua: #61e4c4;
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  background: var(--story-night);
}

.story-media,
.story-visuals,
.story-frame,
.story-frame img,
.story-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.story-media { z-index: 0; }

.story-frame {
  display: block;
  margin: 0;
}

.story-frame img {
  display: block;
  max-width: none;
  object-fit: cover;
  object-position: 50% 50%;
  transform: scale(1.018);
}

.story-frame:not(.story-frame-customer) { opacity: 0; }

.story-hero.is-playing .story-frame img {
  animation: story-image-settle var(--story-sequence-duration, 95s)
    cubic-bezier(0.22, 0.68, 0.25, 1) both;
}

.story-shade {
  z-index: 5;
  background:
    linear-gradient(90deg, rgba(8, 12, 27, 0.98) 0%, rgba(8, 12, 27, 0.78) 30%, rgba(8, 12, 27, 0.16) 59%, transparent 78%),
    linear-gradient(0deg, rgba(8, 12, 27, 0.48), transparent 40%);
}

.signal-transition {
  position: absolute;
  z-index: 4;
  inset: -16%;
  pointer-events: none;
  background: linear-gradient(
    112deg,
    transparent 34%,
    rgba(255, 203, 56, 0.05) 43%,
    rgba(255, 235, 166, 0.42) 49%,
    rgba(97, 228, 196, 0.3) 52%,
    transparent 61%
  );
  filter: blur(7px);
  opacity: 0;
  transform: translate3d(-24%, 0, 0);
}

.story-hero.is-paused .story-frame img,
.story-hero.is-paused .signal-transition { animation-play-state: paused; }

.story-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(
    55vw,
    calc(940px + max(4vw, (100vw - 1640px) / 2))
  );
  min-height: 100svh;
  padding: 118px 0 64px max(4vw, calc((100vw - 1640px) / 2));
}

.story-hero .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sequence-control {
  position: absolute;
  z-index: 6;
  right: 28px;
  bottom: 24px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid rgba(246, 240, 223, 0.28);
  border-radius: 999px;
  background: rgba(9, 13, 27, 0.68);
  color: rgba(246, 240, 223, 0.82);
  cursor: pointer;
  font: 800 10px/1 Manrope, Arial, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.sequence-control:hover,
.sequence-control:focus-visible {
  border-color: var(--story-solar);
  color: var(--story-cream);
}

.sequence-control:focus-visible {
  outline: 2px solid var(--story-solar);
  outline-offset: 3px;
}

.sequence-control span { color: var(--story-solar); }
.sequence-control b { font: inherit; }

.story-eyebrow {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 0 0 clamp(22px, 3vh, 34px);
  color: var(--story-solar);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story-eyebrow > span {
  width: 34px;
  height: 1px;
  flex: 0 0 auto;
  background: currentColor;
}

.story-title {
  display: flex;
  flex-direction: column;
  margin: 0;
  color: var(--story-cream);
  font-family: Manrope, Arial, sans-serif;
  letter-spacing: -0.06em;
  text-transform: none;
}

.story-audience {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 0 0 clamp(8px, 1vh, 12px);
  color: var(--story-aqua);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story-audience > span {
  width: 34px;
  height: 1px;
  flex: 0 0 auto;
  background: currentColor;
}

.story-audience-professional {
  margin-top: clamp(18px, 2vh, 26px);
}

.story-question {
  font-size: clamp(58px, 5.2vw, 96px);
  font-weight: 600;
  line-height: 0.95;
}

.story-answer {
  margin-top: 0.22em;
  color: var(--story-cream);
  font-size: clamp(68px, 6.4vw, 118px);
  font-weight: 850;
  line-height: 0.9;
}

.story-answer-brand { color: var(--story-solar); }

@media (min-width: 761px) {
  .story-media {
    top: var(--nav-height, 80px);
    height: calc(100% - var(--nav-height, 80px));
  }

  .story-eyebrow {
    position: absolute;
    top: 96px;
    left: max(4vw, calc((100vw - 1640px) / 2));
    margin: 0;
  }
}

.story-definition {
  max-width: 820px;
  margin: clamp(26px, 3.6vh, 40px) 0 0;
  color: var(--story-cream);
  font-size: clamp(19px, 1.35vw, 24px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.025em;
}

.story-actions {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-top: clamp(28px, 3.8vh, 42px);
}

.story-primary-action {
  display: inline-flex;
  gap: 36px;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 12px 14px 12px 26px;
  border-radius: 16px;
  background: var(--story-solar);
  color: var(--story-night-deep);
  font-size: 15px;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 18px 56px rgba(255, 203, 56, 0.16);
  animation: story-action-settle 1.25s 5.2s ease-out both;
}

.story-primary-action:hover,
.story-primary-action:focus-visible { background: #ffd65f; }

.story-primary-action > span { white-space: nowrap; }

.story-primary-action:focus-visible {
  outline: 2px solid var(--story-cream);
  outline-offset: 4px;
}

.story-primary-action i {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--story-night-deep);
  color: var(--story-cream);
  font-style: normal;
}

.story-launch-boundary {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
  color: rgba(246, 240, 223, 0.68);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.story-launch-boundary > i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--story-aqua);
  box-shadow: 0 0 0 8px rgba(97, 228, 196, 0.1);
}

.story-launch-boundary b { color: var(--story-aqua); }

@media (max-width: 1160px) {
  .story-copy { width: min(64vw, 780px); }
  .story-actions { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 760px) {
  .story-hero {
    display: grid;
    min-height: 100svh;
    padding-top: var(--nav-height, 68px);
    grid-template-rows: minmax(332px, 43svh) auto;
  }

  .story-media {
    position: relative;
    min-height: 360px;
    grid-row: 1;
  }

  .story-frame-customer img { object-position: 70% 50%; }
  .story-frame-professional img { object-position: 68% 50%; }
  .story-frame-plumber img { object-position: 74% 50%; }
  .story-frame-window img { object-position: 72% 50%; }
  .story-frame-lawn img { object-position: 75% 50%; }
  .story-frame-bath img { object-position: 74% 50%; }
  .story-frame-flatpack img { object-position: 72% 50%; }
  .story-frame-wall img { object-position: 74% 50%; }
  .story-frame-cafe img { object-position: 74% 50%; }
  .story-frame-accessible-garden img { object-position: 73% 50%; }
  .story-frame-electrician img { object-position: 75% 50%; }
  .story-frame-cleaner img { object-position: 75% 50%; }
  .story-frame-painter img { object-position: 73% 50%; }
  .story-frame-handyman img { object-position: 74% 50%; }
  .story-frame-carpenter img { object-position: 74% 50%; }
  .story-frame-gardener img { object-position: 74% 50%; }
  .story-frame-pool-care img { object-position: 73% 50%; }
  .story-frame-window-cleaner img { object-position: 75% 50%; }
  .story-frame-working-home img { object-position: 72% 50%; }
  .story-frame-before-doors-open img { object-position: 74% 50%; }
  .story-frame-energy-ready-home img { object-position: 73% 50%; }
  .story-frame-move-in-reset img { object-position: 72% 50%; }
  .story-frame-outdoor-care-day img { object-position: 73% 50%; }
  .story-frame-pool-couple img { object-position: 72% 50%; }

  .story-shade {
    background: linear-gradient(0deg, var(--story-night) 0%, transparent 48%);
  }

  .sequence-control {
    right: 14px;
    top: 14px;
    bottom: auto;
  }

  .story-copy {
    grid-row: 2;
    width: 100%;
    min-height: 0;
    margin-top: -72px;
    padding: 0 22px 42px;
    background: linear-gradient(transparent, var(--story-night) 76px);
  }

  .story-eyebrow { margin-bottom: 32px; font-size: 9px; }
  .story-audience { gap: 10px; margin-bottom: 7px; font-size: 9px; }
  .story-audience > span { width: 26px; }
  .story-audience-professional { margin-top: 14px; }
  .story-question { font-size: clamp(48px, 14.5vw, 62px); line-height: 0.96; }
  .story-answer { margin-top: 0.18em; font-size: clamp(56px, 17vw, 72px); line-height: 0.92; }
  .story-definition { margin-top: 24px; font-size: 18px; }
  .story-actions { width: 100%; margin-top: 28px; }
  .story-primary-action {
    width: 100%;
    gap: 18px;
    font-size: 14px;
  }
  .story-launch-boundary { font-size: 11px; }
}

@keyframes story-image-settle {
  from { transform: scale(1.018); }
  to { transform: scale(1); }
}

@keyframes story-action-settle {
  0%, 100% { box-shadow: 0 18px 56px rgba(255, 203, 56, 0.16); }
  46% { box-shadow: 0 20px 72px rgba(255, 203, 56, 0.34); }
}

@media (prefers-reduced-motion: reduce) {
  .story-frame img,
  .signal-transition,
  .story-primary-action { animation: none; }

  .story-frame img { transform: none; }
  .signal-transition { display: none; }
}

@media (max-width: 760px) and (max-height: 680px) {
  .story-hero { grid-template-rows: 240px auto; }
  .story-media { min-height: 240px; }
  .story-copy {
    margin-top: -48px;
    padding: 0 18px 28px;
  }
  .story-eyebrow { margin-bottom: 22px; }
  .story-audience { margin-bottom: 4px; }
  .story-audience-professional { margin-top: 8px; }
  .story-question { font-size: 42px; }
  .story-answer { font-size: 50px; }
  .story-definition { margin-top: 16px; font-size: 15px; }
  .story-actions { gap: 14px; margin-top: 18px; }
  .story-primary-action { min-height: 54px; }
  .story-launch-boundary { font-size: 13px; }
  .sequence-control { top: 12px; bottom: auto; }
}

@media (orientation: landscape) and (max-height: 500px) {
  .story-hero { display: block; min-height: 100svh; }
  .story-media { position: absolute; min-height: 100%; }
  .story-shade {
    background: linear-gradient(90deg, rgba(8, 12, 27, 0.98) 0%, rgba(8, 12, 27, 0.86) 45%, rgba(8, 12, 27, 0.12) 82%);
  }
  .story-copy {
    width: min(70%, 690px);
    min-height: 100svh;
    margin: 0;
    padding: 76px 20px 20px;
    background: none;
  }
  .story-eyebrow { position: static; margin-bottom: 10px; }
  .story-audience { gap: 8px; margin-bottom: 3px; font-size: 8px; }
  .story-audience > span { width: 20px; }
  .story-audience-professional { margin-top: 6px; }
  .story-question { font-size: 38px; }
  .story-answer { font-size: 46px; }
  .story-definition { max-width: 560px; margin-top: 12px; font-size: 14px; }
  .story-actions { gap: 10px; margin-top: 14px; }
  .story-primary-action { width: auto; min-height: 48px; }
  .story-launch-boundary { max-width: 560px; font-size: 13px; }
  .sequence-control { right: 12px; bottom: 12px; }
}
