:root {
    color-scheme: light;
    background: #f2f1ef;
    color: #292929;
    font-family: system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { min-height: 100svh; margin: 0; padding-bottom: 5.5rem; display: flex; flex-direction: column; }
.landing { flex: 1; display: grid; align-content: start; justify-items: center; gap: clamp(1.25rem, 4svh, 2.5rem); padding: clamp(1.5rem, 8svh, 5rem) 1rem 1rem; isolation: isolate; }
.studio { width: min(100%, 56rem); text-align: center; }

h1 {
    margin: 0;
    font: 400 clamp(2.35rem, 6vw, 4.75rem)/1.05 "Bodoni MT", Didot, Georgia, serif;
    letter-spacing: -.055em;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.studio-links { grid-column: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem; }

.studio-links a {
    display: grid;
    place-items: center;
    width: 2.65rem;
    height: 2.65rem;
    border: 1px solid #aeaca8;
    border-radius: 50%;
    color: #41413f;
    background: #f2f1efdd;
}

.studio-links a:hover { background: #e3e1de; }
.studio-links a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.studio-links svg { width: 1.15rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.studio-logo { display: block; max-width: min(12rem, 60vw); height: auto; max-height: clamp(4.75rem, 10svh, 6rem); object-fit: contain; margin: 0 auto 1rem; filter: grayscale(1) brightness(.56); }
.pattern { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.pattern::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 54% 51% at 50% 40%, #f2f1efc7 28%, #f2f1ef80 60%, transparent 100%); }
.pattern > svg { display: block; width: 100%; height: 100%; }
.pattern .landing-motif { opacity: .58; }
.pattern .is-flashing { opacity: 1; }
.studio-links svg :is(path, circle, ellipse, rect, line, polygon, polyline) {
    vector-effect: non-scaling-stroke;
    stroke-width: 1px;
}
.pattern .standalone-subjects { display: none; }
.artwork { display: block; width: min(100%, 42rem, 79svh); height: auto; overflow: visible; }

@media (prefers-reduced-motion: no-preference) {
    .landing-motif.is-floating { animation: balloon-drift 14s both; }
    @keyframes balloon-drift {
        0% { transform: translate(0, 0); opacity: .58; }
        25% { transform: translate(calc(var(--balloon-sway) * .4), calc(var(--balloon-rise) * .25)) rotate(7deg); }
        50% { transform: translate(calc(var(--balloon-sway) * .15), calc(var(--balloon-rise) * .6)) rotate(-6deg); }
        78% { transform: translate(var(--balloon-sway), var(--balloon-rise)) rotate(5deg); opacity: 0; }
        79% { transform: translate(0, 0); opacity: 0; }
        100% { transform: translate(0, 0); opacity: .58; }
    }
}

footer { position: fixed; inset: auto 0 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: .5rem; padding: .75rem clamp(1rem, 4vw, 3rem) max(.75rem, env(safe-area-inset-bottom)); color: #555450; font-size: .8rem; }
.platform-credit { justify-self: end; text-align: right; text-shadow: 0 0 5px #f2f1ef, 0 0 10px #f2f1ef; }
.platform-credit a { color: inherit; text-underline-offset: .18em; }
footer strong { color: #292929; letter-spacing: .11em; }

@media (max-width: 36rem) {
    footer { grid-template-columns: 1fr; }
    .studio-links { grid-column: 1; }
}

.landing-motif { transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: no-preference) {
    .candle-offset { --candle-delay: -.7s; }
    .candle-flame {
        transform-box: fill-box;
        transform-origin: center bottom;
        animation: candle-flicker 1.4s ease-in-out var(--candle-delay, 0s) infinite;
    }

    @keyframes candle-flicker {
        0%, 100% { transform: rotate(-7deg) scale(.92, .96); }
        34% { transform: rotate(10deg) scale(.87, 1.12); }
        67% { transform: rotate(-4deg) scale(1.08, .83); }
    }
}

@media (prefers-reduced-motion: no-preference) {
    .landing-motif.is-highlighted { animation: motif-highlight 2.2s ease-in-out; }

    /* Soft pulse: small zoom and darker (bolder) look, then back. */
    @keyframes motif-highlight {
        50% { transform: scale(1.09); opacity: .92; }
    }
}

@media (prefers-reduced-motion: no-preference) {
    .artwork { animation: artwork-arrive .65s ease-out both; }
    @keyframes artwork-arrive {
        from { transform: scale(.94); }
        to { transform: scale(1); }
    }
}

.flash-burst { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
    .is-flashing .flash-burst { animation: camera-flash .85s ease-out; }
    @keyframes camera-flash {
        0% { opacity: 0; }
        6%, 24% { opacity: 1; }
        44% { opacity: .8; }
        100% { opacity: 0; }
    }
}

@media (prefers-reduced-motion: no-preference) {
    .portrait-slide.is-popping { animation: slide-pop 2.1s ease-in-out; }

    @keyframes slide-pop {
        30%, 72% { transform: scale(1.85); }
    }
}
