:root {
    --preview-ink: #221b14;
    --preview-ivory: #f4ead5;
    --preview-paper: #d8c8aa;
    --preview-paper-deep: #bdab8a;
    --preview-gold: #c8943e;
    --preview-gold-light: #edc66f;
    --preview-red: #6c2424;
    --preview-brown: #3a2b20;
    --preview-smoke: #111715;
}

.preview-page {
    background: var(--preview-paper);
    color: var(--preview-ink);
}

.preview-page main {
    overflow: clip;
}

.preview-progress {
    position: fixed;
    inset: 0 0 auto;
    z-index: 2600;
    height: 3px;
    background: rgba(30, 21, 13, .22);
}

.preview-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--preview-red), var(--preview-gold-light));
}

.preview-header {
    position: fixed;
    inset: 3px 0 auto;
    z-index: 2400;
    display: flex;
    min-height: 76px;
    padding: 0 clamp(22px, 4vw, 70px);
    border-bottom: 1px solid rgba(225, 193, 129, .38);
    align-items: center;
    gap: 24px;
    background: linear-gradient(180deg, rgba(27, 29, 26, .9), rgba(21, 24, 22, .78));
    backdrop-filter: blur(12px);
}

.preview-brand {
    display: block;
    width: 176px;
    height: 58px;
    flex: 0 0 auto;
}

.preview-brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.preview-menu {
    display: flex;
    margin-left: auto;
    align-items: center;
    gap: 4px;
}

.preview-menu a {
    position: relative;
    display: inline-flex;
    min-height: 42px;
    padding: 0 11px;
    align-items: center;
    color: #eadfc9;
    font-family: var(--serif);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .055em;
    text-decoration: none;
    text-transform: uppercase;
}

.preview-menu a::after {
    position: absolute;
    right: 11px;
    bottom: 5px;
    left: 11px;
    height: 1px;
    background: var(--preview-gold-light);
    content: "";
    opacity: 0;
    transform: scaleX(.4);
    transition: opacity 160ms ease, transform 160ms ease;
}

.preview-menu a:hover,
.preview-menu a.is-active {
    color: #ffe5a9;
}

.preview-menu a:hover::after,
.preview-menu a.is-active::after {
    opacity: 1;
    transform: scaleX(1);
}

.preview-menu .preview-menu-play {
    min-height: 44px;
    margin-left: 7px;
    padding-inline: 17px;
    border: 1px solid rgba(233, 190, 96, .72);
    background: rgba(93, 56, 24, .44);
    color: #ffe2a1;
}

.preview-menu .preview-menu-play::after {
    display: none;
}

.language-switcher-preview {
    flex: 0 0 auto;
}

.language-switcher-preview summary {
    min-height: 42px;
    border-color: rgba(229, 190, 109, .46);
    background: rgba(16, 18, 17, .52);
    color: #f0e3c9;
}

.language-switcher-preview .language-menu {
    top: calc(100% + 16px);
}

.preview-menu-toggle {
    position: relative;
    display: none;
    width: 44px;
    height: 42px;
    padding: 10px;
    border: 1px solid rgba(232, 190, 99, .56);
    background: rgba(20, 22, 20, .58);
}

.preview-menu-toggle span {
    display: block;
    height: 1px;
    margin: 5px 0;
    background: #f1cf85;
}

