/* ==========================================================================
   Flames Productions — experience site
   ========================================================================== */

:root {
    --base: #0a0a0a;
    --surface: #171717;
    --highlight: #262626;
    --orange: #ff5e00;
    --red: #dc2626;
    --amber: #fbbf24;
    --text: #ece9e4;
    --muted: #8d8984;
    --dim: #55524f;
    --line: rgba(255, 255, 255, 0.09);
    --accent: var(--orange);

    --font-display: "Unbounded", ui-sans-serif, system-ui, sans-serif;
    --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --pad: clamp(1.25rem, 3.6vw, 3.5rem);
    --nav-h: 5.25rem;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
    --fire-gradient: linear-gradient(90deg, #fbbf24 0%, #ff5e00 50%, #dc2626 100%);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    background: var(--base);
}

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

body {
    margin: 0;
    background: var(--base);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection {
    background: var(--orange);
    color: #000;
}

img,
svg,
canvas {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure {
    margin: 0;
}

ol,
ul {
    list-style: none;
    padding: 0;
}

address {
    font-style: normal;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 2px;
}

.skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    padding: 0.75rem 1rem;
    background: var(--orange);
    color: #000;
    font-weight: 600;
    transform: translateY(-200%);
    transition: transform 0.3s var(--ease-out);
}

.skip-link:focus {
    transform: none;
}

/* Shared typographic atoms ------------------------------------------------ */

.mask {
    display: block;
    overflow: hidden;
    padding-bottom: 0.06em;
    margin-bottom: -0.06em;
}

.mask > * {
    display: block;
}

.fire-text,
.fire-text .char {
    background: var(--fire-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Buttons ----------------------------------------------------------------- */

.btn {
    --btn-bg: var(--text);
    --btn-fg: var(--base);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 3.25rem;
    padding: 0 1.6rem;
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    overflow: hidden;
    isolation: isolate;
    transition: color 0.5s var(--ease-out);
}

.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--accent);
    border-radius: inherit;
    transform: translateY(101%);
    transition: transform 0.5s var(--ease-out);
}

.btn__label {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 1em;
    line-height: 1;
    transition: transform 0.5s var(--ease-out);
}

.btn__label > span {
    flex: none;
    height: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn:hover::before,
.btn:focus-visible::before {
    transform: none;
}

.btn:hover,
.btn:focus-visible {
    color: #000;
}

/* .btn:hover .btn__label,
.btn:focus-visible .btn__label {
    transform: translateY(-1em);
} */

.btn--small {
    height: 2.5rem;
    padding: 0 1.15rem;
    font-size: 0.64rem;
}

.btn--ghost {
    --btn-bg: transparent;
    --btn-fg: var(--text);
    box-shadow: inset 0 0 0 1px var(--line);
}

.link-line {
    position: relative;
    display: inline-block;
    padding-bottom: 0.1em;
}

.link-line::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.6s var(--ease-out);
}

.link-line:hover::after,
.link-line:focus-visible::after {
    transform: scaleX(1);
    transform-origin: left;
}

.link-arrow {
    display: inline-flex;
    align-items: baseline;
    gap: 0.6rem;
    font-weight: 500;
    color: var(--text);
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.4rem;
    transition: color 0.4s, border-color 0.4s;
}

.link-arrow span {
    color: var(--accent);
    transition: transform 0.5s var(--ease-out);
}

.link-arrow:hover {
    border-color: var(--accent);
}

.link-arrow:hover span {
    transform: translateX(0.35rem);
}

/* Loader ------------------------------------------------------------------ */

.loader {
    display: none;
}

.js .loader {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: grid;
    place-items: center;
    background: var(--base);
    color: var(--orange);
}

.is-failsafe .loader {
    display: none;
}

.loader__inner {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.loader__logo {
    width: clamp(4.5rem, 9vw, 7rem);
    overflow: visible;
}

.loader__logo .shard {
    fill: transparent;
    stroke: var(--orange);
    stroke-width: 3;
}

.loader__meta {
    position: absolute;
    left: var(--pad);
    right: var(--pad);
    bottom: var(--pad);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
}

.loader__label {
    font-size: 0.72rem;
}

.loader__count {
    display: block;
    overflow: hidden;
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(3rem, 10vw, 8rem);
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: var(--text);
}

.loader__count span {
    display: block;
}

/* Background layers ------------------------------------------------------- */

.fire {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100vh;
    height: 100lvh;
    pointer-events: none;
}

.vignette {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(10, 10, 10, 0) 0%, rgba(10, 10, 10, 0.35) 60%, rgba(10, 10, 10, 0.8) 100%);
}

.grain {
    position: fixed;
    inset: -50%;
    z-index: 90;
    pointer-events: none;
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain 1s steps(6) infinite;
}

@keyframes grain {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-3%, 2%); }
    40% { transform: translate(2%, -4%); }
    60% { transform: translate(-4%, -1%); }
    80% { transform: translate(3%, 3%); }
    100% { transform: translate(0, 0); }
}

