/* ==========================================================================
   Heaven's Garden — shared UI
   Design tokens and the primitives every page is built from: shell, eyebrow,
   headings, rules, links, buttons, the line-mask, modals and the reveal
   system. Loaded site-wide. Page-specific layout lives in home.css / pages.css.
   Typography: Cormorant Garamond (display) + Inter (UI/body).
   ========================================================================== */

:root {
    /* palette */
    --gold: #BF9948;
    --gold-lt: #E1C285;
    --gold-dk: #8C6D2C;
    --ink: #16120E;
    --ink-2: #342D25;
    --body: #5C564D;
    --paper: #FFFFFF;
    --sand: #F7F3EB;
    --sand-2: #EDE5D8;

    --line: rgba(22, 18, 14, .13);
    --line-gold: rgba(191, 153, 72, .38);
    --line-light: rgba(255, 255, 255, .22);

    /* type */
    --serif: 'Cormorant Garamond', 'Anglecia Pro Dsp', 'Anglecia Pro Txt', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

    /* motion */
    --e-out: cubic-bezier(.16, 1, .3, 1);
    --e-io: cubic-bezier(.76, 0, .24, 1);

    /* rhythm */
    --gutter: clamp(20px, 4vw, 64px);
    --section-y: clamp(52px, 5.5vw, 96px);
    /* how far the availability panel rides up over the hero — the hero
       reserves this at its bottom and the scroll cue clears it */
    --book-overlap: clamp(56px, 8vh, 92px);
}

/* ---------- shell ------------------------------------------------------ */

.hg-shell {
    width: min(100% - (var(--gutter) * 2), 1470px);
    margin-inline: auto;
}

.hg-shell--wide {
    width: min(100% - (var(--gutter) * 2), 1720px);
}

/* ---------- shared primitives ------------------------------------------ */

.hg-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0;
}

.hg-eyebrow::before {
    content: "";
    width: clamp(24px, 3vw, 46px);
    height: 1px;
    background: currentColor;
    transform-origin: left center;
    opacity: .7;
}

.hg-eyebrow--light {
    color: var(--gold-lt);
}

/* section index number, e.g. 02 */
.hg-index {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .14em;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
}

.hg-h2 {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(26px, 3vw, 46px);
    line-height: 1.02;
    letter-spacing: -.012em;
    color: var(--ink);
    margin: 0;
}

.hg-h2 em {
    font-style: italic;
    color: var(--gold);
}

.hg-lede {
    font-family: var(--sans);
    font-size: clamp(15px, 1.05vw, 17px);
    line-height: 1.8;
    color: var(--body);
    margin: 0;
}

.hg-rule {
    height: 1px;
    background: var(--line-gold);
    transform-origin: left center;
    border: 0;
    margin: 0;
}

/* text-mask reveal wrappers (built by JS) */
/* Vertical-only mask.
   - `overflow:hidden` would also clip horizontally, silently truncating any
     headline wider than its box, so the clip is pushed far out to the sides.
   - The headings run a line-height below 1, which puts descenders (g, j, у)
     *outside* the line box. The box is therefore padded at the bottom and
     pulled back with a negative margin: the clip edge now sits below the
     descenders while the layout rhythm is unchanged.
   - The incoming line is translated further than that padding (see the
     yPercent values in home.js) so nothing peeks out under the mask. */
.hg-line {
    display: block;
    padding-bottom: .22em;
    margin-bottom: -.22em;
    clip-path: inset(-0.28em -100vw 0 -100vw);
}

.hg-line > span {
    display: block;
    will-change: transform;
}

/* link with a sweeping underline */
.hg-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .7em;
    font-family: var(--sans);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
    padding-bottom: 9px;
    background: none;
    border: 0;
    cursor: pointer;
}

.hg-link::after,
.hg-link::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 1px;
    width: 100%;
}

.hg-link::before {
    background: var(--line);
}

.hg-link::after {
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform .55s var(--e-out);
}

.hg-link:hover,
.hg-link:focus-visible {
    color: var(--gold-dk);
}

