:root {
    --night: #071c1d;
    --deep: #0a2929;
    --verdigris: #1f5550;
    --sea-glass: #70968a;
    --oxide: #a9543f;
    --coral: #d67b58;
    --brass: #cfaa67;
    --paper: #e6d7b3;
    --chalk: #f1e7cc;
    --font-display: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
    --font-data: 'SFMono-Regular', 'Roboto Mono', 'IBM Plex Mono', Consolas, monospace;
    --intro-opacity: 1;
    --intro-y: 0px;
    --sun-opacity: 1;
    --surface-opacity: 0;
    --surface-y: 82vh;
    --instrument-opacity: 0;
    --instrument-y: 18px;
    --instrument-turn: 0deg;
    --chart-opacity: 0;
    --chart-shift: 16px;
    --project-opacity: 0;
    --project-y: 54px;
    --scroll-opacity: 1;
    --scroll-fill: 0%;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-height: 100%;
    background: var(--night);
    color-scheme: dark;
    scrollbar-color: rgba(207, 170, 103, 0.32) var(--night);
}

body {
    min-height: 100%;
}

body.orrery-page {
    overflow-x: hidden;
    background: var(--night);
    color: var(--chalk);
    font-family: var(--font-data);
    text-rendering: geometricPrecision;
}

body.orrery-page::before,
body.orrery-page::after {
    content: '';
    position: fixed;
    z-index: 20;
    pointer-events: none;
}

body.orrery-page::before {
    inset: 0.55rem;
    border: 1px solid rgba(230, 215, 179, 0.12);
    box-shadow:
        inset 0 0 0 1px rgba(7, 28, 29, 0.28),
        inset 0 0 8rem rgba(4, 17, 18, 0.22);
}

body.orrery-page::after {
    inset: 0;
    background:
        linear-gradient(90deg, rgba(241, 231, 204, 0.035) 1px, transparent 1px) 0 0 / 25vw 100%,
        linear-gradient(rgba(241, 231, 204, 0.018) 1px, transparent 1px) 0 0 / 100% 25vh;
    mix-blend-mode: soft-light;
    opacity: 0.4;
}

a {
    color: inherit;
}

.orrery-canvas,
.orrery-fallback,
.plate-grain {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
}

.orrery-canvas {
    z-index: 1;
    display: block;
    background: transparent;
}

.orrery-fallback {
    z-index: 0;
    background:
        radial-gradient(circle at 72% 62%, rgba(214, 123, 88, 0.9) 0 10%, rgba(169, 84, 63, 0.24) 11% 28%, transparent 43%),
        linear-gradient(180deg, #203f42 0%, #bd745a 48%, #d5a36f 58%, #1f5550 59%, #071c1d 100%);
}

.orrery-page.has-webgl .orrery-fallback {
    opacity: 0;
}

.plate-grain {
    z-index: 3;
    pointer-events: none;
    opacity: 0.18;
    background-image:
        repeating-radial-gradient(circle at 17% 31%, rgba(241, 231, 204, 0.15) 0 0.45px, transparent 0.7px 2.7px),
        repeating-linear-gradient(97deg, rgba(3, 14, 15, 0.12) 0 1px, transparent 1px 4px);
    background-size: 7px 7px, 13px 13px;
    mix-blend-mode: overlay;
}

.orrery-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 24;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 1rem;
    padding: clamp(1.35rem, 2.7vw, 2.8rem) clamp(1.35rem, 3.6vw, 3.8rem);
    pointer-events: none;
}

.orrery-header a,
.variant-switcher {
    pointer-events: auto;
}

.studio-mark {
    display: flex;
    width: max-content;
    max-width: 100%;
    align-items: baseline;
    gap: clamp(0.75rem, 1.5vw, 1.6rem);
    color: rgba(241, 231, 204, 0.8);
    font-size: 0.58rem;
    letter-spacing: 0.13em;
    line-height: 1.1;
    text-decoration: none;
    text-transform: uppercase;
}

.studio-mark-name {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-style: italic;
    letter-spacing: 0.07em;
    text-transform: none;
}

.studio-mark-study {
    color: rgba(207, 170, 103, 0.64);
}

.variant-switcher {
    display: flex;
    align-items: center;
    gap: 0.48rem;
    color: rgba(230, 215, 179, 0.46);
    font-size: 0.52rem;
    letter-spacing: 0.12em;
}

.variant-switcher::before,
.variant-switcher::after {
    content: '';
    width: 1.8rem;
    height: 1px;
    background: rgba(230, 215, 179, 0.14);
}