main {
    position: relative;
    z-index: 1;
}

/* Cursor ------------------------------------------------------------------ */

.cursor {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .js .cursor {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 120;
        pointer-events: none;
    }

    .has-cursor,
    .has-cursor a,
    .has-cursor button,
    .has-cursor [data-cursor] {
        cursor: none;
    }
}

.cursor__dot,
.cursor__ring {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 50%;
}

.cursor__dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    transition: background-color 0.6s, opacity 0.3s;
}

.cursor__ring {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    transition: width 0.5s var(--ease-out), height 0.5s var(--ease-out), background-color 0.5s var(--ease-out), border-color 0.5s;
}

.cursor__label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #000;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.3s, transform 0.5s var(--ease-out);
}

.cursor.is-hover .cursor__ring {
    width: 64px;
    height: 64px;
    border-color: transparent;
    background: rgba(255, 255, 255, 0.08);
}

.cursor.is-label .cursor__ring {
    width: 92px;
    height: 92px;
    border-color: transparent;
    background: var(--accent);
}

.cursor.is-label .cursor__label {
    opacity: 1;
    transform: none;
}

.cursor.is-label .cursor__dot,
.cursor.is-hidden .cursor__dot,
.cursor.is-hidden .cursor__ring {
    opacity: 0;
}

/* Nav --------------------------------------------------------------------- */

.nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0 var(--pad);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: transform 0.8s var(--ease-out);
}

.nav::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.85), rgba(10, 10, 10, 0));
    pointer-events: none;
}

.nav.is-hidden {
    transform: translateY(-100%);
}

.nav__brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--text);
}

.nav__logo {
    width: 2.1rem;
    height: 2.1rem;
    color: var(--orange);
    overflow: visible;
}

.nav__logo .shard {
    transition: transform 0.6s var(--ease-out), fill 0.4s;
    transform-box: fill-box;
    transform-origin: center;
}

.nav__brand:hover .shard--1 { transform: translateY(-10%); }
.nav__brand:hover .shard--2 { transform: translate(-8%, 6%); }
.nav__brand:hover .shard--3 { transform: translate(8%, 6%); }

.nav__wordmark {
    display: flex;
    flex-direction: column;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 0.85rem;
    letter-spacing: -0.01em;
    line-height: 1;
}

.nav__wordmark span {
    margin-top: 0.2rem;
    font-weight: 500;
    font-size: 0.56rem;
    letter-spacing: 0.3em;
    color: var(--orange);
}

.nav__links {
    display: flex;
    gap: 2.25rem;
}

.nav__links a {
    position: relative;
    display: flex;
    gap: 0.5rem;
    color: var(--muted);
    transition: color 0.4s;
}

.nav__links a i {
    font-style: normal;
    color: var(--dim);
    transition: color 0.4s;
}

.nav__links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.5rem;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s var(--ease-out);
}

.nav__links a:hover,
.nav__links a.is-active {
    color: var(--text);
}

.nav__links a.is-active i,
.nav__links a:hover i {
    color: var(--accent);
}

.nav__links a.is-active::after {
    transform: scaleX(1);
}

.nav__links .nav__minor {
    color: var(--dim);
}

.nav__aside {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav__clock {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--muted);
}

.nav__clock time {
    color: var(--text);
}

.nav__pulse {
    position: relative;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    transition: background-color 0.6s;
}

.nav__pulse::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    animation: pulse 2s var(--ease-out) infinite;
}

@keyframes pulse {
    from { transform: scale(1); opacity: 0.8; }
    to { transform: scale(3.2); opacity: 0; }
}

/* Chapter rail ------------------------------------------------------------ */

