.page-home {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(ellipse 70% 42% at 50% 108%, rgba(241, 227, 176, 0.055), transparent 58%),
        radial-gradient(ellipse 90% 55% at 18% 18%, rgba(241, 227, 176, 0.035), transparent 46%),
        radial-gradient(ellipse 80% 50% at 86% 30%, rgba(255, 248, 236, 0.025), transparent 42%),
        radial-gradient(ellipse at 50% 42%, #14161c 0%, var(--bg) 72%);
}

.page-home main {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: safe center;
    padding: 5.5rem 0 2.5rem;
}

.page-home main:focus {
    outline: none;
}

.cosmos {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, #000 48%, transparent 94%);
}

.cosmos__pulse {
    transform-origin: center;
    transform-box: fill-box;
    animation: twinkle 6.8s ease-in-out infinite;
}

.cosmos__pulse:nth-of-type(2) { animation-duration: 8.4s; animation-delay: -2s; }
.cosmos__pulse:nth-of-type(3) { animation-duration: 5.6s; animation-delay: -3.2s; }
.cosmos__pulse:nth-of-type(4) { animation-duration: 7.4s; animation-delay: -1.4s; }
.cosmos__pulse:nth-of-type(5) { animation-duration: 9.1s; animation-delay: -4.2s; }
.cosmos__pulse:nth-of-type(6) { animation-duration: 6.2s; animation-delay: -2.6s; }

.ceremony {
    position: fixed;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.ceremony__trigger {
    display: block;
    width: min(44rem, 92vw);
    pointer-events: auto;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

.ceremony__trigger:focus-visible {
    outline-offset: 1.4rem;
}

.ceremony__orbit {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 640 / 400;
}

.ceremony__arc {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.star {
    position: absolute;
    display: block;
    aspect-ratio: 1;
    background: url("../images/star.svg?v=8") center / contain no-repeat;
    filter: drop-shadow(0 0 8px rgba(241, 227, 176, 0.32));
}

/* Archive positions (symmetric arc, before the northern-sky layout):
   .star--lg { left: 16%; top: 74%; transform: translate(-50%, -50%) rotate(-8deg); }
   .star--md { left: 50%; top: 16%; transform: translate(-50%, -50%) rotate(4deg); }
   .star--sm { left: 84%; top: 76%; transform: translate(-50%, -50%) rotate(12deg); }
   Depart keyframes to restore: depart-lg-archive, depart-md-archive, depart-sm-archive. */

.star--lg {
    width: clamp(3.4rem, 16vw, 6.8rem);
    left: 19.852%;
    top: 72.517%;
    transform: translate(-50%, -50%) rotate(-14deg);
    animation: star-rise-lg 1.15s var(--ease) both, twinkle 6.6s ease-in-out 1.15s infinite;
}

.star--md {
    width: clamp(2.15rem, 10vw, 4.4rem);
    left: 49.688%;
    top: 19.5%;
    transform: translate(-50%, -50%) rotate(7deg);
    animation: star-rise-md 1.25s var(--ease) 0.08s both, twinkle 8.2s ease-in-out 1.33s infinite;
}

.star--sm {
    width: clamp(1.2rem, 5.5vw, 2.2rem);
    left: 78.219%;
    top: 52.667%;
    transform: translate(-50%, -50%) rotate(16deg);
    animation: star-rise-sm 1.2s var(--ease) 0.16s both, twinkle 5.4s ease-in-out 1.36s infinite;
}

.utility {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    display: none;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 1.1rem;
    padding: calc(0.95rem + env(safe-area-inset-top)) calc(1.1rem + env(safe-area-inset-right)) 0.8rem calc(1.1rem + env(safe-area-inset-left));
}

.utility__link {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-faint);
}

.utility__link:hover {
    color: var(--gold);
}

.page-home .portal,
.page-home .utility,
.page-home .site-footer {
    display: none;
}

html.is-activating .page-home .portal,
html.is-portal .page-home .portal,
html:has(#portail:target) .page-home .portal {
    display: block;
}

html.is-activating .page-home .utility,
html.is-portal .page-home .utility,
html:has(#portail:target) .page-home .utility {
    display: flex;
}

html.is-activating .page-home .site-footer,
html.is-portal .page-home .site-footer,
html:has(#portail:target) .page-home .site-footer {
    display: block;
}

html.is-portal .ceremony,
html:has(#portail:target) .ceremony {
    display: none;
}

html.is-activating .ceremony,
html.is-activating .portal {
    pointer-events: none;
}

.portal {
    position: relative;
    width: min(58rem, calc(100% - 2.5rem));
    margin-inline: auto;
}

.portal__glow {
    position: absolute;
    left: 50%;
    top: 28%;
    z-index: 0;
    width: min(78vw, 46rem);
    height: min(42vw, 18rem);
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center, rgba(241, 227, 176, 0.18) 0%, rgba(241, 227, 176, 0.05) 40%, transparent 72%);
    pointer-events: none;
}

.portal__title,
.portal__rule,
.pillars {
    position: relative;
    z-index: 1;
}

.portal__title {
    margin: 0;
    max-width: 100%;
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 0.45rem + 4vw, 4.5rem);
    font-weight: 500;
    line-height: 0.98;
    letter-spacing: 0.11em;
    text-align: center;
    text-transform: uppercase;
    color: var(--gold);
}

.portal__title:focus {
    outline: none;
}

.portal__title:focus-visible {
    outline: 1px solid rgba(241, 227, 176, 0.7);
    outline-offset: 0.7rem;
}

.portal__rule {
    display: block;
    width: 4.5rem;
    height: 1px;
    margin: 1.15rem auto 0;
    background: var(--gold);
    transform-origin: center;
}

.pillars {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    width: min(100%, 46rem);
    margin: clamp(1.4rem, 4vh, 2.4rem) auto 0;
    perspective: 1400px;
    text-align: left;
}

.pillar {
    --pillar-accent: var(--gold);
    --pillar-edge: rgba(241, 227, 176, 0.72);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.75rem;
    min-height: 6.1rem;
    padding: 0.72rem 0.75rem 0.68rem;
    transform-style: preserve-3d;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    background:
        linear-gradient(155deg, rgba(255, 255, 255, 0.09), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 46%),
        var(--bg-2);
    border-top: 1px solid rgba(255, 255, 255, 0.34);
    border-left: 1px solid rgba(255, 255, 255, 0.14);
    border-right: 1px solid rgba(0, 0, 0, 0.62);
    border-bottom: 1px solid rgba(0, 0, 0, 0.78);
    box-shadow:
        inset 2px 0 0 var(--pillar-edge),
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -12px 18px rgba(0, 0, 0, 0.32),
        0 1px 0 rgba(255, 255, 255, 0.05),
        0 12px 22px rgba(0, 0, 0, 0.42);
    transition: border-color 0.45s ease, background-color 0.45s ease, transform 0.55s cubic-bezier(0.2, 0.75, 0.2, 1), box-shadow 0.55s ease;
}

.pillar--zoo {
    --pillar-accent: var(--cyan);
    --pillar-edge: rgba(0, 240, 255, 0.7);
}

.pillar--wellness {
    --pillar-accent: var(--aurora-teal);
    --pillar-edge: rgba(126, 207, 196, 0.65);
}

.pillar--events {
    --pillar-accent: var(--gold);
    --pillar-edge: rgba(241, 227, 176, 0.78);
}

.pillar:hover,
.pillar:focus-visible {
    border-top-color: var(--pillar-accent);
    border-left-color: var(--pillar-accent);
}

.pillar:active {
    background-color: #1c1c21;
}

.pillar__index,
.pillar__title,
.pillar__go,
.pillar__corners,
.pillar__beam,
.pillar__mist,
.pillar__sheen {
    position: relative;
    z-index: 1;
}

.pillar__mist,
.pillar__sheen,
.pillar__beam,
.pillar__corners {
    position: absolute;
    pointer-events: none;
}

.pillar__corners {
    inset: 0.55rem;
    z-index: 2;
    opacity: 0.38;
    background:
        linear-gradient(var(--pillar-accent), var(--pillar-accent)) left top / 0.75rem 1px no-repeat,
        linear-gradient(var(--pillar-accent), var(--pillar-accent)) left top / 1px 0.75rem no-repeat,
        linear-gradient(var(--pillar-accent), var(--pillar-accent)) right top / 0.75rem 1px no-repeat,
        linear-gradient(var(--pillar-accent), var(--pillar-accent)) right top / 1px 0.75rem no-repeat,
        linear-gradient(var(--pillar-accent), var(--pillar-accent)) left bottom / 0.75rem 1px no-repeat,
        linear-gradient(var(--pillar-accent), var(--pillar-accent)) left bottom / 1px 0.75rem no-repeat,
        linear-gradient(var(--pillar-accent), var(--pillar-accent)) right bottom / 0.75rem 1px no-repeat,
        linear-gradient(var(--pillar-accent), var(--pillar-accent)) right bottom / 1px 0.75rem no-repeat;
    transition: opacity 0.45s ease;
}

.pillar:hover .pillar__corners,
.pillar:focus-visible .pillar__corners {
    opacity: 0.95;
}

.pillar__beam {
    inset: 0;
    z-index: 2;
    padding: 1px;
    opacity: 0;
    background: conic-gradient(from var(--beam-angle), transparent 0 76%, var(--pillar-accent) 88%, transparent 100%);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
}

.pillar__mist {
    inset: -35%;
    z-index: 0;
    opacity: 0;
    background:
        radial-gradient(circle at 28% 42%, rgba(126, 207, 196, 0.38), transparent 42%),
        radial-gradient(circle at 74% 64%, rgba(167, 139, 250, 0.32), transparent 46%),
        radial-gradient(circle at 50% 88%, rgba(241, 227, 176, 0.12), transparent 40%);
    transition: opacity 0.7s ease;
}

.pillar__sheen {
    inset: 0;
    z-index: 1;
    background: linear-gradient(105deg, transparent 32%, rgba(241, 227, 176, 0.16) 48%, transparent 64%);
    transform: translateX(-120%);
}

.pillar__index {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: var(--text-faint);
}

.pillar__title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.pillar__name {
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 1.35vw, 1.28rem);
    font-weight: 500;
    line-height: 0.95;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pillar__sub {
    display: block;
    margin-top: 0.45rem;
    font-family: var(--font-ui);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--pillar-accent);
}