.hg-link:hover::after,
.hg-link:focus-visible::after {
    transform: scaleX(1);
    transform-origin: left center;
}

.hg-link__arrow {
    width: 1.15em;
    height: 1.15em;
    flex: 0 0 auto;
    transition: transform .5s var(--e-out);
}

.hg-link:hover .hg-link__arrow {
    transform: translateX(5px);
}

.hg-link--light {
    color: #fff;
}

.hg-link--light::before {
    background: var(--line-light);
}

.hg-link--light:hover,
.hg-link--light:focus-visible {
    color: var(--gold-lt);
}

/* solid button */
.hg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .8em;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    font-family: var(--sans);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
    background: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 2px;
    padding: 1.05em 1.9em;
    cursor: pointer;
    transition: color .45s var(--e-out), border-color .45s var(--e-out);
}

.hg-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--ink);
    transform: translateY(101%);
    transition: transform .5s var(--e-out);
}

.hg-btn:hover,
.hg-btn:focus-visible {
    color: var(--gold-lt);
    border-color: var(--ink);
}

.hg-btn:hover::before,
.hg-btn:focus-visible::before {
    transform: translateY(0);
}

.hg-btn--ghost {
    background: transparent;
    color: #fff;
    border-color: var(--line-light);
}

.hg-btn--ghost::before {
    background: #fff;
}

.hg-btn--ghost:hover,
.hg-btn--ghost:focus-visible {
    color: var(--ink);
    border-color: #fff;
}

/* focus ring, consistent everywhere */
.hg :focus-visible,
.hgp :focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

/* ==========================================================================
   Scroll progress hairline
   ========================================================================== */

.hg-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(90deg, var(--gold-dk), var(--gold-lt));
    z-index: 1200;
    pointer-events: none;
}

/* ==========================================================================
   Viewport fallbacks (header.js overwrites these with measured values)
   ========================================================================== */

:root {
    --header-h: 88px;
    --vh: 1vh;
}

/* ==========================================================================
   Modals (room video + journal article)
   ========================================================================== */

.hg-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: clamp(14px, 3vw, 48px);
    visibility: hidden;
    opacity: 0;
    transition: opacity .4s var(--e-out), visibility .4s var(--e-out);
}

.hg-modal.is-open {
    visibility: visible;
    opacity: 1;
}

.hg-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 6, .84);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 0;
    padding: 0;
    cursor: pointer;
}

.hg-modal__box {
    position: relative;
    z-index: 1;
    width: min(100%, 1040px);
    max-height: min(88vh, 900px);
    background: var(--paper);
    overflow: hidden auto;
    overscroll-behavior: contain;
    transform: translateY(24px);
    opacity: 0;
    transition: transform .55s var(--e-out), opacity .45s var(--e-out);
    -webkit-overflow-scrolling: touch;
}

.hg-modal.is-open .hg-modal__box {
    transform: translateY(0);
    opacity: 1;
}

.hg-modal--video .hg-modal__box {
    width: min(100%, 1100px);
    aspect-ratio: 16 / 9;
    max-height: 86vh;
    background: #000;
    overflow: hidden;
}

.hg-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 4;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line-light);
    background: rgba(10, 8, 6, .6);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background-color .35s var(--e-out), color .35s var(--e-out), transform .35s var(--e-out);
}

.hg-modal__close svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 1.6;
    fill: none;
}

.hg-modal__close:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ink);
    transform: rotate(90deg);
}

.hg-modal__media {
    position: relative;
    background: #100D0A;
    aspect-ratio: 16 / 9;
}

.hg-modal__media img,
.hg-modal__media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hg-modal__media video {
    object-fit: contain;
    background: #000;
}

.hg-modal__body {
    padding: clamp(24px, 3.4vw, 52px);
}

.hg-modal__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gold-dk);
    margin-bottom: clamp(12px, 1.4vw, 18px);
}

.hg-modal__title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(25px, 3vw, 46px);
    line-height: 1.1;
    color: var(--ink);
    margin: 0 0 clamp(16px, 2vw, 26px);
}