.rail {
    position: fixed;
    right: calc(var(--pad) * 0.6);
    top: 50%;
    z-index: 80;
    display: flex;
    gap: 0.9rem;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.rail__track {
    position: relative;
    width: 1px;
    background: var(--line);
}

.rail__fill {
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: top;
    transition: background-color 0.6s;
}

.rail__list {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    order: -1;
    text-align: right;
}

.rail__list li {
    color: var(--dim);
    transition: color 0.4s;
}

.rail__list li span {
    display: inline-block;
    opacity: 0;
    transform: translateX(0.5rem);
    transition: opacity 0.4s, transform 0.5s var(--ease-out);
}

.rail__list li::after {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-left: 0.6rem;
    border-radius: 50%;
    background: currentColor;
    vertical-align: middle;
}

.rail:hover .rail__list li span,
.rail__list li.is-active span {
    opacity: 1;
    transform: none;
}

.rail__list li.is-active {
    color: var(--text);
}

.rail__list li.is-active::after {
    background: var(--accent);
}

/* Hero -------------------------------------------------------------------- */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--nav-h) var(--pad) 0;
}

.hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.6rem, 10.2vw, 12.5rem);
    line-height: 0.92;
    letter-spacing: -0.045em;
    text-transform: uppercase;
    color: #fff;
}

.hero__title .char {
    display: inline-block;
    will-change: transform;
}

.hero__lead {
    max-width: 38rem;
    margin-top: 2.25rem;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    color: var(--muted);
}

.hero__lead strong {
    font-weight: 500;
    color: var(--text);
}

.hero__foot {
    position: absolute;
    left: var(--pad);
    right: var(--pad);
    bottom: calc(var(--pad) * 0.9);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.hero__cue {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text);
}

.hero__cue-line {
    position: relative;
    width: 1px;
    height: 3.5rem;
    overflow: hidden;
    background: var(--line);
}

.hero__cue-line::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--orange);
    animation: cue 2.2s var(--ease-in-out) infinite;
}

@keyframes cue {
    0% { transform: translateY(-100%); }
    60%, 100% { transform: translateY(100%); }
}

/* Manifesto --------------------------------------------------------------- */

.manifesto {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding: 20vh var(--pad);
    max-width: 88rem;
    margin: 0 auto;
}

.manifesto__text {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.7rem, 4.1vw, 4.4rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--text);
}

.manifesto__text em {
    font-style: normal;
    color: var(--orange);
}

.manifesto__text .word {
    will-change: opacity;
}

/* Crafts ------------------------------------------------------------------ */

.crafts {
    position: relative;
    height: 240vh;
}

.crafts__stage {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(1.5rem, 4vh, 3rem);
    padding: calc(var(--nav-h) + 1rem) calc(var(--pad) + 3.5rem) calc(var(--pad) * 0.8) var(--pad);
}

.crafts__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.2rem, min(5.2vw, 9vh), 6.5rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
    text-transform: uppercase;
    color: #fff;
}

.crafts__title .char,
.chapter__title .char,
.fusion__title .char,
.contact__title .char {
    display: inline-block;
}

.crafts__panels {
    display: flex;
    gap: clamp(1rem, 2vw, 2rem);
    height: min(52vh, 32rem);
}

.craft {
    --c: var(--orange);
    --mx: 50%;
    --my: 50%;
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: clamp(1.25rem, 2.4vw, 2.25rem);
    border: 1px solid var(--line);
    border-radius: 4px;
    background: rgba(10, 10, 10, 0.55);
    overflow: hidden;
    isolation: isolate;
    transition: flex-grow 0.9s var(--ease-out), border-color 0.5s;
}

.craft--consult {
    --c: var(--amber);
}

.craft::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at var(--mx) var(--my), color-mix(in srgb, var(--c) 26%, transparent), transparent 60%);
    opacity: 0;
    transition: opacity 0.6s;
}

.craft:hover,
.craft:focus-visible {
    border-color: var(--c);
}

.craft:hover::before,
.craft:focus-visible::before {
    opacity: 1;
}

.crafts__panels:has(.craft:hover) .craft:not(:hover) {
    flex-grow: 0.7;
}

.craft__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.craft__index {
    --ow: 1px;
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(4rem, min(8vw, 14vh), 9rem);
    line-height: 0.8;
    letter-spacing: -0.06em;
    color: #fff;
    opacity: 0.4;
    overflow: visible;
    transition: opacity 0.6s;
}

.craft:hover .craft__index {
    color: var(--c);
    opacity: 1;
}

.no-js .craft__index::before,
.no-js .chapter__index::before {
    content: attr(data-index);
}

.craft__index canvas,
.chapter__index canvas {
    display: block;
    max-width: none;
}

.craft__meta {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
}

.craft__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.4rem, min(2.5vw, 4.6vh), 2.8rem);
    line-height: 1;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: #fff;
}

