/* ===== Hero (Figma 3208:4635) ===== */

.hero { padding: 24px 0 0; }

.hero__intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  margin-top: 64px;
}

.hero__title {
  font-weight: 400;
  font-size: clamp(44px, 5.95vw, 114.24px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #000;
}
.hero__title .soft { color: rgba(0, 0, 0, 0.3); }
.hero__line { display: block; white-space: nowrap; padding-bottom: 0.14em; margin-bottom: -0.072em; } /* room for g/y descenders inside the reveal mask, same line spacing */

.hero__aside {
  /* 508px as in Figma, narrowing (down to 380px) when a long headline needs the room */
  flex: 0 1 508px;
  min-width: 380px;
  /* Bottom of the aside block lines up 160px below the headline, as in Figma. */
  margin-top: calc(clamp(44px, 5.95vw, 114.24px) * 2.53);
}
.hero__lead {
  text-wrap: pretty;
  font-size: clamp(22px, 1.67vw, 32.064px);
  line-height: 1.2;
  color: #000;
}
.hero__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 50.304px;
}

@media (max-width: 1280px) {
  .hero__intro { flex-direction: column; gap: 40px; }
  /* stacked: the flex basis would set the aside's height here, so size it by width only */
  .hero__aside { flex: none; min-width: 0; margin-top: 0; width: min(508px, 100%); align-self: flex-end; }
}

@media (max-width: 640px) {
  .hero__intro { margin-top: 40px; }
  .hero__line { white-space: normal; }
  /* phones: a long line wraps inside its mask — give descenders (g, y) room and keep
     the wrapped rows evenly spaced with the other lines */
  .hero__title { line-height: 1.04; }
  .hero__line { padding-bottom: 0.22em; margin-bottom: -0.18em; }
  .hero__rotator.is-rolling { height: 1.25em; }
  .hero__aside { align-self: stretch; }
  .hero__actions { padding-top: 32px; }
}

/* Headline entrance: each line rises out of its own mask with a slight tilt that
   straightens as it lands, one line after another. The grey words arrive black and
   settle to grey a beat later, so "brand" and "ambition" are left standing out.
   While the page loader is up the lines wait below their masks (html.is-loading),
   so the whole entrance plays as the curtain lifts. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__line { overflow: hidden; }
  .js .hero__line > .hero__line-inner {
    display: inline-block;
    transform: translateY(110%) rotate(4deg);
    transform-origin: 0 100%;
    transition: transform 1.3s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1));
  }
  /* the first ~0.35s the loader curtain is still passing over the headline */
  .js .hero__title.is-revealed .hero__line-inner { transform: none; transition-delay: 350ms; }
  .js .hero__title.is-revealed .hero__line:nth-child(2) .hero__line-inner { transition-delay: 470ms; }
  .js .hero__title.is-revealed .hero__line:nth-child(3) .hero__line-inner { transition-delay: 590ms; }
  .js .hero__title[data-reveal] { opacity: 1; transform: none; }

  .js .hero__title .soft,
  .js .hero__title .hero__line.soft .hero__line-inner { color: #000; transition: color 1.2s ease; }
  .js .hero__title.is-revealed .soft { color: rgba(0, 0, 0, 0.3); transition-delay: 1300ms; }
  .js .hero__title.is-revealed .hero__line.soft .hero__line-inner { color: rgba(0, 0, 0, 0.3); transition-delay: 1450ms; }

  html.is-loading.js .hero__title.is-revealed .hero__line-inner { transform: translateY(110%) rotate(4deg); transition: none; }
  html.is-loading.js .hero__title.is-revealed .soft,
  html.is-loading.js .hero__title.is-revealed .hero__line.soft .hero__line-inner { color: #000; transition: none; }
  html.is-loading.js .hero__title[data-reveal].is-revealed { opacity: 1; transform: none; }
}

/* Rotating last word ("your ambition / expertise / vision / story") */
.hero__rotator {
  position: relative;
  display: inline-block;
  vertical-align: top;
  white-space: nowrap;
}
.hero__rotator.is-rolling { height: 1.08em; overflow: hidden; }
.hero__rotator.is-rolling .hero__word { position: absolute; left: 0; top: 0; }
.hero__word { display: inline-block; white-space: nowrap; }

/* Mascot peeking over the film card (mascot_controller.js) */
.peek-mascot {
  --size: clamp(60px, 5vw, 96px);
  position: absolute;
  bottom: calc(100% - var(--size) * 0.3);
  z-index: 0;
  width: var(--size);
  height: calc(var(--size) * 0.93);
  margin-left: calc(var(--size) / -2);
  pointer-events: none;
}
.peek-mascot__body {
  display: block; width: 100%; height: 100%;
  transform: translateY(105%);
  transition: transform 0.55s cubic-bezier(0.55, 0, 0.75, 0);
  pointer-events: auto;
  cursor: default;
}
.peek-mascot.is-up .peek-mascot__body {
  transform: none;
  transition: transform 0.75s cubic-bezier(0.34, 1.7, 0.64, 1);
}
.peek-mascot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.peek-mascot .mascot__eyes { transform-box: fill-box; transform-origin: 50% 55%; }
.film__frame { z-index: 1; }

/* --- Hero CTA: draws the eye without shouting ---
   • orange circle (brand accent) instead of black
   • a soft orange ring ripples out from the circle every few seconds
   • the arrow slides out and back in on a loop
   • text gets an underline sweep on hover
   • magnetic: the button leans toward the cursor (magnetic_controller.js)
   All idle loops start after the headline has revealed, pause on hover,
   and switch off for reduced-motion users. */
.btn-pill--attention { position: relative; isolation: isolate; }
.btn-pill--attention .btn-pill__text,
.btn-pill--attention .btn-circle { transition: transform 0.6s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1)); }
.btn-pill--attention .btn-circle__face--solid { background: var(--accent); }
.btn-pill--attention .btn-pill__text {
  background: linear-gradient(currentColor, currentColor) 100% 100% / 0 1px no-repeat;
  transition: transform 0.6s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1)), background-size 0.45s var(--ease-out);
}
.btn-pill--attention:hover .btn-pill__text { background-position: 0 100%; background-size: 100% 1px; }

