@media (prefers-reduced-motion: no-preference) {
  /* above the fold: plays on load, no JS involved */
  .ev-hero__media {
    animation: ev-fade-in 1.6s ease-out backwards;
  }
  .ev-hero__media > video {
    animation: ev-zoom-out 2.4s var(--ev-ease) backwards;
  }
  .ev-hero__scroll {
    animation: ev-fade-in 1.2s ease-out 1.2s backwards;
  }
  /* Figma "Hero intro": Hidden -> Visible 6 s after load (instant there, a short fade here) */
  .ev-hero__intro {
    animation: ev-intro-in 0.8s ease-out 6s backwards;
  }
}

@keyframes ev-intro-in { from { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .ev-hero__scroll svg {
    animation: none;
    opacity: 1;
  }
}

.ev-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: clamp(640px, 100svh, 1080px);
  padding: 140px var(--ev-gutter) 160px;
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}
/* Home (Figma 514:1350): the video runs to the bottom edge under a 20 % #0e0e0e multiply only;
   .ev-hero__fade (Figma Rectangle 158) blends it into the page */
.ev-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.ev-hero__media img,
.ev-hero__media video {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.ev-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(14, 14, 14, 0.2);
  mix-blend-mode: multiply;
}
.ev-hero__fade {
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 26.4%;
  background: url("../../img/hero-fade.png") center / 100% 100% no-repeat;
}
.ev-hero__title {
  font-family: var(--ev-font-display);
  font-size: clamp(28px, 2.6042vw, 50px);
  font-weight: 500;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
}
.ev-hero__subtitle {
  margin-top: clamp(20px, 2.1vw, 40px);
  font-size: clamp(13px, 0.885vw, 17px);
  font-weight: 500;
  letter-spacing: 0.25em;
}
.ev-hero__cta {
  margin-top: clamp(24px, 1.5vw, 30px);
}
/* Home: the intro sits near the top of the video (Figma y 205 of 1080), 40 px title */
.ev-hero--home {
  justify-content: flex-start;
  padding-top: max(132px, calc(205 * var(--px)));
}
.ev-hero--home .ev-hero__title {
  font-size: clamp(18px, max(2.0833vw, min(4.42vw, 28px)), 40px);
  line-height: 1.4;
}
.ev-hero--home .ev-hero__subtitle {
  margin-top: clamp(8px, 0.625vw, 12px);
  line-height: 1.35;
}
.ev-hero--home .ev-hero__cta {
  margin-top: clamp(16px, 1.615vw, 31px);
}
.ev-hero--home .ev-hero__scroll {
  bottom: 10.1%;
}
/* --- Home: scroll film. Once view.js runs (.is-ready) the section is five screens tall, its stage stays pinned
   to the viewport and the video shows the moment of the scroll position (three screens of scrolling); the
   poster covers it until it has loaded (.is-loaded). Over the last pinned screen the next section rises over
   the stage. Without view.js (no JS, reduced motion, Save-Data) the hero is one screen with the poster. --- */
