:root {
    color-scheme: dark;
    font-family: 'Cormorant Garamond', Georgia, serif;
    color: #f0cdee;
    background: #140b19;
    font-synthesis: none;
    -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

body {
    touch-action: pan-x pan-y;
    margin: 0;
    min-width: 280px;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    isolation: isolate;
    background:
        radial-gradient(ellipse at 0% 24%, #52204c66, transparent 45%),
        radial-gradient(ellipse at 100% 80%, #56204e55, transparent 44%),
        radial-gradient(ellipse at 50% 45%, #241026 0%, #140b19 70%);
}

/* Static fallback while the shader loads or when WebGL is unavailable. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: url('mist.svg') center / cover no-repeat;
    opacity: .35;
}

.landing {
    width: min(100%, 1180px);
    padding: 64px 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(48px, 7vw, 112px);
}

.brand { text-align: center; min-width: 0; }
/* Keep the same compositing layer before, during and after the entrance in Safari. */
.brand__logo { transform: translate3d(0, 0, 0); margin: 0 auto; width: min(100%, 460px); line-height: 0; }
.brand__logo svg { display: block; width: 100%; height: auto; }
.brand__intro { margin: 12px -12px 14px; font-size: clamp(26px, 2.5vw, 36px); line-height: 1.2; }
.brand__location { margin: 0; font: 12px/1.5 Arial, sans-serif; letter-spacing: .34em; text-transform: uppercase; }

.links { display: grid; gap: 18px; min-width: 0; }
.link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    min-height: 72px;
    padding: 15px 24px;
    border: 1px solid #dfb9e5;
    border-radius: 999px;
    color: #f0cdee;
    background: #f0cdee05;
    text-decoration: none;
    text-align: center;
    font-family: inherit;
    cursor: pointer;
    font-size: 30px;
    line-height: 1.2;
    transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease, filter 180ms ease;
    -webkit-tap-highlight-color: #e9bff333;
}
.link--primary { border-color: transparent; background: linear-gradient(110deg, #e6bdf3, #efc8ed); color: #241026; }
.link__arrow { font-family: Georgia, serif; }
.link:focus-visible { outline: 3px solid #fff0fa; outline-offset: 5px; }
@media (hover: hover) {
    .link:hover { background-color: #e8bdeb19; border-color: #fff0fa; transform: translateY(-2px); }
    /* Keep the gradient throughout the transition to avoid a sudden background swap. */
    .link--primary:hover { filter: brightness(1.06); }
}
.link:active { transform: translateY(1px); }

@media (max-width: 760px) {
    .landing { max-width: 480px; grid-template-columns: 1fr; gap: 30px; padding: 28px 28px 40px; }
    .brand__logo { width: min(100%, 285px); }
    .brand__intro { margin: 5px -8px 12px; font-size: clamp(22px, 5.7vw, 27px); }
    .brand__location { font-size: 10px; letter-spacing: .3em; }
    .links { gap: 13px; }
    .link { min-height: 56px; padding: 12px 20px; font-size: 25px; }
}

@media (max-width: 760px) and (max-height: 740px) {
    .landing { padding-top: 16px; padding-bottom: 24px; gap: 22px; }
    .brand__logo { width: 220px; }
    .links { gap: 11px; }
    .link { min-height: 52px; padding-block: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .link { transition: none; }
    .link:hover, .link:active { transform: none; }
}

.courses { position: relative; }
.courses > .link { width: 100%; }
.courses__tooltip {
    position: absolute;
    z-index: 2;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 16px;
    border-radius: 10px;
    background: #efc8ed;
    color: #241026;
    box-shadow: 0 4px 20px #0005;
    font: 12px/1.4 Arial, sans-serif;
    letter-spacing: .06em;
    white-space: nowrap;
}
/* Bridge the gap so the tooltip remains reachable with a pointer. */
.courses__tooltip::before {
    content: '';
    position: absolute;
    inset: -7px 0 auto;
    height: 7px;
}

.background {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
}
.background.is-ready { opacity: 1; }

/* The intro is opt-in: content stays visible without JavaScript or animation. */
.is-entering .brand__logo,
.is-entering .brand__intro,
.is-entering .brand__location,
.is-entering .brand__services,
.is-entering .links > * { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
    .is-entering .brand__logo,
    .is-entering .brand__intro,
    .is-entering .brand__location,
.is-entering .brand__services,
    .is-entering .links > * { opacity: 1; }
}

.brand__services { margin: 14px 0 0; font: 13px/1.6 Arial, sans-serif; color: #ddbbdb; }
