/*
 * The Fish Locker coming soon page. Same tokens, type and motion as the main
 * site (see docs/design.md in the site repo): sea fog and harbour blues, buoy
 * orange as a fill only on the primary button and the play mark, one typeface.
 */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url('/assets/fonts/bricolage-grotesque-latin.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --harbour: #0b2a3b;
  --harbour-deep: #071c29;
  --harbour-mid: #123a4f;
  --harbour-line: #1e4a62;
  --fog: #f2f5f4;
  --fog-2: #e6eceb;
  --ink: #10222c;
  --tide-soft: #cfe3e8;
  --buoy: #c2500c;
  --buoy-deep: #a8420a;
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --instant: 120ms;
  --standard: 220ms;
  --moment: 480ms;
  --gutter: 24px;
}

@media (min-width: 768px) {
  :root {
    --gutter: 48px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

/* One screen: the stage takes whatever the footer leaves. dvh follows mobile toolbars. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  min-height: 100dvh;
  margin: 0;
  background: var(--harbour-deep);
  color: var(--fog);
  font-family: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  line-height: 27px;
  font-variation-settings: 'opsz' 14, 'wdth' 100;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--tide-soft);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Shared focus ring: white band hugging the control, ink ring outside it. */
a:focus-visible,
button:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--ink);
  border-radius: 10px;
}

/* Stage: full-height reel with the copy at the bottom left. */
.stage {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  overflow: hidden;
}

.backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--harbour-deep);
}

.poster,
.backdrop video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}

.poster {
  animation: hero-photo 1.4s var(--ease-expo) both;
  transition: opacity var(--moment) var(--ease-expo);
}

.backdrop.is-playing .poster {
  opacity: 0;
}

/* The one gradient on the site: the photo overlay that keeps the type legible. */
.shade {
  position: absolute;
  inset: 0;
}

.shade-down {
  background: linear-gradient(
    180deg,
    rgba(7, 28, 41, 0.6) 0%,
    rgba(7, 28, 41, 0.12) 30%,
    rgba(7, 28, 41, 0.42) 58%,
    rgba(7, 28, 41, 0.95) 100%
  );
}

.shade-side {
  background: linear-gradient(90deg, rgba(7, 28, 41, 0.72) 0%, rgba(7, 28, 41, 0.35) 38%, rgba(7, 28, 41, 0) 68%);
}

.top {
  padding-top: 24px;
}

.logo {
  display: block;
  width: 184px;
  height: 70px;
}

.copy {
  margin-top: auto;
  padding-top: 32px;
  padding-bottom: 56px;
  text-shadow: 0 2px 6px rgba(7, 28, 41, 0.45), 0 12px 40px rgba(7, 28, 41, 0.35);
}

@media (min-width: 768px) {
  .copy {
    padding-bottom: 80px;
  }
}

.kicker {
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  color: rgba(242, 245, 244, 0.8);
}

.display {
  max-width: 14ch;
  font-size: 52px;
  line-height: 54px;
  letter-spacing: -0.035em;
  font-weight: 750;
  font-variation-settings: 'opsz' 96, 'wdth' 92;
  text-wrap: balance;
}

@media (max-width: 380px) {
  .display {
    font-size: 44px;
    line-height: 48px;
  }
}

@media (min-width: 768px) {
  .display {
    font-size: 84px;
    line-height: 84px;
    letter-spacing: -0.04em;
  }
}

.lead {
  max-width: 52ch;
  margin-top: 24px;
  font-size: 19px;
  line-height: 30px;
  color: rgba(242, 245, 244, 0.85);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 36px;
}

