/* "Dive in!": just under the header near the boat, never below the first screen. The anchor
   (anchor.js) hangs in it. Hidden once pressed and under the surface (is-hidden). */
.dive {
    position: absolute;
    top: max(
        calc(100vw / var(--hero-aspect, 2.7778) + 2vh),
        min(calc(100vw / var(--hero-aspect, 2.7778) + 4vh), calc(100svh - 7em - 3vh))
    );
    left: 22%; /* right of the boat */
    z-index: var(--z-content);
    box-sizing: border-box;
    flex-direction: column;
    justify-content: flex-start;
    height: 7em;
    padding: 1.5em 18px 0;
    border: 0;
    background: none;
    font-size: clamp(16px, 1.6vw, 26px);
    cursor: pointer;
    translate: -50% 0;
    transition:
        scale 0.35s cubic-bezier(0.3, 1.8, 0.5, 1),
        opacity 0.3s ease,
        visibility 0.3s;
}

.dive:hover,
.dive:focus-visible {
    scale: 1.12;
}

.dive:active {
    scale: 0.96;
}

.dive:focus-visible {
    outline: 3px solid #ffd54a;
    outline-offset: 3px;
    border-radius: 999px;
}

.dive.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.dive.is-dropped {
    opacity: 0;
    visibility: hidden;
}

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

/* Upright phones: nothing to dive to (layout.js). */
@media (orientation: portrait) and (max-width: 820px) {
    .dive {
        display: none;
    }
}
