:root {
    --rail: 200px;            /* distance of guide lines from edges */
    --gutter: 62px;           /* outer padding */
    --text: rgba(255, 255, 255, .62);
    --text-strong: #fff;
    --line: rgba(255, 255, 255, .12);
    --cond: 'Roboto Condensed', 'Arial Narrow', sans-serif;
    --body: 'Roboto', Arial, sans-serif;
}

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

html, body { height: 100%; }

body {
    background: #111;
    color: var(--text);
    font-family: var(--body);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
ul { list-style: none; }

/* ---------- Slider ---------- */
.slider { position: fixed; inset: 0; z-index: 0; }

.slide {
    position: absolute; inset: 0;
    background: #1b1d20 center / cover no-repeat;
    background-image: var(--bg);
    opacity: 0;
    transform: scale(1.08);
    transition: opacity 1.1s ease, transform 6s ease;
}
.slide.is-active { opacity: 1; transform: scale(1); }

.slider__overlay {
    position: absolute; inset: 0;
    background: #000000ba;
}

/* ---------- Rails ---------- */
.rail {
    position: fixed; top: 0; bottom: 0; width: 1px;
    background: var(--line);
    z-index: 1; pointer-events: none;
}
.rail--left  { left: var(--rail); }
.rail--right { right: var(--rail); }

/* ---------- Header ---------- */
.header {
    position: fixed; top: 0; left: 0; right: 0;
    display: flex; align-items: center; justify-content: space-between;
    padding: 48px var(--gutter) 0;
    z-index: 10;
}

/* Header brand: logo + text revealed on click */
.brand { display: flex; align-items: center; gap: 16px; perspective: 600px; }
.brand__logo {
    width: 96px; height: 96px; flex: none;
    transform-style: preserve-3d;
}
.brand__logo img {
    width: 100%; height: 100%; display: block;
    opacity: 0;                                     /* shown once the intro logo lands */
    filter: drop-shadow(0 0 10px rgba(255, 45, 149, .35));
    transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .3s;
}
.brand__logo img.is-landed { opacity: 1; }
.brand__logo:hover img { transform: rotate(25deg) scale(1.06); filter: drop-shadow(0 0 16px rgba(255, 140, 0, .55)); }
/* flip on the button, so the image can keep its own spin animation on phones */
.brand__logo.is-flip { animation: logoFlip .9s cubic-bezier(.2,.8,.2,1); }
@keyframes logoFlip {
    0%   { transform: rotateY(0) scale(1); }
    50%  { transform: rotateY(180deg) scale(1.15); }
    100% { transform: rotateY(360deg) scale(1); }
}
.brand__text { pointer-events: none; transform-origin: 0 50%; }


/* ---------- Center caption (between the rails) ---------- */
.caption {
    /* top: clears header logo, bottom: clears About link + arrows (box edges, so scrolling text is clipped there) */
    position: fixed; top: 150px; bottom: 140px;
    left: var(--rail); right: var(--rail);
    display: flex; flex-direction: column;
    padding: 0 40px;
    text-align: center;
    z-index: 5;
    pointer-events: none;
    overflow-y: auto;               /* long text scrolls instead of running under header/footer */
    scrollbar-width: none;
    overscroll-behavior: contain;
}
.caption::-webkit-scrollbar { display: none; }
/* margin:auto centres vertically, but never pushes content above the padding when it overflows */
.caption__inner { display: block; pointer-events: auto; max-width: 900px; margin: auto; }

.caption__title {
    font-family: var(--cond); font-weight: 700;
    font-size: clamp(36px, 5.2vw, 92px);
    line-height: 1;
    text-transform: uppercase; letter-spacing: .02em;
    color: rgba(255,255,255,.88);
    text-shadow: 0 4px 30px rgba(0,0,0,.35);
}
.caption__sub {
    margin-top: 18px;
    font-family: var(--body); font-weight: 400;
    font-size: clamp(14px, 1.15vw, 19px);
    letter-spacing: .12em; text-transform: uppercase;
    color: rgba(255,255,255,.85);
}
.caption__sub::before {
    content: ''; display: block;
    width: 48px; height: 1px; margin: 0 auto 18px;
    background: rgba(255,255,255,.45);
    transition: width .4s ease;
}
.caption__inner:hover .caption__title { color: #fff; }
.caption__inner:hover .caption__sub::before { width: 90px; }

.caption__sub:empty { display: none; }

/* paragraphs (e.g. "Who we are" slide) */
.caption__text:empty, .caption__text:not(:has(p)) { display: none; }
.caption__text { max-width: 760px; margin: 0 auto; }
.caption__text::before {
    content: ''; display: block;
    width: 48px; height: 1px; margin: 26px auto 26px;
    background: rgba(255,255,255,.45);
}
.caption__text p {
    font-family: var(--body); font-weight: 100;
    font-size: clamp(15px, 1.05vw, 18px); line-height: 1.75; letter-spacing: .03em;
    color: rgba(255,255,255,.78);
    text-shadow: 0 1px 12px rgba(0,0,0,.6);
}
.caption__text p + p { margin-top: 16px; }
/* when a subtext is present, it already has the divider line */
.caption__sub:not(:empty) + .caption__text::before { display: none; }
.caption__sub:not(:empty) + .caption__text { margin-top: 22px; }
.caption__inner { cursor: inherit; }

/* fade animation for slide change */
.caption__title, .caption__sub, .caption__text { transition: opacity .45s ease, transform .45s ease, color .3s; }
.caption__inner.is-changing .caption__title { opacity: 0; transform: translateY(-16px); }
.caption__inner.is-changing .caption__sub,
.caption__inner.is-changing .caption__text  { opacity: 0; transform: translateY(16px); }

/* ---------- About us (bottom-left) ---------- */
.about-link {
    position: fixed; left: var(--gutter); bottom: 86px; z-index: 6;
    font-family: var(--cond); font-weight: 700; font-size: 26px;
    text-transform: uppercase; line-height: 1;
    color: rgba(255,255,255,.55);
    transition: color .3s;
}
.about-link:hover { color: #fff; }
.about-link.ui { transition: color .3s, opacity .45s ease, transform .45s ease; }
.about-link.is-changing { opacity: 0; transform: translateY(12px); }
.about-link.is-hidden { opacity: 0; pointer-events: none; }

/* ---------- About panel ---------- */
.about {
    position: fixed; inset: 0; z-index: 80;
    visibility: hidden; pointer-events: none;
    transition: visibility 0s linear .9s;
}
.about.is-open { visibility: visible; pointer-events: auto; transition: none; }

.about__backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(4px);
    opacity: 0; transition: opacity .6s ease;
}
.about.is-open .about__backdrop { opacity: 1; }

.about__panel {
    position: absolute; top: 0; bottom: 0; left: 0;
    width: min(640px, 100%);
    background: #0b0b0c;
    border-right: 1px solid rgba(255,255,255,.08);
    display: flex; align-items: center;
    padding: 120px 80px 80px var(--gutter);
    transform: translateX(-100%);
    transition: transform .8s cubic-bezier(.77, 0, .18, 1);
    overflow-y: auto;
}
.about.is-open .about__panel { transform: none; }

.about__close {
    position: absolute; top: 40px; right: 40px;
    width: 48px; height: 48px; border-radius: 50%;
    display: grid; place-items: center;
    border: 1px solid rgba(255,255,255,.3);
    color: rgba(255,255,255,.75);
    transition: color .3s, background-color .3s, transform .4s;
}
.about__close:hover { background: #fff; color: #111; transform: rotate(90deg); }

.about__content > * {
    opacity: 0; transform: translateY(24px);
    transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1);
}
.about.is-open .about__content > * { opacity: 1; transform: none; }
.about.is-open .about__content > :nth-child(1) { transition-delay: .45s; }
.about.is-open .about__content > :nth-child(2) { transition-delay: .55s; }
.about.is-open .about__content > :nth-child(3) { transition-delay: .65s; }
.about.is-open .about__content > :nth-child(4) { transition-delay: .78s; }

.about__logo { width: 64px; height: 64px; margin-bottom: 36px; display: block; }
.about__eyebrow {
    font-size: 13px; letter-spacing: .3em; text-transform: uppercase;
    color: rgba(255,255,255,.45);
    margin-bottom: 14px;
}
.about__heading {
    font-family: var(--cond); font-weight: 700;
    font-size: clamp(40px, 4.4vw, 72px); line-height: 1;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 28px;
}
.about__text {
    font-size: clamp(15px, 1.1vw, 18px); line-height: 1.75;
    color: rgba(255,255,255,.7);
    max-width: 480px;
}
.about__text p + p { margin-top: 16px; }

@media (max-width: 640px) {
    .about__panel { padding: 100px var(--gutter) 60px; }
    .about__close { top: 24px; right: var(--gutter); }
}

/* ---------- Pager ---------- */
.pager {
    position: fixed; right: var(--gutter); bottom: 80px; z-index: 6;
    display: flex; gap: 14px;
}
.pager__btn {
    width: 54px; height: 54px; border-radius: 50%;
    display: grid; place-items: center;
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(4px);
    color: rgba(255,255,255,.75);
    transition: color .3s, border-color .3s, background-color .3s, transform .3s;
}
.pager__btn:hover { color: #111; background: #fff; border-color: #fff; }
#prevBtn:hover svg { transform: translateX(-3px); }
#nextBtn:hover svg { transform: translateX(3px); }
.pager__btn svg { transition: transform .3s; }

/* ---------- Footer ---------- */
.footer {
    position: fixed; left: 0; right: 0; bottom: 0;
    display: flex; align-items: flex-end; justify-content: space-between;
    padding: 0 var(--gutter) 28px;
    z-index: 6;
}

.socials { display: flex; gap: 52px; }
.socials a {
    font-family: var(--cond); font-weight: 700; font-size: 15px;
    color: rgba(255,255,255,.55); transition: color .3s;
}
.socials a:hover { color: #fff; }

.copyright {
    font-family: var(--cond); font-weight: 300; font-size: 12px;
    color: rgba(255,255,255,.55);
}

/* ---------- Custom cursor ---------- */
.cursor {
    position: fixed; top: 0; left: 0; z-index: 100;
    pointer-events: none;
    display: flex; align-items: center; gap: 10px;
    transform: translate(-50%, -50%);
    opacity: 0; transition: opacity .3s;
}
.cursor.is-visible { opacity: 1; }
.cursor__ring {
    width: 58px; height: 58px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,.85);
    transition: width .25s, height .25s, background .25s;
}
.cursor.is-link .cursor__ring { width: 26px; height: 26px; background: rgba(255,255,255,.15); }
.cursor__arrow {
    width: 11px; height: 11px;
    border-left: 2px solid #fff; border-bottom: 2px solid #fff;
    transition: opacity .25s;
}
.cursor__arrow--l { transform: rotate(45deg); }
.cursor__arrow--r { transform: rotate(-135deg); }
.cursor.is-link .cursor__arrow { opacity: 0; }

@media (hover: hover) and (pointer: fine) {
    body, a, button { cursor: none; }
}

/* ---------- 3D brand text ---------- */
.ztext {
    display: inline-flex;
    font-family: var(--cond); font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em;
    line-height: 1;
    perspective: 900px;
    white-space: nowrap;
}
.ztext .ch {
    display: inline-block;
    color: #fff;
    opacity: 0;
    transform-origin: 50% 100%;
    transform: rotateX(-100deg) translateZ(-120px);
    /* stacked shadows in the letter's colour = extruded 3D block */
    text-shadow:
        .01em .01em 0 var(--c), .02em .02em 0 var(--c), .03em .03em 0 var(--c),
        .04em .04em 0 var(--c), .05em .05em 0 var(--c), .06em .06em 0 var(--c),
        .07em .07em 0 rgba(0,0,0,.6),
        .09em .12em .12em rgba(0,0,0,.55),
        0 0 .35em var(--c);
}
.ztext { --step: 75ms; --dur: 1000ms; --out-step: 60ms; }
.ztext.is-in .ch {
    animation: chIn var(--dur) cubic-bezier(.2, .9, .25, 1.25) forwards;
    animation-delay: calc(var(--i) * var(--step));
}
.ztext.is-live .ch {
    opacity: 1; transform: none;
    animation: chFloat 3.2s ease-in-out infinite;
    animation-delay: calc(var(--i) * -0.18s);
}
.ztext.is-out .ch {
    opacity: 1; transform: none;
    animation: chOut 1.2s ease-in forwards;
    animation-delay: calc(var(--i) * var(--out-step));
}
/* whole-word zoom + dissolve: one element, compositor-friendly */
.ztext--lg { will-change: transform, opacity; backface-visibility: hidden; }
.ztext--lg.is-in  { animation: wordZoomIn var(--dur) cubic-bezier(.22, 1, .36, 1) both; }
.ztext--lg.is-out { animation: wordZoomOut 1.2s cubic-bezier(.55, 0, .75, .2) both; }
@keyframes wordZoomIn {
    0%   { opacity: 0; filter: blur(6px); transform: translate3d(0, 0, 0) scale(.4); }
    60%  { opacity: 1; filter: blur(0); }
    100% { opacity: 1; filter: blur(0); transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes wordZoomOut {
    0%   { opacity: 1; filter: blur(0); transform: translate3d(0, 0, 0) scale(1); }
    100% { opacity: 0; filter: blur(6px); transform: translate3d(0, 0, 0) scale(1.3); }
}
/* dissolve in: letters condense out of a blurred haze while the noise mask fills in */
@keyframes chIn {
    0%   { opacity: 0; filter: blur(10px); transform: rotateX(-40deg) translateZ(-60px) scale(1.25); }
    45%  { opacity: .8; filter: blur(3px); }
    100% { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes chFloat {
    0%, 100% { transform: translateY(0) rotateX(0) rotateY(0); }
    50%      { transform: translateY(-.06em) rotateX(14deg) rotateY(-10deg); }
}
/* dissolve out: letters drift up and blur away while the noise mask eats them */
@keyframes chOut {
    0%   { opacity: 1; filter: blur(0); transform: none; }
    100% { opacity: 0; filter: blur(8px); transform: translateY(-.35em) scale(1.15); }
}
/* intro text: smaller, white only, slower reveal */
.ztext--lg {
    --step: 0ms;          /* 0 = whole word together */
    --out-step: 0ms;
    --dur: 2200ms;
    font-size: 20px;
    font-weight: 300;
    letter-spacing: .3em;
    margin-right: -.3em;               /* balance trailing letter-spacing */
}
.ztext--lg .ch {
    color: #fff;
    text-shadow:
        .01em .01em 0 #e6e6e6, .02em .02em 0 #d0d0d0, .03em .03em 0 #b8b8b8,
        .04em .04em 0 #9e9e9e,
        .06em .08em .1em rgba(0,0,0,.6),
        0 0 .4em rgba(255,255,255,.35);
}
/* letters stay still; the whole word does the animation */
.ztext--lg.is-in .ch,
.ztext--lg.is-out .ch { animation: none; opacity: 1; transform: none; }

/* ---------- Intro ---------- */
.intro {
    position: fixed; inset: 0; z-index: 60;
    background: #000;
    display: flex; align-items: center; justify-content: center;
    perspective: 1400px;
    overflow: hidden;
    transition: background-color 1.1s ease;
}
.intro__glow {
    position: absolute; left: 50%; top: 50%;
    width: 120vmax; height: 120vmax;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 45, 149, .16) 0%, rgba(61, 43, 214, .10) 25%, transparent 55%);
    animation: glowPulse 4s ease-in-out infinite;
    will-change: transform, opacity;
    pointer-events: none;
    transition: opacity .8s;
}
@keyframes glowPulse {
    0%, 100% { opacity: .6; transform: translate(-50%, -50%) scale(.9); }
    50%      { opacity: 1;  transform: translate(-50%, -50%) scale(1.05); }
}
.intro__stage {
    display: flex; flex-direction: column; align-items: center;
    gap: 2vmin;
    transform-style: preserve-3d;
    transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.intro__logo { width: min(38vmin, 340px); aspect-ratio: 1; transform-origin: 50% 50%; }
.intro__logo-in {
    width: 100%; height: 100%;
    transform-style: preserve-3d;
    animation: logoIn 2s cubic-bezier(.16, 1, .3, 1) forwards;
}
@keyframes logoIn {
    0%   { opacity: 0; transform: translateZ(-1600px) rotateY(-720deg) rotateX(50deg) scale(.3); }
    40%  { opacity: 1; }
    100% { opacity: 1; transform: none; }
}
.intro__ring {
    width: 100%; height: 100%; display: block;
    filter: drop-shadow(0 0 28px rgba(255, 45, 149, .45)) drop-shadow(0 0 60px rgba(255, 140, 0, .25));
    animation: ringSpin 9s linear infinite;
    will-change: transform;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }

.intro__skip {
    position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
    font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
    color: rgba(255,255,255,.35); transition: color .3s, opacity .5s;
}
.intro__skip:hover { color: #fff; }

/* intro leaving: black fades to the slider while the logo flies to the header */
.intro.is-leaving { background-color: transparent; pointer-events: none; }
.intro.is-leaving .intro__glow,
.intro.is-leaving .intro__skip { opacity: 0; }
.intro.is-gone { display: none; }

/* page UI hidden during intro */
.ui { transition: opacity 1s ease .35s; }
.is-intro .ui { opacity: 0; pointer-events: none; }
.is-intro .header.ui { opacity: 1; }              /* keep header box for logo target; hide its parts */

@media (prefers-reduced-motion: reduce) {
    .intro__logo-in, .intro__ring, .intro__glow, .ztext.is-live .ch { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1400px) {
    :root { --rail: 160px; --gutter: 40px; }}

@media (max-width: 1024px) {
    :root { --rail: 110px; --gutter: 24px; }
    .header { padding-top: 28px; }
    .brand__logo { width: 60px; height: 60px; }
    .socials { gap: 24px; }
    .pager__btn { width: 48px; height: 48px; }
}

/* ---------- Phones: normal scrolling page, content shown in full ---------- */
@media (max-width: 640px) {
    :root { --rail: 72px; --gutter: 18px; }
    .rail { display: none; }

    /* mobile banner (assets/images/mob-banner/<same name>) when available */
    .slide { background-image: var(--bg-mob, var(--bg)); }

    html, body { height: auto; }
    body {
        min-height: 100vh; min-height: 100svh;
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto 1fr auto auto;
        grid-template-areas:
            "header  header"
            "caption caption"
            "about   pager"
            "footer  footer";
        overflow-x: hidden;
    }
    body:not(.is-intro) { overflow-y: auto; }

    /* page still scrolls, but without the visible scrollbar */
    html, body { scrollbar-width: none; -ms-overflow-style: none; }
    html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }

    /* everything flows in the page; slider + intro + panels stay fixed */
    .header {
        grid-area: header;
        position: relative;
        padding: 22px var(--gutter) 0;
    }
    /* logo centred, always slowly rotating (starts once the intro logo has landed) */
    .header { justify-content: center; }
    .brand { flex-direction: column; gap: 10px; }
    .brand__logo { width: 90px; height: 90px; }
    .brand__logo img.is-landed { animation: ringSpin 9s linear infinite; will-change: transform; }
    .brand__text { letter-spacing: .12em; margin-right: -.12em; transform-origin: 50% 50%; }

    .caption {
        grid-area: caption;
        position: relative; inset: auto;
        display: block;
        overflow: visible;
        padding: 56px var(--gutter) 36px;
        pointer-events: auto;
    }
    .caption__inner { margin: 0 auto; }
    .caption__title { font-size: 34px; }
    .caption__sub { margin-top: 14px; font-size: 13px; letter-spacing: .1em; }
    .caption__sub::before { margin-bottom: 14px; }
    .caption__sub:not(:empty) + .caption__text { margin-top: 18px; }
    .caption__text::before { margin: 18px auto; }
    .caption__text p { font-size: 15px; line-height: 1.7; font-weight: 300; }
    .caption__text p + p { margin-top: 12px; }

    .about-link {
        grid-area: about;
        position: relative; left: auto; bottom: auto;
        align-self: center;
        padding-left: var(--gutter);
        font-size: 24px;
    }
    .pager {
        grid-area: pager;
        position: relative; right: auto; bottom: auto;
        align-self: center;
        padding-right: var(--gutter);
        gap: 10px;
    }
    .pager__btn { width: 42px; height: 42px; }

    .footer {
        grid-area: footer;
        position: relative;
        flex-direction: column; align-items: flex-start; gap: 14px;
        padding: 26px var(--gutter) 24px;
        margin-top: 22px;
        border-top: 1px solid var(--line);
    }
    .socials { gap: 28px; }
    .copyright { display: block; font-size: 11px; }
}
