/* =========================================================================
   TYDAL Hero 1: "Tide"
   The hero becomes the TYDAL badge: the wave-T bar draws itself, the aqua sun
   rises behind it, and the real case surfaces out of the band-coloured waves
   to become the T's stem. Every rule is scoped under .hero-1.
   Loops animate transform/opacity only. Base styles = final resting state;
   intro keyframes only describe "from" states (fill-mode: both).
   ========================================================================= */

.hero-1 {
  /* layout unit: desktop = 1% of hero height; stage = 74u x 100u */
  --u: 1cqh;
  --st: 0px;                                   /* stage top */
  --sx: calc(69% - 37 * var(--u));             /* stage left */
  --h1-coconut: #584240;
  --h1-breeze: #B8E8EF;
  --h1-soft: #CAE8EF;
  --h1-aqua: #97E7E3;
  position: relative;
  isolation: isolate;
  container-type: size;
  height: clamp(560px, calc(100vh - var(--nav-h, 72px) - var(--hero-gap, var(--logo-gap, 0px))), 900px);
  height: clamp(560px, calc(100svh - var(--nav-h, 72px) - var(--hero-gap, var(--logo-gap, 0px))), 900px);
  overflow: hidden;
  overflow: clip;
  background:
    radial-gradient(60cqh 60cqh at 66% 18%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #CBEFF4 0%, var(--h1-breeze) 55%);
  color: var(--h1-coconut);
}

/* ---------- copy ---------- */
.hero-1 .hero-1__copy {
  position: absolute;
  z-index: 6;
  left: var(--gutter, 24px);
  top: 0;
  bottom: 36cqh;
  width: min(36rem, calc(var(--sx) - var(--gutter, 24px) - 4 * var(--u)));
  display: flex;
  flex-direction: column;
  justify-content: center;
  will-change: transform;
}
.hero-1 .hero-1__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  margin: 0 0 1.1rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.hero-1 .hero-1__eyebrow svg { width: 2.6em; height: auto; flex: none; }
.hero-1 .hero-1__title {
  margin: 0 0 1.1rem;
  font-size: clamp(2rem, 1.1rem + 3.1vw, 4.1rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.hero-1 .hero-1__title em {
  font-style: normal;
  position: relative;
  white-space: nowrap;
}
/* soft hand-drawn underline under "Stand Out!" */
.hero-1 .hero-1__title em svg {
  position: absolute;
  left: -2%;
  bottom: -.16em;
  width: 104%;
  height: .32em;
  z-index: -1;
  overflow: visible;
}
.hero-1 .hero-1__lede {
  margin: 0 0 1.8rem;
  max-width: 30rem;
  font-size: clamp(1rem, .92rem + .3vw, 1.15rem);
  font-weight: 500;
  line-height: 1.55;
}
.hero-1 .hero-1__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-1 .hero-1__actions .btn--ghost { background: rgba(255, 255, 255, .35); }
.hero-1 .hero-1__actions .btn--ghost:hover { background: var(--h1-coconut); }

/* ---------- stage (badge: glow, sun, ring, wave bar, case) ---------- */
.hero-1 .hero-1__stage {
  position: absolute;
  left: var(--sx);
  top: var(--st);
  width: calc(74 * var(--u));
  height: calc(100 * var(--u));
  pointer-events: none;
}
.hero-1 .hero-1__glow {
  position: absolute;
  z-index: 1;
  left: calc(-12 * var(--u));
  top: calc(-21 * var(--u));
  width: calc(84 * var(--u));
  height: calc(84 * var(--u));
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .85), rgba(255, 255, 255, .35) 45%, rgba(255, 255, 255, 0));
  animation: hero-1-fade 2.4s .8s ease-out both, hero-1-breathe 7s 3.2s ease-in-out infinite alternate;
}
.hero-1 .hero-1__mark {
  position: absolute;
  z-index: 2;
  inset: 0;
  will-change: transform;
}
/* the sun lives in a clip box whose bottom edge runs along the wave bar */
.hero-1 .hero-1__sunclip {
  position: absolute;
  left: calc(16 * var(--u));
  top: calc(4 * var(--u));
  width: calc(28 * var(--u));
  height: calc(15.6 * var(--u));
  overflow: hidden;
  transform: rotate(7deg);
  transform-origin: 50% 100%;
}
.hero-1 .hero-1__sunpar { position: absolute; inset: 0; will-change: transform; }
.hero-1 .hero-1__sun {
  position: absolute;
  left: calc(4.6 * var(--u));
  top: calc(4.8 * var(--u));
  width: calc(18.4 * var(--u));
  height: calc(18.4 * var(--u));
  border-radius: 50%;
  background: var(--h1-aqua);
  animation: hero-1-sunrise 1.9s .95s cubic-bezier(.2, .7, .2, 1) both;
}
.hero-1 .hero-1__marksvg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.hero-1 .hero-1__ring,
.hero-1 .hero-1__bar { fill: none; stroke-linecap: round; }
.hero-1 .hero-1__ring--outer { stroke: var(--h1-coconut); stroke-width: 4; opacity: .9; }
.hero-1 .hero-1__ring--inner { stroke: #fff; stroke-width: 3; }
.hero-1 .hero-1__bar { stroke: var(--h1-coconut); stroke-width: 34; }
/* ring ripples outward from the sun */
.hero-1 .hero-1__rings {
  transform-origin: 50% 52%;
  animation: hero-1-ripple 2.4s .9s cubic-bezier(.2, .7, .2, 1) both;
}
/* wave bar "draws" left -> right: the clip slides right while the bar slides back left by the same amount */
.hero-1 .hero-1__barclip {
  position: absolute;
  left: 0;
  top: calc(14 * var(--u));
  width: 100%;
  height: calc(14 * var(--u));
  overflow: hidden;
  animation: hero-1-wipe 1.5s .25s cubic-bezier(.6, 0, .2, 1) both;
}
.hero-1 .hero-1__barsvg {
  display: block;
  width: 100%;
  height: 100%;
  animation: hero-1-unwipe 1.5s .25s cubic-bezier(.6, 0, .2, 1) both;
}

.hero-1 .hero-1__casepar {
  position: absolute;
  z-index: 4;
  /* sits outside .hero-1__stage (so it can slot between sea layers): add the stage offset */
  left: calc(var(--sx) + 21.8 * var(--u));
  top: calc(var(--st) + 23.4 * var(--u));
  width: calc(30.4 * var(--u));
  height: calc(59.9 * var(--u));
  will-change: transform;
  transform-origin: 50% 80%;
}
.hero-1 .hero-1__case {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: 50% 85%;
  animation:
    hero-1-surface 1.9s .55s cubic-bezier(.16, .84, .3, 1) both,
    hero-1-bob 6.5s 2.45s ease-in-out infinite alternate;
}
.hero-1 .hero-1__case picture,
.hero-1 .hero-1__case img {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-1 .hero-1__case img {
  object-fit: contain;
}
/* static soft shadow (box-shadow paints once into the layer; a filter would be re-run every frame) */
.hero-1 .hero-1__case::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: calc(1.2 * var(--u)) calc(.8 * var(--u)) calc(.6 * var(--u));
  border-radius: calc(5 * var(--u));
  box-shadow: 0 calc(1.8 * var(--u)) calc(3 * var(--u)) rgba(88, 66, 64, .26);
}

/* ---------- sea (wave bands) ---------- */
.hero-1 .hero-1__layer {
  position: absolute;
  left: -48px;
  right: -48px;
  top: calc(var(--st) + var(--k) * var(--u));
  /* each band only reaches just below the next band (keeps composited layers small) */
  height: calc(var(--fh) * var(--u));
  will-change: transform;
  pointer-events: none;
  /* JS owns `transform` (parallax); the intro roll + swell use the separate `translate` property */
  animation:
    hero-1-roll 1.6s .05s cubic-bezier(.2, .75, .25, 1) both,
    hero-1-swell var(--sw, 6s) 1.65s ease-in-out infinite alternate;
}
.hero-1 .hero-1__layer--last { height: auto; bottom: -36cqh; }
.hero-1 .hero-1__wave {
  position: absolute;
  left: 0;
  top: 0;
  width: 200%;
  max-width: none;
  height: calc(var(--wh) * var(--u));
  overflow: visible;
  animation: hero-1-drift var(--dr, 30s) linear infinite;
}
.hero-1 .hero-1__wave--rev { animation-direction: reverse; }
.hero-1 .hero-1__wave path.c { fill: none; stroke: #fff; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.hero-1 .hero-1__fill {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--wh) * var(--u) - 3px);
  bottom: 0;
}

/* ---------- keyframes ---------- */
@keyframes hero-1-ripple { from { transform: scale(.82); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes hero-1-wipe { from { transform: translate3d(-100%, 0, 0); } to { transform: translate3d(0, 0, 0); } }
@keyframes hero-1-unwipe { from { transform: translate3d(100%, 0, 0); } to { transform: translate3d(0, 0, 0); } }
@keyframes hero-1-sunrise { from { transform: translate3d(0, 105%, 0); } to { transform: translate3d(0, 0, 0); } }
@keyframes hero-1-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hero-1-breathe { from { opacity: 1; } to { opacity: .55; } }
@keyframes hero-1-surface {
  0% { transform: translate3d(0, calc(46 * var(--u)), 0) rotate(-5deg); opacity: 0; }
  18% { opacity: 1; }
  100% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 1; }
}
@keyframes hero-1-bob {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(0, calc(-1.4 * var(--u)), 0) rotate(1.2deg); }
}
@keyframes hero-1-roll {
  from { translate: -4% calc(var(--rd, 30) * var(--u)); }
  to { translate: 0 0; }
}
@keyframes hero-1-swell {
  from { translate: 0 0; }
  to { translate: 0 calc(var(--sa, 1) * var(--u)); }
}
@keyframes hero-1-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }

/* paused when offscreen / tab hidden */
.hero-1.is-paused *,
.hero-1.is-paused *::before,
.hero-1.is-paused *::after { animation-play-state: paused !important; }

/* ---------- stacked layout (phones / tablets portrait) ---------- */
@media (max-width: 820px) {
  .hero-1 {
    --u: min(.68cqh, 1.25cqw);
    --st: calc(100cqh - 100 * var(--u));
    --sx: calc(50% - 37 * var(--u));
    background:
      radial-gradient(50cqh 50cqh at 50% 62%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%),
      linear-gradient(180deg, #CBEFF4 0%, var(--h1-breeze) 60%);
  }
  .hero-1 .hero-1__copy {
    left: var(--gutter, 16px);
    right: var(--gutter, 16px);
    width: auto;
    bottom: auto;
    top: clamp(16px, 3.5cqh, 48px);
    align-items: center;
    text-align: center;
  }
  .hero-1 .hero-1__eyebrow { margin-bottom: .8rem; font-size: .74rem; }
  .hero-1 .hero-1__title { margin-bottom: .8rem; font-size: clamp(1.9rem, 1.1rem + 3.6vw, 3rem); }
  .hero-1 .hero-1__lede { margin-bottom: 1.2rem; font-size: 1rem; }
  .hero-1 .hero-1__actions { justify-content: center; }
}
@media (max-width: 820px) and (max-height: 760px) {
  .hero-1 .hero-1__lede { display: none; }
}

/* ---------- reduced motion: calm, finished, static ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-1 *, .hero-1 *::before, .hero-1 *::after { animation: none !important; }
}
.hero-1.is-static *, .hero-1.is-static *::before, .hero-1.is-static *::after { animation: none !important; }
