:root {
    --ink: #100d0d;
    --paper: #e8dfd5;
    --orange: #ff8b5e;
    --ember: #e54831;
    --line: rgba(255,231,209,.18);
    --muted: #b4a39a;
    --max: 1240px
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: var(--ink);
    color: var(--paper);
    font-family: "Noto Sans SC","Manrope",sans-serif;
    overflow-x: hidden
}

.grain {
    position: fixed;
    z-index: 10;
    inset: 0;
    opacity: .055;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")
}

.r-nav {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 50%;
    width: min(calc(100% - 64px),var(--max));
    height: 86px;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    border-bottom: 1px solid var(--line)
}

.r-brand {
    color: var(--paper);
    text-decoration: none;
    font: 800 18px/1 "Manrope",sans-serif;
    letter-spacing: -.07em
}

.r-brand span {
    color: var(--orange)
}

.r-nav p {
    margin: 0;
    color: #d6bcb0;
    font: 11px/1 "DM Mono",monospace;
    letter-spacing: .11em
}

.r-back {
    justify-self: end;
    display: flex;
    gap: 8px;
    color: #eee0d8;
    font: 12px/1 "Noto Sans SC",sans-serif;
    text-decoration: none
}

.r-back i {
    font-size: 16px
}

.r-hero {
    min-height: 100svh;
    position: relative;
    display: flex;
    align-items: end;
    isolation: isolate;
    overflow: hidden
}

.r-hero-image,.r-closing-image {
    position: absolute;
    z-index: -2;
    inset: 0;
    background: center/cover no-repeat url("assets/reactor/containment-network.png");
    filter: saturate(.82) contrast(1.1)
}

.r-hero-vignette {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(90deg,rgba(7,4,4,.95) 0%,rgba(11,6,5,.71) 41%,rgba(20,7,5,.15) 80%),linear-gradient(0deg,rgba(9,5,4,.96) 0%,transparent 46%)
}

.r-hero-content {
    width: min(calc(100% - 64px),var(--max));
    margin: 0 auto;
    padding: 0 0 103px
}

.r-kicker,.r-section-label {
    margin: 0;
    color: #ffa982;
    font: 500 11px/1.4 "DM Mono",monospace;
    letter-spacing: .13em
}

.r-hero h1 {
    margin: 23px 0;
    font: 800 clamp(58px,10vw,142px)/.77 "Manrope",sans-serif;
    letter-spacing: -.1em
}

.r-hero h1 span {
    color: transparent;
    -webkit-text-stroke: 1px #f5d2c4
}

.r-deck {
    width: min(100%,480px);
    margin: 0;
    color: #dcc4ba;
    font-size: 16px;
    line-height: 1.9
}

.r-hero-data {
    position: absolute;
    right: max(32px,calc((100vw - var(--max))/2));
    bottom: 112px;
    width: 210px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    color: #c8aba0;
    font: 10px/1.2 "DM Mono",monospace;
    letter-spacing: .11em
}

.r-hero-data strong {
    margin-bottom: 13px;
    color: var(--paper);
    font: 500 12px/1.4 "DM Mono",monospace
}

.r-scroll {
    position: absolute;
    left: max(32px,calc((100vw - var(--max))/2));
    bottom: 35px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e5d2ca;
    text-decoration: none;
    font-size: 12px
}

.r-scroll i {
    font-size: 18px
}

.r-wrap {
    width: min(calc(100% - 64px),var(--max));
    margin: auto
}

.r-brief {
    padding: 142px 0 150px
}

.r-section-label {
    display: flex;
    gap: 15px;
    color: #a38c83;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(255,221,204,.17)
}

.r-section-label span {
    color: var(--orange)
}

.r-brief-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 10%;
    padding-top: 74px
}

.r-brief h2,.r-loop h2,.r-facility h2,.r-closing h2 {
    margin: 0;
    font: 700 clamp(39px,5.3vw,73px)/1.07 "Manrope","Noto Sans SC",sans-serif;
    letter-spacing: -.07em
}

.r-brief h2 span,.r-loop h2 span,.r-closing h2 span {
    color: var(--orange)
}

