



/* =========================================================
   ALEX SCHALLER
   HEADER & NAVIGATION
========================================================= */

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


/* =========================================================
   VARIABLES
========================================================= */

.as-header {

    --as-ink: #fffdf9;
    --as-paper: #ebe8e1;

    --as-header-height: 92px;

    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: var(--as-header-height);

    padding-left: 5vw;
    padding-right: 5vw;

    display: flex;
    align-items: center;
    justify-content: space-between;

    z-index: 1300;
}

@media (min-width: 769px) {
    .as-header {
        position: absolute;
    }
}

.as-back-to-top {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    z-index: 1000;
    display: grid;
    width: 48px;
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(51, 51, 51, 0.92);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.as-back-to-top-icon {
    position: relative;
    display: block;
    width: 2px;
    height: 17px;
    background: currentColor;
}

.as-back-to-top-icon::before {
    position: absolute;
    top: 1px;
    left: -4px;
    width: 8px;
    height: 8px;
    border-top: 2px solid currentColor;
    border-left: 2px solid currentColor;
    content: "";
    transform: rotate(45deg);
}

.as-back-to-top[hidden] {
    display: none;
}

.as-back-to-top:hover {
    background: #222222;
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.28);
    transform: translateY(-3px);
}

.as-back-to-top:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

/* =========================================================
   LOGO
========================================================= */

.as-logo {

    position: relative;
    z-index: 1200;
    display: block;
    flex: 0 0 auto;
    width: 150px;
    height: var(--as-header-height);
    overflow: hidden;
}

.as-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0) invert(1);
}


/* =========================================================
   DESKTOP NAVIGATION
========================================================= */

.as-desktop-nav {

    display: flex;
    align-items: center;
    
    gap: 42px;
}


.as-desktop-nav a {

    position: relative;

    color: var(--as-ink);

    text-decoration: none;

    font-family: "Manrope", Arial, sans-serif;

    font-size: 11px;
    font-weight: 400;

    line-height: 1;

    text-transform: uppercase;
    letter-spacing: 0.1em;

    transition: opacity 0.3s ease;
}


/* Underline animation */

.as-desktop-nav a::after {

    content: "";

    position: absolute;

    left: 0;
    bottom: -8px;

    width: 100%;
    height: 1px;

    background: currentColor;

    transform: scaleX(0);

    transform-origin: right center;

    transition: transform 0.45s cubic-bezier(.77, 0, .18, 1);
}


.as-desktop-nav a:hover::after {

    transform: scaleX(1);

    transform-origin: left center;
}


.as-desktop-nav a:hover {

    opacity: 0.6;
}


/* =========================================================
   MOBILE MENU BUTTON
========================================================= */

.as-menu-button {

    display: none;

    position: absolute;

    top: 22px;
    right: 5vw;

    width: 48px;
    height: 48px;

    padding: 0;

    border: none;
    border-radius: 50%;

    background: var(--as-ink);

    cursor: pointer;

    z-index: 1300;

    place-items: center;

    transition: transform 0.25s ease;
}


.as-menu-button:hover {
    transform: scale(1.05);
}


.as-menu-button:active {
    transform: scale(0.94);
}


.as-menu-button:focus-visible {

    outline: 2px solid var(--as-ink);
    outline-offset: 4px;
}


/* =========================================================
   HAMBURGER
========================================================= */

.as-menu-icon {

    position: relative;

    display: block;

    width: 20px;
    height: 14px;
}


.as-menu-icon i {

    position: absolute;

    left: 0;

    width: 20px;
    height: 1.5px;

    background: #fff;

    border-radius: 2px;

    transform-origin: center;

    transition:
        top 0.4s cubic-bezier(.77, 0, .18, 1),
        transform 0.4s cubic-bezier(.77, 0, .18, 1);
}


.as-menu-icon i:first-child {
    top: 2px;
}


.as-menu-icon i:last-child {
    top: 11px;
}


/* =========================================================
   HAMBURGER → X
========================================================= */

.as-header[data-menu-open]
.as-menu-icon
i:first-child {

    top: 6px;

    transform: rotate(45deg);
}


.as-header[data-menu-open]
.as-menu-icon
i:last-child {

    top: 6px;

    transform: rotate(-45deg);
}


/* =========================================================
   MOBILE FULLSCREEN MENU
========================================================= */