.preview-menu-toggle b {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.preview-shell {
    width: min(1220px, calc(100% - 60px));
    margin-inline: auto;
}

.preview-eyebrow {
    margin: 0 0 18px;
    color: var(--preview-gold-light);
    font-family: var(--serif);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.preview-heading h2,
.preview-story-copy h2,
.preview-final-copy h2 {
    margin: 0;
    color: var(--preview-ivory);
    font: 700 clamp(2.5rem, 5.4vw, 5.4rem)/.98 var(--serif);
    letter-spacing: -.045em;
    text-wrap: balance;
}

.preview-heading-ink h2,
.preview-heading-ink .preview-eyebrow {
    color: var(--preview-ink);
}

.preview-hero {
    position: relative;
    display: grid;
    min-height: max(760px, 100svh);
    align-items: center;
    overflow: hidden;
    background: #39423d url("../media/home-hero-imperivm.webp") center/cover no-repeat;
}

.preview-hero video,
.preview-hero-wash {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.preview-hero video {
    object-fit: cover;
    opacity: .96;
    filter: saturate(.98) contrast(1.02) brightness(1.02);
}

.preview-hero-wash {
    background:
        linear-gradient(90deg, rgba(15, 24, 22, .82) 0%, rgba(18, 28, 25, .56) 43%, rgba(18, 25, 22, .08) 76%),
        linear-gradient(180deg, rgba(12, 18, 17, .08) 58%, rgba(27, 22, 16, .58) 100%);
}

.preview-hero-inner {
    position: relative;
    z-index: 1;
    width: min(1260px, calc(100% - 80px));
    margin: 0 auto;
    padding: 138px 0 82px;
}

.preview-hero h1 {
    max-width: 920px;
    margin: 0;
    color: #fff4dd;
    font: 700 clamp(3.8rem, 7vw, 7.8rem)/.89 var(--serif);
    letter-spacing: -.055em;
    text-shadow: 0 4px 24px rgba(0, 0, 0, .5);
    text-wrap: balance;
}

.preview-hero-lead {
    max-width: 720px;
    margin: 28px 0 0;
    color: #f2e8d4;
    font: 1.08rem/1.72 var(--serif);
    text-shadow: 0 2px 14px rgba(0, 0, 0, .7);
}

.preview-actions {
    display: flex;
    margin-top: 34px;
    flex-wrap: wrap;
    gap: 12px;
}

.preview-action {
    display: inline-flex;
    min-height: 52px;
    padding: 0 25px;
    border: 1px solid rgba(241, 204, 121, .72);
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-decoration: none;
    text-transform: uppercase;
}

.preview-action-primary {
    background: linear-gradient(180deg, #e1b85f, #a16a2d);
    color: #24160b;
}

.preview-action-primary:hover {
    color: #24160b;
    filter: brightness(1.08);
}

.preview-action-secondary {
    background: rgba(24, 29, 25, .58);
    color: #ffe3a5;
    backdrop-filter: blur(7px);
}

.preview-action-secondary:hover {
    color: #fff0c9;
    background: rgba(24, 29, 25, .76);
}

.preview-facts {
    display: flex;
    margin: 42px 0 0;
    padding: 0;
    flex-wrap: wrap;
    gap: 14px 28px;
    list-style: none;
}

.preview-facts li {
    padding-left: 12px;
    border-left: 2px solid #e1b75e;
    color: #f0e6d2;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .8);
    text-transform: uppercase;
}

.preview-scroll {
    position: absolute;
    right: clamp(28px, 5vw, 74px);
    bottom: 34px;
    z-index: 2;
    display: block;
    width: 30px;
    height: 48px;
    border: 1px solid rgba(249, 219, 153, .72);
    border-radius: 999px;
}

.preview-scroll span {
    position: absolute;
    top: 9px;
    left: 50%;
    width: 3px;
    height: 9px;
    background: #f3d187;
    transform: translateX(-50%);
}

.preview-manifesto {
    position: relative;
    padding: clamp(90px, 12vw, 170px) 0 clamp(80px, 10vw, 130px);
    border-top: 8px solid #896833;
    background:
        radial-gradient(circle at 88% 12%, rgba(111, 63, 36, .14), transparent 31%),
        linear-gradient(135deg, #e0d2b6, #c9b895 68%, #b8a57f);
}

.preview-manifesto::before {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(120deg, transparent 0 27px, rgba(72, 49, 31, .025) 28px 29px);
    content: "";
    pointer-events: none;
}

.preview-manifesto-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .62fr);
    align-items: end;
    gap: clamp(42px, 9vw, 130px);
}

.preview-manifesto-copy {
    margin: 0;
    color: #413326;
    font: 1.12rem/1.78 var(--serif);
}

.preview-principles {
    position: relative;
    display: grid;
    margin-top: clamp(55px, 8vw, 100px);
    border-top: 1px solid rgba(70, 48, 30, .42);
    grid-template-columns: repeat(3, 1fr);
}

.preview-principles article {
    min-height: 250px;
    padding: 30px 34px 34px 0;
    border-right: 1px solid rgba(70, 48, 30, .28);
}

.preview-principles article + article {
    padding-left: 34px;
}

.preview-principles article:last-child {
    border-right: 0;
}

.preview-principles span {
    color: #7b552b;
    font-family: var(--serif);
    font-size: .78rem;
    font-weight: 700;
}

.preview-principles h3 {
    margin: 75px 0 12px;
    color: #32251c;
    font: 700 1.65rem/1.1 var(--serif);
}

.preview-principles p {
    margin: 0;
    color: #594a3b;
    line-height: 1.7;
}

.preview-classes {
    padding: clamp(85px, 10vw, 135px) 0 0;
    background:
        radial-gradient(circle at 18% 10%, rgba(116, 38, 38, .34), transparent 28%),
        radial-gradient(circle at 85% 12%, rgba(51, 91, 105, .3), transparent 30%),
        #49463e;
    color: var(--preview-ivory);
}

.preview-section-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, .62fr);
    align-items: end;
    gap: clamp(40px, 8vw, 110px);
}

.preview-section-intro > p,
.preview-systems-head > p {
    margin: 0;
    color: #e0d7c5;
    font: 1.04rem/1.72 var(--serif);
}

.preview-class-grid {
    display: grid;
    width: 100%;
    margin-top: clamp(54px, 7vw, 90px);
    grid-template-columns: repeat(4, 1fr);
}

.preview-class {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    border-top: 1px solid rgba(232, 202, 145, .28);
    border-right: 1px solid rgba(232, 202, 145, .24);
    background: #272823;
}

.preview-class:last-child {
    border-right: 0;
}

.preview-class img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 500ms ease, filter 500ms ease;
}

