/* launch pass */

/* nothing may cause a sideways scroll */
html,
body {
    overflow-x: clip;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 200;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-m);
    background: var(--color-ink);
    color: var(--color-cream);
    text-decoration: none;
}
.skip-link:focus {
    top: 1rem;
}

.has-bubbles,
.has-leaves {
    isolation: auto;
}
.has-bubbles::before,
.has-leaves::before,
.has-leaves::after {
    z-index: 0;
}
.has-bubbles > *:not(.surfer):not(.cta__coconuts),
.has-leaves > *:not(.surfer):not(.cta__coconuts) {
    position: relative;
    z-index: 1;
}

/* home */
.season.psec {
    padding-top: calc(var(--space-3xl) + var(--space-l));
    padding-bottom: calc(var(--space-4xl) + var(--radius-section));
}
.hero--home + .season > .container {
    margin-top: calc(-1 * clamp(4.3rem, 4.3rem + (100vw - 23.4375rem) * 0.097, 6.875rem));
}

/* photo fan */
.photo-fan__item {
    aspect-ratio: 1;
}
.photo-fan {
    height: calc(var(--fan-card) * 1.3);
}
.photo-fan__sticker {
    position: absolute;
    z-index: 5;
    transition: opacity 0.6s ease 1.4s, scale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.4s;
}
.photo-fan__sticker--since {
    top: calc(var(--fan-card) * -0.08);
    left: calc(50% + var(--fan-step) * 1.5 - var(--fan-card) * 0.25);
    transform: rotate(-7deg);
}
.photo-fan__sticker--coasts {
    top: calc(var(--fan-card) * 0.92);
    left: calc(50% - var(--fan-step) * 1.5 - var(--fan-card) * 0.05);
    transform: rotate(6deg);
}
.photo-fan.is-collapsed .photo-fan__sticker {
    opacity: 0;
    scale: 0.6;
    transition-delay: 0s;
}
@media (max-width: 47.99rem) {
    /* phones */
    .photo-fan {
        --fan-card: min(44vw, 13rem);
        display: grid;
        grid-template-columns: repeat(2, var(--fan-card));
        justify-content: center;
        gap: var(--space-s);
        height: auto;
    }
    .photo-fan__item {
        position: relative;
        left: auto;
        margin: 0;
        aspect-ratio: 173 / 200;
        transform: rotate(var(--r));
    }
    .photo-fan__item--far-left  { --r: -3deg; }
    .photo-fan__item--left      { --r: 3deg; }
    .photo-fan__item--right     { --r: 3deg; }
    .photo-fan__item--far-right { --r: -3deg; }
    .photo-fan.is-collapsed .photo-fan__item {
        transform: rotate(var(--r)) scale(0.9);
        opacity: 0;
    }
    .photo-fan__item {
        transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
    }
    .photo-fan__item:nth-child(2) { transition-delay: 0.1s; }
    .photo-fan__item:nth-child(3) { transition-delay: 0.2s; }
    .photo-fan__item:nth-child(4) { transition-delay: 0.3s; }
    .photo-fan__sticker--since {
        top: auto;
        bottom: -1rem;
        left: calc(50% - var(--fan-card) - var(--space-s) / 2 - 0.5rem);
    }
    .photo-fan__sticker--coasts {
        top: -1rem;
        left: auto;
        right: calc(50% - var(--fan-card) - var(--space-s) / 2 - 0.5rem);
    }
}
@media (min-width: 48rem) and (max-width: 64rem) {
    /* tablet */
    .photo-fan {
        --fan-card: min(21vw, 13rem);
        --fan-spread: 1.08;
        height: calc(var(--fan-card) * 1.45);
    }
    .photo-fan__item {
        aspect-ratio: 167 / 200;
    }
}