.r-copy {
    padding-top: 9px;
    color: #c7b7b0;
    font-size: 15px;
    line-height: 2
}

.r-copy p {
    margin: 0 0 27px
}

.r-copy .r-lead {
    color: #f1ddd3;
    font-size: 17px;
    font-weight: 500
}

.r-loop {
    position: relative;
    padding: 132px 0 121px;
    background: linear-gradient(125deg,#261613,#110c0b 57%,#1d100e);
    overflow: hidden
}

.r-loop:before {
    content: "";
    position: absolute;
    width: 66vw;
    height: 66vw;
    left: -35vw;
    bottom: -50vw;
    border: 1px solid rgba(255,135,93,.13);
    border-radius: 50%;
    box-shadow: 0 0 120px rgba(164,47,22,.12) inset
}

.r-loop .r-wrap {
    position: relative
}

.r-loop-heading {
    display: flex;
    justify-content: space-between;
    gap: 50px;
    padding: 62px 0 70px
}

.r-loop-heading p {
    width: 330px;
    margin: 15px 0 0;
    color: #c5aaa0;
    font-size: 14px;
    line-height: 1.9
}

.r-system-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    border: 1px solid var(--line)
}

.r-system {
    min-height: 295px;
    position: relative;
    padding: 25px;
    border-right: 1px solid var(--line);
    transition: background .3s ease,transform .3s ease
}

.r-system:last-child {
    border: 0
}

.r-system:hover {
    background: rgba(255,132,81,.08);
    transform: translateY(-6px)
}

.r-system>span {
    color: #bb9281;
    font: 10px/1 "DM Mono",monospace;
    letter-spacing: .08em
}

.r-system i {
    display: block;
    margin-top: 50px;
    color: #ff9b70;
    font-size: 29px
}

.r-system h3 {
    margin: 29px 0 9px;
    font-size: 18px;
    letter-spacing: -.04em
}

.r-system p {
    margin: 0;
    color: #c2aaa1;
    font-size: 13px;
    line-height: 1.8
}

.r-disclaimer {
    margin: 18px 0 0;
    color: #9a7e73;
    font-size: 11px
}

.r-facility {
    padding: 145px 0
}

.r-facility-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 40px;
    padding: 63px 0
}

.r-facility-heading p {
    max-width: 340px;
    margin: 0;
    color: #bcaaa1;
    font-size: 14px;
    line-height: 1.9
}

.r-gallery {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    grid-template-rows: 420px 315px;
    gap: 14px
}

.r-shot {
    position: relative;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    background: #241611
}

.r-shot-wide {
    grid-row: span 2
}

.r-shot-tall {
    grid-row: span 1
}

.r-shot img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    filter: brightness(.76) saturate(.82);
    transition: transform .7s cubic-bezier(.2,.8,.2,1),filter .5s ease
}

.r-shot:hover img {
    transform: scale(1.045);
    filter: brightness(.93) saturate(.98)
}

.r-shot figcaption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 23px 24px 19px;
    background: linear-gradient(transparent,rgba(9,5,4,.9));
    display: grid;
    gap: 7px
}

.r-shot figcaption span {
    color: #f6b092;
    font: 10px/1.3 "DM Mono",monospace;
    letter-spacing: .09em
}

.r-shot figcaption strong {
    font-size: 17px;
    letter-spacing: -.04em
}

.r-closing {
    min-height: 580px;
    position: relative;
    display: flex;
    align-items: center;
    isolation: isolate;
    overflow: hidden
}

.r-closing-image {
    background-image: url("assets/reactor/chamber-airlock.png");
    background-position: center;
    filter: brightness(.58) saturate(.9)
}

.r-closing:after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(90deg,rgba(14,7,5,.93),rgba(14,7,5,.45),rgba(14,7,5,.1))
}

.r-closing-content {
    width: min(calc(100% - 64px),var(--max));
    margin: auto
}

.r-closing h2 {
    margin-top: 20px
}

.r-home-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 38px;
    padding: 13px 0;
    color: #ffe3d6;
    border-bottom: 1px solid var(--orange);
    font-size: 14px;
    text-decoration: none
}