.ev-hero__stage {
  display: contents;
}
.ev-hero--film {
  display: block;
  min-height: 0;
  padding: 0;
  overflow: visible;
  background: var(--ev-bg);
}
.ev-hero--film .ev-hero__media picture {
  display: contents;
}
/* the film is graded already: only the shade below, as in the reference */
.ev-hero--film .ev-hero__media::after {
  content: none;
}
.ev-hero--film .ev-hero__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  height: 100svh;
  padding: clamp(132px, 19svh, 210px) var(--ev-gutter) 0;
  overflow: hidden;
  isolation: isolate;
}
.ev-hero__video {
  position: absolute;
  inset: 0;
  display: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.ev-hero--film .ev-hero__media > .ev-hero__video {
  animation: none;
}
.ev-hero--film.is-loaded .ev-hero__video {
  opacity: 1;
}
.ev-hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 60%, var(--ev-bg) 100%);
  pointer-events: none;
}
.ev-hero--film .ev-hero__intro {
  animation: none;
}
.ev-hero--film .ev-hero__title {
  perspective: 600px;
}
.ev-hero__word {
  display: inline-block;
  white-space: nowrap;
}
.ev-hero__letter {
  display: inline-block;
}
.ev-hero--film .ev-hero__scroll {
  transition: opacity 0.4s;
}
.ev-hero__loading {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: none;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ev-muted);
  transition: opacity 0.5s;
}
.ev-hero--film.is-loaded .ev-hero__loading {
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  /* the negative margin pulls the next section onto the last pinned screen */
  .ev-hero--film.is-ready {
    height: 500vh;
    height: calc(300vh + 200svh);
    margin-bottom: -100vh;
    margin-bottom: -100svh;
  }
  .ev-hero--film.is-ready .ev-hero__stage {
    position: sticky;
    top: 0;
  }
  /* the cover under that section: solid for its screen, a soft shade 40 % of a screen ahead of it */
  .ev-hero--film.is-ready::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 140vh;
    height: 140svh;
    background: linear-gradient(180deg, rgba(14, 14, 14, 0) 0%, rgba(14, 14, 14, 0.1) 7%, rgba(14, 14, 14, 0.4) 15%, rgba(14, 14, 14, 0.8) 23%, var(--ev-bg) 28.6%);
    pointer-events: none;
  }
  /* the pinned stage is a positioned layer: what follows has to lie above it */
  .ev-hero--film.is-ready ~ * {
    position: relative;
    z-index: 1;
  }
  .ev-hero--film.is-ready :is(.ev-hero__video, .ev-hero__loading) {
    display: block;
  }
  /* hidden from the first paint (.ev-js), until the film reaches the showroom (.is-on): letters turn in
     one by one, then the line and the button */
  .ev-js .ev-hero--film:not(.is-still) .ev-hero__letter {
    opacity: 0;
    transform: rotateY(80deg);
    transition: opacity 0.5s ease-out, transform 0.7s cubic-bezier(0.2, 1.3, 0.4, 1);
    transition-delay: calc(var(--i, 0) * 32ms);
  }
  .ev-js .ev-hero--film:not(.is-still) .ev-hero__subtitle {
    opacity: 0;
    transition: opacity 0.6s 0.35s;
  }
  .ev-js .ev-hero--film:not(.is-still) .ev-hero__cta {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s 0.55s, transform 0.8s 0.55s cubic-bezier(0.2, 1.3, 0.4, 1);
  }
  .ev-js .ev-hero--film.is-ready:not(.is-on) .ev-hero__cta {
    pointer-events: none;
  }
  /* keyboard focus on the button shows the intro at any frame */
  .ev-js .ev-hero--film.is-on :is(.ev-hero__letter, .ev-hero__subtitle, .ev-hero__cta),
  .ev-js .ev-hero--film .ev-hero__intro:focus-within :is(.ev-hero__letter, .ev-hero__subtitle, .ev-hero__cta) {
    opacity: 1;
    transform: none;
  }
  /* view.js never started (blocked or missing file): show the intro anyway */
  .ev-js .ev-hero--film:not(.is-ready, .is-still) :is(.ev-hero__letter, .ev-hero__subtitle, .ev-hero__cta) {
    animation: ev-film-failsafe 0.6s ease-out 4s forwards;
  }
  .ev-js .ev-hero--film.is-started .ev-hero__scroll:not(:focus-visible) {
    opacity: 0;
    pointer-events: none;
  }
}
@keyframes ev-film-failsafe {
  to { opacity: 1; transform: none; }
}
.ev-hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 6.3%;
  display: flex;
  flex-direction: column;
  gap: 0;
  translate: -50% 0;
}
/* Figma loop: chevrons light up one by one (0.1 s wait + 0.3 s each), then all dim */
.ev-hero__scroll svg {
  display: block;
  margin-top: -2px;
  overflow: visible;
  fill: none;
  stroke: #fff;
  stroke-width: 1;
  opacity: 0.3;
  animation: ev-chevron 1.6s ease-out infinite;
}
.ev-hero__scroll svg:first-child {
  margin-top: 0;
}
.ev-hero__scroll svg:nth-child(2) {
  animation-name: ev-chevron-2;
}
.ev-hero__scroll svg:nth-child(3) {
  animation-name: ev-chevron-3;
}
@keyframes ev-chevron {
  0%, 6.25% { opacity: 0.3; filter: none; }
  25%, 81.25% { opacity: 1; filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.9)); }
  100% { opacity: 0.3; filter: none; }
}
@keyframes ev-chevron-2 {
  0%, 31.25% { opacity: 0.3; filter: none; }
  50%, 81.25% { opacity: 1; filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.9)); }
  100% { opacity: 0.3; filter: none; }
}
@keyframes ev-chevron-3 {
  0%, 56.25% { opacity: 0.3; filter: none; }
  75%, 81.25% { opacity: 1; filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.9)); }
  100% { opacity: 0.3; filter: none; }
}
/* --- Hero: sub-page variant of .ev-hero (eyebrow, title, lead, two buttons) --- Figma places the content in a band of the hero (--hero-top … --hero-bottom, design px): --hero-align: flex-start pins it to the top of the band, center centres it there. */
.ev-hero--sub {
  justify-content: var(--hero-align, center);
  min-height: max(560px, calc(var(--hero-h, 860) * var(--px)));
  padding-top: max(130px, calc(var(--hero-top, 260) * var(--px)));
  padding-bottom: max(0px, calc(var(--hero-bottom, 0) * var(--px)));
}
.ev-hero--sub .ev-hero__media {
  -webkit-mask-image: linear-gradient(180deg, #000 50%, transparent 96%);
  mask-image: linear-gradient(180deg, #000 50%, transparent 96%);
}
.ev-hero--sub .ev-hero__media::after {
  background: rgba(14, 14, 14, var(--hero-dim, 0.5));
  mix-blend-mode: normal;
}
.ev-hero__glow {
  position: absolute;
  inset: 12% 11% 8%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(211, 211, 211, 0.1) 0%, rgba(198, 164, 129, 0.05) 50%, rgba(184, 116, 47, 0) 100%);
  pointer-events: none;
}
.ev-hero__eyebrow {
  margin-bottom: clamp(18px, 1.46vw, 28px);
  font-size: clamp(13px, 0.885vw, 17px);
  font-weight: 500;
  line-height: 1.353;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}
/* 1.42 = the automatic line height of Quablo in Figma (71 px at 50 px) */
.ev-hero--sub .ev-hero__title {
  max-width: 1100px;
  line-height: 1.42;
}
.ev-hero--balance .ev-hero__title {
  text-wrap: balance;
}
.ev-hero__lead {
  max-width: var(--lead-w, 760px);
  min-height: calc(var(--lead-h, 0) * var(--px));
  margin-top: clamp(18px, 1.46vw, 28px);
  font-size: var(--ev-fs-body-l);
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}
.ev-hero--sub .ev-hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px 28px;
  margin-top: clamp(18px, 1.46vw, 28px);
  padding-block: calc(var(--cta-pad, 0) * var(--px));
}
.ev-hero--sub .ev-hero__scroll {
  bottom: calc(var(--scroll-bottom, 68) * var(--px));
}
/* chevrons that follow the content instead of sitting at the bottom edge */
.ev-hero--flow .ev-hero__scroll {
  position: static;
  margin-top: calc(var(--scroll-gap, 28) * var(--px));
  translate: none;
}
@media (max-width: 900px) {
  .ev-hero__scroll {
    padding: 12px 16px;
    margin-bottom: -12px;
  }
  /* sub-pages */
  .ev-hero--sub {
    justify-content: center;
    padding-top: 130px;
    padding-bottom: 96px;
  }
  .ev-hero--sub .ev-hero__cta {
    padding-block: 0;
  }
  .ev-hero__lead {
    min-height: 0;
  }
  .ev-hero--sub .ev-hero__scroll {
    bottom: 28px;
  }
  .ev-hero--flow .ev-hero__scroll {
    position: absolute;
    margin-top: 0;
    translate: -50% 0;
  }
}

