/* ============================================================
   REEON – nav.css
   Navigation: Desktop Links + Mobile Hamburger Overlay
   ============================================================ */


/* ─── NAV LEISTE ────────────────────────────────────────────── */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

/* Scrolled State: dunkler Hintergrund mit Blur */
.nav--scrolled {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}


/* ─── NAV INNER ─────────────────────────────────────────────── */

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


/* ─── LOGO ──────────────────────────────────────────────────── */

.nav__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav__logo svg {
    height: 30px;
    width: auto;
    display: block;
}


/* ─── LOGO ANIMATION ────────────────────────────────────────── */

.logo-head-triangle,
.logo-head-r,
.logo-head-e1,
.logo-head-e2,
.logo-head-o,
.logo-head-n {
    opacity: 1;
    transform-origin: 30% center;
    -webkit-animation: logoBlink 2s 1s ease-in-out 1;
    animation: logoBlink 2s 1s ease-in-out 1;
}
.logo-head-r        { animation-delay: 1.2s; }
.logo-head-e1       { animation-delay: 1.4s; }
.logo-head-e2       { animation-delay: 1.6s; }
.logo-head-o        { animation-delay: 1.8s; }
.logo-head-n        { animation-delay: 2s; }

@keyframes logoBlink {
    0%   { opacity: 1;   transform: scale(1)    translate(0px, 0px); }
    20%  { opacity: 0.3; transform: scale(0.94) translate(12px, 0px); }
    100% { opacity: 1;   transform: scale(1)    translate(0px, 0px); }
}


/* ─── DESKTOP LINKS ─────────────────────────────────────────── */

.nav__links {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav__link {
    font-family: var(--font-ui);
    font-size: var(--text-nav);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-primary);
    transition: opacity 0.2s ease;
}

.nav__link:hover {
    opacity: 0.5;
}

/* Subscribe Icon */
.nav__subscribe {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.nav__subscribe:hover {
    opacity: 0.75;
}

.nav__subscribe svg {
    display: block;
}


/* ─── HAMBURGER ─────────────────────────────────────────────── */

.nav__hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.nav__hamburger span {
    background-color: #fff;
    border-radius: 2px;
    content: '';
    display: block;
    width: 100%;
    height: 3px;
}

/* Mittlerer Balken: Abstand nach oben und unten */
.nav__hamburger span:nth-child(2) {
    margin: 5px 0;
    -webkit-animation: outM 0.5s backwards;
    animation: outM 0.5s backwards;
    -webkit-animation-direction: reverse;
    animation-direction: reverse;
}

/* Aus-Animationen (beim Schliessen) */
.nav__hamburger span:nth-child(1) {
    -webkit-animation: outT 0.5s backwards;
    animation: outT 0.5s backwards;
    -webkit-animation-direction: reverse;
    animation-direction: reverse;
}
.nav__hamburger span:nth-child(3) {
    -webkit-animation: outBtm 0.5s backwards;
    animation: outBtm 0.5s backwards;
    -webkit-animation-direction: reverse;
    animation-direction: reverse;
}

/* Ein-Animationen (beim Öffnen) */
.nav--open .nav__hamburger span:nth-child(1) {
    -webkit-animation: inT 0.5s forwards;
    animation: inT 0.5s forwards;
}
.nav--open .nav__hamburger span:nth-child(2) {
    -webkit-animation: inM 0.5s forwards;
    animation: inM 0.5s forwards;
}
.nav--open .nav__hamburger span:nth-child(3) {
    -webkit-animation: inBtm 0.5s forwards;
    animation: inBtm 0.5s forwards;
}

@keyframes inM {
    50%  { transform: rotate(0deg); }
    100% { transform: rotate(45deg); }
}
@keyframes outM {
    50%  { transform: rotate(0deg); }
    100% { transform: rotate(45deg); }
}
@keyframes inT {
    0%   { transform: translateY(0px)  rotate(0deg); }
    50%  { transform: translateY(8px)  rotate(0deg); }
    100% { transform: translateY(8px)  rotate(135deg); }
}
@keyframes outT {
    0%   { transform: translateY(0px)  rotate(0deg); }
    50%  { transform: translateY(8px)  rotate(0deg); }
    100% { transform: translateY(8px)  rotate(135deg); }
}
@keyframes inBtm {
    0%   { transform: translateY(0px)  rotate(0deg); }
    50%  { transform: translateY(-8px) rotate(0deg); }
    100% { transform: translateY(-8px) rotate(135deg); }
}
@keyframes outBtm {
    0%   { transform: translateY(0px)  rotate(0deg); }
    50%  { transform: translateY(-8px) rotate(0deg); }
    100% { transform: translateY(-8px) rotate(135deg); }
}


/* ─── MOBILE OVERLAY ────────────────────────────────────────── */

.nav__mobile {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: 90;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

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

    /* Versteckt: nach rechts verschoben */
    transform: translateX(100%);
    transition: transform 0.7s cubic-bezier(.44,.01,.09,1);
    pointer-events: none;
}

/* Geöffnet */
.nav--open ~ .nav__mobile {
    transform: translateX(0);
    pointer-events: auto;
}

.nav__mobile-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.nav__mobile-link {
    font-family: var(--font-ui);
    font-size: 32px;
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    transition: opacity 0.2s ease;
}

.nav__mobile-link:hover {
    opacity: 0.5;
}


/* ─── RESPONSIVE ────────────────────────────────────────────── */

@media (max-width: 768px) {

    /* Desktop Links ausblenden */
    .nav__links {
        display: none;
    }

    /* Hamburger einblenden */
    .nav__hamburger {
        display: flex;
    }
}
