.tsb-home {
    --tsb-home-ease: cubic-bezier(.2, .7, .25, 1);
    --tsb-home-rise: 16px;
}

/* Jump before offscreen sections change height during a long smooth scroll. */
html:has(#dive-and-learn:target, #why-tdb-sunbeach:target) {
    scroll-behavior: auto;
}

@keyframes tsb-home-rise {
    from { translate: 0 var(--tsb-home-rise); }
    to { translate: 0 0; }
}

@keyframes tsb-home-settle {
    from { scale: 1.045; }
    to { scale: 1; }
}

@keyframes tsb-home-rule {
    from { scale: 0 1; }
    to { scale: 1 1; }
}

.tsb2-hero-copy .tsb2-eyebrow > span {
    transform-origin: left center;
    animation: tsb-home-rule 360ms var(--tsb-home-ease);
}

.tsb2-hero-copy h1,
.tsb2-hero-lead {
    animation: tsb-home-rise 480ms var(--tsb-home-ease) backwards;
}

.tsb2-hero-lead {
    animation-delay: 70ms;
}

.tsb2-hero-visual img {
    transform-origin: 58% center;
    animation: tsb-home-settle 850ms var(--tsb-home-ease);
    transform: translateY(calc(var(--tsb-home-scroll, 0) * 5%)) scale(calc(1 + var(--tsb-home-scroll, 0) * .22));
}

.tsb-home [data-home-reveal] {
    --tsb-home-entrance: translate 680ms var(--tsb-home-ease) var(--tsb-home-delay, 0ms),
        opacity 540ms ease-out var(--tsb-home-delay, 0ms);
    transition: var(--tsb-home-entrance);
}

.tsb-home .tsb-hc-course[data-home-reveal]:not(:focus-within) {
    transition: var(--tsb-home-entrance), transform .2s, box-shadow .2s;
}

.tsb-home [data-home-reveal="waiting"] {
    opacity: .08;
    translate: 0 clamp(32px, 4vw, 48px);
}

.tsb-home .tsb2-intro-photo > img[data-home-reveal] {
    opacity: 1;
    translate: none;
    clip-path: inset(0);
    transition: clip-path 800ms var(--tsb-home-ease);
}

.tsb-home .tsb2-intro-photo > img[data-home-reveal="waiting"] {
    clip-path: inset(0 0 85% 0);
}

.tsb-home [data-home-reveal]:focus-within {
    opacity: 1;
    translate: none;
    transition: none;
}

@media (max-width: 760px) {
    .tsb-home { --tsb-home-rise: 10px; }
}
