/* =========================================================
   COLLISION — content pages (studio/, impressum/)
   Same ground, paper and touch colours as the 3D start page.
   html.js               JS running: scroll reveals active (js/pages.js)
   .site-bar.is-scrolled header gets a backdrop after scrolling
   ========================================================= */

/* Jost (OFL), self-hosted – the privacy notice promises no third-party servers.
   Used for menu, labels and buttons; headlines and body keep the system font. */
@font-face {
    font-family: 'Jost';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/jost-latin-400-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Jost';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/jost-latin-500-normal.woff2') format('woff2');
}

:root {
    --ground: #0E1A1C;              /* Grund */
    --ground-glass: rgba(14, 26, 28, 0.72);
    --paper: #EDE7DC;               /* Papier */
    --paper-soft: rgba(237, 231, 220, 0.64);
    --paper-line: rgba(237, 231, 220, 0.14);
    --touch: #FFA2FF;               /* Beruehrung */
    --touch-glow: rgba(255, 162, 255, 0.55);
    --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-ui: 'Jost', var(--font);
    --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
    --ease-collide: cubic-bezier(0.7, 0, 0.2, 1);
    --gutter: clamp(1.25rem, 4vw, 3rem);
    --max: 1240px;
    --bar-h: 72px;
}

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

html {
    background-color: var(--ground);
    scroll-behavior: smooth;
    scroll-padding-top: var(--bar-h);
}

body {
    background-color: var(--ground);
    color: var(--paper);
    font: 300 1.0625rem/1.65 var(--font);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Arrival: a viewport-sized veil opens as a circle from the centre, answering the circle
   that closes over the start page on double-click. Fixed, so it also works when the page loads scrolled (anchor, back button).
   Without @property support the radius can't animate — the veil then simply disappears
   when the animation ends (visibility falls back to hidden). */
@property --veil {
    syntax: '<length>';
    inherits: false;
    initial-value: 0px;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 100;
    background-color: var(--ground);
    -webkit-mask: radial-gradient(circle at 50% 50%, transparent var(--veil), #000 calc(var(--veil) + 1px));
    mask: radial-gradient(circle at 50% 50%, transparent var(--veil), #000 calc(var(--veil) + 1px));
    pointer-events: none;
    visibility: hidden;
    animation: pageIn 0.9s var(--ease-collide) backwards;
}

@keyframes pageIn {
    from { --veil: 0px; visibility: visible; }
    to { --veil: 75vmax; visibility: visible; }   /* 75vmax reaches past every corner */
}

a {
    color: inherit;
}

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

::selection {
    background-color: var(--touch);
    color: var(--ground);
}

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

/* ---------- Type ---------- */

h1,
h2,
h3 {
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.8rem, 7.2vw, 6.2rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3.8rem); }

h3 {
    font-size: clamp(1.35rem, 2.2vw, 1.9rem);
    font-weight: 400;
    letter-spacing: -0.01em;
}

.label {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font: 500 0.75rem/1 var(--font-ui);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--paper-soft);
}

/* small glowing lens dot */
.label::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--touch);
    box-shadow: 0 0 12px var(--touch-glow);
}

.lede {
    max-width: 36ch;
    font-size: clamp(1.1rem, 1.6vw, 1.35rem);
    color: var(--paper-soft);
}

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

.button {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.6rem;
    border: 1px solid var(--paper);
    border-radius: 999px;
    font: 400 0.95rem/1 var(--font-ui);
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: background-color 0.35s var(--ease-out), border-color 0.35s, color 0.35s, box-shadow 0.35s;
}

.button::after {
    content: "";
    width: 1.4rem;
    height: 1px;
    background-color: currentColor;
    transition: width 0.35s var(--ease-out);
}

.button:hover {
    background-color: var(--touch);
    border-color: var(--touch);
    color: var(--ground);
    box-shadow: 0 0 36px rgba(255, 162, 255, 0.35);
}

.button:hover::after {
    width: 2.2rem;
}

.button--large {
    padding: 1.3rem 2.2rem;
    font-size: 1.05rem;
}

/* ---------- Header bar ---------- */

.site-bar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    height: var(--bar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--gutter);
    border-bottom: 1px solid transparent;
    transition: background-color 0.4s, border-color 0.4s;
}

.site-bar.is-scrolled {
    background-color: var(--ground-glass);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-color: var(--paper-line);
}

.site-bar__mark img {
    width: auto;
    height: 17px;
}

.site-bar__nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.site-bar__nav a {
    font: 400 0.95rem/1 var(--font-ui);
    letter-spacing: 0.01em;
    text-decoration: none;
    color: var(--paper);
    transition: color 0.3s;
}

.site-bar__nav a:hover,
.site-bar__nav a[aria-current="page"] {
    color: var(--touch);
}

.site-bar__nav .site-bar__cta {
    padding: 0.6rem 1.1rem;
    border: 1px solid var(--paper-line);
    border-radius: 999px;
    color: var(--paper);
    transition: border-color 0.3s, color 0.3s;
}

