:root {
    --ink: #f3e8d8;
    --deep: #160b08;
    --deep-2: #24110c;
    --ember: #d83b22;
    --gold: #e99b51;
    --mist: #c4e0db;
    --line: rgba(243, 232, 216, .2);
    --muted: rgba(243, 232, 216, .64);
}

* { box-sizing: border-box; }
html { background: var(--deep); scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
    margin: 0;
    overflow-x: hidden;
    overflow-x: clip;
    color: var(--ink);
    background: var(--deep);
    font-family: 'Google Sans Flex', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip-link {
    position: fixed;
    top: max(8px, env(safe-area-inset-top));
    left: max(8px, calc(env(safe-area-inset-left) + 8px));
    z-index: 100;
    padding: 10px 14px;
    color: var(--deep);
    background: var(--ink);
    transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.nirva-nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 58px;
    padding: 0 clamp(16px, 3.2vw, 52px);
    padding-left: max(clamp(16px, 3.2vw, 52px), calc(env(safe-area-inset-left) + 12px));
    padding-right: max(clamp(16px, 3.2vw, 52px), calc(env(safe-area-inset-right) + 12px));
    border-bottom: 1px solid var(--line);
    background: rgba(22, 11, 8, .76);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.nirva-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.nirva-nav a:first-child { justify-self: start; }
.nirva-nav a:last-child { justify-self: end; }
.nirva-nav a:hover, .nirva-nav a:focus-visible { color: var(--gold); }
.nirva-nav__mark { justify-self: center; }

.flow-progress {
    --page-progress: 0%;
    position: fixed;
    top: 76px;
    right: 10px;
    bottom: 24px;
    z-index: 45;
    width: 1px;
    background: rgba(196, 224, 219, .18);
    pointer-events: none;
}
.flow-progress::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: var(--page-progress);
    background: linear-gradient(to bottom, var(--gold), var(--mist));
}
.flow-progress span {
    position: absolute;
    top: var(--page-progress);
    left: 50%;
    width: 7px;
    height: 11px;
    border-radius: 55% 55% 65% 65%;
    background: var(--mist);
    box-shadow: 0 0 14px rgba(196, 224, 219, .7);
    transform: translate(-50%, -50%);
}

.section-pad { padding-inline: clamp(18px, 7vw, 112px); }
.section-index {
    margin: 0;
    color: var(--gold);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.eyebrow {
    margin: 0;
    color: var(--gold);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.nirva-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
    grid-template-rows: 1fr auto;
    gap: 30px clamp(30px, 7vw, 118px);
    padding: clamp(100px, 13vh, 150px) clamp(18px, 5vw, 80px) clamp(28px, 5vw, 70px);
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(circle at 72% 36%, rgba(216, 59, 34, .26), transparent 32%),
        linear-gradient(135deg, #160b08 0%, #1f0e0a 58%, #090605 100%);
}
.nirva-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .28;
    background-image: linear-gradient(rgba(243, 232, 216, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(243, 232, 216, .07) 1px, transparent 1px);
    background-size: 9vw 9vw;
    -webkit-mask-image: linear-gradient(to bottom, black, transparent 72%);
    mask-image: linear-gradient(to bottom, black, transparent 72%);
}
.nirva-hero__glow {
    position: absolute;
    top: 14%;
    right: 8%;
    z-index: -1;
    width: min(48vw, 720px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(233, 155, 81, .16);
    filter: blur(70px);
    animation: ambient-breathe 5.8s ease-in-out infinite;
}
@keyframes ambient-breathe { 50% { opacity: .58; transform: scale(1.08); } }
.nirva-hero__copy {
    position: relative;
    z-index: 2;
    align-self: center;
}
.nirva-hero h1 {
    margin: clamp(22px, 4vh, 48px) 0 36px;
    font-size: clamp(72px, 11.2vw, 180px);
    font-variation-settings: "opsz" 144, "wdth" 118, "wght" 680;
    font-weight: 680;
    line-height: .66;
    letter-spacing: -.075em;
    text-transform: uppercase;
}
.nirva-hero h1 span { display: block; }
.nirva-hero h1 span:last-child { margin-left: .42em; color: var(--ember); }
.nirva-hero__line {
    margin: 0 0 0 9vw;
    color: rgba(243, 232, 216, .82);
    font-size: clamp(20px, 2.2vw, 34px);
    font-variation-settings: "wdth" 104, "wght" 430;
    line-height: 1.05;
    letter-spacing: -.025em;
}
.nirva-hero__prototype {
    position: relative;
    z-index: 1;
    align-self: stretch;
    margin: 0;
    min-height: 66vh;
    isolation: isolate;
}
.nirva-hero__prototype::before,
.nirva-hero__prototype::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(233, 155, 81, .5) 14%, rgba(233, 155, 81, .5) 86%, transparent);
    animation: canopy-echo 5.8s ease-in-out infinite;
}
.nirva-hero__prototype::before { top: -10px; right: 8%; left: 8%; box-shadow: 0 12px 0 rgba(233, 155, 81, .24); }
.nirva-hero__prototype::after { top: -23px; right: 18%; left: 18%; animation-delay: -2.9s; }
@keyframes canopy-echo { 50% { opacity: .32; transform: translateY(-4px); } }
.nirva-hero__image-wrap {
    position: relative;
    z-index: 1;
    height: 100%;
    min-height: 66vh;
    overflow: hidden;
    border: 1px solid rgba(243, 232, 216, .3);
    border-radius: 4px;
    background: #050303;
    box-shadow: 0 0 90px rgba(216, 59, 34, .15);
}
.nirva-hero__image-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.nirva-hero__prototype figcaption {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 10px;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.nirva-hero__meta {
    display: flex;
    align-items: center;
    gap: clamp(18px, 3vw, 46px);
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.nirva-hero__scroll {
    align-self: end;
    justify-self: end;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .11em;
    text-decoration: none;
    text-transform: uppercase;
}

.project-story { padding-top: clamp(80px, 10vw, 150px); padding-bottom: clamp(80px, 10vw, 150px); }
.project-story__statement {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    gap: clamp(44px, 9vw, 150px);
    margin-top: clamp(34px, 6vw, 82px);
}
.project-story h2, .flow-system h2, .prototype-story h2, .technical h2 {
    margin: 0;
    font-size: clamp(44px, 6.7vw, 104px);
    font-variation-settings: "opsz" 96, "wdth" 108, "wght" 620;
    font-weight: 620;
    line-height: .88;
    letter-spacing: -.055em;
    text-transform: uppercase;
}
.project-story h2 em { color: var(--gold); font-style: normal; }
.project-story__body { align-self: end; }
.project-story__body p, .technical__head > div > p {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: clamp(17px, 1.45vw, 22px);
    line-height: 1.5;
}
.arrival-sequence {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin: clamp(64px, 9vw, 140px) 0 0;
    padding: 0;
    border: 1px solid var(--line);
    background: var(--line);
    list-style: none;
}
.arrival-sequence li {
    min-height: 190px;
    padding: clamp(20px, 3vw, 42px);
    background: var(--deep);
    transition: background .35s ease, opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1);
}
.arrival-sequence li:nth-child(2) { transition-delay: .08s; }
.arrival-sequence li:nth-child(3) { transition-delay: .16s; }
.arrival-sequence li:hover { background: linear-gradient(145deg, rgba(216, 59, 34, .2), var(--deep) 68%); }
.arrival-sequence span {
    display: block;
    margin-bottom: clamp(44px, 6vw, 82px);
    color: var(--gold);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.arrival-sequence strong { display: block; font-size: clamp(26px, 3vw, 46px); font-weight: 550; letter-spacing: -.035em; }
.arrival-sequence p { max-width: 25ch; margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }

.flow-system { padding-block: clamp(80px, 10vw, 150px); color: #141818; background: var(--mist); }
.flow-system .section-index { color: #496762; }
.flow-system__intro { display: grid; grid-template-columns: .5fr 1.5fr; gap: clamp(32px, 7vw, 110px); }
.flow-system__intro > div { display: grid; grid-template-columns: 1fr .72fr; gap: clamp(40px, 8vw, 130px); }
.flow-system__intro h2 { font-size: clamp(44px, 5.4vw, 88px); }
.flow-system__intro p:last-child { align-self: end; margin: 0; color: rgba(20, 24, 24, .64); font-size: clamp(17px, 1.45vw, 22px); line-height: 1.5; }
.flow-stage {
    display: grid;
    grid-template-columns: minmax(300px, 1.25fr) minmax(280px, .75fr);
    gap: clamp(48px, 9vw, 150px);
    align-items: center;
    margin-top: clamp(70px, 10vw, 150px);
}
.flow-stage__visual { position: relative; height: min(76vw, 860px); overflow: hidden; background: transparent; }
.flow-stage__visual img { width: 100%; height: 100%; object-fit: contain; }
.flow-stage__drop { position: absolute; top: 47%; left: 50%; bottom: 15%; width: 2px; background: linear-gradient(to bottom, rgba(87, 145, 157, 0), #4b8c99 16%, #4b8c99 84%, transparent); }
.flow-stage__drop i { position: absolute; top: 0; left: -3px; width: 7px; height: 14px; border-radius: 50% 50% 65% 65%; background: #75adb5; animation: water-drop 2.4s linear infinite; }
.flow-stage__drop i:nth-child(2) { animation-delay: -.8s; }
.flow-stage__drop i:nth-child(3) { animation-delay: -1.6s; }
.flow-stage__drop::before,
.flow-stage__drop::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 18px;
    height: 6px;
    border: 1px solid rgba(75, 140, 153, .75);
    border-radius: 50%;
    transform: translateX(-50%);
    animation: water-ripple 2.4s ease-out infinite;
}
.flow-stage__drop::after { animation-delay: -1.2s; }
@keyframes water-drop { from { transform: translateY(0) scale(.5); opacity: 0; } 15% { opacity: .9; } 90% { opacity: .8; } to { transform: translateY(32vh) scale(1); opacity: 0; } }
@keyframes water-drop-contained { from { top: 0; transform: scale(.5); opacity: 0; } 15% { opacity: .9; } 90% { opacity: .8; } to { top: calc(100% - 14px); transform: scale(1); opacity: 0; } }
@keyframes water-ripple { from { opacity: .8; transform: translateX(-50%) scale(.3); } to { opacity: 0; transform: translateX(-50%) scale(4.2); } }
.flow-route { margin: 0; padding: 0; border-top: 1px solid rgba(20, 24, 24, .3); list-style: none; }
.flow-route li { display: grid; grid-template-columns: 46px 1fr; gap: 18px; padding: 24px 0; border-bottom: 1px solid rgba(20, 24, 24, .22); }
.flow-route span { padding-top: 4px; color: #496762; font-size: 10px; letter-spacing: .12em; }
.flow-route strong { display: block; font-size: clamp(22px, 2vw, 32px); font-weight: 580; letter-spacing: -.03em; }
.flow-route p { margin: 7px 0 0; color: rgba(20, 24, 24, .6); font-size: 14px; line-height: 1.4; }

.prototype-story { display: grid; grid-template-columns: 1.08fr .92fr; min-height: 88vh; min-height: 88svh; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.prototype-story__image { min-height: 88vh; min-height: 88svh; overflow: hidden; background: #050303; }
.prototype-story__image img { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
.prototype-story__copy { display: flex; flex-direction: column; justify-content: center; padding-block: 90px; background: #1d0e0a; }
.prototype-story__copy h2 { margin: clamp(30px, 5vw, 64px) 0 34px; }
.prototype-story__copy > p:not(.section-index) { max-width: 38ch; margin: 0; color: var(--muted); font-size: clamp(17px, 1.5vw, 22px); line-height: 1.5; }
.prototype-story__copy > .prototype-story__inspiration { margin-top: 16px; font-size: clamp(14px, 1.15vw, 17px); }
.layer-mark { width: min(100%, 360px); margin: clamp(34px, 5vw, 62px) 0 0; }
.layer-mark i { display: block; height: 12px; margin: -1px auto 0; border-bottom: 1px solid rgba(233, 155, 81, .72); border-radius: 0 0 50% 50%; }
.layer-mark i:nth-child(1) { width: 38%; }
.layer-mark i:nth-child(2) { width: 48%; }
.layer-mark i:nth-child(3) { width: 58%; }
.layer-mark i:nth-child(4) { width: 68%; }
.layer-mark i:nth-child(5) { width: 78%; }
.prototype-facts { margin: clamp(34px, 5vw, 62px) 0 0; border-top: 1px solid var(--line); }
.prototype-facts div { display: grid; grid-template-columns: 105px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.prototype-facts dt { color: var(--gold); font-size: 9px; letter-spacing: .11em; text-transform: uppercase; }
.prototype-facts dd { margin: 0; font-size: 13px; }

.technical { padding-top: clamp(80px, 10vw, 150px); padding-bottom: clamp(80px, 10vw, 150px); }
.technical__head { display: grid; grid-template-columns: .5fr 1.5fr; gap: clamp(32px, 7vw, 110px); }
.technical__head > div { display: grid; grid-template-columns: 1fr .65fr; gap: clamp(40px, 8vw, 130px); }
.technical__head > div > p { align-self: end; }
.technical__drawing { margin: clamp(56px, 8vw, 105px) auto 0; max-width: 980px; }
.drawing-viewport { aspect-ratio: 1853 / 2200; overflow: hidden; background: #fff; }
.drawing-viewport img { width: 100%; height: auto; }
.technical__drawing figcaption { display: flex; justify-content: space-between; padding-top: 12px; color: var(--muted); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.technical__specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: clamp(56px, 8vw, 105px); border: 1px solid var(--line); background: var(--line); }
.spec { min-height: 190px; display: flex; flex-direction: column; padding: clamp(20px, 2.4vw, 32px); background: var(--deep); }
.spec span { color: var(--gold); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.spec strong { margin-top: auto; font-size: clamp(21px, 2.2vw, 34px); font-weight: 550; line-height: 1.05; letter-spacing: -.03em; }
.spec small { margin-top: 10px; color: var(--muted); font-size: 12px; }

.nirva-closing { position: relative; min-height: 68vh; min-height: 68svh; display: grid; align-items: end; overflow: hidden; background: #050303; }
.nirva-closing__image { position: absolute; inset: 0; background: linear-gradient(to top, rgba(5, 3, 3, .94), rgba(5, 3, 3, .12) 65%), url('../assets/projects/nirva-flow/prototype.png') center 38% / cover; filter: saturate(.75); }
.nirva-closing__copy { position: relative; z-index: 2; padding: clamp(30px, 7vw, 110px); }
.nirva-closing__copy p { margin: 0 0 30px; font-size: clamp(52px, 8.7vw, 138px); font-variation-settings: "opsz" 144, "wdth" 112, "wght" 630; font-weight: 630; line-height: .78; letter-spacing: -.06em; text-transform: uppercase; }
.nirva-closing__copy span { color: var(--muted); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.next-project { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 20px; min-height: 48vh; min-height: 48svh; padding: clamp(40px, 7vw, 110px); color: #19120f; background: #e7ddd0; text-decoration: none; }
.next-project span { font-size: 10px; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; }
.next-project strong { grid-column: 1 / -1; font-size: clamp(72px, 13vw, 190px); font-variation-settings: "opsz" 144, "wdth" 118, "wght" 680; font-weight: 680; line-height: .72; letter-spacing: -.07em; text-transform: uppercase; }
.next-project i { position: absolute; right: clamp(40px, 7vw, 110px); bottom: clamp(40px, 7vw, 110px); font-size: clamp(34px, 5vw, 74px); font-style: normal; }
.next-project:hover strong { color: #a03624; }

.reveal { opacity: 1; transform: none; transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal-enabled .reveal:not(.is-visible) { opacity: 0; transform: translateY(34px); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
    .nirva-hero { grid-template-columns: 1fr 1fr; gap: 24px; }
    .nirva-hero h1 { font-size: clamp(68px, 13vw, 120px); }
    .project-story__statement { grid-template-columns: 1fr; }
    .project-story__body { max-width: 42rem; }
    .flow-system__intro, .technical__head { grid-template-columns: 1fr; }
    .flow-system__intro > div, .technical__head > div { grid-template-columns: 1fr; }
    .flow-system__intro p:last-child, .technical__head > div > p { max-width: 42rem; }
    .prototype-story { grid-template-columns: 1fr 1fr; }
    .technical__specs { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px), (max-height: 500px) and (pointer: coarse) {
    .nirva-nav { grid-template-columns: 1fr 1fr; height: 52px; padding-inline: 14px; padding-left: max(14px, calc(env(safe-area-inset-left) + 10px)); padding-right: max(14px, calc(env(safe-area-inset-right) + 10px)); }
    .nirva-nav__mark { display: none; }
    .nirva-hero { min-height: auto; grid-template-columns: 1fr; grid-template-rows: auto auto auto; padding: 92px 14px 28px; }
    .nirva-hero__copy { align-self: start; }
    .nirva-hero h1 { margin-block: 24px; font-size: clamp(70px, 23vw, 112px); }
    .nirva-hero__line { margin-left: 22vw; font-size: 20px; }
    .nirva-hero__prototype { min-height: 66vh; min-height: 66svh; }
    .nirva-hero__image-wrap { min-height: 66vh; min-height: 66svh; border-radius: 3px; }
    .nirva-hero__meta { grid-row: 3; flex-wrap: wrap; gap: 12px 20px; }
    .nirva-hero__scroll { display: none; }
    .project-story h2, .flow-system h2, .prototype-story h2, .technical h2 { min-width: 0; font-size: clamp(40px, 12vw, 68px); }
    .arrival-sequence, .technical__specs { grid-template-columns: 1fr; }
    .arrival-sequence li { min-height: 170px; }
    .arrival-sequence span { margin-bottom: 42px; }
    .flow-stage { grid-template-columns: 1fr; }
    .flow-stage__visual { height: 125vw; }
    .flow-stage__drop { bottom: 17%; }
    .flow-stage__drop i { animation-name: water-drop-contained; }
    .prototype-story { grid-template-columns: 1fr; }
    .prototype-story__image { min-height: 76vh; min-height: 76svh; }
    .prototype-story__copy { padding-block: 76px; }
    .technical__drawing { width: calc(100% + 18px); margin-left: -9px; }
    .technical__drawing figcaption { padding-inline: 9px; }
    .spec { min-height: 190px; }
    .nirva-closing { min-height: 64vh; min-height: 64svh; }
    .nirva-closing__copy { min-width: 0; }
    .nirva-closing__copy p { font-size: 13vw; }
    .next-project { min-height: 46vh; min-height: 46svh; }
    .flow-progress { display: none; }
}

.is-static-motion {
    scroll-behavior: auto;
}

.is-static-motion *,
.is-static-motion *::before,
.is-static-motion *::after {
    animation-delay: 0s !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-delay: 0s !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
}

html.is-static-motion .nirva-nav {
    background: rgba(22, 11, 8, .95);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

@media (pointer: coarse), (prefers-reduced-motion: reduce) {
    .nirva-nav {
        background: rgba(22, 11, 8, .95);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
    .reveal { opacity: 1; transform: none; }
}
