/* WATA Studio — hero (Editorial)
   Designed on a 1440×900 stage. All sizes are expressed in design pixels
   multiplied by --u, which scales the composition to the viewport.

   Two modes:
   - static (default, also without JS): CSS entrance animations below.
   - html.intro: surfacing intro driven by intro.js. CSS entrances are off,
     content stays hidden until the video settles, then the controller
     reveals it in sync with the video clock. */

:root {
  --ink: #191E22;
  --bg: #1A1F23;
  --water: #0B2A33;
  --paper: #F5F1E8;
  --paper-hi: #FAF7F0;
  --shadow: 12, 18, 24;

  --serif: "Marcellus", Georgia, serif;
  --sans: "Karla", Helvetica, Arial, sans-serif;

  --u: min(100vw / 1440, 100svh / 900);
  --fs-caps: max(11px, calc(13 * var(--u)));
  --fs-small: max(10px, calc(12 * var(--u)));
  --ease-rise: cubic-bezier(.2, .7, .2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--paper); text-decoration: none; }
a:hover { color: #FFFFFF; }

a:focus-visible,
button:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 6px;
}

/* ---------- Stage ---------- */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: calc(560 * var(--u));
  overflow: hidden;
  isolation: isolate;
}

/* Poster, intro video and underwater start frame share one box, one fit
   and one position, so the hand-off from video to poster cannot shift. */
.hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform-origin: 50% 56%;
  animation: vd-push 42s cubic-bezier(.24, .4, .2, 1) forwards;
}

.hero__img,
.hero__video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__video {
  display: none;
  opacity: 0;
}

.hero__start {
  position: absolute;
  inset: 0;
  display: none;
  background: var(--intro-start, none) center / cover no-repeat, var(--water);
}

/* Brief brightening where a stock clip breaks into the poster photo. */
.hero__flash {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 70% at 50% 35%, rgba(235, 248, 255, .55) 0%, rgba(210, 236, 245, .25) 50%, rgba(210, 236, 245, 0) 100%);
}

.shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(10, 15, 20, .8) 0%, rgba(10, 15, 20, .42) 32%, rgba(10, 15, 20, 0) 62%),
    linear-gradient(180deg, rgba(10, 15, 20, .45) 0%, rgba(10, 15, 20, 0) 24%),
    rgba(13, 19, 25, .08);
}

/* ---------- Header ---------- */

.top {
  position: absolute;
  top: 0;
  left: calc(64 * var(--u));
  right: calc(64 * var(--u));
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: calc(44 * var(--u));
  animation: vd-fade 1.4s ease-out .12s both;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: calc(12 * var(--u));
}

.brand__name {
  font-family: var(--serif);
  font-size: calc(24 * var(--u));
  letter-spacing: .32em;
  color: var(--paper-hi);
}