.pillar__go {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: auto;
    color: var(--pillar-accent);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.pillar__arrow {
    position: relative;
    width: 1.5rem;
    height: 1px;
    background: currentColor;
}

.pillar__arrow::after {
    content: "";
    position: absolute;
    right: 0;
    top: -3px;
    width: 6px;
    height: 6px;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    transform: rotate(45deg);
}

@media (hover: hover) {
    .ceremony__trigger:hover .star {
        filter: drop-shadow(0 0 14px rgba(241, 227, 176, 0.55)) brightness(1.16);
    }

    .pillar--wellness:hover .pillar__mist,
    .pillar--wellness:focus-visible .pillar__mist {
        opacity: 1;
    }

    .pillar--zoo:hover .pillar__beam,
    .pillar--zoo:focus-visible .pillar__beam,
    .pillar--events:hover .pillar__beam,
    .pillar--events:focus-visible .pillar__beam {
        opacity: 1;
    }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .pillar--zoo:hover,
    .pillar--zoo:focus-visible {
        transform: translate3d(0, -14px, 36px) rotateX(11deg) rotateY(8deg) scale(1.06);
        box-shadow:
            inset 2px 0 0 #00f0ff,
            inset 0 1px 0 rgba(255, 255, 255, 0.28),
            0 28px 42px rgba(0, 0, 0, 0.55),
            0 0 32px rgba(0, 240, 255, 0.28);
    }

    .pillar--wellness:hover,
    .pillar--wellness:focus-visible {
        transform: translate3d(0, -18px, 46px) rotateX(13deg) scale(1.07);
        box-shadow:
            inset 2px 0 0 rgba(126, 207, 196, 0.95),
            inset 0 1px 0 rgba(255, 255, 255, 0.28),
            0 32px 48px rgba(0, 0, 0, 0.55),
            0 0 36px rgba(126, 207, 196, 0.32);
    }

    .pillar--events:hover,
    .pillar--events:focus-visible {
        transform: translate3d(0, -14px, 36px) rotateX(11deg) rotateY(-8deg) scale(1.06);
        box-shadow:
            inset 2px 0 0 rgba(241, 227, 176, 0.95),
            inset 0 1px 0 rgba(255, 255, 255, 0.28),
            0 28px 42px rgba(0, 0, 0, 0.55),
            0 0 32px rgba(241, 227, 176, 0.28);
    }

    .pillar--zoo:hover .pillar__beam,
    .pillar--zoo:focus-visible .pillar__beam,
    .pillar--events:hover .pillar__beam,
    .pillar--events:focus-visible .pillar__beam {
        animation: beamSpin 2.8s linear infinite;
    }

    .pillar--wellness:hover .pillar__mist,
    .pillar--wellness:focus-visible .pillar__mist {
        animation: mistDrift 7.5s ease-in-out infinite alternate;
    }

    .pillar--events:hover .pillar__sheen,
    .pillar--events:focus-visible .pillar__sheen {
        animation: sheen 0.95s ease;
    }

    .pillar:hover .pillar__arrow,
    .pillar:focus-visible .pillar__arrow {
        transform: translateX(4px);
    }
}

html.is-activating .star--lg { animation: depart-lg var(--duration-depart) cubic-bezier(0.4, 0, 0.2, 1) forwards; }
html.is-activating .star--md { animation: depart-md var(--duration-depart) cubic-bezier(0.4, 0, 0.2, 1) forwards; }
html.is-activating .star--sm { animation: depart-sm var(--duration-depart) cubic-bezier(0.4, 0, 0.2, 1) forwards; }
html.is-activating .ceremony__arc { animation: fadeOut var(--duration-depart) ease forwards; }

html.is-activating .portal__glow { animation: glowIn 1.15s var(--ease) 0.62s both; }
html.is-activating .portal__title { animation: nameIn 0.95s var(--ease) 0.74s both; }
html.is-activating .portal__rule { animation: ruleIn 0.7s var(--ease) 1.05s both; }
html.is-activating .pillar { animation: cardIn 0.7s var(--ease) both; }
html.is-activating .pillar:nth-child(1) { animation-delay: 1.32s; }
html.is-activating .pillar:nth-child(2) { animation-delay: 1.46s; }
html.is-activating .pillar:nth-child(3) { animation-delay: 1.6s; }
html.is-activating .page-home .utility,
html.is-activating .page-home .site-footer { animation: fadeIn 0.6s ease 1.4s both; }

@keyframes twinkle {
    0%, 100% { opacity: 0.78; }
    50% { opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; }
}

@keyframes star-rise-lg {
    from { opacity: 0; transform: translate(-62%, 40%) rotate(-22deg) scale(0.28); filter: drop-shadow(0 0 2px rgba(241, 227, 176, 0.1)) brightness(0.7); }
    to { opacity: 1; transform: translate(-50%, -50%) rotate(-14deg) scale(1); filter: drop-shadow(0 0 8px rgba(241, 227, 176, 0.32)) brightness(1); }
}

@keyframes star-rise-md {
    from { opacity: 0; transform: translate(-40%, 80%) rotate(-4deg) scale(0.22); filter: drop-shadow(0 0 2px rgba(241, 227, 176, 0.1)) brightness(0.7); }
    to { opacity: 1; transform: translate(-50%, -50%) rotate(7deg) scale(1); filter: drop-shadow(0 0 8px rgba(241, 227, 176, 0.32)) brightness(1); }
}

@keyframes star-rise-sm {
    from { opacity: 0; transform: translate(-20%, 70%) rotate(4deg) scale(0.2); filter: drop-shadow(0 0 2px rgba(241, 227, 176, 0.1)) brightness(0.7); }
    to { opacity: 1; transform: translate(-50%, -50%) rotate(16deg) scale(1); filter: drop-shadow(0 0 8px rgba(241, 227, 176, 0.32)) brightness(1); }
}

@keyframes depart-lg {
    0% { opacity: 1; transform: translate(-50%, -50%) rotate(-14deg) scale(1); filter: drop-shadow(0 0 8px rgba(241, 227, 176, 0.32)) brightness(1); }
    26% { opacity: 1; transform: translate(-110%, -90%) rotate(-4deg) scale(1.28); filter: drop-shadow(0 0 26px rgba(241, 227, 176, 0.9)) brightness(1.75); }
    100% { opacity: 0; transform: translate(-340%, -20%) rotate(-36deg) scale(0.16); filter: brightness(1.15); }
}

@keyframes depart-md {
    0% { opacity: 1; transform: translate(-50%, -50%) rotate(7deg) scale(1); filter: drop-shadow(0 0 8px rgba(241, 227, 176, 0.32)) brightness(1); }
    26% { opacity: 1; transform: translate(-10%, -130%) rotate(20deg) scale(1.24); filter: drop-shadow(0 0 26px rgba(241, 227, 176, 0.9)) brightness(1.75); }
    100% { opacity: 0; transform: translate(30%, -320%) rotate(40deg) scale(0.14); filter: brightness(1.15); }
}

@keyframes depart-sm {
    0% { opacity: 1; transform: translate(-50%, -50%) rotate(16deg) scale(1); filter: drop-shadow(0 0 8px rgba(241, 227, 176, 0.32)) brightness(1); }
    26% { opacity: 1; transform: translate(40%, -30%) rotate(30deg) scale(1.26); filter: drop-shadow(0 0 26px rgba(241, 227, 176, 0.9)) brightness(1.75); }
    100% { opacity: 0; transform: translate(300%, 90%) rotate(52deg) scale(0.12); filter: brightness(1.15); }
}

@keyframes depart-lg-archive {
    0% { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); filter: drop-shadow(0 0 8px rgba(241, 227, 176, 0.32)) brightness(1); }
    32% { opacity: 1; transform: translate(-70%, -68%) rotate(-2deg) scale(1.08); filter: drop-shadow(0 0 16px rgba(241, 227, 176, 0.62)) brightness(1.55); }
    100% { opacity: 0; transform: translate(-170%, 28%) rotate(-20deg) scale(0.18); filter: brightness(1.1); }
}