.r-home-link i {
    font-size: 18px
}

.r-footer {
    width: min(calc(100% - 64px),var(--max));
    margin: auto;
    display: flex;
    justify-content: space-between;
    padding: 30px 0;
    color: #9d857b;
    border-top: 1px solid var(--line);
    font: 10px/1.4 "DM Mono",monospace;
    letter-spacing: .08em
}

.r-top {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 3;
    width: 45px;
    height: 45px;
    border: 0;
    border-radius: 50%;
    background: #f5c0aa;
    color: #25100a;
    font-size: 19px;
    opacity: 0;
    cursor: pointer;
    pointer-events: none;
    transform: translateY(13px);
    transition: opacity .25s ease,transform .25s ease
}

.r-top.visible {
    opacity: 1;
    transform: none;
    pointer-events: auto
}

.reveal {
    opacity: 0;
    transform: translateY(23px);
    transition: opacity .7s cubic-bezier(.2,.7,.2,1),transform .7s cubic-bezier(.2,.7,.2,1)
}

.reveal.is-visible {
    opacity: 1;
    transform: none
}

.load {
    opacity: 0;
    transform: translateY(18px);
    animation: r-load .8s cubic-bezier(.2,.8,.2,1) forwards
}

.r-hero-content .load:nth-child(1) {
    animation-delay: .15s
}

.r-hero-content .load:nth-child(2) {
    animation-delay: .25s
}

.r-hero-content .load:nth-child(3) {
    animation-delay: .39s
}

.r-hero-data.load {
    animation-delay: .42s
}

.r-scroll.load {
    animation-delay: .55s
}

@keyframes r-load {
    to {
        opacity: 1;
        transform: none
    }
}

@media(max-width: 760px) {
    .r-nav {
        width:calc(100% - 40px);
        height: 68px;
        grid-template-columns: 1fr auto
    }

    .r-nav p {
        display: none
    }

    .r-back {
        font-size: 11px
    }

    .r-wrap {
        width: calc(100% - 40px)
    }

    .r-hero-content {
        width: calc(100% - 40px);
        padding-bottom: 153px
    }

    .r-hero h1 {
        font-size: clamp(55px,17vw,88px)
    }

    .r-hero-data {
        right: 20px;
        bottom: 91px;
        width: 165px
    }

    .r-scroll {
        left: 20px
    }

    .r-brief {
        padding: 95px 0
    }

    .r-brief-grid,.r-loop-heading {
        grid-template-columns: 1fr;
        display: grid;
        padding-top: 48px;
        gap: 30px
    }

    .r-loop {
        padding: 94px 0
    }

    .r-loop-heading {
        padding-bottom: 48px
    }

    .r-loop-heading p {
        width: auto;
        margin: 0
    }

    .r-system-grid {
        grid-template-columns: 1fr 1fr
    }

    .r-system {
        min-height: 225px;
        padding: 20px;
        border-bottom: 1px solid var(--line)
    }

    .r-system:nth-child(2) {
        border-right: 0
    }

    .r-system i {
        margin-top: 35px
    }

    .r-system h3 {
        margin-top: 20px
    }

    .r-system p {
        font-size: 12px
    }

    .r-facility {
        padding: 95px 0
    }

    .r-facility-heading {
        display: block;
        padding: 47px 0
    }

    .r-facility-heading p {
        margin-top: 22px
    }

    .r-gallery {
        grid-template-columns: 1fr;
        grid-template-rows: 300px 270px 240px 240px
    }

    .r-shot-wide,.r-shot-tall {
        grid-row: auto
    }

    .r-closing {
        min-height: 460px
    }

    .r-closing-content {
        width: calc(100% - 40px)
    }

    .r-footer {
        width: calc(100% - 40px);
        gap: 12px;
        flex-direction: column
    }

    .r-disclaimer {
        font-size: 10px
    }
}

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

    .load,.reveal {
        opacity: 1;
        transform: none;
        animation: none;
        transition: none
    }

    .r-system,.r-shot img,.r-top {
        transition: none
    }
}
