:root {
    --violet-white: #f6efff;
    --violet-soft: #d9c4f0;
    --violet-mid: #a978d3;
    --violet-deep: #241330;
    --ink-space: #080510;
    --ease-spirit: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--ink-space); }
body { color: var(--violet-white); font-family: Georgia, "Times New Roman", serif; }
button, a { font: inherit; }

.spirit-page, .first-view { position: relative; width: 100%; height: 100%; overflow: hidden; isolation: isolate; }
.first-view { background: #07040d; }

.first-view::after {
    content: "";
    position: absolute;
    z-index: 8;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 46%, transparent 28%, rgba(5, 2, 10, .18) 66%, rgba(3, 1, 7, .78) 100%),
        linear-gradient(180deg, rgba(5, 2, 10, .2), transparent 18%, transparent 76%, rgba(5, 2, 10, .44));
}

.first-view-background {
    position: absolute;
    z-index: 0;
    left: 50%;
    top: calc(100% - 176vh);
    width: 100%;
    height: 176vh;
    object-fit: cover;
    object-position: center;
    transform: translateX(-50%) scale(1.025);
    filter: saturate(.9) contrast(1.02) brightness(.82);
    transition: top 8.8s cubic-bezier(.18,.84,.18,1), filter 7s ease;
    will-change: top, filter;
}

.first-view.is-revealing .first-view-background {
    top: 0;
    filter: saturate(1.02) contrast(1.03) brightness(.93);
}

.memory-shimmer,
.light-beam,
.particle-field,
.spirit-presence {
    position: absolute;
    pointer-events: none;
}

.memory-shimmer {
    z-index: 2;
    left: 8%;
    bottom: 0;
    width: 84%;
    height: 67%;
    object-fit: cover;
    opacity: .13;
    mix-blend-mode: screen;
    filter: blur(.35px) saturate(.6);
    animation: memory-signal 11s ease-in-out infinite;
}

.particle-field {
    z-index: 4;
    inset: -7%;
    width: 114%;
    height: 114%;
    object-fit: cover;
    opacity: .28;
    mix-blend-mode: screen;
    filter: blur(.15px);
    animation: particle-drift 17s ease-in-out infinite alternate;
}

.light-beam {
    z-index: 3;
    left: 50%;
    bottom: -22%;
    width: min(52vw, 560px);
    height: 124%;
    object-fit: fill;
    transform: translateX(-50%) scaleX(.55);
    opacity: .11;
    mix-blend-mode: screen;
    transition: opacity 1.8s ease, transform 4.5s var(--ease-spirit), bottom 7s var(--ease-spirit);
}

.spirit-presence {
    z-index: 6;
    left: 50%;
    top: 42%;
    width: clamp(240px, 30vw, 455px);
    aspect-ratio: 2 / 3;
    --attention-x: 0px;
    --attention-y: 0px;
    --attention-rotate: 0deg;
    transform: translate(calc(-50% + var(--attention-x)), calc(-50% + var(--attention-y))) rotate(var(--attention-rotate));
    transition: top 8.5s var(--ease-spirit), transform .9s var(--ease-spirit), filter 1.2s ease;
    will-change: top, transform;
}

.spirit-hero {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(177, 116, 228, .3)) drop-shadow(0 0 60px rgba(128, 70, 180, .18));
    animation: spirit-breathe 7.8s ease-in-out infinite;
    transform-origin: 50% 54%;
}

.eye-light {
    position: absolute;
    z-index: 2;
    top: 26.6%;
    width: 7.5%;
    height: 2.5%;
    border-radius: 50%;
    opacity: 0;
    background: #fff;
    filter: blur(4px);
    box-shadow: 0 0 14px 6px rgba(238, 221, 255, .84), 0 0 40px 12px rgba(176, 97, 238, .58);
    transition: opacity 1.1s ease;
}
.eye-light-left { left: 37%; transform: rotate(-5deg); }
.eye-light-right { right: 37%; transform: rotate(5deg); }

.first-view.is-attentive .eye-light,
.first-view.is-revealing .eye-light { opacity: .88; }
.first-view.is-attentive .light-beam { opacity: .26; transform: translateX(-50%) scaleX(.78); }
.first-view.is-revealing .light-beam { opacity: .42; transform: translateX(-50%) scaleX(1); bottom: -4%; }
.first-view.is-revealing .spirit-presence { top: 12%; transform: translate(calc(-50% + var(--attention-x)), calc(-50% + var(--attention-y))) rotate(var(--attention-rotate)) scale(.78); }