.site-bar__nav .site-bar__cta:hover {
    border-color: var(--touch);
    color: var(--touch);
}

/* ---------- Studio: hero ---------- */

.studio-hero {
    max-width: var(--max);
    min-height: 100vh;
    min-height: 100svh;
    margin: 0 auto;
    padding: calc(var(--bar-h) + 3rem) var(--gutter) 4rem;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
}

.studio-hero__copy h1 {
    margin: 1.5rem 0 1.75rem;
}

.studio-hero__copy .lede {
    margin-bottom: 2.5rem;
}

.studio-hero__copy > * {
    animation: rise 1s var(--ease-out) backwards;
}

.studio-hero__copy > :nth-child(1) { animation-delay: 0.5s; }
.studio-hero__copy > :nth-child(2) { animation-delay: 0.62s; }
.studio-hero__copy > :nth-child(3) { animation-delay: 0.74s; }
.studio-hero__copy > :nth-child(4) { animation-delay: 0.86s; }

@keyframes rise {
    from { opacity: 0; transform: translateY(24px); }
}

.studio-hero__mark {
    width: 100%;
    height: auto;
    overflow: visible;
}

/* Collision in 2D: rings draw apart, meet, the lens lights up with a shock wave */
.ring {
    fill: none;
    stroke: var(--paper);
    stroke-width: 1.6;
}

.hero-ring {
    stroke-dasharray: 1;
}

.hero-ring--a { animation: ringA 2.2s var(--ease-collide) 0.4s both; }
.hero-ring--b { animation: ringB 2.2s var(--ease-collide) 0.4s both; }

@keyframes ringA {
    0% { stroke-dashoffset: 1; transform: translateX(-60px); }
    50% { stroke-dashoffset: 0; transform: translateX(-60px); }
    100% { stroke-dashoffset: 0; transform: translateX(0); }
}

@keyframes ringB {
    0% { stroke-dashoffset: -1; transform: translateX(60px); }
    50% { stroke-dashoffset: 0; transform: translateX(60px); }
    100% { stroke-dashoffset: 0; transform: translateX(0); }
}

.hero-lens {
    fill: var(--touch);
    transform-origin: 150px 100px;
    filter: drop-shadow(0 0 18px var(--touch-glow));
    animation:
        lensIn 0.9s var(--ease-out) 2.5s both,
        lensGlow 5s ease-in-out 3.4s infinite;
}

@keyframes lensIn {
    from { opacity: 0; transform: scale(0.3); }
    60% { opacity: 1; transform: scale(1.08); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes lensGlow {
    0%, 100% { filter: drop-shadow(0 0 18px rgba(255, 162, 255, 0.45)); }
    50% { filter: drop-shadow(0 0 34px rgba(255, 162, 255, 0.8)); }
}

.hero-wave {
    fill: none;
    stroke: var(--touch);
    stroke-width: 1;
    opacity: 0;
    transform-origin: 150px 100px;
    animation: wave 1.3s var(--ease-out) 2.5s both;
}

@keyframes wave {
    from { opacity: 0.9; transform: scale(1); }
    to { opacity: 0; transform: scale(7); }
}

/* ---------- Studio: statement ---------- */

.statement {
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(5rem, 12vw, 10rem) var(--gutter);
    border-top: 1px solid var(--paper-line);
}

.statement p {
    max-width: 26ch;
    font-size: clamp(1.6rem, 3.6vw, 3.1rem);
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.statement em {
    font-style: normal;
    color: var(--touch);
}

/* ---------- Studio: sections ---------- */

.section {
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(4rem, 10vw, 8rem) var(--gutter);
}

.section__head {
    display: grid;
    justify-items: start;
    gap: 1.25rem;
    margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

/* three hinted fields; each glyph lights one part of the mark (ring A, ring B, lens) */
.fields {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--paper-line);
    border-bottom: 1px solid var(--paper-line);
}

.field {
    display: grid;
    align-content: start;
    gap: 1rem;
    padding: 2.75rem 2rem 3rem;
}

.field:first-child {
    padding-left: 0;
}

.field:last-child {
    padding-right: 0;
}

.field + .field {
    border-left: 1px solid var(--paper-line);
}

.field__glyph {
    width: 4.75rem;
    height: auto;
    margin-bottom: 0.75rem;
    overflow: visible;
}

.field__glyph circle {
    fill: none;
    stroke: var(--paper-soft);
    stroke-width: 9;
}

.field__glyph path {
    fill: transparent;
    stroke: none;
}

.field__glyph circle.is-lit {
    stroke: var(--touch);
}

.field__glyph path.is-lit {
    fill: var(--touch);
}

.field__glyph .is-lit {
    transition: filter 0.45s var(--ease-out);
}

.field h3 {
    transition: transform 0.45s var(--ease-out);
}

.field p {
    max-width: 34ch;
    color: var(--paper-soft);
}

.field:hover .is-lit {
    filter: drop-shadow(0 0 10px var(--touch-glow));
}

.field:hover h3 {
    transform: translateX(0.5rem);
}

/* closing line: the "third thing" beneath the three fields */
.fields__foot {
    padding-top: clamp(2.5rem, 5vw, 3.5rem);
    max-width: 28ch;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    line-height: 1.2;
    letter-spacing: -0.015em;
}

.fields__foot em {
    font-style: normal;
    color: var(--touch);
}

.process {
    position: relative;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
}

/* timeline hairline through the nodes */
.process::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--paper-line);
}

.step {
    position: relative;
    padding-top: 2.5rem;
}

.step__node {
    position: absolute;
    top: 0;
    left: 0;
    width: 15px;
    height: 15px;
    border: 1px solid var(--paper);
    border-radius: 50%;
    background-color: var(--ground);
    transition:
        background-color 0.6s var(--ease-out) calc(var(--i, 0) * 120ms + 0.3s),
        border-color 0.6s var(--ease-out) calc(var(--i, 0) * 120ms + 0.3s),
        box-shadow 0.6s var(--ease-out) calc(var(--i, 0) * 120ms + 0.3s);
}

.step.is-visible .step__node {
    background-color: var(--touch);
    border-color: var(--touch);
    box-shadow: 0 0 16px var(--touch-glow);
}

.step h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.step p {
    font-size: 0.98rem;
    color: var(--paper-soft);
}

/* ---------- Studio: contact ---------- */

.contact {
    position: relative;
    overflow: hidden;
    padding: clamp(6rem, 14vw, 11rem) var(--gutter);
    border-top: 1px solid var(--paper-line);
    text-align: center;
}

.contact__rings {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(900px, 140vw);
    transform: translate(-50%, -50%);
    opacity: 0.12;
    pointer-events: none;
}

.contact__rings .lens {
    fill: var(--touch);
    opacity: 0.6;
}

.contact > :not(.contact__rings) {
    position: relative;
}

.contact h2 {
    max-width: 16ch;
    margin: 1.5rem auto;
}

.contact__text {
    max-width: 46ch;
    margin: 0 auto 2.75rem;
    color: var(--paper-soft);
}

.contact__mail {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--paper-soft);
}