@media (max-width: 600px) {
  .ev-hero__subtitle,
  .ev-hero__eyebrow {
    letter-spacing: 0.16em;
  }
  /* Figma iPhone frame 801:6551 (402 px wide, hero H = 774): dark band under the header, video
     137–758 with a 91 px fade-in (Rectangle 159), fade into the page 471–759 (Rectangle 158),
     intro at 419, chevrons ending at H. The statement starts 34 px lower, so H is capped to keep
     its first lines on the first screen. */
  .ev-hero--home:not(.ev-hero--film) {
    --home-h: max(400px, min(192.54vw, 100svh - 34.83vw));
    min-height: var(--home-h);
    padding-top: calc(var(--home-h) * 0.5413);
    padding-bottom: 48px;
  }
  .ev-hero--home:not(.ev-hero--film) .ev-hero__media {
    top: 17.7%;
    bottom: auto;
    height: 80.23%;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14.5%);
    mask-image: linear-gradient(180deg, transparent 0, #000 14.5%);
  }
  .ev-hero--home:not(.ev-hero--film) .ev-hero__fade {
    height: 39.15%;
    background: linear-gradient(180deg, rgba(14, 14, 14, 0), #0e0e0e 91.8%);
  }
  .ev-hero--home:not(.ev-hero--film) .ev-hero__scroll {
    bottom: 0;
  }
  /* buttons: one clear column instead of two different widths */
  .ev-hero--sub .ev-hero__cta {
    flex-direction: column;
    align-items: stretch;
    width: min(100%, 320px);
    gap: 14px;
  }
  /* text over a photo needs a darker photo at this size */
  .ev-hero--sub .ev-hero__media::after {
    background: rgba(14, 14, 14, max(var(--hero-dim, 0.5), 0.74));
  }
}
