.hero {
  position: relative;
  min-height: max(600px, 100svh);
  overflow: hidden;
  background: var(--color-espresso) url("../assets/video/lamiz-poster.jpg") 50% 60% / cover no-repeat;
  isolation: isolate;
}
@media (max-width: 720px) {
  .hero { background-image: url("../assets/video/lamiz-poster-mobile.jpg"); background-position: 50% 40%; }
}

.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; z-index: -2; }
@media (max-width: 720px) { .hero__video { object-position: 50% 40%; } }
.hero.is-failed .hero__video { display: none; } /* the section's poster background remains */

.hero__scrim {
  /* Darken only where the copy sits (bottom, inline-start side) so the
     sunlight moving across the counter stays visible. */
  --scrim-side: to right;
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to top, rgb(14 10 8 / 0.76) 0%, rgb(14 10 8 / 0.32) 32%, rgb(14 10 8 / 0) 50%),
    linear-gradient(var(--scrim-side), rgb(14 10 8 / 0.74) 0%, rgb(14 10 8 / 0.42) 40%, rgb(14 10 8 / 0) 64%),
    linear-gradient(to bottom, rgb(14 10 8 / 0.5) 0%, rgb(14 10 8 / 0) 18%);
}
[dir="rtl"] .hero__scrim { --scrim-side: to left; }
@media (max-width: 720px), (orientation: portrait) {
  /* phones and portrait tablets: copy sits over the bright counter */
  .hero__scrim {
    background:
      linear-gradient(to top, rgb(14 10 8 / 0.86) 0%, rgb(14 10 8 / 0.55) 38%, rgb(14 10 8 / 0) 62%),
      linear-gradient(to bottom, rgb(14 10 8 / 0.5) 0%, rgb(14 10 8 / 0) 18%);
  }
}

.hero__content {
  position: absolute; inset-inline: 0; bottom: 0;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px;
  padding: 0 var(--space-gutter) clamp(28px, 5vh, 48px);
}
.hero__copy { display: flex; flex-direction: column; gap: 18px; max-width: 640px; }
.hero__title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(42px, 6.2vw, 80px); line-height: 1.04; letter-spacing: -0.02em; }
[dir="rtl"] .hero__title { letter-spacing: 0; line-height: 1.25; font-weight: 600; }
.hero__lede { margin: 0; max-width: 470px; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.6; color: var(--color-cream-muted); }
[dir="rtl"] .hero__lede { line-height: 1.9; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }

.hero .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding-inline: 26px; border-radius: var(--radius-pill); font-weight: 600; font-size: 15px; text-decoration: none; transition: background-color .2s, color .2s, border-color .2s; }
.hero .btn:focus-visible { outline: 2px solid var(--color-saffron); outline-offset: 3px; }
.hero .btn--primary { background: var(--color-saffron); color: var(--color-on-saffron); }
.hero .btn--primary:hover { background: #f6c887; }
.hero .btn--ghost { border: 1px solid rgb(246 239 230 / 0.55); color: var(--color-cream); }
.hero .btn--ghost:hover { border-color: var(--color-cream); background: rgb(246 239 230 / 0.08); }

.hero__daybar { display: flex; align-items: center; gap: 16px; padding-block: 10px; padding-inline: 18px 10px; border-radius: var(--radius-pill); background: rgb(18 14 11 / 0.55); backdrop-filter: blur(8px); }
.hero__phase-wrap { display: flex; flex-direction: column; gap: 8px; width: 168px; }
.hero__phase { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-saffron); }
[dir="rtl"] .hero__phase { letter-spacing: 0; font-size: 13px; }
.hero__track { position: relative; height: 2px; border-radius: 2px; background: rgb(246 239 230 / 0.28); }
.hero__sun {
  --progress: 0;
  position: absolute; top: -4px; inset-inline-start: calc(var(--progress) * 100%);
  width: 10px; height: 10px; margin-inline-start: -5px; border-radius: 50%; background: var(--color-saffron);
}
.hero__toggle { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); padding: 0; border-radius: 50%; border: 1px solid rgb(246 239 230 / 0.45); background: transparent; color: var(--color-cream); cursor: pointer; }
.hero__toggle:focus-visible { outline: 2px solid var(--color-saffron); outline-offset: 3px; }
.hero__toggle .icon-play, .hero.is-paused .hero__toggle .icon-pause { display: none; }
.hero.is-paused .hero__toggle .icon-play { display: block; }
.hero.is-failed .hero__daybar { display: none; }

@media (max-width: 720px) {
  .hero__content { flex-direction: column-reverse; align-items: stretch; }
  .hero__daybar { justify-content: space-between; }
  .hero__phase-wrap { width: auto; flex: 1; }
  .hero__actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
/* on the homepage the film is a section below the 3D hero, not the first screen */
.hero--section { min-height: clamp(520px, 82svh, 820px); }