.preview-class:hover img {
    filter: saturate(1.08) contrast(1.04);
    transform: scale(1.025);
}

.preview-class > div {
    position: absolute;
    inset: auto 0 0;
    z-index: 1;
    padding: 90px 28px 30px;
    background: linear-gradient(180deg, transparent, rgba(20, 19, 16, .95) 50%, rgba(20, 19, 16, .99));
}

.preview-class h3 {
    margin: 0 0 8px;
    color: #ffe6b3;
    font: 700 1.75rem/1 var(--serif);
}

.preview-class p {
    margin: 0;
    color: #d7cfbf;
    font-size: .88rem;
    line-height: 1.55;
}

.preview-story {
    position: relative;
    min-height: 980px;
    padding: clamp(105px, 12vw, 170px) 0;
    color: var(--preview-ivory);
    overflow: hidden;
}

.preview-story-image,
.preview-story-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.preview-story-image {
    object-fit: cover;
    object-position: center;
}

.preview-story-overlay {
    background:
        linear-gradient(90deg, rgba(18, 28, 26, .84), rgba(20, 30, 27, .4) 48%, rgba(27, 28, 23, .18)),
        linear-gradient(180deg, rgba(26, 30, 25, .12), rgba(24, 20, 15, .72) 100%);
}

.preview-story-layout {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, .82fr) minmax(430px, .8fr);
    gap: clamp(55px, 10vw, 140px);
}

.preview-story-copy {
    align-self: start;
    padding-top: 25px;
}

.preview-story-copy > p:last-child {
    max-width: 620px;
    margin: 30px 0 0;
    color: #f0e7d6;
    font: 1.08rem/1.75 var(--serif);
}

.preview-story-phases {
    margin: 0;
    padding: 0;
    border-top: 1px solid rgba(242, 211, 146, .48);
    list-style: none;
}

.preview-story-phases li {
    display: grid;
    padding: 25px 0;
    border-bottom: 1px solid rgba(242, 211, 146, .32);
    grid-template-columns: 78px 1fr;
    gap: 20px;
}

.preview-story-phases li > span {
    color: #f0c978;
    font: 700 1.1rem/1 var(--serif);
}

.preview-story-phases h3 {
    margin: 0 0 7px;
    color: #fff0cf;
    font: 700 1.28rem/1.1 var(--serif);
}

