/* Qualis — floating navbar; ortada dikey marka + Qualis wordmark; .site-header altında */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.15rem clamp(1rem, 3vw, 2rem) 0;
    pointer-events: none;
    overflow: visible;
}

.site-header * {
    pointer-events: auto;
}

.site-header .floating-nav {
    /* Tek opak yüzey — SVG ile aynı */
    --nav-bg-solid: #fffcf6;
    --nav-edge: rgba(62, 39, 35, 0.09);

    position: relative;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

/* Eğri gövde: ortada U çukuru (alt kenar) */
.site-header .floating-nav__shape {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    z-index: 0;
    color: var(--nav-bg-solid);
    filter: drop-shadow(0 20px 42px rgba(28, 26, 24, 0.1)) drop-shadow(0 5px 14px rgba(28, 26, 24, 0.05));
}

.site-header .floating-nav__shape-fill {
    fill: currentColor;
}

.site-header .floating-nav__content {
    position: relative;
    z-index: 1;
    padding: 0.22rem 1.2rem 1.35rem;
    min-height: 6.75rem;
    overflow: visible;
    isolation: isolate;
}

/* Sol: linkler, sağ: CTA — marka tam ortada (absolute) */
.site-header .floating-nav__rail {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(0.5rem, 2vw, 1.25rem);
    min-height: 3.15rem;
    pointer-events: none;
}

.site-header .floating-nav__rail .floating-nav__links,
.site-header .floating-nav__rail .floating-nav__actions {
    pointer-events: auto;
}

.site-header .floating-nav__brand {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) translateY(-0.6rem);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-header .floating-nav__brand:hover {
    transform: translateX(-50%) translateY(calc(-0.4rem - 2px));
}

.site-header .floating-nav__brand:active {
    transform: translateX(-50%) translateY(0.35rem);
}

/* Kutu yok: ikon + yazı doğrudan çukurda */
.site-header .floating-nav__brand-cluster {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.22rem;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
}

/* İkon: ekstra kutu yok — sadece görsel */
.site-header .floating-nav__brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
}

.site-header .floating-nav__brand-img {
    display: block;
    height: clamp(3.35rem, 6vw, 4.1rem);
    width: auto;
    max-width: clamp(2.2rem, 4vw, 2.85rem);
    object-fit: contain;
    object-position: center;
}

.site-header .floating-nav__brand-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
    border: none;
    min-height: 0;
}

.site-header .floating-nav__brand-wordmark {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 700;
    font-size: clamp(1.28rem, 2.6vw, 1.55rem);
    letter-spacing: 0.03em;
    line-height: 1;
    color: var(--qualis-espresso);
    font-variant-numeric: lining-nums;
}