/* Life at Mambo's */
@media (min-width: 40rem) {
    .photo-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (max-width: 39.99rem) {
    .photo-grid__item:nth-child(n + 5) {
        display: none;
    }
}

/* more destinations */
@media (min-width: 40rem) and (max-width: 48rem) {
    .dest .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dest-card {
        aspect-ratio: 342 / 440;
        min-height: 0;
    }
}

/* choose your season */
.location-card__media {
    aspect-ratio: 670 / 480;
}
.location-card__sticker {
    top: var(--card-inset);
    right: var(--card-inset);
}
@media (max-width: 48rem) {
    .location-card__media {
        aspect-ratio: 4 / 3;
    }
    .location-card__sticker strong {
        font-size: 1rem;
    }
}
@media (max-width: 39.99rem) {
    /* phones */
    .location-card__sticker {
        display: none;
    }
}

.has-surfer {
    overflow: visible;
}
.section-surfer {
    --surfer-width: clamp(7.5rem, 4.4rem + 13.2vw, 16.125rem);
    position: absolute;
    z-index: 6;
    width: var(--surfer-width);
    height: auto;
    bottom: calc(var(--radius-section) - clamp(0.5rem, 0.3rem + 0.8vw, 1rem) - var(--surfer-width) * 0.368);
    pointer-events: none;
}
.section-surfer--left {
    left: calc(var(--surfer-width) * -0.128);
}
.section-surfer--right {
    right: calc(var(--surfer-width) * -0.15);
}
.section-surfer--right.is-hidden {
    translate: 120% 15%;
}
.has-surfer + .section {
    z-index: auto;
}

/* Coconuts on page CTAs */
.cta--page {
    position: relative;
}
.cta--page .cta__coconuts {
    z-index: 3;
}

/* destinations */
.dest-card__button .button {
    white-space: normal;
}

/* header */
.site-header__menu-toggle {
    min-height: 3.25rem;
}
.site-header__nav-list a[aria-current="page"] {
    color: var(--color-teal);
}

.drawer {
    position: fixed;
    inset: 0;
    z-index: 150;
}
.drawer[hidden] {
    display: none;
}
.drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(21, 13, 10, 0.45);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.drawer__panel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    width: min(28rem, 100%);
    padding: var(--space-l) var(--space-xl) var(--space-xl);
    overflow-y: auto;
    background: var(--color-wave-front);
    color: var(--color-cream);
    border-radius: 0;
    translate: -100% 0;
    transition: translate 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer.is-open .drawer__panel { translate: 0 0; }

.drawer__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.drawer__logo img {
    display: block;
    width: 9rem;
    height: auto;
}
.drawer__close {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: var(--radius-m);
    background: rgba(250, 239, 220, 0.12);
    color: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.drawer__close:hover { background: rgba(250, 239, 220, 0.22); }

.drawer__links,
.drawer__projects {
    display: grid;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.drawer__links a {
    display: inline-block;
    padding: 0.375rem 0;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
    line-height: 1.1;
    text-transform: uppercase;
    color: var(--color-cream);
    text-decoration: none;
    transition: color 0.2s ease, translate 0.2s ease;
}
.drawer__links a:hover,
.drawer__links a[aria-current="page"] {
    color: var(--color-orange);
    translate: 0.25rem 0;
}
.drawer__heading {
    margin: var(--space-l) 0 var(--space-2xs);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.7;
}
.drawer__projects a,
.drawer__projects span {
    color: var(--color-cream);
    text-decoration: none;
    font-weight: 500;
}
.drawer__projects a:hover { color: var(--color-orange); }
.drawer__bottom {
    display: grid;
    gap: 0.5rem;
    justify-items: start;
    margin-top: auto;
}
.drawer__bottom .button { margin-bottom: var(--space-s); }
.drawer__contact {
    color: var(--color-cream);
    text-decoration: none;
    font-weight: 500;
}
/* menu items slide in one by one */
.drawer__links li,
.drawer__projects li {
    opacity: 0;
    translate: -1rem 0;
    transition: opacity 0.4s ease, translate 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.drawer.is-open .drawer__links li,
.drawer.is-open .drawer__projects li {
    opacity: 1;
    translate: 0 0;
}
.drawer.is-open li:nth-child(2) { transition-delay: 0.05s; }
.drawer.is-open li:nth-child(3) { transition-delay: 0.1s; }
.drawer.is-open li:nth-child(4) { transition-delay: 0.15s; }
.drawer.is-open li:nth-child(5) { transition-delay: 0.2s; }
.drawer.is-open li:nth-child(6) { transition-delay: 0.25s; }
html.has-drawer-open { overflow: hidden; }

@media (max-width: 62rem) {
    .site-header__actions .site-header__contact { display: none; }
}

/* booking popup */
.booking__tabs--popup {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: var(--space-m);
}
.booking__tabs--popup .booking__tab {
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    color: inherit;
}
.booking__tabs--popup .booking__tab span {
    transition: background-color 0.2s ease, color 0.2s ease;
}
.booking__tabs--popup .booking__tab[aria-selected="true"] span {
    background: var(--color-teal);
    color: var(--color-cream);
}
.booking__pane[hidden] { display: none; }
.booking__success-icon { color: var(--color-teal); }

/* chip-like single choice */
.choice-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.choice-chips label { position: relative; }
.choice-chips input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.choice-chips span {
    display: inline-block;
    padding: 0.75rem 1.125rem;
    border: 1.5px solid rgba(23, 153, 140, 0.4);
    border-radius: var(--radius-m);
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.choice-chips input:checked + span {
    background: var(--color-teal);
    border-color: var(--color-teal);
    color: var(--color-cream);
}
.choice-chips input:focus-visible + span {
    outline: 2px solid var(--color-teal);
    outline-offset: 2px;
}

/* scroll animations */
.reveal-zoom {
    transition:
        opacity 0.9s ease var(--reveal-delay, 0s),
        scale 1.1s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0s);
}
.reveal-zoom.is-hidden {
    opacity: 0;
    scale: 0.94;
}
.reveal-zoom.is-instant { transition: none; }

/* stickers pop in after their photo */
.sticker.reveal-pop {
    transition:
        opacity 0.4s ease var(--reveal-delay, 0.3s),
        scale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) var(--reveal-delay, 0.3s);
}
.sticker.reveal-pop.is-hidden {
    opacity: 0;
    scale: 0.5;
}

/* photos */
.location-card__media img,
.contact-card__photo img,
.lesson__media img,
.mosaic__item img,
.photo-stack__item img {
    transition: transform 0.6s ease;
}
.location-card:hover .location-card__media img,
.contact-card:hover .contact-card__photo img,
.lesson:hover .lesson__media img,
.mosaic__item:hover img {
    transform: scale(1.04);
}

/* video play button pulses gently */
.video__play {
    animation: play-pulse 2.4s ease-in-out infinite;
}
@keyframes play-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 145, 49, 0.45); }
    50%      { box-shadow: 0 0 0 1rem rgba(239, 145, 49, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .drawer__panel,
    .drawer__backdrop,
    .drawer__links li,
    .drawer__projects li,
    .photo-fan__sticker,
    .video__play {
        transition: none;
        animation: none;
    }
    .location-card__media img,
    .contact-card__photo img,
    .lesson__media img,
    .mosaic__item img {
        transition: none;
    }
}

.photo-stack__item, .collage__big, .collage__small, .intro__split-photo, .intro__photo,
.lesson__media, .included__big, .included__small, .book__photo, .menu__photo1, .menu__photo2,
.lineup__p1, .lineup__p2, .moment__photo, .mosaic__item, .cabana__photo, .contact-card__photo,
.location-card__media, .photo-grid__item {
    position: relative;
    overflow: hidden;
}
.photo-stack__item > img, .collage__big > img, .collage__small > img, .intro__split-photo > img, .intro__photo > img,
.lesson__media > img, .included__big > img, .included__small > img, .book__photo > img, .menu__photo1 > img, .menu__photo2 > img,
.lineup__p1 > img, .lineup__p2 > img, .moment__photo > img, .mosaic__item > img, .cabana__photo > img, .contact-card__photo > img,
.orbit__photo > img, .photo-grid__item > img, .photo-fan__item > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Real Google map inside the map cards */
.map-card__map {
    position: relative;
    overflow: hidden;
}
.map-card__iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    filter: saturate(0.85);
}

/* popup */
@media (max-width: 48rem) {
    .booking .inquiry__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .booking .inquiry__field--half {
        grid-column: auto;
    }
    .booking .inquiry__field--half input[type="email"],
    .booking .inquiry__field--half input[type="tel"] {
        min-width: 0;
    }
}
.booking .booking__input {
    min-width: 0;
    width: 100%;
}

.video__play[data-no-video] { cursor: default; }
.video__play[data-no-video]:hover { transform: none; }

/* bubbles slowly float up */
.has-bubbles {
    container-type: inline-size;
}
.has-bubbles::before {
    animation: bubbles-rise 90s linear infinite;
}
@keyframes bubbles-rise {
    from { background-position: center 0; }
    to   { background-position: center calc((100cqw - 3rem) * -0.48611); }
}
@media (prefers-reduced-motion: reduce) {
    .has-bubbles::before { animation: none; }
}

/* scrollbar */
@media (hover: hover) and (pointer: fine) {
    html::-webkit-scrollbar {
        width: 12px;
        height: 12px;
    }
    html::-webkit-scrollbar-track {
        background: var(--color-cream);
    }
    html::-webkit-scrollbar-thumb {
        background: var(--color-orange);
        border: 3px solid var(--color-cream); /* gap around the thumb -> slim pill */
        border-radius: 999px;
        min-height: 48px;
    }
    html::-webkit-scrollbar-thumb:hover {
        background: var(--color-orange-hover);
    }

    /* inner scroll areas */
    .booking__panel::-webkit-scrollbar,
    .drawer__panel::-webkit-scrollbar,
    .menu-card ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
    .booking__panel::-webkit-scrollbar-track,
    .drawer__panel::-webkit-scrollbar-track {
        background: transparent;
        margin-block: var(--radius-l); /* keep the bar off the rounded corners */
    }
    .booking__panel::-webkit-scrollbar-thumb,
    .drawer__panel::-webkit-scrollbar-thumb,
    .menu-card ::-webkit-scrollbar-thumb {
        background: var(--color-orange);
        border-radius: 999px;
    }
}

/* firefox */
@supports not selector(::-webkit-scrollbar) {
    @media (hover: hover) and (pointer: fine) {
        html { scrollbar-color: var(--color-orange) var(--color-cream); }
        .booking__panel, .drawer__panel, .menu-card { scrollbar-width: thin; scrollbar-color: var(--color-orange) transparent; }
    }
}

/* 404 */
.hero--404 {
    padding-top: clamp(3.5rem, 2.4rem + 4.7vw, 6.5rem);
}
.not-found {
    gap: 0;
}
.not-found__code {
    position: relative;
    margin: 0;
    line-height: 0.9;
    font-family: var(--font-display);
    font-size: clamp(7.5rem, 4.6rem + 12.4vw, 15.5rem); /* 120 -> 248px */
    letter-spacing: 0.02em;
}
.not-found__code span {
    display: inline-block;
    padding: 0 0.06em;
    /* logo colours, no outline */
    background: linear-gradient(180deg, #f2c524 12%, var(--color-orange) 50%, #e8251f 92%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.not-found__surfer {
    position: absolute;
    width: 0.62em;
    height: auto;
    right: -0.18em;
    top: -0.12em;
    rotate: 8deg;
    animation: not-found-ride 4s ease-in-out infinite;
}
@keyframes not-found-ride {
    0%, 100% { translate: 0 0; rotate: 8deg; }
    50%      { translate: -0.04em -0.05em; rotate: 3deg; }
}
@media (prefers-reduced-motion: reduce) {
    .not-found__surfer { animation: none; }
}
.not-found__title {
    margin: var(--space-l) 0 0;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: var(--text-display-l);
    line-height: 1.2;
    color: var(--color-ink);
    text-transform: uppercase;
}
.not-found__text {
    max-width: 32rem;
    margin: var(--space-s) 0 0;
    font-size: var(--text-m);
    line-height: 1.4;
    color: var(--color-ink);
}
.not-found__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xs);
    margin-top: var(--space-xl);
}
@media (max-width: 30rem) {
    .not-found__actions { width: 100%; }
    .not-found__actions .button--accent { flex: 1 1 100%; justify-content: center; }
    .not-found__actions .button--outline { flex: 1 1 0; justify-content: center; }
}
.hero--404 {
    padding-bottom: clamp(3rem, 2rem + 4vw, 5.5rem);
}

