/* ==========================================================================
   premium-core.css: shared chrome + design tokens, loaded after style.css.
   Owns: header/nav, mobile menu, buttons, kicker/title marks, footer,
   WhatsApp float, focus, scrollbar, page entrance. Page sections live in
   premium-home*.css / premium-rooms.css.
   ========================================================================== */

:root {
    /* Shared tokens for every premium-* file (fallbacks there are fine) */
    --mv-ease: var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
    --mv-ease-in-out: var(--ease-in-out, cubic-bezier(0.65, 0, 0.35, 1));
    --mv-radius: var(--radius, 18px);
    --mv-radius-lg: var(--radius-lg, 28px);
    --mv-shadow-soft: 0 1px 2px rgba(15, 40, 37, 0.04), 0 12px 32px -14px rgba(15, 40, 37, 0.2);
    --mv-shadow-lift: 0 2px 6px rgba(15, 40, 37, 0.06), 0 30px 60px -24px rgba(11, 38, 36, 0.42);
    --mv-hairline: rgba(184, 147, 90, 0.38);
    --mv-hairline-light: rgba(230, 210, 174, 0.3);
    --mv-grain: var(--grain);
    --mv-serif: 'Cormorant Garamond', Georgia, serif;
    --mv-sans: 'Montserrat', system-ui, sans-serif;
    /* Ornaments: use as mask-image with background: var(--gold) so they recolor */
    --mv-diamond: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 0 10 5 5 10 0 5z'/%3E%3C/svg%3E");
    --mv-kicker-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 8'%3E%3Cpath d='M0 3.5h25v1H0z'/%3E%3Cpath d='M30 .5 33.5 4 30 7.5 26.5 4z'/%3E%3C/svg%3E");
    --mv-sprig: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 24'%3E%3Cpath d='M0 11.6h44v.8H0zM76 11.6h44v.8H76z'/%3E%3Cpath d='M60 2.5c4.6 3.6 4.6 15.4 0 19-4.6-3.6-4.6-15.4 0-19z'/%3E%3Cpath d='M58.5 13c-3.6-4.6-9-6.2-13-5.2 1.6 3.8 7 6.6 13 5.2zM61.5 13c3.6-4.6 9-6.2 13-5.2-1.6 3.8-7 6.6-13 5.2z' opacity='.75'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Base: focus, scrollbar, cross-page fade
   -------------------------------------------------------------------------- */
/* gold-deep keeps >= 3:1 on cream; dark surfaces switch to gold-light */
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; }
.site-header :focus-visible,
footer :focus-visible,
.teal-section :focus-visible,
.hero :focus-visible,
.whatsapp-float:focus-visible { outline-color: var(--gold-light); }

html { scrollbar-color: rgba(142, 108, 58, 0.55) var(--cream); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { border: 3px solid var(--cream); border-radius: 99px; background: rgba(142, 108, 58, 0.55); }

@media (prefers-reduced-motion: no-preference) {
    @view-transition { navigation: auto; }
    ::view-transition-old(root),
    ::view-transition-new(root) { animation-duration: 420ms; }
}

/* --------------------------------------------------------------------------
   Header: entrance, gold hairline when frosted, tuck away on scroll down
   -------------------------------------------------------------------------- */
.site-header {
    transition: padding var(--motion-slow) var(--ease), color var(--motion-base) ease, transform 600ms var(--ease);
    animation: mv-fade 900ms var(--ease) 100ms backwards;
}
/* transform only while tucked: a transform on the header would re-anchor the fixed mobile menu */
.site-header.is-tucked:not(:focus-within):not(.menu-open) { transform: translateY(calc(-100% - 4px)); }
.site-header::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--mv-hairline-light) 18%, rgba(230, 210, 174, 0.5) 50%, var(--mv-hairline-light) 82%, transparent);
    content: '';
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--motion-slow) var(--ease);
}
.site-header.scrolled::after,
.room-page .site-header::after { opacity: 1; }
.site-header.menu-open::after { opacity: 0; }
.brand-lockup { animation: mv-drop 1s var(--ease) 150ms backwards; }

/* Scroll-spy (JS sets .is-active on in-page links) */
.nav-links a.is-active { color: var(--gold-light); opacity: 1; }
.nav-links a.is-active::after { transform: scaleX(1); }

@media (min-width: 701px) {
    .nav-links > a { animation: mv-drop 900ms var(--ease) backwards; }
    .nav-links > a:nth-child(1) { animation-delay: 250ms; }
    .nav-links > a:nth-child(2) { animation-delay: 310ms; }
    .nav-links > a:nth-child(3) { animation-delay: 370ms; }
    .nav-links > a:nth-child(4) { animation-delay: 430ms; }
    .nav-links > a:nth-child(5) { animation-delay: 490ms; }
}

/* --------------------------------------------------------------------------
   Mobile menu: numbered serif index, grain, botanical sign-off
   -------------------------------------------------------------------------- */
@media (max-width: 700px) {
    .nav-links { counter-reset: mv-nav; }
    .nav-links::before {
        position: absolute;
        inset: 0;
        z-index: -1;
        background-image: var(--grain);
        content: '';
        opacity: 0.1;
        mix-blend-mode: overlay;
        pointer-events: none;
    }
    .nav-links a:not(.nav-cta) { display: flex; align-items: baseline; gap: 18px; }
    .nav-links a:not(.nav-cta)::before {
        flex: none;
        min-width: 1.7rem;
        color: var(--gold);
        content: counter(mv-nav, decimal-leading-zero);
        counter-increment: mv-nav;
        font-family: var(--mv-sans);
        font-size: 0.62rem;
        font-style: normal;
        font-weight: 600;
        letter-spacing: 0.2em;
    }
    .nav-links a.is-active { font-style: italic; }
    .nav-links::after {
        flex: none;
        order: 99;
        width: 120px;
        height: 24px;
        margin-top: 40px;
        background: var(--gold);
        content: '';
        opacity: 0;
        -webkit-mask: var(--mv-sprig) center / contain no-repeat;
        mask: var(--mv-sprig) center / contain no-repeat;
        transition: opacity 0.5s ease;
    }
    .site-header.menu-open .nav-links::after { opacity: 0.8; transition-delay: 0.55s; }
}