.as-mobile-menu {

    position: fixed;

    inset: 0;

    width: 100vw;
    height: 100dvh;

    padding: 0 8vw;

    background: var(--as-paper);

    display: flex;
    flex-direction: column;
    justify-content: center;

    z-index: 1100;

    /*
       Circle startet exakt
       im Zentrum des Buttons.
    */

    clip-path:
        circle(
            0px
            at
            calc(100% - 5vw - 24px)
            46px
        );

    visibility: hidden;

    transition:
        clip-path
        0.75s
        cubic-bezier(.65, 0, .35, 1),

        visibility
        0s
        linear
        0.75s;
}


/* =========================================================
   MENU OPEN
========================================================= */

.as-header[data-menu-open]
.as-mobile-menu {

    clip-path:
        circle(
            150%
            at
            calc(100% - 5vw - 24px)
            46px
        );

    visibility: visible;

    transition:
        clip-path
        0.75s
        cubic-bezier(.65, 0, .35, 1),

        visibility
        0s
        linear
        0s;
}


/* =========================================================
   MOBILE LINKS
========================================================= */

.as-mobile-navigation {

    display: flex;
    flex-direction: column;

    gap: 3px;
}


.as-mobile-navigation a {

    display: flex;
    align-items: baseline;

    gap: 20px;

    padding: 8px 0;

    color: #717171;

    text-decoration: none;

    font-family:
        "Cormorant Garamond",
        Georgia,
        serif;

    font-size:
        clamp(
            52px,
            11vw,
            105px
        );

    font-weight: 400;

    line-height: 0.92;

    letter-spacing: -0.035em;

    opacity: 0;

    transform: translateY(24px);

    transition:
        opacity 0.4s ease,
        transform 0.6s cubic-bezier(.2, .7, .2, 1),
        padding-left 0.4s cubic-bezier(.77, 0, .18, 1);
}


/* =========================================================
   NUMBERS
========================================================= */

.as-number {

    display: inline-block;

    min-width: 22px;

    font-family:
        "Manrope",
        Arial,
        sans-serif;

    font-size: 10px;

    font-weight: 400;

    line-height: 1;

    letter-spacing: 0.04em;

    opacity: 0.45;
}


/* =========================================================
   LINK REVEAL
========================================================= */

.as-header[data-menu-open]
.as-mobile-navigation
a {

    opacity: 1;

    transform: translateY(0);

    transition-delay:
        calc(
            0.18s +
            var(--i) * 0.075s
        );
}


/* =========================================================
   LINK HOVER
========================================================= */

.as-mobile-navigation a:hover {
    padding-left: 18px;
}


/* =========================================================
   MOBILE FOOTER
========================================================= */

.as-mobile-meta {

    position: absolute;

    left: 8vw;
    right: 8vw;
    bottom: 34px;

    display: flex;

    justify-content: space-between;
    align-items: center;

    font-family:
        "Manrope",
        Arial,
        sans-serif;

    font-size: 9px;

    font-weight: 400;

    line-height: 1;

    text-transform: uppercase;

    letter-spacing: 0.08em;

    color: var(--as-ink);

    opacity: 0.45;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .as-back-to-top {
        display: none;
    }

    .as-header {

        --as-header-height: 80px;

        padding-left: 6vw;
        padding-right: 6vw;
    }


    .as-logo {
        width: 142px;
    }


    .as-desktop-nav {
        display: none;
    }


    .as-menu-button {

        display: grid;

        right: 6vw;
        top: 16px;
    }


    .as-mobile-menu {

        clip-path:
            circle(
                0px
                at
                calc(100% - 6vw - 24px)
                40px
            );
    }


    .as-header[data-menu-open]
    .as-mobile-menu {

        clip-path:
            circle(
                150%
                at
                calc(100% - 6vw - 24px)
                40px
            );
    }
}


/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 390px) {

    .as-mobile-navigation a {
        font-size: 47px;
    }


    .as-mobile-meta {

        flex-direction: column;

        align-items: flex-start;

        gap: 7px;
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .as-mobile-menu {

        clip-path: none;

        opacity: 0;

        transition:
            opacity 0.2s ease,
            visibility 0s linear 0.2s;
    }


    .as-header[data-menu-open]
    .as-mobile-menu {

        opacity: 1;

        transition:
            opacity 0.2s ease,
            visibility 0s linear 0s;
    }


    .as-mobile-navigation a {

        transform: none;

        transition:
            opacity 0.15s ease;
    }
}