.variant-switcher a,
.variant-switcher span {
    display: grid;
    width: 1.55rem;
    height: 1.55rem;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 50%;
    text-decoration: none;
}

.variant-switcher a {
    transition: color 180ms ease, border-color 180ms ease;
}

.variant-switcher a:hover,
.variant-switcher a:focus-visible {
    border-color: rgba(230, 215, 179, 0.3);
    color: var(--paper);
    outline: none;
}

.variant-switcher span {
    border-color: rgba(207, 170, 103, 0.46);
    color: var(--brass);
}

.inquiry-link {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: rgba(241, 231, 204, 0.68);
    font-size: 0.55rem;
    letter-spacing: 0.14em;
    text-decoration: none;
    text-transform: uppercase;
}

.inquiry-link i {
    position: relative;
    display: block;
    width: 1.7rem;
    height: 1.7rem;
    border: 1px solid rgba(207, 170, 103, 0.28);
    border-radius: 50%;
    transition: transform 220ms ease, border-color 220ms ease;
}

.inquiry-link i::before,
.inquiry-link i::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--brass);
    transform: translate(-50%, -50%);
}

.inquiry-link i::before {
    width: 0.46rem;
    height: 1px;
}

.inquiry-link i::after {
    width: 1px;
    height: 0.46rem;
}

.inquiry-link:hover i,
.inquiry-link:focus-visible i {
    border-color: rgba(207, 170, 103, 0.74);
    transform: rotate(90deg);
}

.inquiry-link:focus-visible {
    outline: none;
}

.orrery-track {
    position: relative;
    z-index: 6;
    min-height: 600vh;
    pointer-events: none;
}

.orrery-intro {
    position: fixed;
    inset: 0;
    z-index: 8;
    opacity: var(--intro-opacity);
    transform: translate3d(0, var(--intro-y), 0);
    will-change: opacity, transform;
}