.craft__text {
    max-width: 26rem;
    margin-top: 0.9rem;
    color: var(--muted);
}

.craft__cta {
    display: inline-flex;
    gap: 0.6rem;
    margin-top: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text);
}

.craft__cta span {
    color: var(--c);
    transition: transform 0.5s var(--ease-out);
}

.craft:hover .craft__cta span {
    transform: translateX(0.35rem);
}

.crafts__extra {
    align-self: flex-start;
    color: var(--muted);
}

.crafts__extra-copy {
    flex: 1 1 12rem;
}

.crafts__extra b {
    font-family: var(--font-display);
    color: var(--red);
}

.crafts__extra:hover {
    color: var(--text);
    border-color: var(--red);
}

.crafts__extra span {
    color: var(--red);
}

/* Glass logo ---------------------------------------------------------------- */

.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.glass-logo {
    --mx: 32%;
    --my: 22%;
    position: relative;
    width: 100%;
    height: 100%;
}

.glass-shard {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 36%),
        radial-gradient(circle at calc(100% - var(--mx)) calc(100% - var(--my)), rgba(255, 110, 30, 0.14), rgba(255, 110, 30, 0) 45%),
        linear-gradient(155deg, rgba(255, 255, 255, 0.08), rgba(255, 140, 70, 0.04) 50%, rgba(10, 10, 10, 0.28));
    -webkit-backdrop-filter: blur(16px) saturate(170%) brightness(1.2);
    backdrop-filter: blur(16px) saturate(170%) brightness(1.2);
    will-change: transform;
}

.glass-shard svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.glass-shard__body {
    fill: url(#fp-glass-body);
}

.glass-shard__edge {
    fill: none;
    stroke: url(#fp-glass-edge);
    stroke-width: 2.4;
    vector-effect: non-scaling-stroke;
}

/* Chapters ---------------------------------------------------------------- */

.chapter {
    position: relative;
    height: var(--h, 300vh);
}

.chapter--develop { --accent: var(--orange); }
.chapter--print { --accent: var(--red); }
.chapter--consult { --accent: var(--amber); }

.chapter__stage {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(1rem, 2vw, 2rem);
    align-items: center;
    padding: calc(var(--nav-h) + 1rem) calc(var(--pad) + 3.5rem) calc(var(--pad) * 0.8) var(--pad);
}

.chapter__index {
    position: absolute;
    left: calc(var(--pad) - 0.06em);
    bottom: -0.2em;
    z-index: 0;
    --ow: 1.5px;
    display: block;
    isolation: isolate;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(12rem, 34vw, 38rem);
    line-height: 1;
    letter-spacing: -0.06em;
    color: #fff;
    opacity: 0.22;
    pointer-events: none;
    user-select: none;
}

.chapter--flip .chapter__index {
    left: auto;
    right: calc(var(--pad) + 2rem);
}

.chapter__content {
    position: relative;
    z-index: 2;
    grid-column: 1 / span 5;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(1rem, 2.4vh, 1.6rem);
}

.chapter--flip .chapter__content {
    grid-column: 7 / -1;
    padding-left: clamp(0rem, 2vw, 2rem);
    grid-row: 1;
}

.chapter__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.2rem, min(4.1vw, 8.5vh), 5.4rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
    text-transform: uppercase;
    color: #fff;
}

.chapter__lead {
    font-size: clamp(1rem, min(1.25vw, 2.3vh), 1.25rem);
    line-height: 1.55;
    color: var(--text);
    max-width: 34rem;
}

.chapter__body {
    font-size: clamp(0.9rem, min(1vw, 1.9vh), 1rem);
    color: var(--muted);
    max-width: 32rem;
}

.pull {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1rem, min(1.5vw, 2.6vh), 1.45rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--accent);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 34rem;
}

.tags li {
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.78rem;
    color: var(--text);
    background: rgba(10, 10, 10, 0.4);
    transition: border-color 0.4s, color 0.4s;
}

.tags li:hover {
    border-color: var(--accent);
    color: #fff;
}

.specs {
    display: grid;
    width: 100%;
    max-width: 34rem;
    border-top: 1px solid var(--line);
}

.specs div {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
}

.specs dt {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 0.2rem;
}

.specs dd {
    font-weight: 500;
    color: var(--text);
}

.steps {
    display: grid;
    width: 100%;
    max-width: 34rem;
    border-top: 1px solid var(--line);
}

