/* Alpin Visuals - gemeinsames Design (Startseite + Unterseiten)
   Dunkle Kinowelt ueber einem 3D-Berg. Kein Orange in Schrift;
   Akzent ist ein kuehles Gletscherblau. */

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

@font-face {
    font-family: 'AV Display';
    src: url('schriften/inter-display-black.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'AV Display';
    src: url('schriften/inter-display-extralight.woff') format('woff');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'AV Logo';
    src: url('schriften/inter-display-light-logo.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Marke';
    src: url('schriften/poppins-medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #04070d;
    --ink: #f3f6fb;
    --text: #f3f6fb;
    --mute: rgba(243, 246, 251, 0.66);
    --text-2: rgba(243, 246, 251, 0.7);
    --faint: rgba(243, 246, 251, 0.4);
    --line: rgba(255, 255, 255, 0.15);
    --line-stark: rgba(255, 255, 255, 0.32);
    --akzent: #000;
    --akzent-2: #000;
    --glas: rgba(10, 16, 30, 0.5);
    --glas-hell: rgba(255, 255, 255, 0.06);
    --kopf: 76px;
    --rand: clamp(1.25rem, 5vw, 4.5rem);
    --breite: 1320px;
    --radius: 24px;
    --sanft: cubic-bezier(0.16, 1, 0.3, 1);
    --schnell: cubic-bezier(0.22, 0.8, 0.2, 1);
    --schleier: 0.25;

    --schrift: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --gross: 'AV Display', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI Variable Display', 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'Roboto Mono', Menlo, Consolas, monospace;
}

html {
    color-scheme: dark;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--kopf) - 10px);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    background: var(--bg);
}
html.gesperrt { overflow: hidden; }
html.laedt { overflow: hidden; }

body {
    font-family: var(--schrift);
    font-size: 1.0625rem;
    line-height: 1.6;
    letter-spacing: -0.011em;
    color: var(--ink);
    background: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
    min-height: 100vh;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
::selection { background: #000; color: #fff; }

:focus-visible {
    outline: 2px solid var(--akzent);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ---------- Hintergrund: 3D-Berg ---------- */
/* Bis der Berg berechnet ist (oder wenn WebGL fehlt), steht das Titelbild */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -3;
    background:
        linear-gradient(180deg, rgba(4, 7, 13, 0.55), rgba(4, 7, 13, 0.25) 45%, rgba(4, 7, 13, 0.7)),
        #04070d url('images/hero-2560.jpg') center 62% / cover no-repeat;
}
#berg {
    position: fixed;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0;
    transition: opacity 1.2s ease;
    background: #04070d;
}
html.berg-an #berg { opacity: 1; }

/* Mobil: vorgerendertes Berg-Video bzw. Standbild als fester Hintergrund */
#bergFilm, #bergBild {
    position: fixed;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    opacity: 0;
    transition: opacity 1.2s ease;
    background: #04070d;
}
#bergBild {
    background: #04070d url('images/berg-mobil.jpg') center / cover no-repeat;
}
html.film #bergFilm { display: block; }
html.bild #bergBild { display: block; }
html.film-an #bergFilm, html.bild-an #bergBild { opacity: 1; }
html.film #berg, html.bild #berg { display: none; }

/* leichter Schleier fuer Lesbarkeit; Staerke wechselt je Abschnitt */
#schleier {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(120% 90% at 50% 40%, transparent 30%, rgba(2, 4, 9, 0.5) 100%),
        rgba(2, 4, 9, var(--schleier));
}

/* ---------- Kopfzeile ---------- */
#kopf {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    padding: 14px var(--rand);
    transition: padding 0.5s var(--sanft), transform 0.6s var(--sanft);
}
.header-content {
    max-width: var(--breite);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 8px 10px 8px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background 0.5s ease, border-color 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}