@media (min-width: 640px) {
  .actions {
    flex-direction: row;
    align-items: center;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding-inline: 24px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  text-shadow: none;
  user-select: none;
  transition:
    transform var(--standard) var(--ease-expo),
    box-shadow var(--standard) var(--ease-expo),
    background-color 160ms var(--ease-expo),
    border-color 160ms var(--ease-expo),
    color 160ms var(--ease-expo);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(16, 34, 44, 0.06), 0 10px 28px -14px rgba(16, 34, 44, 0.28);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn svg:last-child:not(.play-mark) {
  margin-right: -4px;
  opacity: 0.8;
}

.btn-primary {
  background: var(--buoy);
  border-color: var(--buoy);
  color: #fff;
}

.btn-primary:hover {
  background: var(--buoy-deep);
  border-color: var(--buoy-deep);
}

.btn-secondary {
  background: #fff;
  border-color: #d8e1e0;
  color: var(--harbour);
}

.btn-secondary:hover {
  border-color: var(--harbour);
}

.play-mark {
  margin-left: -4px;
  color: var(--buoy);
}

.handoff {
  margin-top: 14px;
  font-size: 13px;
  line-height: 18px;
  color: rgba(242, 245, 244, 0.65);
}

/* Reel caption and pause control, bottom right. */
.reel-controls {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* On phones the copy fills the bottom, so the control sits top right, beside the logo. */
@media (max-width: 767px) {
  .reel-controls {
    top: 20px;
    bottom: auto;
  }
}

@media (min-width: 768px) {
  .reel-controls {
    right: 48px;
    bottom: 32px;
  }
}

.now-showing,
.reel-toggle {
  background: rgba(7, 28, 41, 0.7);
  color: rgba(242, 245, 244, 0.85);
  border-radius: 10px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition:
    background-color var(--instant) var(--ease-expo),
    color var(--instant) var(--ease-expo);
}

.now-showing:hover,
.reel-toggle:hover {
  background: rgba(7, 28, 41, 0.9);
  color: #fff;
}

.now-showing {
  display: none;
  max-width: 320px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 18px;
}

.now-showing > span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  animation: hero-rise 720ms var(--ease-expo) both;
}

.now-showing svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.muted {
  color: rgba(242, 245, 244, 0.55);
}

@media (min-width: 1024px) {
  .now-showing {
    display: inline-flex;
  }
}

.reel-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  cursor: pointer;
}

/* Copyright and credit, a quiet strip under the stage. */
.foot {
  background: var(--harbour-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.foot-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-block: 24px;
  font-size: 13px;
  line-height: 18px;
  color: rgba(242, 245, 244, 0.6);
}

@media (min-width: 768px) {
  .foot-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }
}

.foot-link {
  color: rgba(242, 245, 244, 0.85);
  text-decoration: underline;
  text-decoration-color: rgba(242, 245, 244, 0.25);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  border-radius: 4px;
  transition:
    color var(--instant) var(--ease-expo),
    text-decoration-color var(--instant) var(--ease-expo);
}

.foot-link:hover {
  color: #fff;
  text-decoration-color: #fff;
}

/*
 * Fitting one screen. Tall screens keep the full sizes above; shorter ones
 * tighten type and spacing so the copy, actions and footer never scroll.
 */
@media (max-width: 767px) {
  .lead {
    margin-top: 16px;
    font-size: 17px;
    line-height: 26px;
  }

  .actions {
    margin-top: 28px;
  }

  .foot-row {
    gap: 4px;
    padding-block: 16px;
  }
}

@media (min-width: 768px) and (max-height: 820px) {
  .copy {
    padding-bottom: 48px;
  }

  .display {
    font-size: 68px;
    line-height: 68px;
  }

  .lead {
    margin-top: 20px;
  }

  .actions {
    margin-top: 28px;
  }
}

@media (max-width: 767px) and (max-height: 760px) {
  .top {
    padding-top: 16px;
  }

  .logo {
    width: 137px;
    height: 52px;
  }

  .copy {
    padding-bottom: 24px;
  }

  .kicker {
    margin-bottom: 12px;
  }

  .display {
    font-size: 40px;
    line-height: 42px;
  }

  .lead {
    font-size: 16px;
    line-height: 23px;
  }

  .actions {
    gap: 8px;
    margin-top: 20px;
  }

  .btn {
    height: 46px;
  }

  .handoff {
    margin-top: 8px;
    font-size: 12px;
    line-height: 16px;
  }

  .foot-row {
    padding-block: 12px;
    font-size: 12px;
    line-height: 16px;
  }
}

@media (max-width: 767px) and (max-height: 600px) {
  .top {
    padding-top: 12px;
  }

  .logo {
    width: 116px;
    height: 44px;
  }

  .copy {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .kicker {
    margin-bottom: 8px;
  }

  .display {
    font-size: 34px;
    line-height: 36px;
  }

  .lead {
    margin-top: 10px;
    font-size: 15px;
    line-height: 20px;
  }

  .actions {
    gap: 6px;
    margin-top: 14px;
  }

  .btn {
    height: 40px;
    font-size: 16px;
  }

  .handoff {
    margin-top: 6px;
  }

  .foot-row {
    padding-block: 10px;
  }
}

/* The page-load sequence: the one orchestrated moment. */
.hero-seq > * {
  animation: hero-rise 720ms var(--ease-expo) both;
}

.hero-seq > :nth-child(1) { animation-delay: 120ms; }
.hero-seq > :nth-child(2) { animation-delay: 210ms; }
.hero-seq > :nth-child(3) { animation-delay: 300ms; }
.hero-seq > :nth-child(4) { animation-delay: 390ms; }
.hero-seq > :nth-child(5) { animation-delay: 480ms; }

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

@keyframes hero-photo {
  from {
    transform: scale(1.06);
    filter: saturate(0.6);
  }
  to {
    transform: scale(1);
    filter: saturate(1);
  }
}

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