.intro-index {
    position: absolute;
    top: clamp(6.8rem, 14vh, 9.8rem);
    left: clamp(1.6rem, 6.2vw, 6.6rem);
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: rgba(230, 215, 179, 0.5);
    font-size: 0.52rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.intro-index span + span::before {
    content: '·';
    margin-right: 0.9rem;
    color: rgba(169, 84, 63, 0.9);
}

.intro-copy {
    position: absolute;
    top: clamp(10rem, 23vh, 15rem);
    left: clamp(1.6rem, 6.2vw, 6.6rem);
    width: min(60rem, 70vw);
}

.intro-kicker {
    margin-bottom: clamp(1rem, 2.1vh, 1.6rem);
    color: rgba(241, 231, 204, 0.64);
    font-size: clamp(0.54rem, 0.65vw, 0.64rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.intro-copy h1 {
    color: var(--paper);
    font-family: var(--font-display);
    font-size: clamp(4.6rem, 10.4vw, 10.8rem);
    font-weight: 400;
    letter-spacing: -0.065em;
    line-height: 0.7;
    text-shadow: 0 1px rgba(7, 28, 29, 0.48), 0 0 2.5rem rgba(214, 123, 88, 0.08);
}

.intro-copy h1 span {
    display: block;
    width: max-content;
}

.intro-copy h1 span:last-child {
    margin-left: 0.34em;
    color: transparent;
    font-size: 0.78em;
    font-style: italic;
    letter-spacing: -0.035em;
    -webkit-text-stroke: 1px rgba(230, 215, 179, 0.78);
}

.intro-deck {
    width: min(25rem, 65vw);
    margin-top: clamp(2.2rem, 4.5vh, 4rem);
    margin-left: clamp(2rem, 12vw, 10rem);
    color: rgba(230, 215, 179, 0.68);
    font-family: var(--font-display);
    font-size: clamp(0.92rem, 1.25vw, 1.2rem);
    font-style: italic;
    line-height: 1.5;
}

.sun-register {
    position: absolute;
    right: clamp(4rem, 10vw, 10rem);
    bottom: clamp(5.6rem, 13vh, 9rem);
    width: clamp(5.8rem, 9vw, 8rem);
    aspect-ratio: 1;
    opacity: var(--sun-opacity);
    transform: rotate(calc(var(--instrument-turn) * -0.28));
    will-change: opacity, transform;
}

.sun-register-axis,
.sun-register-ring,
.sun-register-dot {
    position: absolute;
    border-radius: 50%;
}

.sun-register-axis {
    inset: 50% -22%;
    height: 1px;
    border-radius: 0;
    background: rgba(230, 215, 179, 0.26);
}

.sun-register-ring {
    border: 1px solid rgba(230, 215, 179, 0.28);
}

.sun-register-ring-a {
    inset: 0;
}

.sun-register-ring-b {
    inset: 18%;
    border-style: dotted;
}

.sun-register-dot {
    top: 44%;
    left: 44%;
    width: 12%;
    aspect-ratio: 1;
    background: var(--oxide);
    box-shadow: 0 0 1rem rgba(214, 123, 88, 0.48);
}

.sun-register small {
    position: absolute;
    top: calc(100% + 0.8rem);
    left: 50%;
    width: 9rem;
    color: rgba(230, 215, 179, 0.48);
    font-size: 0.48rem;
    font-style: normal;
    letter-spacing: 0.1em;
    line-height: 1.55;
    text-align: center;
    text-transform: uppercase;
    transform: translateX(-50%);
}

.surface-crossing {
    position: fixed;
    top: var(--surface-y);
    left: 50%;
    z-index: 10;
    display: grid;
    grid-template-columns: auto min(20vw, 14rem) auto;
    align-items: center;
    gap: 0.8rem;
    color: rgba(230, 215, 179, 0.76);
    font-size: 0.49rem;
    letter-spacing: 0.14em;
    opacity: var(--surface-opacity);
    text-transform: uppercase;
    transform: translate(-50%, -50%);
    will-change: top, opacity;
}

.surface-crossing-rule {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(230, 215, 179, 0.58), transparent);
}

.depth-instrument {
    position: fixed;
    right: clamp(2rem, 5vw, 5.4rem);
    top: 50%;
    z-index: 12;
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2vw, 1.8rem);
    opacity: var(--instrument-opacity);
    transform: translate3d(0, calc(-50% + var(--instrument-y)), 0);
    will-change: opacity, transform;
}

.instrument-rose {
    position: relative;
    width: clamp(5.5rem, 8vw, 7.6rem);
    aspect-ratio: 1;
    border: 1px solid rgba(207, 170, 103, 0.28);
    border-radius: 50%;
    transform: rotate(var(--instrument-turn));
}

.instrument-rose::before,
.instrument-rose::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.instrument-rose::before {
    inset: 7%;
    border: 1px dotted rgba(230, 215, 179, 0.24);
}

.instrument-rose::after {
    inset: 45%;
    border: 1px solid rgba(214, 123, 88, 0.74);
    background: rgba(169, 84, 63, 0.3);
}

.rose-ring,
.rose-cross,
.rose-needle {
    position: absolute;
    top: 50%;
    left: 50%;
}

.rose-ring {
    border: 1px solid rgba(230, 215, 179, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.rose-ring-a {
    width: 58%;
    height: 58%;
}

.rose-ring-b {
    width: 30%;
    height: 30%;
}

.rose-cross {
    width: 112%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0 8%, rgba(230, 215, 179, 0.2) 8% 47%, transparent 47% 53%, rgba(230, 215, 179, 0.2) 53% 92%, transparent 92%);
    transform: translate(-50%, -50%);
}

.rose-cross-b {
    transform: translate(-50%, -50%) rotate(90deg);
}

.rose-needle {
    width: 32%;
    height: 1px;
    background: var(--coral);
    box-shadow: 0 0 0.5rem rgba(214, 123, 88, 0.42);
    transform: translate(0, -50%) rotate(-28deg);
    transform-origin: left center;
}

.instrument-readout {
    display: grid;
    min-width: 7.4rem;
    gap: 0.3rem;
}

.instrument-label,
.instrument-readout > span:last-child {
    color: rgba(230, 215, 179, 0.5);
    font-size: 0.47rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.instrument-readout strong {
    color: var(--paper);
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 2.2vw, 2.2rem);
    font-weight: 400;
    letter-spacing: -0.03em;
}

.instrument-readout > span:last-child {
    color: rgba(112, 150, 138, 0.92);
    letter-spacing: 0.08em;
}

.chart-legend {
    position: fixed;
    bottom: clamp(2.4rem, 5.2vh, 4.2rem);
    left: clamp(2rem, 5vw, 5.4rem);
    z-index: 12;
    display: grid;
    grid-template-columns: auto 4.6rem auto;
    align-items: center;
    gap: 0.7rem;
    color: rgba(230, 215, 179, 0.46);
    font-size: 0.46rem;
    letter-spacing: 0.13em;
    opacity: var(--chart-opacity);
    text-transform: uppercase;
    transform: translateY(var(--chart-shift));
    will-change: opacity, transform;
}

.chart-legend i {
    height: 5px;
    border-top: 1px solid rgba(207, 170, 103, 0.52);
    border-bottom: 1px dotted rgba(207, 170, 103, 0.34);
}

.project-finding {
    position: fixed;
    inset: 0;
    z-index: 14;
    display: grid;
    grid-template-columns: minmax(7rem, 0.42fr) minmax(20rem, 1fr) minmax(8rem, 0.48fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 6rem);
    padding: clamp(6rem, 12vh, 9rem) clamp(2rem, 8vw, 9rem);
    opacity: var(--project-opacity);
    pointer-events: none;
    transform: translate3d(0, var(--project-y), 0);
    will-change: opacity, transform;
}

.is-project-ready .project-finding {
    pointer-events: auto;
}

.finding-number {
    align-self: start;
    display: grid;
    gap: 0.55rem;
    margin-top: 12vh;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(207, 170, 103, 0.42);
    color: rgba(230, 215, 179, 0.52);
    text-transform: uppercase;
}

.finding-number span {
    font-size: 0.47rem;
    letter-spacing: 0.16em;
}

.finding-number strong {
    color: rgba(207, 170, 103, 0.68);
    font-family: var(--font-display);
    font-size: clamp(2.7rem, 5vw, 5.5rem);
    font-weight: 400;
    line-height: 0.9;
}

.finding-copy {
    max-width: 49rem;
    min-width: 0;
}

.finding-kicker {
    margin-bottom: 1.1rem;
    color: var(--coral);
    font-size: 0.53rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.finding-copy h2 {
    color: var(--paper);
    font-family: var(--font-display);
    font-size: clamp(4rem, 8.7vw, 9.1rem);
    font-weight: 400;
    letter-spacing: -0.065em;
    line-height: 0.69;
}

.finding-copy h2::first-line {
    font-style: italic;
}

.finding-description {
    width: min(31rem, 100%);
    margin: clamp(2rem, 4.5vh, 3.4rem) 0 0 clamp(1rem, 9vw, 8rem);
    color: rgba(230, 215, 179, 0.67);
    font-family: var(--font-display);
    font-size: clamp(0.95rem, 1.25vw, 1.18rem);
    line-height: 1.55;
    overflow-wrap: break-word;
}

.finding-open {
    display: flex;
    width: min(31rem, calc(100% - clamp(1rem, 9vw, 8rem)));
    align-items: center;
    justify-content: space-between;
    margin: 1.7rem 0 0 clamp(1rem, 9vw, 8rem);
    padding: 0.85rem 0;
    border-top: 1px solid rgba(207, 170, 103, 0.36);
    border-bottom: 1px solid rgba(207, 170, 103, 0.16);
    color: var(--paper);
    font-size: 0.52rem;
    letter-spacing: 0.16em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 180ms ease, padding 180ms ease;
}

.finding-open:hover,
.finding-open:focus-visible {
    color: var(--coral);
    outline: none;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.finding-seal {
    position: relative;
    justify-self: end;
    display: grid;
    width: clamp(7rem, 11vw, 10rem);
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid rgba(207, 170, 103, 0.34);
    border-radius: 50%;
    color: rgba(207, 170, 103, 0.72);
    transform: rotate(-8deg);
}

.finding-seal::before,
.finding-seal::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.finding-seal::before {
    inset: 7%;
    border: 1px dotted rgba(230, 215, 179, 0.28);
}

.finding-seal::after {
    inset: 18%;
    border: 1px solid rgba(169, 84, 63, 0.4);
}

.finding-seal > span {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 4vw, 4rem);
    font-style: italic;
}

.finding-seal small {
    position: absolute;
    top: calc(100% + 0.9rem);
    width: 8rem;
    color: rgba(230, 215, 179, 0.42);
    font-size: 0.43rem;
    letter-spacing: 0.11em;
    line-height: 1.6;
    text-align: center;
    text-transform: uppercase;
}

.scroll-sounding {
    position: fixed;
    right: clamp(1.7rem, 4vw, 4.2rem);
    bottom: clamp(1.7rem, 4vh, 3.6rem);
    z-index: 12;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: rgba(230, 215, 179, 0.56);
    font-size: 0.47rem;
    letter-spacing: 0.13em;
    opacity: var(--scroll-opacity);
    text-transform: uppercase;
}

.scroll-sounding i {
    position: relative;
    display: block;
    width: 4.8rem;
    height: 1px;
    background: rgba(230, 215, 179, 0.2);
}

.scroll-sounding b {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--scroll-fill);
    background: var(--brass);
}

.scroll-sounding small {
    color: rgba(207, 170, 103, 0.68);
    font-size: inherit;
}

.render-status {
    position: fixed;
    z-index: 40;
    left: 0.8rem;
    bottom: 0.8rem;
    display: none;
    max-width: calc(100vw - 1.6rem);
    padding: 0.45rem 0.6rem;
    border: 1px solid rgba(230, 215, 179, 0.22);
    background: rgba(7, 28, 29, 0.86);
    color: var(--paper);
    font-size: 0.62rem;
    line-height: 1.5;
}

.show-debug .render-status {
    display: block;
}

.noscript-note {
    position: fixed;
    z-index: 50;
    inset: auto 1rem 1rem;
    padding: 0.75rem;
    background: var(--night);
    color: var(--paper);
    font: 0.72rem/1.5 var(--font-data);
    text-align: center;
}

@media (max-width: 820px) {
    .orrery-header {
        grid-template-columns: 1fr auto;
    }

    .variant-switcher {
        display: none;
    }

    .studio-mark-study {
        display: none;
    }

    .intro-index {
        flex-wrap: wrap;
        width: 70vw;
        row-gap: 0.45rem;
    }

    .intro-copy {
        top: 24vh;
        width: calc(100vw - 3.2rem);
    }

    .intro-copy h1 {
        font-size: clamp(3.5rem, 17vw, 7.2rem);
        line-height: 0.76;
    }

    .intro-copy h1 span:last-child {
        margin-top: 0.06em;
        margin-left: 0.08em;
    }

    .intro-deck {
        width: min(19rem, 78vw);
        margin-left: 7vw;
    }

    .sun-register {
        right: 2rem;
        bottom: 5rem;
    }

    .surface-crossing {
        grid-template-columns: auto 14vw auto;
        width: calc(100vw - 3rem);
        justify-content: center;
    }

    .depth-instrument {
        right: 1.5rem;
        top: auto;
        bottom: 5.2rem;
        align-items: flex-end;
        transform: translate3d(0, var(--instrument-y), 0);
    }

    .instrument-rose {
        width: 4.6rem;
    }

    .instrument-readout {
        min-width: 6.4rem;
    }

    .chart-legend {
        bottom: 2rem;
        left: 1.5rem;
    }

    .scroll-sounding {
        right: 1.5rem;
        bottom: 1.6rem;
    }

    .project-finding {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 1.1rem;
        padding: 6rem 1.6rem 5rem;
    }

    .finding-number {
        align-self: auto;
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        width: 100%;
        margin: 0;
    }

    .finding-number strong {
        font-size: 2.5rem;
    }

    .finding-copy h2 {
        font-size: clamp(3.7rem, 18vw, 7rem);
    }

    .finding-description,
    .finding-open {
        width: calc(100% - 1rem);
        max-width: calc(100% - 1rem);
        margin-left: 1rem;
    }

    .finding-description {
        margin-top: 1.7rem;
        font-size: 0.96rem;
    }

    .finding-open {
        margin-top: 1.2rem;
    }

    .finding-seal {
        display: none;
    }
}

@media (max-width: 520px) {
    body.orrery-page::before {
        inset: 0.35rem;
    }

    .orrery-header {
        padding: 1.2rem 1.35rem;
    }

    .inquiry-link > span {
        display: none;
    }

    .intro-index {
        top: 6rem;
        left: 1.45rem;
        width: 86vw;
    }

    .intro-copy {
        top: 23vh;
        left: 1.45rem;
    }

    .intro-kicker {
        max-width: 16rem;
        line-height: 1.55;
    }

    .intro-copy h1 {
        font-size: clamp(3.4rem, 19vw, 5.7rem);
    }

    .intro-deck {
        margin-top: 2.1rem;
        margin-left: 1.1rem;
    }

    .sun-register {
        width: 4.6rem;
        right: 2.2rem;
        bottom: 4.8rem;
    }

    .sun-register small {
        display: none;
    }

    .surface-crossing-name,
    .surface-crossing-value {
        font-size: 0.43rem;
    }

    .depth-instrument {
        right: 1.35rem;
        bottom: 4.5rem;
    }

    .instrument-rose {
        width: 3.9rem;
    }

    .instrument-readout strong {
        font-size: 1.45rem;
    }

    .chart-legend {
        display: none;
    }

    .scroll-sounding > span,
    .scroll-sounding small {
        display: none;
    }

    .scroll-sounding i {
        width: 4rem;
    }

    .project-finding {
        padding: 5.5rem 1.45rem 4.4rem;
    }

    .finding-copy h2 {
        font-size: clamp(3.4rem, 20vw, 5.8rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