#kopf.scrolled .header-content {
    background: rgba(6, 10, 20, 0.62);
    border-color: var(--line);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    backdrop-filter: blur(22px) saturate(150%);
    box-shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    flex: none;
}
.logo-mark {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid #000;
    background: #000;
    transition: transform 0.7s var(--sanft);
    box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.6);
}
.logo:hover .logo-mark { transform: rotate(-12deg) scale(1.06); }
.logo-text {
    /* Schriftzug wie auf der Kleidung: duenne Versalien, weit gesperrt, Trennstrich.
       Auf Apple-Geraeten Optima, sonst eine duenne Grotesk als Ersatz */
    display: inline-flex;
    align-items: center;
    font-family: Optima, 'Optima nova', 'AV Logo', var(--schrift);
    font-weight: 400;
    font-size: 1.05rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
}
.logo-text .strich {
    display: inline-block;
    width: 1.5px;
    height: 1.1em;
    margin: 0 0.5em 0 0.3em;
    background: currentColor;
}

#mainNav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}
#mainNav a {
    position: relative;
    padding: 0.55rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mute);
    border-radius: 999px;
    transition: color 0.3s ease, background 0.3s ease;
}
#mainNav a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--akzent);
    transform: translateX(-50%) scale(0);
    transition: transform 0.4s var(--sanft);
}
#mainNav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
#mainNav a[aria-current] { color: #fff; }
#mainNav a[aria-current]::after { transform: translateX(-50%) scale(1); }

.menu-toggle {
    display: none;
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    z-index: 5;
}
.menu-toggle span {
    position: absolute;
    left: 14px;
    right: 14px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.45s var(--sanft), top 0.45s var(--sanft);
}
.menu-toggle span:nth-child(1) { top: 19px; }
.menu-toggle span:nth-child(2) { top: 25px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

@media (max-width: 960px) {
    .menu-toggle { display: block; }
    #mainNav {
        position: fixed;
        inset: 0;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        gap: 0.2rem;
        padding: 6rem var(--rand) 3rem;
        background: rgba(3, 6, 12, 0.94);
        -webkit-backdrop-filter: blur(26px);
        backdrop-filter: blur(26px);
        opacity: 0;
        visibility: hidden;
        clip-path: circle(0% at calc(100% - 46px) 46px);
        transition: clip-path 0.8s var(--sanft), opacity 0.4s ease, visibility 0s 0.8s;
        z-index: 4;
    }
    #mainNav.active {
        opacity: 1;
        visibility: visible;
        clip-path: circle(150% at calc(100% - 46px) 46px);
        transition: clip-path 0.9s var(--sanft), opacity 0.3s ease;
    }
    #mainNav a {
        font-family: var(--gross);
        font-weight: 900;
        font-size: clamp(2.2rem, 10vw, 3.6rem);
        letter-spacing: -0.02em;
        text-transform: uppercase;
        color: #fff;
        padding: 0.15em 0;
        background: none !important;
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.8s var(--sanft);
    }
    #mainNav a::after { display: none; }
    #mainNav.active a {
        opacity: 1;
        transform: none;
        transition-delay: calc(0.12s + var(--i, 0) * 0.06s);
    }
    #mainNav a[aria-current] { color: var(--akzent); }
    .logo-text { display: none; }   /* Handy: nur das runde AV-Logo */
}
@media (max-width: 420px) {
    .logo-mark { width: 40px; height: 40px; }
}