.contact__mail a {
    text-decoration-color: var(--touch);
    text-underline-offset: 3px;
    transition: color 0.3s;
}

.contact__mail a:hover {
    color: var(--touch);
}

/* ---------- Legal page ---------- */

.legal {
    max-width: 46rem;
    margin: 0 auto;
    padding: calc(var(--bar-h) + clamp(3rem, 8vw, 6rem)) var(--gutter) clamp(4rem, 10vw, 7rem);
}

.legal h1,
.legal .legal__title {
    margin: 1.25rem 0 3rem;
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 300;
    letter-spacing: -0.02em;
}

.legal .legal__title {
    margin-top: 6rem;
}

.legal h2 {
    margin: 3rem 0 1rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--paper-line);
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: 0;
}

.legal h3 {
    margin: 1.75rem 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0;
}

.legal p,
.legal li {
    color: var(--paper-soft);
}

.legal p + p {
    margin-top: 1rem;
}

.legal ul {
    margin-top: 0.75rem;
    padding-left: 1.2rem;
}

.legal li + li {
    margin-top: 0.35rem;
}

.legal a {
    color: var(--paper);
    text-decoration-color: var(--touch);
    text-underline-offset: 3px;
}

/* Placeholder that still has to be filled in before going live */
.todo {
    padding: 0 0.35em;
    border: 1px dashed rgba(255, 162, 255, 0.6);
    border-radius: 4px;
    color: var(--touch);
    font-style: normal;
}

/* ---------- Footer ---------- */

.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2.5rem var(--gutter);
    border-top: 1px solid var(--paper-line);
    font-size: 0.8rem;
    color: var(--paper-soft);
}

.site-footer__mark img {
    width: auto;
    height: 28px;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem;
}

.site-footer nav a {
    font: 400 0.9rem/1.4 var(--font-ui);
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: color 0.3s;
}

.site-footer nav a:hover {
    color: var(--touch);
}

/* ---------- Scroll reveal (js/pages.js adds .is-visible) ---------- */

.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 1s var(--ease-out) calc(var(--i, 0) * 90ms),
        transform 1s var(--ease-out) calc(var(--i, 0) * 90ms);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

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

@media (max-width: 900px) {
    .studio-hero {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        padding-top: calc(var(--bar-h) + 2rem);
    }

    .studio-hero__mark {
        order: -1;
        width: min(420px, 86%);
        margin: 0 auto;
    }

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

    .field,
    .field:first-child,
    .field:last-child {
        padding: 2.25rem 0 2.5rem;
    }

    .field + .field {
        border-left: 0;
        border-top: 1px solid var(--paper-line);
    }

    .process {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 3rem;
    }

    .process::before {
        display: none;
    }
}

@media (max-width: 560px) {
    .site-bar__nav a:not(.site-bar__cta) {
        display: none;
    }

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

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .hero-ring { stroke-dashoffset: 0; }
    .hero-lens { opacity: 1; }
}
