/* Scoped to the landing page. Project navigation stays above the chart. */
body.nautical-landing {
  background: #102a38;
  /* An extra screen below the projects, reached with native wheel/touch scrolling. */
  padding-bottom: 100vh;
  padding-bottom: 100svh;
}

#nautical-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}

#nautical-background .special-animation-nautical-sheet {
  position: absolute;
  inset: 0;
  overflow: hidden;
  contain: strict;
}

#nautical-background canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

#nautical-background canvas[hidden] {
  display: none;
}

.nautical-landing main {
  position: relative;
  z-index: 1;
  pointer-events: none;
  padding-top: max(96px, calc(env(safe-area-inset-top) + 80px));
}

.nautical-landing .artwork {
  pointer-events: auto;
}

.nautical-landing .artwork img {
  filter: drop-shadow(0 8px 16px rgb(3 15 26 / 35%));
}

.nautical-landing .project-caption {
  color: #fff;
  text-shadow: 0 1px 3px #071d2c, 0 0 8px #071d2c, 0 0 18px #071d2c;
}

@media (hover: hover) and (pointer: fine) {
  .nautical-landing .artwork:hover img {
    filter: brightness(1.08) drop-shadow(0 8px 16px rgb(3 15 26 / 35%));
  }
}

.nautical-transport {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: 16px;
  color: #243b43;
  background: rgb(247 249 235 / 94%);
  box-shadow: 0 4px 24px rgb(3 15 26 / 20%);
  transform: translateX(-50%);
  font-size: 12px;
  line-height: 1;
  color-scheme: light;
  opacity: 0;
  transition: opacity 450ms ease;
}

.nautical-transport[hidden] { display: none; }

/* Keep the invisible bar's hit area available for hover and keyboard focus. */
.nautical-transport[data-revealed="true"],
.nautical-transport:has(:focus-visible) {
  opacity: 1;
}

@media (hover: hover) {
  .nautical-transport:hover { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .nautical-transport { transition: none; }
}

.nautical-transport-buttons { display: flex; gap: 2px; }

.nautical-transport button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: inherit;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

.nautical-transport button:hover:not(:disabled),
.nautical-transport button[aria-pressed="true"] {
  background: rgb(52 118 150 / 14%);
}

.nautical-transport [data-action="play"] {
  background: linear-gradient(135deg, #d3e9d6, #b7dbe7);
}

.nautical-transport svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nautical-transport [data-playing="true"] .nautical-play-icon,
.nautical-transport [data-playing="false"] .nautical-pause-icon {
  display: none;
}

.nautical-transport-speed {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nautical-transport-speed input {
  width: 72px;
  height: 32px;
  margin: 0;
  accent-color: #377790;
  cursor: pointer;
}

.nautical-transport :is(button, input):focus-visible {
  outline: 2px solid #17668e;
  outline-offset: 2px;
}

.nautical-transport :disabled {
  opacity: .45;
  cursor: default;
}

@media (max-width: 360px) {
  .nautical-transport { flex-direction: column; gap: 2px; }
  .nautical-landing main { padding-top: 128px; }
}