/* ---------- Knoepfe ---------- */
.cta-button,
.knopf {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 1.05rem 2rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #04070d;
    background: #fff;
    border: 1px solid #fff;
    border-radius: 999px;
    overflow: hidden;
    isolation: isolate;
    cursor: pointer;
    transition: transform 0.5s var(--sanft), box-shadow 0.5s ease, color 0.4s ease;
    box-shadow: 0 14px 40px -14px rgba(0, 0, 0, 0.55);
    will-change: transform;
}
.cta-button::before,
.knopf::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--akzent);
    transform: translateY(101%);
    transition: transform 0.6s var(--sanft);
    border-radius: inherit;
}
.cta-button:hover::before,
.knopf:hover::before { transform: none; }
.cta-button:hover,
.knopf:hover { color: #fff; box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.9); }
.knopf.geist {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--line-stark);
    box-shadow: none;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
.knopf.geist::before { background: #fff; }
.knopf.geist:hover { color: #04070d; box-shadow: none; }
.knopf .pfeil, .cta-button .pfeil {
    width: 1.1em;
    height: 1.1em;
    transition: transform 0.5s var(--sanft);
}
.knopf:hover .pfeil, .cta-button:hover .pfeil { transform: translateX(5px); }

/* ---------- Glas ---------- */
.glas {
    position: relative;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03) 60%), var(--glas);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    backdrop-filter: blur(22px) saturate(140%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 40px 80px -40px rgba(0, 0, 0, 0.8);
}
html.sparsam .glas,
html.sparsam #kopf.scrolled .header-content {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(8, 13, 24, 0.82);
}

/* ---------- Ladebildschirm ---------- */
#lader {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--rand);
    background: #03060b;
    color: #fff;
    clip-path: inset(0 0 0 0);
    transition: clip-path 1.2s var(--sanft);
}
#lader.weg { clip-path: inset(0 0 100% 0); pointer-events: none; }
#lader .l-oben, #lader .l-unten {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--mute);
}
#lader .l-zahl {
    font-family: var(--gross);
    font-weight: 900;
    font-size: clamp(5rem, 22vw, 17rem);
    line-height: 0.8;
    letter-spacing: -0.05em;
    font-variant-numeric: tabular-nums;
}
#lader .l-zahl small { font-size: 0.25em; letter-spacing: 0; font-weight: 200; margin-left: 0.15em; }
#lader .l-linie {
    height: 2px;
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
    margin: 1.4rem 0 1rem;
}
#lader .l-linie i {
    display: block;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--akzent), #fff);
    transform: scaleX(0);
    transform-origin: left;
}
#lader .l-logo { width: 54px; height: 54px; border-radius: 50%; border: 2px solid #000; animation: dreh 6s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }
html:not(.js) #lader { display: none; }

/* ---------- Einblend-Effekte ---------- */
.js .zeige {
    opacity: 0;
    translate: 0 46px;
    filter: blur(10px);
    transition: opacity 1s ease, translate 1.2s var(--sanft), filter 1s ease;
    transition-delay: calc(var(--i, 0) * 90ms);
}
.js .zeige.sichtbar { opacity: 1; translate: 0 0; filter: none; }
.js .scroll-reveal { /* Unterseiten */
    opacity: 0;
    transform: translate3d(0, 36px, 0);
    filter: blur(8px);
    transition: opacity 0.9s ease, transform 1.1s var(--sanft), filter 0.9s ease;
    transition-delay: calc(var(--i, 0) * 80ms);
}
.js .scroll-reveal.visible { opacity: 1; transform: none; filter: none; }

/* Woerter, die beim Scrollen aufleuchten */
.wortlicht .w { opacity: 0.16; transition: opacity 0.35s ease; }
.wortlicht .w.an { opacity: 1; }

/* Titel-Zeilen: Buchstaben steigen aus einer Maske auf */
.maske { display: block; overflow: hidden; padding: 0.04em 0 0.1em; margin: -0.04em 0 -0.1em; }
.maske > span { display: inline-block; will-change: transform; }
.js .maske > span { transform: translateY(112%) rotate(4deg); transition: transform 1.4s var(--sanft); transition-delay: calc(var(--i, 0) * 120ms + 0.15s); }
html.js.bereit .maske > span { transform: none; }

