/* ==========================================================================
   Section 1 — Hero
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh; /* stable under mobile browser toolbars */
  overflow: hidden;
  background-color: var(--sea);
  color: var(--ink);
}

/* ---------- Media layer ----------
   Both source clips (and their posters) carry baked-in letterbox bars
   (~3.6% top and bottom). Scaling the layer by 1.1 hides 4.5% of every edge,
   which pushes the bars out of frame at any viewport aspect ratio. */
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  transform: scale(1.1);
  background: var(--sea) url("../../images/sec-1/hero-bg-poster.jpg")
    center / cover no-repeat;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1.2s var(--ease-out);
}

.hero.is-playing .hero__video {
  opacity: 1;
}

/* ---------- Readability scrim ----------
   Top: soft shade for a future fixed header.
   Left: lifts the headline column.
   Bottom: grounds the highlights strip. Centre-right stays clear for the video. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--sea) 45%, transparent) 0%,
      transparent 22%
    ),
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--sea) 70%, transparent) 0%,
      color-mix(in srgb, var(--sea) 38%, transparent) 42%,
      transparent 70%
    ),
    linear-gradient(
      0deg,
      color-mix(in srgb, var(--sea) 80%, transparent) 0%,
      color-mix(in srgb, var(--sea) 28%, transparent) 24%,
      transparent 44%
    );
}

/* ---------- Content ---------- */
.hero__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(104px, 16vh, 168px) var(--gutter) 0;
  text-shadow: 0 1px 28px color-mix(in srgb, var(--sea) 35%, transparent);
}

.hero__main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  padding-bottom: clamp(36px, 7vh, 72px);
}

.hero__content {
  max-width: 60rem;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(18px, 3vh, 28px);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.28em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ink);
}

.hero__eyebrow-rule {
  flex: none;
  width: 36px;
  height: 1px;
  background-color: var(--accent);
}

.hero__title {
  font-size: clamp(1.8rem, 0.7rem + 4.5vw, 5rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.hero__title-line {
  display: block;
}

.hero__subhead {
  max-width: 34rem;
  margin-top: clamp(18px, 3vh, 28px);
  font-size: clamp(12px, 0.8rem + 0.3vw, 16px);
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.hero__actions {
  margin-top: clamp(24px, 4.5vh, 40px);
  text-shadow: none;
}

/* The page's lead CTA — a touch taller and roomier than the base button. */
.hero__actions .btn {
  min-height: 58px;
  padding-left: 32px;
  gap: 22px;
}

/* ---------- Scroll cue ---------- */
.hero__scroll {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 8px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  transition: color 0.3s var(--ease-out);
}

.hero__scroll:hover {
  color: var(--ink);
}

.hero__scroll-label {
  writing-mode: vertical-rl;
}

.hero__scroll-line {
  position: relative;
  width: 1px;
  height: 56px;
  overflow: hidden;
  background-color: var(--hairline);
}

.hero__scroll-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: -40%;
  width: 100%;
  height: 40%;
  background-color: var(--ink);
}

/* ---------- Highlights strip ---------- */
.hero__highlights {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
  border-top: 1px solid var(--hairline);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.hero__highlight {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px clamp(24px, 4vh, 36px);
}

.hero__highlight:first-child {
  padding-left: 0;
}

.hero__highlight + .hero__highlight {
  border-left: 1px solid var(--hairline);
}

.hero__hl-index {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}

.hero__hl-text {
  font-size: clamp(14px, 0.78rem + 0.3vw, 17px);
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
}

/* ---------- Motion (entrance + scroll cue) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero [data-reveal] {
    animation: hero-rise 1s var(--ease-out) both;
    animation-delay: calc(var(--reveal-i, 0) * 110ms + 200ms);
  }

  .hero__scroll-line::after {
    animation: hero-scroll 2.4s var(--ease-out) infinite;
  }
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-scroll {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(350%);
  }
}

/* ---------- Tablet ---------- */
@media (max-width: 1099px) {
  .hero__highlights {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero__highlight:nth-child(3n + 1) {
    padding-left: 0;
    border-left: 0;
  }

  .hero__highlight:nth-child(n + 4) {
    border-top: 1px solid var(--hairline);
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .hero__media {
    background-image: url("../../images/sec-1/hero-bg-mobile-poster.jpg");
  }

  /* Text sits in the lower half, so the scrim builds from the bottom and
     leaves the upper frame (architecture / sky) untouched. */
  .hero__scrim {
    background:
      linear-gradient(
        180deg,
        color-mix(in srgb, var(--sea) 40%, transparent) 0%,
        transparent 18%
      ),
      linear-gradient(
        0deg,
        color-mix(in srgb, var(--sea) 90%, transparent) 0%,
        color-mix(in srgb, var(--sea) 66%, transparent) 34%,
        color-mix(in srgb, var(--sea) 22%, transparent) 58%,
        transparent 74%
      );
  }

  .hero__inner {
    padding-top: 96px;
  }

  .hero__main {
    display: block;
    padding-bottom: 28px;
  }

  .hero__eyebrow {
    gap: 12px;
    margin-bottom: 16px;
    font-size: 11px;
    letter-spacing: 0.22em;
  }

  .hero__eyebrow-rule {
    width: 24px;
  }

  .hero__title {
    letter-spacing: -0.022em;
  }

  .hero__subhead {
    margin-top: 16px;
    line-height: 1.55;
  }

  .hero__actions {
    margin-top: 24px;
  }

  .hero__scroll {
    display: none;
  }

  .hero__highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }

  .hero__highlight,
  .hero__highlight:first-child,
  .hero__highlight + .hero__highlight,
  .hero__highlight:nth-child(3n + 1) {
    padding: 13px 14px 13px 0;
    border-left: 0;
    border-top: 0;
  }

  .hero__highlight:nth-child(even) {
    padding-left: 16px;
    border-left: 1px solid var(--hairline);
  }

  .hero__highlight:nth-child(n + 3) {
    border-top: 1px solid var(--hairline);
  }

  .hero__highlight:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .hero__hl-index {
    display: none;
  }

  .hero__hl-text {
    font-size: 13px;
  }
}

/* Short landscape phones: let the hero grow rather than crush the content. */
@media (max-height: 520px) and (orientation: landscape) {
  .hero__inner {
    padding-top: 88px;
  }

  .hero__main {
    padding-bottom: 28px;
  }
}