.brand__sub,
.nav a {
  font-size: var(--fs-caps);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand__sub { letter-spacing: .36em; opacity: .85; }

.nav {
  display: flex;
  align-items: center;
  gap: calc(36 * var(--u));
}

.nav a {
  opacity: .86;
  transition: opacity .3s ease;
}
.nav a:hover { opacity: 1; }

.nav .nav__cta {
  padding-left: calc(36 * var(--u));
  border-left: 1px solid rgba(245, 241, 232, .35);
  opacity: 1;
}

/* ---------- Headline block ---------- */

.main {
  position: absolute;
  left: calc(64 * var(--u));
  right: calc(64 * var(--u));
  bottom: calc(124 * var(--u));
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc(360 * var(--u));
  align-items: end;
  gap: calc(64 * var(--u));
}

.title {
  margin: 0;
  font-family: var(--serif);
  font-size: calc(108 * var(--u));
  line-height: .98;
  font-weight: 400;
  letter-spacing: -.012em;
  color: var(--paper-hi);
}

/* Each line rises from behind its own bottom edge; the clip leaves room
   for ascenders and descenders. */
.line {
  display: block;
  clip-path: inset(-.3em -.2em -.22em -.2em);
}

.line__inner {
  display: block;
  white-space: nowrap;
  animation: vd-line 1.2s var(--ease-rise) .3s both;
}
.line + .line .line__inner { animation-delay: .42s; }

.side { padding-bottom: calc(10 * var(--u)); }

.side__lede {
  margin: 0 0 calc(28 * var(--u));
  font-size: max(15px, calc(18 * var(--u)));
  line-height: 1.65;
  font-weight: 500;
  color: rgba(245, 241, 232, .9);
  text-wrap: pretty;
  animation: vd-rise 1.2s var(--ease-rise) .55s both;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: calc(14 * var(--u));
  padding-bottom: calc(8 * var(--u));
  border-bottom: 1px solid rgba(245, 241, 232, .7);
  font-size: var(--fs-caps);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: gap .35s ease, border-color .3s ease;
  animation: vd-rise 1.2s var(--ease-rise) .65s both;
}
.link-arrow:hover {
  gap: calc(22 * var(--u));
  border-bottom-color: #FFFFFF;
}

/* ---------- Footer row ---------- */

.foot {
  position: absolute;
  left: calc(64 * var(--u));
  right: calc(64 * var(--u));
  bottom: calc(40 * var(--u));
  z-index: 1;
  display: flex;
  justify-content: space-between;
  padding-top: calc(18 * var(--u));
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(245, 241, 232, .82);
}

.foot__rule {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(245, 241, 232, .28);
  transform-origin: left center;
  animation: vd-grow-x 1.4s var(--ease-rise) .6s both;
}

.foot__text {
  display: block;
  animation: vd-rise 1.2s var(--ease-rise) .75s both;
}

/* ---------- Skip intro ---------- */

.intro-skip {
  position: absolute;
  left: 50%;
  bottom: calc(26 * var(--u));
  z-index: 5;
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  transform: translateX(-50%);
  font: 600 11px/1 var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--paper);
  background: rgba(14, 19, 24, .45);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(245, 241, 232, .22);
  border-radius: 999px;
  cursor: pointer;
  transition: background .25s ease, border-color .25s ease;
}

.intro-skip:hover {
  background: rgba(14, 19, 24, .7);
  border-color: rgba(245, 241, 232, .5);
}

.intro-skip:focus-visible { outline-offset: 3px; }
.intro-skip[hidden] { display: none; }

/* ---------- Intro mode ---------- */

.intro .hero__media,
.intro .top,
.intro .line__inner,
.intro .side__lede,
.intro .link-arrow,
.intro .foot__rule,
.intro .foot__text { animation: none; }

/* Slow push starts only after the intro, from the exact final frame. */
.intro.intro-done .hero__media {
  animation: vd-push 42s cubic-bezier(.24, .4, .2, 1) forwards;
}

.intro .hero__video { display: block; }
.intro.intro-playing .hero__video { opacity: 1; }

.intro .hero__start {
  display: block;
  transition: opacity .4s ease, visibility 0s linear .4s;
}
.intro.intro-playing .hero__start {
  opacity: 0;
  visibility: hidden;
}

.intro-hidden .shade { opacity: 0; }
.intro-hidden [data-intro-content] { visibility: hidden; }

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
  :root { --u: min(100vw / 760, 1px); }

  .top { left: 24px; right: 24px; padding-top: 28px; }
  .brand__name { font-size: 21px; }
  .nav a:not(.nav__cta) { display: none; }
  .nav .nav__cta {
    padding: 0 0 6px;
    border-left: 0;
    border-bottom: 1px solid rgba(245, 241, 232, .6);
    font-size: 12px;
  }

  .main {
    left: 24px;
    right: 24px;
    bottom: 96px;
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .title { font-size: clamp(44px, 12.4vw, 80px); }
  .side__lede { max-width: 380px; font-size: 16px; margin-bottom: 22px; }
  .link-arrow { font-size: 12px; gap: 12px; padding-bottom: 6px; }

  .foot {
    left: 24px;
    right: 24px;
    bottom: 28px;
    padding-top: 14px;
    font-size: 10px;
    letter-spacing: .22em;
  }
  .foot__text:nth-of-type(2) { display: none; }

  .intro-skip {
    left: auto;
    right: 20px;
    bottom: 18px;
    padding: 9px 14px;
    transform: none;
    font-size: 10px;
  }
}

@media (max-height: 560px) and (max-width: 900px) {
  .hero { min-height: 640px; }
}

/* ---------- Motion ---------- */

@keyframes vd-push {
  from { transform: scale(1); }
  to   { transform: scale(1.055); }
}

@keyframes vd-rise {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes vd-line {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes vd-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes vd-grow-x {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
  }
}