/* ---------- HUD (Sucher) ---------- */
#hud {
    position: fixed;
    inset: 0;
    z-index: 70;
    pointer-events: none;
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    opacity: 0;
    transition: opacity 1.2s ease 0.8s;
}
html.bereit #hud { opacity: 1; }
#hud::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 110px;
    z-index: -1;
    background: linear-gradient(0deg, rgba(2, 4, 9, 0.62), transparent);
}
#hud .ecke { position: absolute; width: 26px; height: 26px; border: 0 solid rgba(255, 255, 255, 0.55); }
#hud .e1 { top: 96px; left: 22px; border-top-width: 1.5px; border-left-width: 1.5px; }
#hud .e2 { top: 96px; right: 22px; border-top-width: 1.5px; border-right-width: 1.5px; }
#hud .e3 { bottom: 22px; left: 22px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
#hud .e4 { bottom: 22px; right: 22px; border-bottom-width: 1.5px; border-right-width: 1.5px; }
#hud .links { position: absolute; left: 56px; bottom: 30px; display: grid; gap: 0.35rem; }
#hud .rechts { position: absolute; right: 56px; bottom: 30px; display: grid; gap: 0.35rem; text-align: right; }
#hud .rec { display: inline-flex; align-items: center; gap: 0.6rem; }
#hud .rec i {
    width: 8px; height: 8px; border-radius: 50%; background: #ff4d4d;
    box-shadow: 0 0 12px rgba(255, 77, 77, 0.9);
    animation: blink 1.4s steps(2, jump-none) infinite;
}
@keyframes blink { 50% { opacity: 0.15; } }
#hud b { font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
#hud .mitte {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    gap: 0.9rem;
    justify-items: end;
}
#hud .mitte a {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease;
}
#hud .mitte a span { opacity: 0; transform: translateX(8px); transition: opacity 0.3s ease, transform 0.4s var(--sanft); }
#hud .mitte a i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; transition: background 0.3s ease, transform 0.4s var(--sanft); }
#hud .mitte a:hover span, #hud .mitte a.jetzt span { opacity: 1; transform: none; }
#hud .mitte a.jetzt { color: #fff; }
#hud .mitte a.jetzt i { background: var(--akzent); border-color: var(--akzent); transform: scale(1.3); }
#fortschritt {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    z-index: 90;
    background: linear-gradient(90deg, var(--akzent), #fff);
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
}
@media (max-width: 900px) {
    #hud .mitte, #hud .ecke, #hud .rechts { display: none; }
    #hud .links { left: var(--rand); bottom: 18px; font-size: 0.625rem; }
}

/* ---------- Cursor ---------- */
#cursor { display: none; }
html.cursor-an { cursor: none; }
html.cursor-an a, html.cursor-an button, html.cursor-an input, html.cursor-an textarea { cursor: none; }
html.cursor-an #cursor { display: block; }
#cursor i, #cursor b {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 400;
    border-radius: 50%;
    will-change: transform;
}
#cursor i { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; background: #fff; mix-blend-mode: difference; }
#cursor b {
    width: 44px; height: 44px; margin: -22px 0 0 -22px;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    display: grid; place-items: center;
    font: 600 0.625rem/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: #04070d;
    transition: width 0.5s var(--sanft), height 0.5s var(--sanft), margin 0.5s var(--sanft), background 0.4s ease, border-color 0.4s ease;
}
#cursor.hover b { width: 74px; height: 74px; margin: -37px 0 0 -37px; border-color: var(--akzent); background: rgba(0, 0, 0, 0.12); }
#cursor.play b { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: #fff; border-color: #fff; }
#cursor b span { opacity: 0; transition: opacity 0.3s ease; }
#cursor.play b span { opacity: 1; }

/* ---------- Fusszeile ---------- */
footer {
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, rgba(3, 6, 12, 0.5), rgba(3, 6, 12, 0.92) 40%);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    padding: clamp(3.5rem, 7vw, 6rem) var(--rand) 2rem;
}
.footer-content {
    max-width: var(--breite);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2.5rem;
}
.footer-section h4 {
    font-family: var(--mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--akzent);
    margin-bottom: 1.2rem;
}
.footer-section a,
.footer-section p {
    display: block;
    font-size: 0.9375rem;
    color: var(--mute);
    margin-bottom: 0.55rem;
    transition: color 0.3s ease, transform 0.4s var(--sanft);
}
.footer-section a:hover { color: #fff; transform: translateX(4px); }
.footer-bottom {
    max-width: var(--breite);
    margin: 3.5rem auto 0;
    padding-top: 1.6rem;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 2rem;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--faint);
}
.footer-bottom a { color: var(--mute); }
.footer-bottom a:hover { color: #fff; }
@media (max-width: 860px) { .footer-content { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-content { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .zeige, .js .scroll-reveal { opacity: 1; translate: none; transform: none; filter: none; transition: none; }
    .js .maske > span { transform: none; transition: none; }
    .wortlicht .w { opacity: 1; }
    #lader { display: none; }
}

/* einheitliche Buchstabenabstaende (seite.js setzt die Abstaende je Buchstabenpaar) */
.abstand-gleich { font-kerning: none; }
