/* =============================================================
   MoRi — Global styles (home + shared shell)
   ============================================================= */

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

html {
    -webkit-text-size-adjust: 100%;
    /* Lenis handles smooth scroll; keep native fallback off to avoid double-easing */
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: 1.65;
    color: var(--cream);
    background: var(--ink-900);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

/* Lenis */
html.lenis,
html.lenis body {
    height: auto;
}

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

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

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

::selection {
    background: var(--accent);
    color: var(--ink-900);
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -0.02em;
}

/* ---------- Atmosphere: subtle grain + vignette ---------- */
.atmosphere {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.atmosphere::before {
    /* drifting warm glow */
    content: "";
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(40% 50% at 22% 18%, rgba(236, 207, 138, 0.10), transparent 60%),
        radial-gradient(45% 55% at 82% 75%, rgba(63, 110, 160, 0.16), transparent 62%);
    filter: blur(10px);
    animation: drift 26s var(--ease-soft) infinite alternate;
}

.atmosphere::after {
    /* fine film grain */
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.045;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

@keyframes drift {
    0% {
        transform: translate3d(-2%, -1%, 0) scale(1.02);
    }
    100% {
        transform: translate3d(3%, 2%, 0) scale(1.08);
    }
}

/* ---------- Layout helpers ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

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

.eyebrow {
    font-family: var(--font-body);
    font-size: var(--fs-label);
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 500;
}

.eyebrow--muted {
    color: var(--muted);
}

.lead {
    font-size: var(--fs-lead);
    color: var(--muted);
    max-width: 46ch;
    line-height: 1.6;
}

/* ---------- Reveal animation (driven by GSAP, CSS fallback) ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

[data-reveal].is-in,
.no-js [data-reveal] {
    opacity: 1;
    transform: none;
}

/* ---------- Buttons / links ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    padding: 0.85em 1.6em;
    border-radius: 100px;
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    border: 1px solid var(--line-strong);
    color: var(--cream);
    background: transparent;
    cursor: pointer;
    transition: background 0.45s var(--ease-out), color 0.45s var(--ease-out),
        border-color 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}

.btn:hover {
    background: var(--accent-now);
    color: var(--ink-900);
    border-color: var(--accent-now);
    transform: translateY(-2px);
}

.btn--solid {
    background: var(--accent-now);
    color: var(--ink-900);
    border-color: var(--accent-now);
}

.btn--solid:hover {
    background: transparent;
    color: var(--cream);
}

.btn .arrow {
    transition: transform 0.45s var(--ease-out);
}

.btn:hover .arrow {
    transform: translateX(4px);
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    color: var(--accent-now);
    font-weight: 500;
    position: relative;
}

.text-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease-out);
}

.text-link:hover::after {
    transform: scaleX(1);
}

/* =============================================================
   HEADER / NAV
   ============================================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: background 0.5s var(--ease-soft), backdrop-filter 0.5s var(--ease-soft),
        border-color 0.5s var(--ease-soft);
    border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
    background: rgba(10, 22, 34, 0.72);
    backdrop-filter: blur(14px);
    border-bottom-color: var(--line);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

/* brand collapses to MoRi; hidden at the very top (hero owns the wordmark) */
.nav-brand {
    font-family: var(--font-display);
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    color: var(--cream);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.nav-brand .accent {
    color: var(--accent);
}

.grow {
    white-space: nowrap;
    display: inline-block;
}

.site-header.is-scrolled .nav-brand {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(1.2rem, 2.4vw, 2.4rem);
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    color: var(--muted);
    position: relative;
    transition: color 0.4s var(--ease-out);
}

.nav-links a:hover {
    color: var(--cream);
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--ease-out);
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 30px;
    height: 30px;
    justify-content: center;
    background: none;
    border: 0;
    cursor: pointer;
    z-index: 110;
}

.nav-toggle span {
    height: 1.5px;
    width: 100%;
    background: var(--cream);
    transition: transform 0.4s var(--ease-out), opacity 0.3s var(--ease-out);
}

/* =============================================================
   HERO
   ============================================================= */
/* Pin wrapper: gives the sticky hero scroll-distance to reveal the full name
   before the page advances to the showreel. */
.hero-pin {
    position: relative;
    height: 200vh;
}

.hero {
    position: sticky;
    top: 0;
    height: 100svh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 7rem var(--gutter) 4rem;
    overflow: hidden;
}

/* No-JS / reduced fallback: if the pin can't be driven, don't trap the user
   in a 200vh empty block — collapse it to a single screen. */
.no-pin .hero-pin {
    height: auto;
}

.no-pin .hero {
    position: relative;
}

.hero__tag {
    margin-bottom: clamp(1.5rem, 4vh, 3rem);
}

/* The morphing wordmark */
.wordmark {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--fs-hero);
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: var(--cream);
    white-space: nowrap;
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
}

.wordmark .fixed {
    color: var(--cream);
}

.wordmark .accent {
    color: var(--accent);
}

/* hidden letters that expand in on scroll */
.wordmark .grow {
    display: inline-block;
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    transform: translateY(0.06em);
    will-change: max-width, opacity;
}

.wordmark .gap {
    display: inline-block;
    width: 0;
    overflow: hidden;
}

.hero__sub {
    margin-top: clamp(1.5rem, 4vh, 2.6rem);
    font-size: var(--fs-lead);
    color: var(--muted);
    letter-spacing: 0.02em;
    max-width: 40ch;
}

.hero__scrollcue {
    position: absolute;
    left: 50%;
    bottom: clamp(1.6rem, 4vh, 2.6rem);
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    color: var(--muted-dim);
    font-size: 0.7rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.hero__scrollcue .line {
    width: 1px;
    height: 46px;
    background: linear-gradient(var(--accent), transparent);
    animation: cueline 2.4s var(--ease-soft) infinite;
    transform-origin: top;
}

@keyframes cueline {
    0% { transform: scaleY(0); opacity: 0; }
    40% { transform: scaleY(1); opacity: 1; }
    100% { transform: scaleY(1); opacity: 0; transform-origin: bottom; }
}

/* =============================================================
   SECTION HEADINGS
   ============================================================= */
.section {
    padding-block: var(--section-y);
    position: relative;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.section-head h2 {
    font-size: var(--fs-h2);
    max-width: 16ch;
}

.section-head .lead {
    max-width: 38ch;
}

.index {
    font-family: var(--font-display);
    color: var(--accent);
    font-size: 0.95rem;
}

/* =============================================================
   SHOWREEL
   ============================================================= */
.showreel {
    background: var(--ink-850);
    border-block: 1px solid var(--line);
}

.reel {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
}

.reel video,
.reel img.reel__poster {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.reel__poster {
    transition: transform 1.2s var(--ease-out), opacity 0.6s var(--ease-out);
}

.reel.is-playing .reel__poster,
.reel.is-playing .reel__overlay {
    opacity: 0;
    pointer-events: none;
}

.reel:hover .reel__poster {
    transform: scale(1.04);
    will-change: transform;
}

.reel__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
    background: linear-gradient(180deg, rgba(10, 22, 34, 0.25), rgba(10, 22, 34, 0.55));
    transition: opacity 0.5s var(--ease-out);
}

.reel__play {
    width: clamp(70px, 8vw, 104px);
    height: clamp(70px, 8vw, 104px);
    border-radius: 50%;
    border: 1px solid var(--accent);
    background: rgba(10, 22, 34, 0.35);
    backdrop-filter: blur(4px);
    display: grid;
    place-items: center;
    transition: transform 0.5s var(--ease-out), background 0.2s var(--ease-out);
    will-change: transform;
}

.reel:hover .reel__play {
    transform: scale(1.08);
    background: var(--accent);
}

.reel__play svg {
    width: 34%;
    height: 34%;
    fill: var(--accent);
    transition: fill 0.5s var(--ease-out);
    margin-left: 6%;
}

.reel:hover .reel__play svg {
    fill: var(--ink-900);
}

.reel__label {
    color: var(--cream);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

/* =============================================================
   PROJECTS — cinematic feature cards
   ============================================================= */
.projects {
    display: flex;
    flex-direction: column;
    gap: clamp(3.5rem, 8vw, 7rem);
}

.feature {
    --c: var(--accent);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
    padding: clamp(1.25rem, 3vw, 2.5rem);
    border-radius: var(--radius-lg);
    background: transparent;
    will-change: transform;
    transition: transform 0.6s var(--ease-out), background 0.6s var(--ease-out),
        box-shadow 0.6s var(--ease-out);
    position: relative;
}

.feature:nth-child(even) {
    flex-direction: row-reverse !important;
}

.feature:nth-child(even) .feature__media {
    order: 1;
}

.feature:nth-child(even) .feature__body {
    order: 0;
}

.feature__body {
    flex: 1;
    position: relative;
}

.feature__media {
    flex: 1;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--ink-800);
    box-shadow: var(--shadow-soft);
    contain: paint;
}

.feature__media::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.7;
    transition: opacity 0.6s var(--ease-out);
}

.feature__media img,
.feature__media video {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    will-change: transform;
    transform: translateZ(0);
    transition: transform 0.5s var(--ease-out);
}

.feature__media img {
    object-fit: contain;
}

/* PLACEHOLDER motion layer — hover starfield (see js/starfield.js) */
.feature > .starfield {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s var(--ease-out);
}

.feature:hover > .starfield,
.feature:focus-within > .starfield,
.feature:active > .starfield,
.feature:focus-visible > .starfield,
.feature.is-in > .starfield,
.feature.is-active > .starfield {
    opacity: 1;
}

.feature:not(:hover) > .starfield {
    opacity: 0.1; /* Beispiel: leicht transparent statt ganz aus */
    transition: opacity 1s var(--ease-out);
}

.feature__uplight::before {
    content: "";
    position: absolute;
    inset: 0;
} 

.feature__uplight {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: soft-light;

    border-radius: var(--radius-lg);
    overflow: hidden;
    background:
        /* drifting bright core */
        radial-gradient(circle at 50% 180%,
            var(--c) 0%,
            transparent 65%),
        /* steady base wash along the bottom */
        radial-gradient(circle at 50% 200%,
            var(--c) 40%,
            transparent 75%);
    background-repeat: no-repeat;
    background-size: 140% 140%, 100% 100%;
    background-position: 50% 200%, 50% 200%;
}

.feature:hover > .feature__uplight,
.feature:focus-within > .feature__uplight,
.feature.is-active > .feature__uplight {
    opacity: 0.7;
    animation: sheira-flow 3s ease-in-out infinite;
}

/* The bright core drifts side to side while also waving up/down for a flowing effect. */
@keyframes sheira-flow {
    0% {
        background-position: 45% 100%, 50% 100%;
    }

    50% {
        background-position: 55% 60%, 50% 100%;
    }

    100% {
        background-position: 45% 100%, 50% 100%;
    }
}

.feature:hover .feature__media img,
.feature:hover .feature__media video {
    transform: scale(1.05);
}

.feature__media .corner {
    position: absolute;
    inset: 0;
    z-index: 2;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    transition: border-color 0.6s var(--ease-out);
}

.feature:hover .feature__media .corner {
    border-color: color-mix(in srgb, var(--c) 55%, transparent);
}

.feature__num {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    color: color-mix(in srgb, var(--c) 80%, var(--cream));
    line-height: 1;
    opacity: 0.55;
}

.feature__kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.7em;
    margin: 1.1rem 0 0.9rem;
    font-size: var(--fs-label);
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--muted);
}

.feature__kicker .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--c);
    box-shadow: 0 0 18px color-mix(in srgb, var(--c) 70%, transparent);
}