.spirit-copy {
    position: absolute;
    z-index: 10;
    left: clamp(24px, 7vw, 110px);
    bottom: clamp(34px, 8vh, 90px);
    width: min(550px, calc(100vw - 48px));
    padding: clamp(18px, 2.6vw, 34px);
    background: linear-gradient(100deg, rgba(7, 3, 13, .76), rgba(7, 3, 13, .35) 72%, transparent);
    border-left: 1px solid rgba(225, 202, 244, .34);
    text-shadow: 0 2px 18px rgba(0,0,0,.85);
    transition: opacity 2.2s ease, transform 2.2s var(--ease-spirit);
}

.spirit-copy h1 { margin: .55rem 0 1rem; font-size: clamp(1.45rem, 3vw, 2.8rem); line-height: 1.08; font-weight: 400; }
.spirit-copy p { margin: .42rem 0; color: rgba(244, 237, 250, .82); font-size: clamp(.92rem, 1.35vw, 1.12rem); line-height: 1.5; }
.spirit-copy .spirit-eyebrow { margin: 0; color: rgba(217,196,240,.7); font-size: .68rem; letter-spacing: .28em; text-transform: uppercase; }
.spirit-copy .spirit-closing { margin-top: 1.15rem; }
.spirit-copy strong { color: #fff; font-weight: 400; font-style: italic; }
.first-view.is-revealing .spirit-copy { opacity: 0; transform: translateY(22px); pointer-events: none; }

.hero-links {
    position: absolute;
    z-index: 12;
    top: 50%;
    left: 50%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 270px));
    gap: 22px clamp(34px, 7vw, 110px);
    width: min(760px, calc(100vw - 40px));
    transform: translate(-50%, calc(-50% - 24px));
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.8s ease 5.8s, transform 2s var(--ease-spirit) 5.8s;
}
.first-view.is-revealing .hero-links { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }

.hero-card {
    display: grid;
    text-decoration: none;
    gap: .25rem;
    min-height: 92px;
    padding: 14px 18px;
    color: var(--violet-white);
    text-align: left;
    cursor: pointer;
    border: 1px solid rgba(231, 213, 246, .28);
    border-radius: 5px;
    background: linear-gradient(135deg, rgba(27, 13, 43, .76), rgba(9, 5, 17, .46));
    backdrop-filter: blur(12px);
    box-shadow: inset 0 0 24px rgba(203, 163, 235, .06), 0 8px 34px rgba(0,0,0,.34);
    transition: transform .45s var(--ease-spirit), border-color .45s ease, background .45s ease;
}
.hero-card:hover, .hero-card:focus-visible { transform: translateY(3px); border-color: rgba(238, 218, 255, .68); background: rgba(34, 17, 53, .74); }
.hero-card-kicker { color: rgba(218,198,237,.6); font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; }
.hero-card-title { font-size: clamp(1rem, 1.8vw, 1.35rem); }
.hero-card-note { color: rgba(235,225,244,.62); font-size: .76rem; }
.manifesto-card {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(360px, 100%);
    text-align: center;
}


.quiet-return { position: absolute; z-index: 12; right: 20px; bottom: 16px; color: rgba(240,230,248,.42); font-size: .68rem; letter-spacing: .15em; text-decoration: none; text-transform: uppercase; }
.quiet-return:hover { color: rgba(255,255,255,.8); }