.hg-modal__text {
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.85;
    color: var(--body);
    max-width: 68ch;
}

.hg-modal__text p {
    margin: 0 0 1em;
}

.hg-modal__text img {
    max-width: 100%;
    height: auto;
}

.hg-modal__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--line);
    margin-top: clamp(24px, 3vw, 40px);
    padding-top: clamp(18px, 2vw, 26px);
}

.hg-modal__nav button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--ink);
    background: none;
    border: 0;
    padding: 6px 0;
    cursor: pointer;
    transition: color .3s var(--e-out), opacity .3s var(--e-out);
}

.hg-modal__nav button:hover:not(:disabled) {
    color: var(--gold-dk);
}

.hg-modal__nav button:disabled {
    opacity: .3;
    cursor: default;
}

.hg-modal__nav svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
}

.hg-modal__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* scroll lock — pad the fixed header too so nothing jumps sideways */
html.hg-locked {
    overflow: hidden;
}

html.hg-locked .hgh {
    padding-right: var(--hg-sbw, 0px);
}

/* ==========================================================================
   Reveal system — only armed once GSAP is confirmed loaded, so the page is
   never left invisible if the script fails.
   ========================================================================== */

html.hg-anim [data-reveal] {
    opacity: 0;
}


html.hg-anim [data-reveal="mask"] {
    opacity: 1;
    clip-path: inset(0 0 100% 0);
}

@media (prefers-reduced-motion: reduce) {
    html.hg-anim [data-reveal],
    html.hg-anim [data-reveal="mask"],
    html.hg-anim .hg-hero__eyebrow,
    html.hg-anim .hg-hero__title,
    html.hg-anim .hg-hero__desc,
    html.hg-anim .hg-hero__cta > *,
    html.hg-anim .hg-stage,
    html.hg-anim .hg-booking,
    html.hg-anim .hg-cue-wrap {
        opacity: 1;
        clip-path: none;
    }

    .hg-cue__line::after {
        animation: none;
    }

    .hg *,
    .hg *::before,
    .hg *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ==========================================================================
   Media normalisation
   Every image inside a component box fills that box and is cropped to it.
   Without this a portrait or oversized original sets its own height and the
   surrounding grid row grows or shrinks with it.
   ========================================================================== */

.hg-media,
.hg-media--wide,
.hg-media--tall,
.hg-media--square {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--sand-2);
}

.hg-media           { aspect-ratio: 4 / 3; }
.hg-media--wide     { aspect-ratio: 16 / 10; }
.hg-media--tall     { aspect-ratio: 3 / 4; }
.hg-media--square   { aspect-ratio: 1 / 1; }

.hg-media > img,
.hg-media--wide > img,
.hg-media--tall > img,
.hg-media--square > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* belt and braces: any img we place in a fixed-ratio box crops rather than
   dictating the box */
.hgp img,
.hg img {
    max-width: 100%;
}

/* ==========================================================================
   Print
   Bootstrap 4.5 ships `@page{size:a3}` plus `body/.container{min-width:992px}`
   in its print block, which forces A3 paper and a 992px canvas — on A4 the
   result is scaled down and clipped. Undo that first, then make sure nothing
   the reveal system is holding at opacity 0 prints blank.
   ========================================================================== */

@media print {
    @page {
        size: auto;
        margin: 14mm;
    }

    html,
    body,
    .container,
    .hg-shell {
        min-width: 0 !important;
        width: auto !important;
        max-width: none !important;
        background: #fff !important;
    }

    /* a stalled or un-triggered reveal must never print as empty space */
    html.hg-anim [data-reveal],
    html.hg-anim [data-reveal="mask"],
    [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
        visibility: visible !important;
    }

    /* site chrome is noise on paper */
    .hgh,
    .hgh-spacer,
    .hg-footer,
    .hg-progress,
    #heaven-loader,
    .navx-shell,
    .navx-drawer,
    .navx-overlay {
        display: none !important;
    }

    a[href]::after {
        content: "" !important;
    }
}