.feature__title {
    font-size: var(--fs-h1);
    color: var(--cream);
    margin-bottom: 0.7rem;
}

.feature:hover .feature__title {
    color: color-mix(in srgb, var(--c) 35%, var(--cream));
}

.feature:hover {
    transform: translateY(-6px);
    background: color-mix(in srgb, var(--ink-800) 65%, transparent);
    box-shadow: 0 40px 90px -35px rgba(0, 0, 0, 0.65);
}

.feature__desc {
    color: var(--muted);
    max-width: 44ch;
    margin-bottom: 1.6rem;
}

.feature__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.6rem;
    margin-bottom: 1.7rem;
}

.tag {
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 100px;
    padding: 0.35em 0.9em;
}

.feature .text-link {
    color: var(--c);
}

.feature__media .badge--soon {
    position: absolute;
    z-index: 3;
    top: 1rem;
    left: 1rem;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-900);
    background: var(--c);
    padding: 0.4em 0.8em;
    border-radius: 100px;
    font-weight: 600;
}

/* =============================================================
   ABOUT
   ============================================================= */
.about {
    background: var(--ink-850);
    border-block: 1px solid var(--line);
}

.about__grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: center;
}

.about__portrait {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4 / 5;
    box-shadow: var(--shadow-soft);
}

