/* teemarray.com — the hero footage and the motion.
 *
 * Both reference sites (ssyglobal.com, mbshipbrokers.com) open with moving ship footage. Ours is a
 * royalty-free aerial clip from Pexels, cleared for commercial use with no attribution required,
 * trimmed to 11 s, stripped of audio, scaled to 1600 px and served from our own domain at 1.7 MB.
 * It is decoration behind the copy, never a claim about our own tonnage.
 *
 * A poster frame covers the moment before the video decodes and stands in for it on a slow link.
 * Every animation stops under prefers-reduced-motion, and the page reads correctly with
 * JavaScript off — the reveal classes only ever add, never hide. */

.hero {
  position: relative;
  overflow: hidden;
  background: #071824;
  isolation: isolate;
}
.hero .inner { position: relative; z-index: 3; padding-block: 104px 112px; }

.hero video,
.hero .poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}
.hero video { opacity: 0; transition: opacity 1.4s ease; }
.hero video.ready { opacity: 1; }

/* The wash is what makes white text readable over moving water, and it is weighted to the left so
   the copy sits on the darkest part of the frame. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(100deg, rgba(5,18,28,.93) 0%, rgba(6,22,34,.84) 46%, rgba(8,32,50,.58) 100%),
    linear-gradient(180deg, rgba(5,18,28,.55) 0%, rgba(5,18,28,0) 34%, rgba(5,18,28,.5) 100%);
  pointer-events: none;
}

/* ---------- the mark draws itself ---------- */
.logo .l { stroke-dasharray: 1; stroke-dashoffset: 1; }
.hero .logo circle { opacity: 0; transform-box: fill-box; transform-origin: center; }
.hero .logo circle:nth-of-type(1) { animation: star .55s .2s ease-out forwards; }
.hero .logo circle:nth-of-type(2) { animation: star .55s .6s ease-out forwards; }
.hero .logo circle:nth-of-type(3) { animation: star .55s 1s ease-out forwards; }
.hero .logo circle:nth-of-type(4) { animation: star .55s 1.4s ease-out forwards; }
.hero .logo .l { animation: trace 1.5s .45s cubic-bezier(.45, 0, .25, 1) forwards; }
@keyframes star { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes trace { to { stroke-dashoffset: 0; } }
/* The header mark is static: nothing to wait for up there. */
nav .logo .l { stroke-dashoffset: 0; }

/* ---------- the hero copy settles in ---------- */
.hero h1, .hero > .inner > p, .hero .strap {
  opacity: 0;
  animation: rise .9s cubic-bezier(.2, .8, .3, 1) forwards;
}
.hero h1 { animation-delay: .3s; }
.hero > .inner > p { animation-delay: .45s; }
.hero .strap { animation-delay: .6s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- sections reveal on approach ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.3,1); }
.js .reveal.seen { opacity: 1; transform: none; }
.js .grid .cell { transition: opacity .55s ease, transform .55s cubic-bezier(.2,.8,.3,1), box-shadow .25s ease; }
.js .grid.reveal .cell { opacity: 0; transform: translateY(10px); }
.js .grid.reveal.seen .cell { opacity: 1; transform: none; }
.js .grid.reveal.seen .cell:nth-child(2) { transition-delay: .06s; }
.js .grid.reveal.seen .cell:nth-child(3) { transition-delay: .12s; }
.js .grid.reveal.seen .cell:nth-child(4) { transition-delay: .18s; }
.js .grid.reveal.seen .cell:nth-child(5) { transition-delay: .24s; }
.js .grid.reveal.seen .cell:nth-child(6) { transition-delay: .3s; }

/* ---------- small polish ---------- */
.cell { transition: box-shadow .25s ease; }
.cell:hover { box-shadow: inset 3px 0 0 var(--accent); }
.links a { transition: color .2s ease; }
nav.bar { position: sticky; top: 0; z-index: 20; transition: box-shadow .25s ease; }
nav.bar.lifted { box-shadow: 0 1px 14px rgba(8, 20, 30, .1); }
ol.steps li::before { transition: border-color .25s ease; }
ol.steps li:hover::before { border-color: var(--accent); }

/* ---------- anyone who asked for less motion gets none ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero video { display: none; }
  .hero h1, .hero > .inner > p, .hero .strap,
  .hero .logo circle, .hero .logo .l { animation: none !important; }
  .hero h1, .hero > .inner > p, .hero .strap { opacity: 1; }
  .hero .logo circle { opacity: 1; }
  .logo .l { stroke-dashoffset: 0; }
  .js .reveal, .js .grid.reveal .cell { opacity: 1; transform: none; transition: none; }
}