/* logo */
.hero__logo {
    width: clamp(14.6rem, 1.67rem + 55.2vw, 51.35rem);
}
@media (max-width: 48rem) {
    .hero__logo {
        display: block;
        width: 91.3%;
        margin-inline: auto;
    }
}

/* bungalow photo gallery */
.cabana__track {
    position: absolute;
    inset: 0;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}
.cabana__track::-webkit-scrollbar { display: none; }
.cabana__track:focus-visible { outline: 2px solid var(--color-orange, #E9963A); outline-offset: -4px; }
.cabana__slide {
    position: relative;
    flex: 0 0 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}
.cabana__arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-top: -1.25rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(251, 239, 216, 0.92);
    color: var(--color-ink);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}
.cabana__arrow:hover { background: #fff; transform: scale(1.06); }
.cabana__arrow:focus-visible { outline: 2px solid var(--color-orange, #E9963A); outline-offset: 2px; }
.cabana__arrow--prev { left: 1rem; }
.cabana__arrow--next { right: 1rem; }
.cabana__dots {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    z-index: 2;
    display: flex;
    gap: 0.375rem;
    padding: 0.375rem 0.5rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.28);
    transform: translateX(-50%);
    pointer-events: none;
}
.cabana__dots span {
    width: 0.4375rem;
    height: 0.4375rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    transition: background-color 0.2s ease, width 0.2s ease;
}
.cabana__dots span.is-active { width: 1.125rem; border-radius: 999px; background: #fff; }
.cabana__photo--gallery .cabana__badge { z-index: 2; }
@media (max-width: 40rem) {
    .cabana__arrow { width: 2.125rem; height: 2.125rem; margin-top: -1.0625rem; }
    .cabana__arrow--prev { left: 0.625rem; }
    .cabana__arrow--next { right: 0.625rem; }
    .cabana__dots { bottom: 0.625rem; }
}
@media (prefers-reduced-motion: reduce) {
    .cabana__track { scroll-behavior: auto; }
}

/* videos */
.video--auto::after { display: none; }
.video .video__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}
.video .video__bg.is-playing { opacity: 1; }

.video-modal-open { overflow: hidden; }
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 1rem;
    animation: video-modal-in 0.25s ease-out;
}
@keyframes video-modal-in { from { opacity: 0; } }
.video-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(21, 13, 10, 0.88);
    cursor: pointer;
}
.video-modal__box {
    position: relative;
    width: min(70rem, 100%);
    margin-inline: auto;
    padding-top: 4rem;
}
.video-modal__player {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 1.5rem;
    background: #000;
    box-shadow: 0 1.5rem 3.75rem rgba(0, 0, 0, 0.35);
}
.video-modal__player video,
.video-modal__player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}
.video-modal__close {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--color-cream);
    color: var(--color-ink);
    cursor: pointer;
    transition: transform 0.2s ease;
}
.video-modal__close:hover { transform: scale(1.06); }
.video-modal__close:focus-visible { outline: 2px solid var(--color-orange, #E9963A); outline-offset: 3px; }
@media (max-width: 40rem) {
    .video-modal__box { padding-top: 3.5rem; }
    .video-modal__player { border-radius: 1rem; }
    .video-modal__close { width: 2.5rem; height: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .video-modal { animation: none; }
    .video .video__bg { transition: none; }
}