.steps li {
    display: grid;
    grid-template-columns: 2.5rem 6.5rem 1fr;
    gap: 0.75rem;
    align-items: baseline;
    padding: clamp(0.6rem, 1.6vh, 0.95rem) 0;
    border-bottom: 1px solid var(--line);
}

.steps i {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 0.7rem;
    color: var(--accent);
}

.steps b {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: #fff;
}

.steps span {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.5;
}

/* Visual frame */

.chapter__visual {
    position: relative;
    z-index: 1;
    grid-column: 6 / -1;
    height: min(100%, 46rem);
    align-self: center;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: radial-gradient(120% 90% at 50% 100%, rgba(255, 255, 255, 0.035), rgba(10, 10, 10, 0.6) 60%), rgba(10, 10, 10, 0.55);
    overflow: hidden;
}

.chapter--flip .chapter__visual {
    grid-column: 1 / span 6;
    grid-row: 1;
}

.frame__corners::before,
.frame__corners::after,
.frame::before,
.frame::after {
    content: "";
    position: absolute;
    z-index: 3;
    width: 14px;
    height: 14px;
    border-color: var(--accent);
    border-style: solid;
    pointer-events: none;
}

.frame::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.frame::after { top: -1px; right: -1px; border-width: 1px 1px 0 0; }
.frame__corners::before { bottom: -1px; left: -1px; border-width: 0 0 1px 1px; }
.frame__corners::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.frame__top,
.frame__bottom {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 1.15rem;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.frame__top {
    border-bottom: 1px solid var(--line);
}

.frame__bottom {
    border-top: 1px solid var(--line);
}

.frame__top > span,
.frame__bottom > span {
    white-space: nowrap;
}

.frame__live {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
}

.hud b {
    font-weight: 500;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.hud__bar {
    position: relative;
    flex: 1;
    max-width: 9rem;
    height: 2px;
    background: var(--line);
    overflow: hidden;
}

.hud__bar span {
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
}

.surface,
.printer,
.signal {
    position: relative;
    flex: 1;
    min-height: 0;
    touch-action: pan-y;
}

.surface canvas,
.printer canvas,
.signal canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
}

.printer__fallback {
    position: absolute;
    inset: 20%;
    color: var(--red);
    opacity: 0.9;
}

/* Fusion ------------------------------------------------------------------ */

.fusion {
    position: relative;
    height: 300vh;
}

.fusion__stage {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 2rem;
    align-items: center;
    padding: var(--nav-h) calc(var(--pad) + 3.5rem) var(--pad) var(--pad);
}

.fusion__logo-wrap {
    grid-column: 1 / span 5;
    grid-row: 1;
    width: min(100%, 60vh);
    aspect-ratio: 1;
    justify-self: center;
}

.fusion__copy {
    grid-column: 6 / -1;
    grid-row: 1;
    padding-left: clamp(0rem, 3vw, 3rem);
}

.fusion__title .word {
    white-space: nowrap;
}

.fusion__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2rem, 4.4vw, 5.8rem);
    line-height: 0.92;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    color: #fff;
}

.fusion__lead {
    max-width: 32rem;
    margin-top: 2rem;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    color: var(--text);
}

/* Contact ----------------------------------------------------------------- */

.contact {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0) 0%, rgba(10, 10, 10, 0.75) 22%, rgba(10, 10, 10, 0.92) 100%);
}

.marquee {
    padding: 3rem 0 1rem;
    overflow: hidden;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    user-select: none;
}

.marquee__row {
    display: flex;
    align-items: center;
    gap: clamp(1.5rem, 3vw, 3rem);
    width: max-content;
    padding-bottom: 1.5rem;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.5rem, 7vw, 7rem);
    line-height: 1;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    will-change: transform;
}

/* Unbounded's glyphs are built from overlapping contours, which text-stroke exposes.
   The filter outlines the rendered silhouette instead, so only the outer edge shows. */
.marquee__row--outline {
    color: #fff;
    -webkit-text-fill-color: #fff;
    filter: url(#fp-outline);
    opacity: 0.45;
}

.marquee__glyph {
    flex: none;
    width: 0.55em;
    height: 0.55em;
    color: var(--orange);
}

.marquee__row--outline .marquee__glyph {
    color: inherit;
}

.contact__inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
    padding: clamp(5rem, 12vh, 9rem) calc(var(--pad) + 3.5rem) clamp(4rem, 9vh, 7rem) var(--pad);
}

.contact__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.8rem, 10vw, 12rem);
    line-height: 0.9;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    color: #fff;
}

.contact__lead {
    max-width: 34rem;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    color: var(--muted);
}