.audio-prompt { position: absolute; z-index: 20; inset: auto 0 5vh; margin: 0; text-align: center; }
.audio-prompt button { padding: .9rem 1.2rem; color: #f7f0ff; cursor: pointer; border: 1px solid rgba(232,209,250,.38); background: rgba(15,7,25,.72); backdrop-filter: blur(10px); }

.reference-panel {
    position: absolute;
    z-index: 40;
    inset: 4vh 4vw;
    padding: clamp(28px, 5vw, 72px);
    overflow: auto;
    color: #eee5f5;
    opacity: 0;
    pointer-events: none;
    border: 1px solid rgba(226, 202, 244, .22);
    background: rgba(7, 3, 13, .92);
    backdrop-filter: blur(24px);
    transform: scale(.985);
    transition: opacity .5s ease, transform .5s var(--ease-spirit);
}
.reference-panel.is-open { opacity: 1; pointer-events: auto; transform: scale(1); }
.panel-close { position: absolute; top: 14px; right: 18px; color: #fff; cursor: pointer; border: 0; background: transparent; font-size: 2rem; }
.panel-content { width: min(1180px, 100%); margin: auto; }
.panel-content h2 { margin: .4rem 0 1rem; font-size: clamp(2.5rem, 7vw, 5.5rem); font-weight: 400; }
.panel-content p { color: rgba(236,226,244,.78); font-size: clamp(1rem, 1.6vw, 1.25rem); line-height: 1.75; }
.panel-eyebrow { letter-spacing: .24em; text-transform: uppercase; }
.panel-lead { color: #fff !important; font-style: italic; }
.concept-preview {
    position: relative;
    width: 100%;
    margin: 2rem 0;
    overflow: hidden;
    border: 1px solid rgba(213, 174, 240, .24);
    background: #080510;
    box-shadow: 0 22px 70px rgba(0, 0, 0, .42), 0 0 36px rgba(133, 77, 179, .08);
}
.concept-preview img { display: block; width: 100%; height: auto; }
.concept-intro { max-width: 760px; }
.concept-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(14px, 2.4vw, 30px);
    margin: 2rem 0 1rem;
}
.concept-card {
    position: relative;
    display: block;
    overflow: hidden;
    color: var(--violet-white);
    text-decoration: none;
    border: 1px solid rgba(213, 174, 240, .24);
    background: #080510;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .34);
    transition: transform .5s var(--ease-spirit), border-color .5s ease, box-shadow .5s ease;
}
.concept-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center 18%;
    filter: brightness(.88) saturate(.9);
    transition: transform .7s var(--ease-spirit), filter .5s ease;
}
.concept-card span {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 1.25rem 1.15rem .9rem;
    font-size: clamp(.82rem, 1.5vw, 1.05rem);
    letter-spacing: .14em;
    text-transform: uppercase;
    background: linear-gradient(transparent, rgba(7, 3, 13, .94));
}
.concept-card:hover, .concept-card:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(238, 218, 255, .62);
    box-shadow: 0 24px 62px rgba(0, 0, 0, .46), 0 0 34px rgba(133, 77, 179, .12);
}
.concept-card:hover img, .concept-card:focus-visible img { transform: scale(1.035); filter: brightness(1) saturate(1); }

.arrival-veil {
    position: absolute;
    z-index: 50;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 45%, rgba(223,199,246,.96), rgba(122,70,164,.94) 30%, #160a25 74%);
    opacity: 1;
    animation: veil-clear 2.7s ease forwards;
}

@keyframes veil-clear { 0%, 18% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes spirit-breathe {
    0%, 100% { transform: translate3d(-10px, 8px, 0) scale(.97) rotate(-1.2deg); filter: brightness(.94); }
    20% { transform: translate3d(7px, -10px, 0) scale(1.015) rotate(.7deg); filter: brightness(1.05); }
    43% { transform: translate3d(14px, -22px, 0) scale(1.04) rotate(1.35deg); filter: brightness(1.1); }
    66% { transform: translate3d(-6px, -13px, 0) scale(1.012) rotate(-.55deg); filter: brightness(1.02); }
    84% { transform: translate3d(-15px, -2px, 0) scale(.99) rotate(-1deg); }
}
@keyframes particle-drift { from { transform: translate3d(-1%, 1%, 0) scale(1.02); } to { transform: translate3d(1.2%, -2%, 0) scale(1.07); } }
@keyframes memory-signal {
    0%, 12%, 100% { opacity: .08; transform: translate3d(0,0,0) scaleY(1); }
    16% { opacity: .24; transform: translate3d(0,-.8%,0) scaleY(1.008); }
    17.5% { opacity: .04; }
    45% { opacity: .1; transform: translate3d(0,.4%,0); }
    48% { opacity: .28; filter: blur(0) saturate(.7) brightness(1.15); }
    49% { opacity: .07; }
}

@media (max-width: 720px) {
    .first-view-background { width: 132%; max-width: none; }
    .spirit-presence { top: 39%; width: clamp(225px, 64vw, 350px); }
    .spirit-copy { left: 16px; right: 16px; bottom: 38px; width: auto; padding: 17px 18px; background: rgba(7,3,13,.64); }
    .spirit-copy h1 { font-size: clamp(1.3rem, 6vw, 1.85rem); }
    .spirit-copy p { font-size: .86rem; line-height: 1.4; }
    .hero-links { grid-template-columns: 1fr 1fr; gap: 14px; top: 50%; width: calc(100vw - 28px); }
    .manifesto-card { width: min(310px, 100%); }
    .hero-card { min-height: 78px; padding: 10px; }
    .hero-card-note { display: none; }
    .quiet-return { display: none; }
    .reference-panel { inset: 10px; padding: 46px 22px 26px; }
    .concept-preview { margin: 1.25rem 0; }
    .concept-gallery { grid-template-columns: 1fr; margin-top: 1.25rem; }
    .concept-card img { aspect-ratio: 16 / 10; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .first-view-background { top: 0; }
    .hero-links { opacity: 1; transform: translate(-50%,-50%); pointer-events: auto; }
}