.btn-pill__ring {
  position: absolute;
  right: 0;
  top: 50%;
  z-index: -1;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  border-radius: 50%;
  pointer-events: none;
  transition: transform 0.6s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1));
}
.btn-pill__ring::before,
.btn-pill__ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .btn-pill__ring::before { animation: cta-ripple 3.2s cubic-bezier(0.16, 1, 0.3, 1) 1.8s infinite; }
  .btn-pill__ring::after  { animation: cta-ripple 3.2s cubic-bezier(0.16, 1, 0.3, 1) 2.15s infinite; }
  .btn-pill--attention .btn-circle__face--solid svg { animation: cta-nudge 3.2s cubic-bezier(0.65, 0, 0.35, 1) 2s infinite; }
  .btn-pill--attention:hover .btn-pill__ring::before,
  .btn-pill--attention:hover .btn-pill__ring::after,
  .btn-pill--attention:hover .btn-circle__face--solid svg { animation-play-state: paused; }
}

@keyframes cta-ripple {
  0%   { transform: scale(1);   opacity: 0.55; }
  70%  { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}
/* arrow exits right, re-enters from the left, then rests */
@keyframes cta-nudge {
  0%, 62%  { transform: translateX(0); opacity: 1; }
  74%      { transform: translateX(130%); opacity: 0; }
  75%      { transform: translateX(-130%); opacity: 0; }
  88%, 100% { transform: translateX(0); opacity: 1; }
}

/* Phones: lines 2 and 3 flow as one sentence, so a short word like "as" is never
   left alone on a row — it wraps together with "your ambition" instead. These two
   lines fade up (no mask) because they share rows. */
@media (max-width: 640px) {
  .hero__title .hero__line:nth-child(2),
  .hero__title .hero__line:nth-child(3) { display: inline; overflow: visible; padding: 0; margin: 0; }
  .hero__title .hero__line:nth-child(2) > .hero__line-inner { display: inline; }
  .hero__title .hero__line:nth-child(3) > .hero__line-inner { display: inline-block; white-space: nowrap; }
  .hero__title .hero__line:nth-child(1) { margin-bottom: 0; }
}
@media (max-width: 640px) and (prefers-reduced-motion: no-preference) {
  .js .hero__title .hero__line:nth-child(2) > .hero__line-inner,
  .js .hero__title .hero__line:nth-child(3) > .hero__line-inner {
    transform: none; opacity: 0; transition: opacity 0.9s ease;
  }
  .js .hero__title.is-revealed .hero__line:nth-child(2) > .hero__line-inner { opacity: 1; transform: none; transition-delay: 470ms; }
  .js .hero__title.is-revealed .hero__line:nth-child(3) > .hero__line-inner { opacity: 1; transform: none; transition-delay: 590ms; }
  html.is-loading.js .hero__title.is-revealed .hero__line:nth-child(2) > .hero__line-inner,
  html.is-loading.js .hero__title.is-revealed .hero__line:nth-child(3) > .hero__line-inner { opacity: 0; transform: none; transition: none; }
}