.contact__topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    height: 2.75rem;
    padding: 0 1.15rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(10, 10, 10, 0.4);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    transition: border-color 0.4s, color 0.4s, background-color 0.4s;
}

.chip span {
    color: var(--orange);
    transition: transform 0.5s var(--ease-out);
}

.chip:hover,
.chip:focus-visible {
    border-color: var(--orange);
    background: rgba(255, 94, 0, 0.08);
    color: #fff;
}

.chip:hover span {
    transform: translate(0.15rem, -0.15rem);
}

.contact__mail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem 2rem;
    margin-top: 1rem;
}

.contact__email {
    position: relative;
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.15rem, 3.4vw, 3.4rem);
    letter-spacing: -0.03em;
    color: var(--text);
    padding-bottom: 0.25em;
    transition: color 0.4s;
}

.contact__email::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--fire-gradient);
    transform-origin: left;
    transition: transform 0.8s var(--ease-out);
}

.contact__email:hover {
    color: #fff;
}

.contact__email:hover::after {
    transform: scaleX(0);
    transform-origin: right;
}

.contact__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
    width: 100%;
    margin-top: clamp(2rem, 6vh, 4rem);
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.contact__grid h3 {
    margin-bottom: 0.9rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.contact__grid div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    color: var(--text);
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem calc(var(--pad) + 3.5rem) 1.5rem var(--pad);
    border-top: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 2rem;
    z-index: 130;
    padding: 0.8rem 1.2rem;
    border-radius: 999px;
    background: var(--text);
    color: #000;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transform: translate(-50%, 250%);
    transition: transform 0.6s var(--ease-out);
    pointer-events: none;
}

.toast.is-visible {
    transform: translate(-50%, 0);
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 1100px) {
    .nav__clock {
        display: none;
    }

    .steps li {
        grid-template-columns: 2rem 1fr;
    }

    .steps span {
        grid-column: 2;
    }
}

@media (max-width: 900px) {
    :root {
        --nav-h: 4.25rem;
    }

    .nav__links,
    .rail {
        display: none;
    }

    .hero__foot > span {
        display: none;
    }

    .hero__foot {
        justify-content: center;
    }

    .crafts {
        height: auto;
    }

    .crafts__stage {
        position: relative;
        height: auto;
        padding: 6rem var(--pad) 4rem;
        overflow: visible;
    }

    .crafts__title {
        font-size: clamp(2.3rem, 11vw, 4rem);
    }

    .crafts__panels {
        flex-direction: column;
        height: auto;
    }

    .craft {
        flex: none;
        min-height: 0;
        overflow: visible;
    }

    .craft__meta {
        white-space: normal;
        text-align: right;
        max-width: 9rem;
    }

    .craft__index {
        font-size: 4.4rem;
    }

    .craft__title {
        font-size: clamp(1.5rem, 7vw, 2.2rem);
    }

    .crafts__extra {
        max-width: 100%;
        flex-wrap: wrap;
    }

    .chapter {
        height: auto;
    }

    .chapter__stage {
        position: relative;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 2.5rem;
        padding: 7rem var(--pad) 5rem;
        overflow: visible;
    }

    .chapter__content,
    .chapter--flip .chapter__content {
        order: -1;
        padding-left: 0;
    }

    .chapter__visual,
    .chapter--flip .chapter__visual {
        height: min(118vw, 34rem);
    }

    .chapter__index {
        top: 3rem;
        bottom: auto;
        right: var(--pad);
        left: auto;
        font-size: 11rem;
    }

    .chapter__title {
        font-size: clamp(2.3rem, 11vw, 4rem);
    }

    .fusion {
        height: 220vh;
    }

    .fusion__stage {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 2.5rem;
        padding: var(--nav-h) var(--pad) var(--pad);
    }

    .fusion__logo-wrap {
        width: min(58vw, 38vh);
    }

    .fusion__copy {
        padding-left: 0;
        text-align: center;
    }

    .fusion__lead {
        margin-inline: auto;
    }

    .contact__inner,
    .footer {
        padding-right: var(--pad);
    }

    .contact__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 520px) {
    .nav .btn--small {
        display: none;
    }

    .hero__title {
        font-size: 9.4vw;
    }

    .craft__meta {
        display: none;
    }

    .fusion__title .word {
        white-space: normal;
    }

    .contact__title {
        font-size: 9.6vw;
    }

    .contact__grid {
        grid-template-columns: 1fr;
    }

    .frame__bottom .hud__bar,
    .hud__opt {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