.about__portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.92) contrast(1.02);
}

.portrait-image {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
    object-fit: cover;

    opacity: 0;

    transform: scale(1.08);

    transition:
        opacity 1.4s ease,
        transform 6s ease;

    will-change: transform, opacity;
}

.portrait-image.active {
    opacity: 1;
    transform: scale(1);
}

.about__portrait::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(10, 22, 34, 0.5));
}

.about__body h2 {
    font-size: var(--fs-h2);
    margin-bottom: 1.6rem;
}

.about__body p {
    color: var(--muted);
    max-width: 56ch;
    margin-bottom: 1.2rem;
}

.about__body p strong {
    color: var(--cream);
    font-weight: 500;
}

.about__disciplines {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 2rem;
}

.about__disciplines .tag {
    color: var(--accent);
    border-color: var(--line-strong);
}

/* =============================================================
   CONTACT / FOOTER
   ============================================================= */
.contact {
    text-align: center;
}

.contact__big {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 8vw, 6.5rem);
    line-height: 1;
    color: var(--cream);
    margin: 1rem 0 2.4rem;
}

.contact__big a:hover {
    color: var(--accent);
}

.contact__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3.5rem;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding-block: 3rem;
    position: relative;
    z-index: 2;
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.4rem;
    align-items: center;
    justify-content: space-between;
}

.footer-socials {
    display: flex;
    gap: 1.6rem;
    list-style: none;
}

.footer-socials a {
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--muted);
    transition: color 0.4s var(--ease-out);
}

.footer-socials a:hover {
    color: var(--accent);
}

.footer-meta {
    color: var(--muted-dim);
    font-size: 0.82rem;
}

.footer-meta a:hover {
    color: var(--accent);
}