*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; background: #cfe1ee; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; color: #111; overflow: hidden; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.stage {
    position: relative;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
}

/* bg picture fills the stage */
.stage > picture {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.stage > picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* foreground layers — absolutely positioned per variant via the rules below */
.stage > img.fg {
    position: absolute;
    height: auto;
    object-fit: contain;
    pointer-events: none;
}

/* DESKTOP / landscape — base positions */
.fg-1         { left: 59.1%; top: 39.1%; width: 29.1%; }
.fg-2         { left: 11.4%; top: 4.4%;  width: 56.2%; }
.fg-3         { left: 70.3%; top: 1.9%;  width: 20.3%; }
.fg-4         { left: 53.8%; top: 92.1%; width: 39.6%; }
.fg-6         { left: 53.6%; top: 72.7%; width: 39.8%; }
.fg-providing { display: none; }
.fg-services  { display: none; }

/* TABLET portrait */
@media (orientation: portrait) and (min-width: 601px) {
    .fg-1         { display: none; }
    .fg-2         { left: 8.2%;  top: 5.9%;  width: 56.2%; }
    .fg-3         { left: 66.4%; top: 6.8%;  width: 20.3%; }
    .fg-4         { left: 38%;   top: 91.7%; width: 55%;  }
    .fg-6         { left: 35.3%; top: 35.2%; width: 55%;  }
    .fg-providing { display: block; left: 9%;  top: 22%;  width: 81%; }
    .fg-services  { display: none; }
}

/* PHONE portrait */
@media (orientation: portrait) and (max-width: 600px) {
    .fg-1         { display: none; }
    .fg-2         { left: 11.1%; top: 8.6%;  width: 56.2%; }
    .fg-3         { left: 69.2%; top: 10%;   width: 20.3%; }
    .fg-4         { left: 15.3%; top: 93.2%; width: 70%;  }
    .fg-6         { left: 19.2%; top: 34.4%; width: 65%;  }
    .fg-providing { display: block; left: 14.2%; top: 21.6%; width: 69.5%; }
    .fg-services  { display: block; left: 19.5%; top: 29.7%; width: 50%;  }
}

/* background — Ken Burns: slow zoom + drift, alternating */
.bg img {
    transform-origin: 50% 50%;
    will-change: transform;
    animation:
        bg-intro 1.6s cubic-bezier(.25,.46,.45,.94) both,
        kenburns 32s ease-in-out 1.6s infinite alternate;
}
@media (orientation: portrait) {
    .bg img { object-position: left bottom; }
}
@keyframes bg-intro {
    from { opacity: 0; transform: scale(1.06); }
    to   { opacity: 1; transform: scale(1.00); }
}

/* foreground — staggered intro */
.fg {
    opacity: 0;
    will-change: opacity, transform;
    animation: fg-intro 1.4s cubic-bezier(.2,.7,.2,1) forwards;
}
.fg-2         { animation-delay: 0.4s; --fx: 18px;  --fy: -14px; --fs: 0.97; }
.fg-3         { animation-delay: 0.6s; --fx: 0px;   --fy: 20px;  --fs: 1.03; }
.fg-providing { animation-delay: 0.9s; --fx: 0px;   --fy: 12px;  --fs: 1.02; }
.fg-6         { animation-delay: 1.1s; --fx: 0px;   --fy: -18px; --fs: 0.99; }
.fg-4         { animation-delay: 1.3s; --fx: -10px; --fy: 0px;   --fs: 0.98; }
.fg-1         { animation-delay: 1.5s; --fx: -22px; --fy: 16px;  --fs: 1.04; }
.fg-services  { animation-delay: 1.5s; --fx: 12px;  --fy: 0px;   --fs: 1.02; }
@keyframes fg-intro {
    from { opacity: 0; transform: translate(var(--fx, 0), var(--fy, 0)) scale(var(--fs, 1)); }
    to   { opacity: 1; transform: translate(0, 0) scale(1); }
}

.contact-trigger { animation: fg-intro 1s ease-out 2.2s both; }
@keyframes kenburns {
    0%   { transform: scale(1.00) translate(0%,    0%); }
    20%  { transform: scale(1.04) translate(-0.7%, 0.4%); }
    45%  { transform: scale(1.09) translate(-1.6%, 1.1%); }
    70%  { transform: scale(1.13) translate(-2.2%, 1.7%); }
    100% { transform: scale(1.18) translate(-2.8%, 2.2%); }
}

/* mailto link, bottom-left badge — replaces the burned-in email if needed */
.mail {
    position: absolute;
    left: max(env(safe-area-inset-left), 4vw);
    bottom: max(env(safe-area-inset-bottom), 4vw);
    color: transparent;       /* visually hidden — designed email already in art */
    font-size: 1px;
    text-decoration: none;
    width: 38vw; height: 6vh;  /* clickable hotspot covering the printed address */
    z-index: 10;
}

@media (prefers-reduced-motion: reduce) {
    .bg img, .fg, .contact-trigger { animation: none; opacity: 1; transform: none; }
}

/* contact trigger */
.contact-trigger {
    position: absolute;
    top: max(env(safe-area-inset-top), 3vh);
    right: max(env(safe-area-inset-right), 3vw);
    z-index: 20;
    padding: 0.7rem 1.4rem;
    font: 700 0.85rem/1 inherit;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: #ff5411;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}
.contact-trigger:hover { background: #e6480d; transform: translateY(-1px); }
.contact-trigger:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* modal */
.modal {
    border: none;
    padding: 0;
    background: transparent;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    color: #fff;
}
.modal::backdrop {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: fade-in 0.25s ease;
}
.modal[open] .modal-card { animation: pop-in 0.3s cubic-bezier(.2,.8,.2,1); }

.modal-card {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: min(580px, calc(100vw - 2rem));
    padding: 2.25rem;
    background: transparent;
    border: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: none;
}
.modal-heading {
    margin: 0 0 0.25rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.contact-row {
    display: flex;
    gap: 20px;
}
@media (max-width: 520px) {
    .contact-row { flex-direction: column; gap: 20px; }
}

/* JD liquid glass — exact spec */
.contact-input {
    flex: 1;
    width: 100%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 18px 22px;
    color: #f0efee;
    font: 400 1.05rem/1.4 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
    box-shadow:
        0 2px 16px rgba(0, 0, 0, 0.25),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}
.contact-input::placeholder { color: rgba(255, 255, 255, 0.35); }
.contact-input:focus {
    border-color: rgba(254, 200, 9, 0.5);
    background: rgba(255, 255, 255, 0.16);
    box-shadow:
        0 2px 20px rgba(0, 0, 0, 0.3),
        0 0 0 3px rgba(254, 200, 9, 0.08),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.1);
}
textarea.contact-input {
    resize: vertical;
    min-height: 130px;
    font-family: inherit;
}

.modal-submit {
    align-self: flex-start;
    margin-top: 0.25rem;
    padding: 14px 32px;
    font: 700 0.85rem/1 'Inter', sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: #ff5411;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}
.modal-submit:hover  { background: #e6480d; transform: translateY(-1px); }
.modal-submit:active { transform: translateY(0); }
.modal-submit:disabled { opacity: 0.6; cursor: wait; transform: none; }
.modal-status { margin: 0; min-height: 1.2em; font-size: 0.85rem; color: rgba(240, 239, 238, 0.7); }
.modal-status[data-state="ok"]  { color: #6ee7a3; }
.modal-status[data-state="err"] { color: #ff8b8b; }

.modal-close {
    position: fixed;
    top: max(env(safe-area-inset-top), 1.5vh);
    right: max(env(safe-area-inset-right), 1.5vw);
    width: 2.5rem; height: 2.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.85;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: opacity 0.15s ease, background 0.15s ease;
}
.modal-close:hover { opacity: 1; background: rgba(255, 255, 255, 0.18); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.96); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* social row — desktop only, under the turntable.
   Size + gap are pure-vw so the row keeps the SAME proportion to the artwork
   at every width (no max cap that would make small screens look oversized). */
.social {
    position: absolute;
    left: 13vw;
    bottom: max(env(safe-area-inset-bottom), 5vh);
    display: flex;
    align-items: center;
    gap: 2.5vw;
    z-index: 15;
    opacity: 0;
    animation: social-in 1s ease-out 2.4s forwards;
}
.social-link { display: block; transition: transform 0.15s ease, filter 0.15s ease; }
.social-link:hover { transform: translateY(-4px); filter: brightness(1.08); }
.social-link img {
    height: 4vw;
    width: auto;
    display: block;
}
@keyframes social-in { to { opacity: 1; } }

/* TABLET portrait — centered along the bottom */
@media (orientation: portrait) and (min-width: 601px) {
    .social {
        /* center over the baked-in email. The art is pinned left + scaled by
           height, so the email's x-position tracks viewport height (vh), not
           width — 49.2vh keeps the row centered over the email at every iPad
           portrait ratio (measured from the rendered art). */
        left: 49.2vh;
        transform: translateX(-50%);
        bottom: 12vh;
        gap: 6vw;
    }
    .social-link img { height: 8vw; }
}

/* PHONE portrait — centered, just above the bookings line */
@media (orientation: portrait) and (max-width: 600px) {
    .social {
        left: 50%;
        transform: translateX(-50%);
        bottom: 9vh;
        gap: 7vw;
    }
    .social-link img { height: 10vw; }
}
@media (prefers-reduced-motion: reduce) {
    .social { animation: none; opacity: 1; }
}