.preview-story-phases p {
    margin: 0;
    color: #e0d8c9;
    font-size: .91rem;
    line-height: 1.62;
}

.preview-technology {
    padding: clamp(90px, 11vw, 150px) 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(125, 81, 42, .14), transparent 27%),
        linear-gradient(135deg, #e7dac1, #cdbb99 72%);
}

.preview-section-intro-ink > p {
    color: #46382c;
}

.preview-technology-grid {
    display: grid;
    margin-top: clamp(55px, 8vw, 95px);
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, .7fr);
    align-items: start;
    gap: clamp(45px, 8vw, 110px);
}

.preview-technology figure {
    margin: 0;
    border: 1px solid rgba(73, 49, 31, .42);
    background: #716b5e;
    box-shadow: 0 25px 60px rgba(58, 40, 26, .18);
}

.preview-technology figure img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.preview-technology figcaption {
    padding: 13px 17px;
    color: #4a3828;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.preview-technology-points {
    border-top: 1px solid rgba(66, 43, 28, .42);
}

.preview-technology-points article {
    display: grid;
    padding: 22px 0;
    border-bottom: 1px solid rgba(66, 43, 28, .3);
    grid-template-columns: 54px 1fr;
    gap: 16px;
}

.preview-technology-points article > span {
    color: #76532f;
    font-family: var(--serif);
    font-weight: 700;
}

.preview-technology-points h3 {
    margin: 0 0 6px;
    color: #30231b;
    font: 700 1.2rem/1.1 var(--serif);
}

.preview-technology-points p {
    margin: 0;
    color: #58493b;
    font-size: .9rem;
    line-height: 1.62;
}

.preview-systems {
    padding: clamp(90px, 11vw, 150px) 0;
    color: var(--preview-ivory);
    background:
        radial-gradient(circle at 78% 18%, rgba(178, 103, 45, .22), transparent 32%),
        linear-gradient(135deg, #5b3028, #372823 54%, #29322f);
}

.preview-systems-head {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, .62fr);
    align-items: end;
    gap: clamp(40px, 8vw, 110px);
}