@keyframes depart-md-archive {
    0% { opacity: 1; transform: translate(-50%, -50%) rotate(4deg) scale(1); filter: drop-shadow(0 0 8px rgba(241, 227, 176, 0.32)) brightness(1); }
    32% { opacity: 1; transform: translate(-50%, -78%) rotate(10deg) scale(1.08); filter: drop-shadow(0 0 16px rgba(241, 227, 176, 0.62)) brightness(1.55); }
    100% { opacity: 0; transform: translate(-20%, -220%) rotate(18deg) scale(0.15); filter: brightness(1.1); }
}

@keyframes depart-sm-archive {
    0% { opacity: 1; transform: translate(-50%, -50%) rotate(12deg) scale(1); filter: drop-shadow(0 0 8px rgba(241, 227, 176, 0.32)) brightness(1); }
    32% { opacity: 1; transform: translate(-18%, -42%) rotate(18deg) scale(1.1); filter: drop-shadow(0 0 16px rgba(241, 227, 176, 0.62)) brightness(1.55); }
    100% { opacity: 0; transform: translate(110%, 36%) rotate(30deg) scale(0.14); filter: brightness(1.1); }
}

@keyframes glowIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.28); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes nameIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

@keyframes ruleIn {
    from { opacity: 0; transform: scaleX(0); }
    to { opacity: 1; transform: scaleX(1); }
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

@keyframes zooPulse {
    0%, 100% { box-shadow: inset 2px 0 0 rgba(0, 240, 255, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 -12px 18px rgba(0, 0, 0, 0.32), 0 12px 22px rgba(0, 0, 0, 0.42), inset 0 0 24px rgba(0, 240, 255, 0.05); }
    50% { box-shadow: inset 2px 0 0 #00f0ff, inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 -12px 18px rgba(0, 0, 0, 0.32), 0 12px 22px rgba(0, 0, 0, 0.42), inset 0 0 48px rgba(0, 240, 255, 0.16); }
}

@media (min-width: 768px) {
    .portal__title { letter-spacing: 0.16em; }
}

@media (min-width: 1024px) {
    .ceremony__trigger { width: min(52rem, 78vw); }
    .pillars { grid-template-columns: repeat(3, minmax(0, 13.5rem)); justify-content: center; gap: 0.7rem; }
    .pillar { min-height: 9.1rem; padding: 0.8rem 0.75rem 0.72rem; }
    .portal { width: min(60rem, calc(100% - 4rem)); }
}

@media (min-width: 1440px) {
    .ceremony__trigger { width: min(58rem, 64vw); }
}

@media (max-height: 520px) {
    .ceremony__trigger { width: min(28rem, 64vw); }
    .page-home main { padding-top: 3.4rem; }
    .pillar { min-height: 7rem; }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .pillar__arrow { transition: transform 0.35s ease; }
}