/* --------------------------------------------------------------------------
   Typography marks: kicker rule + diamond, title diamond rule
   -------------------------------------------------------------------------- */
/* flex keeps the mark pinned to the first line when the kicker wraps on mobile */
.section-kicker { display: flex; align-items: flex-start; gap: 14px; text-wrap: balance; }
.section-kicker::before {
    flex: none;
    width: 34px;
    height: 8px;
    margin: calc(0.875em - 4px) 0 0;
    -webkit-mask: var(--mv-kicker-mark) center / 100% 100% no-repeat;
    mask: var(--mv-kicker-mark) center / 100% 100% no-repeat;
    transform: none;
}
.section-title::after {
    width: 112px;
    height: 7px;
    background: var(--gold);
    -webkit-mask: var(--mv-diamond) 0 50% / 7px 7px no-repeat, linear-gradient(90deg, #000, transparent) 13px 50% / calc(100% - 13px) 1px no-repeat;
    mask: var(--mv-diamond) 0 50% / 7px 7px no-repeat, linear-gradient(90deg, #000, transparent) 13px 50% / calc(100% - 13px) 1px no-repeat;
}
.section-title.centered::after {
    width: 150px;
    background: var(--gold);
    -webkit-mask: linear-gradient(90deg, transparent, #000) 0 50% / calc(50% - 9px) 1px no-repeat, var(--mv-diamond) 50% 50% / 7px 7px no-repeat, linear-gradient(90deg, #000, transparent) 100% 50% / calc(50% - 9px) 1px no-repeat;
    mask: linear-gradient(90deg, transparent, #000) 0 50% / calc(50% - 9px) 1px no-repeat, var(--mv-diamond) 50% 50% / 7px 7px no-repeat, linear-gradient(90deg, #000, transparent) 100% 50% / calc(50% - 9px) 1px no-repeat;
}

/* --------------------------------------------------------------------------
   Buttons: light sheen across gold CTAs
   -------------------------------------------------------------------------- */
.btn-gold { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28); }
.btn-gold::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.42) 50%, transparent 68%);
    content: '';
    pointer-events: none;
    transform: translateX(-115%);
}
.btn-gold:hover::after,
.btn-gold:focus-visible::after { transform: translateX(115%); transition: transform 1s var(--ease) 80ms; }

/* --------------------------------------------------------------------------
   Footer: botanical mark, serif signature, underlined links
   -------------------------------------------------------------------------- */
footer:not(.room-footer) .footer-inner::before {
    display: block;
    width: 120px;
    height: 24px;
    margin: 0 auto 28px;
    background: var(--gold);
    content: '';
    -webkit-mask: var(--mv-sprig) center / contain no-repeat;
    mask: var(--mv-sprig) center / contain no-repeat;
}
.footer-brand {
    margin-bottom: 30px;
    font-family: var(--mv-serif);
    font-size: clamp(1.75rem, 3.6vw, 2.9rem);
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.15;
    text-transform: none;
    text-wrap: balance;
}
.footer-links { gap: 0 32px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-links a::after {
    position: absolute;
    right: 0;
    bottom: 11px;
    left: 0;
    height: 1px;
    background: var(--gold-light);
    content: '';
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--motion-base) var(--ease);
}
.footer-links a:hover::after,
.footer-links a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
/* editor css dims this to .55, which fails AA on the lagoon; also widen the hit area without moving text */
footer .cms-login-link { margin: -12px -4px; padding: 12px 4px; opacity: 0.85; }

/* --------------------------------------------------------------------------
   WhatsApp float: entrance, hover label, docks above footer (JS sets translate)
   -------------------------------------------------------------------------- */
.whatsapp-float {
    transition: transform var(--motion-base) var(--ease), box-shadow var(--motion-base) var(--ease), background var(--motion-fast) ease, opacity var(--motion-base) ease;
    animation: mv-pop 900ms var(--ease) 1.1s backwards;
}
body:has(.site-header.menu-open) .whatsapp-float { opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
    .whatsapp-float::after {
        position: absolute;
        top: 50%;
        left: calc(100% + 14px);
        padding: 9px 16px;
        border: 1px solid var(--mv-hairline-light);
        border-radius: 999px;
        background: rgba(11, 38, 36, 0.94);
        box-shadow: var(--mv-shadow-soft);
        color: #fff;
        content: attr(aria-label);
        font-size: 0.72rem;
        font-weight: 500;
        letter-spacing: 0.04em;
        opacity: 0;
        pointer-events: none;
        transform: translate(-8px, -50%);
        transition: opacity var(--motion-fast) ease, transform var(--motion-base) var(--ease);
        white-space: nowrap;
    }
    .whatsapp-float:hover::after,
    .whatsapp-float:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
}

/* --------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */
@keyframes mv-fade { from { opacity: 0; } }
@keyframes mv-drop { from { opacity: 0; transform: translateY(-10px); } }
@keyframes mv-pop { from { opacity: 0; scale: 0.6; } }

@media (prefers-reduced-motion: reduce) {
    .site-header,
    .brand-lockup,
    .nav-links > a,
    .whatsapp-float { animation: none; }
    .btn-gold::after { display: none; }
}