.site-header .floating-nav__links {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-header .floating-nav__links a {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.95rem;
    font-family: "Lexend", system-ui, sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: rgba(28, 26, 24, 0.72);
    border-radius: 999px;
    border: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.site-header .floating-nav__links a:hover {
    color: #3e2723;
    background: rgba(214, 199, 183, 0.35);
}

.site-header .floating-nav__links a.is-active {
    color: #1c1a18;
    border-color: rgba(62, 39, 35, 0.18);
    background: rgba(255, 255, 255, 0.65);
}

.site-header .floating-nav__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.site-header .floating-nav__ghost {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1rem;
    font-family: "Lexend", system-ui, sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: #3e2723;
    border: 1px solid rgba(62, 39, 35, 0.2);
    border-radius: 999px;
    background: transparent;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.site-header .floating-nav__ghost:hover {
    background: rgba(214, 199, 183, 0.25);
    border-color: rgba(62, 39, 35, 0.28);
}

.site-header .floating-nav__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.05rem 0.55rem 1.15rem;
    font-family: "Lexend", system-ui, sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fffef9;
    background: linear-gradient(145deg, #3e2723 0%, #2a1a17 100%);
    border: none;
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(62, 39, 35, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-header .floating-nav__cta i {
    font-size: 0.7rem;
    opacity: 0.9;
}

.site-header .floating-nav__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(62, 39, 35, 0.32);
}

.site-header .floating-nav__toggle {
    display: none;
    position: absolute;
    right: 0.5rem;
    top: 2.05rem;
    transform: translateY(-50%);
    z-index: 4;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(62, 39, 35, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    color: #3e2723;
    cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
    .site-header .floating-nav__brand,
    .site-header .floating-nav__brand:hover,
    .site-header .floating-nav__brand:active {
        transition: none;
        transform: translateX(-50%) translateY(0.35rem);
    }

    .site-header .floating-nav__cta:hover {
        transform: none;
    }
}

@media (max-width: 900px) {
    .site-header .floating-nav {
        max-width: none;
        width: calc(100% - 2rem);
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .site-header .floating-nav__content {
        padding: 0.48rem 3.25rem 1.22rem 0.95rem;
        min-height: 6.55rem;
    }

    .site-header .floating-nav__rail {
        min-height: 3.05rem;
    }

    .site-header .floating-nav__toggle {
        top: 2.12rem;
    }

    .site-header .floating-nav__toggle {
        display: inline-flex;
    }

    .site-header .floating-nav__rail .floating-nav__links,
    .site-header .floating-nav__rail .floating-nav__actions {
        display: none;
    }

    .site-header .floating-nav.is-open .floating-nav__rail {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: calc(0.48rem + 3.05rem + 0.45rem);
        left: 0;
        right: 0;
        padding: 1rem;
        min-height: 0;
        background: var(--nav-bg-solid);
        border: 1px solid var(--nav-edge);
        border-radius: 24px;
        box-shadow: 0 20px 42px rgba(28, 26, 24, 0.1), 0 5px 14px rgba(28, 26, 24, 0.05);
        gap: 0.5rem;
        z-index: 5;
        pointer-events: auto;
    }

    .site-header .floating-nav.is-open .floating-nav__rail .floating-nav__links,
    .site-header .floating-nav.is-open .floating-nav__rail .floating-nav__actions {
        display: flex;
    }

    .site-header .floating-nav.is-open .floating-nav__links {
        flex-direction: column;
        width: 100%;
    }

    .site-header .floating-nav.is-open .floating-nav__links a {
        justify-content: center;
        padding: 0.75rem;
    }

    .site-header .floating-nav.is-open .floating-nav__actions {
        flex-direction: column;
        width: 100%;
    }

    .site-header .floating-nav.is-open .floating-nav__cta,
    .site-header .floating-nav.is-open .floating-nav__ghost {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .site-header .floating-nav__content {
        padding: 0.42rem 2.85rem 1.05rem 0.8rem;
        min-height: 5.95rem;
    }

    .site-header .floating-nav__rail {
        min-height: 2.85rem;
    }

    .site-header .floating-nav__brand {
        transform: translateX(-50%) translateY(0.42rem);
    }

    .site-header .floating-nav__brand:hover {
        transform: translateX(-50%) translateY(calc(0.42rem - 2px));
    }

    .site-header .floating-nav__brand:active {
        transform: translateX(-50%) translateY(0.42rem);
    }

    .site-header .floating-nav__toggle {
        top: 1.88rem;
    }

    .site-header .floating-nav__brand-cluster {
        gap: 0.18rem;
    }

    .site-header .floating-nav__brand-img {
        height: 3rem;
        max-width: 2.15rem;
    }

    .site-header .floating-nav__brand-wordmark {
        font-size: 1.22rem;
    }

    .site-header .floating-nav.is-open .floating-nav__rail {
        top: calc(0.42rem + 2.85rem + 0.4rem);
    }

    @media (prefers-reduced-motion: reduce) {
        .site-header .floating-nav__brand,
        .site-header .floating-nav__brand:hover,
        .site-header .floating-nav__brand:active {
            transform: translateX(-50%) translateY(0.42rem);
        }
    }
}

/* ============================================================
   Mobile pill navbar (≤ 768px)
   Replaces the SVG-curve design with a clean pill bar.
   Rules appear AFTER 900px & 480px blocks so they win the cascade.
   ============================================================ */
@media (max-width: 768px) {
    .site-header {
        padding: 0.9rem clamp(0.75rem, 4vw, 1rem) 0;
    }

    .site-header .floating-nav {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    /* Hide the SVG curve */
    .site-header .floating-nav__shape {
        display: none;
    }

    /* Clean pill bar */
    .site-header .floating-nav__content {
        position: relative;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-height: 0;
        padding: 0.55rem 0.65rem 0.55rem 1rem;
        background: rgba(255, 252, 246, 0.96);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(62, 39, 35, 0.1);
        border-radius: 10px;
        box-shadow:
            0 6px 24px rgba(28, 26, 24, 0.1),
            0 2px 6px rgba(28, 26, 24, 0.06),
            0 1px 0 rgba(255, 255, 255, 0.8) inset;
        gap: 0;
    }

    /* Brand: left-aligned, horizontal row */
    .site-header .floating-nav__brand {
        position: static;
        bottom: auto;
        left: auto;
        transform: none;
        display: flex;
        align-items: center;
        flex-shrink: 0;
        transition: opacity 0.2s ease;
    }

    .site-header .floating-nav__brand:hover {
        transform: none;
        opacity: 0.8;
    }

    .site-header .floating-nav__brand:active {
        transform: none;
        opacity: 0.7;
    }

    .site-header .floating-nav__brand-cluster {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    .site-header .floating-nav__brand-img {
        height: 2.2rem;
        max-width: 1.6rem;
    }

    .site-header .floating-nav__brand-type {
        align-items: flex-start;
    }

    .site-header .floating-nav__brand-wordmark {
        font-size: 1.15rem;
    }

    /* Toggle: static in the flex row */
    .site-header .floating-nav__toggle {
        position: static;
        top: auto;
        transform: none;
        display: inline-flex;
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.65);
        border: 1px solid rgba(62, 39, 35, 0.14);
        flex-shrink: 0;
        color: #3e2723;
    }

    .site-header .floating-nav__toggle i {
        font-size: 1rem;
    }

    /* Rail: hidden by default on mobile */
    .site-header .floating-nav__rail {
        display: none;
        pointer-events: none;
        min-height: 0;
    }

    /* Dropdown panel on open */
    .site-header .floating-nav.is-open .floating-nav__rail {
        display: flex;
        pointer-events: auto;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 0;
        right: 0;
        padding: 1rem;
        background: rgba(255, 252, 246, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(62, 39, 35, 0.12);
        border-radius: 10px;
        box-shadow:
            0 20px 44px rgba(28, 26, 24, 0.14),
            0 4px 12px rgba(28, 26, 24, 0.07);
        gap: 0.5rem;
        z-index: 5;
        min-height: 0;
    }

    .site-header .floating-nav.is-open .floating-nav__rail .floating-nav__links,
    .site-header .floating-nav.is-open .floating-nav__rail .floating-nav__actions {
        display: flex;
    }

    .site-header .floating-nav.is-open .floating-nav__links {
        flex-direction: column;
        width: 100%;
        gap: 0.2rem;
    }

    .site-header .floating-nav.is-open .floating-nav__links a {
        justify-content: center;
        padding: 0.78rem 1rem;
        font-size: 0.875rem;
        border-radius: 6px;
        border-color: transparent;
        width: 100%;
    }

    .site-header .floating-nav.is-open .floating-nav__links a.is-active {
        border-color: rgba(62, 39, 35, 0.15);
        background: rgba(255, 255, 255, 0.7);
    }

    .site-header .floating-nav.is-open .floating-nav__actions {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        padding-top: 0.65rem;
        border-top: 1px solid rgba(62, 39, 35, 0.1);
    }

    .site-header .floating-nav.is-open .floating-nav__ghost,
    .site-header .floating-nav.is-open .floating-nav__cta {
        justify-content: center;
        width: 100%;
        padding: 0.78rem 1rem;
        font-size: 0.875rem;
    }

    @media (prefers-reduced-motion: reduce) {
        .site-header .floating-nav__brand,
        .site-header .floating-nav__brand:hover,
        .site-header .floating-nav__brand:active {
            transition: none;
        }
    }
}