.preview-codex-layout {
    display: grid;
    margin-top: clamp(55px, 8vw, 95px);
    grid-template-columns: minmax(380px, .86fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(40px, 7vw, 90px);
}

.preview-codex {
    margin: 0;
    border: 1px solid rgba(240, 201, 126, .42);
    background: rgba(30, 26, 22, .42);
    box-shadow: 0 28px 65px rgba(22, 13, 10, .32);
}

.preview-codex img {
    display: block;
    width: 100%;
    height: auto;
}

.preview-system-groups {
    border-top: 1px solid rgba(240, 205, 136, .42);
}

.preview-system-groups article {
    position: relative;
    padding: 28px 0 30px 60px;
    border-bottom: 1px solid rgba(240, 205, 136, .27);
}

.preview-system-groups article > span {
    position: absolute;
    top: 31px;
    left: 0;
    color: #e5bd72;
    font-family: var(--serif);
    font-weight: 700;
}

.preview-system-groups h3 {
    margin: 0 0 10px;
    color: #ffe9bd;
    font: 700 1.45rem/1.08 var(--serif);
}

.preview-system-groups p {
    margin: 0;
    color: #e0d5c3;
    line-height: 1.65;
}

.preview-system-groups small {
    display: block;
    margin-top: 14px;
    color: #d8ae65;
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1.55;
    text-transform: uppercase;
}

.preview-final {
    position: relative;
    display: grid;
    min-height: 760px;
    padding: 100px 30px;
    place-items: center;
    overflow: hidden;
    background: #273330;
}

.preview-final > img,
.preview-final-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.preview-final > img {
    object-fit: cover;
    object-position: center;
}

.preview-final-shade {
    background: linear-gradient(90deg, rgba(23, 29, 27, .78), rgba(38, 31, 24, .34), rgba(23, 29, 27, .62));
}

.preview-final-copy {
    position: relative;
    z-index: 1;
    max-width: 840px;
    text-align: center;
}

.preview-final-copy > p:not(.preview-eyebrow) {
    max-width: 660px;
    margin: 26px auto 0;
    color: #f0e6d3;
    font: 1.08rem/1.72 var(--serif);
}

.preview-final .preview-actions {
    justify-content: center;
}

.preview-footer {
    display: flex;
    min-height: 86px;
    padding: 24px clamp(24px, 5vw, 78px);
    border-top: 1px solid rgba(221, 181, 104, .34);
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    background: #1f2926;
    color: #cfc7b8;
    font-size: .78rem;
}

.preview-footer a {
    color: #edcb86;
    text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
    .preview-class img,
    .preview-menu a::after {
        transition: none;
    }
}

@media (max-width: 1180px) {
    .preview-menu-toggle {
        display: block;
    }

    .preview-menu {
        position: absolute;
        top: 76px;
        right: 0;
        left: 0;
        display: none;
        max-height: calc(100dvh - 76px);
        margin: 0;
        padding: 16px 24px 24px;
        border-bottom: 1px solid rgba(225, 193, 129, .38);
        align-items: stretch;
        flex-direction: column;
        overflow-y: auto;
        background: rgba(27, 30, 27, .98);
    }

    .preview-menu.is-open {
        display: flex;
    }

    .preview-menu a {
        width: 100%;
        min-height: 48px;
        justify-content: flex-start;
    }

    .preview-menu .preview-menu-play {
        margin: 8px 0 0;
    }

    .preview-class-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .preview-class {
        min-height: 650px;
    }
}

@media (max-width: 920px) {
    .preview-manifesto-grid,
    .preview-section-intro,
    .preview-story-layout,
    .preview-technology-grid,
    .preview-systems-head,
    .preview-codex-layout {
        grid-template-columns: 1fr;
    }

    .preview-principles {
        grid-template-columns: 1fr;
    }

    .preview-principles article,
    .preview-principles article + article {
        min-height: 0;
        padding: 28px 0;
        border-right: 0;
        border-bottom: 1px solid rgba(70, 48, 30, .28);
    }

    .preview-principles h3 {
        margin-top: 25px;
    }

    .preview-story {
        min-height: 0;
    }

    .preview-story-layout {
        gap: 65px;
    }

    .preview-codex-layout {
        gap: 54px;
    }

    .preview-codex {
        width: min(720px, 100%);
        margin-inline: auto;
    }
}

@media (max-width: 680px) {
    .preview-header {
        min-height: 68px;
        padding-inline: 14px;
        gap: 10px;
    }

    .preview-brand {
        width: 136px;
        height: 48px;
    }

    .preview-menu {
        top: 68px;
        max-height: calc(100dvh - 68px);
        padding-inline: 18px;
    }

    .language-switcher-preview {
        margin-left: auto;
    }

    .language-switcher-preview summary {
        width: 42px;
    }

    .language-switcher-preview .language-code {
        display: none;
    }

    .preview-shell,
    .preview-hero-inner {
        width: min(100% - 34px, 620px);
    }

    .preview-hero {
        min-height: 760px;
    }

    .preview-hero-inner {
        padding-top: 108px;
        padding-bottom: 65px;
    }

    .preview-hero h1 {
        font-size: clamp(3.05rem, 15vw, 5rem);
    }

    .preview-hero-lead {
        font-size: 1rem;
    }

    .preview-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .preview-action {
        width: 100%;
    }

    .preview-facts {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .preview-scroll {
        display: none;
    }

    .preview-heading h2,
    .preview-story-copy h2,
    .preview-final-copy h2 {
        font-size: clamp(2.5rem, 11vw, 3.8rem);
    }

    .preview-class-grid {
        grid-template-columns: 1fr;
    }

    .preview-class {
        min-height: 560px;
        border-right: 0;
    }

    .preview-story-phases li {
        grid-template-columns: 60px 1fr;
    }

    .preview-system-groups article {
        padding-left: 44px;
    }

    .preview-final {
        min-height: 680px;
        padding-inline: 17px;
    }

    .preview-footer {
        align-items: center;
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .preview-brand {
        width: 112px;
    }

    .preview-menu-toggle {
        width: 40px;
    }

    .preview-facts {
        grid-template-columns: 1fr;
    }

    .preview-class {
        min-height: 500px;
    }
}
