/* ============================================================
   Shared public site chrome — header, drawer navigation, footer.
   Loaded by every front-end page. Page-specific styles live in
   their own stylesheet (home.css, blog.css, services.css, …).
   ============================================================ */

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    inset-inline: 0;
    top: 0;
    /* Sits above the drawer backdrop (105) so the open drawer and the toggle
       stay interactive; the whole fixed header paints as one layer. */
    z-index: 120;
    /* Kept transparent: the frost lives on ::before below. */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s, box-shadow 0.4s;
}

/* The frosted glass lives on a pseudo-element, not the header itself. A
   `backdrop-filter` on the header would make it the containing block for the
   fixed-position drawer nav, which would break the mobile menu. */
.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    transition: background 0.4s;
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .site-header::before {
        background: rgba(255, 255, 255, 0.55);
    }
}

.site-header.scrolled {
    border-bottom-color: rgba(var(--extra-rgb), 0.15);
    box-shadow: 0 8px 32px rgba(var(--secondary-rgb), 0.08), 0 1px 0 rgba(var(--extra-rgb), 0.1);
}

.site-header.scrolled::before {
    background: rgba(255, 255, 255, 0.92);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    height: 76px;
}

.brand {
    display: inline-flex;
    align-items: center;
    color: var(--secondary);
    z-index: 102;
    transition: transform 0.3s;
}

.brand:hover {
    transform: scale(1.03);
}

.brand-logo {
    height: 44px;
    width: auto;
    display: block;
}

@media (max-width: 767px) {
    .brand-logo {
        height: 34px;
    }
}

/* ---------- Desktop nav ---------- */
/* In the header row so flexbox — not pixel offsets — seats it against the
   brand; it can therefore never grow leftwards through the logo. */
.site-nav {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    height: auto;
    z-index: auto;
    display: flex;
    align-items: center;
    gap: clamp(0.55rem, 1.1vw, 1.5rem);
    margin-left: auto;
    min-width: 0;
}

.site-nav > a:not(.btn):not(.nav-login):not(.user-chip):not(.nav-bell) {
    position: relative;
    color: var(--secondary);
    font-weight: 500;
    font-size: 0.93rem;
    padding: 0.35rem 0.1rem;
    white-space: nowrap;
    transition: color 0.25s;
}

.site-nav > a:not(.btn):not(.nav-login):not(.user-chip):not(.nav-bell) i {
    display: none;
}

.site-nav > a:not(.btn):not(.nav-login):not(.user-chip):not(.nav-bell)::after {
    content: '';
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 0;
    height: 2.5px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--extra), var(--main));
    transition: right 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.site-nav > a:not(.btn):not(.nav-login):not(.user-chip):not(.nav-bell):hover,
.site-nav > a.is-current:not(.btn):not(.nav-login) {
    color: var(--main);
}

.site-nav > a:not(.btn):not(.nav-login):not(.user-chip):not(.nav-bell):hover::after,
.site-nav > a.is-current:not(.btn):not(.nav-login)::after {
    right: 0;
}

.site-nav .nav-login {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--extra);
    font-weight: 500;
    padding: 0.45rem 0.9rem;
    border-radius: 12px;
    transition: color 0.25s, background 0.25s, box-shadow 0.25s;
}

.site-nav .nav-login i {
    display: inline-block;
    font-size: 1rem;
}

.site-nav .nav-login:hover {
    color: var(--main);
    background: rgba(var(--main-rgb), 0.1);
    box-shadow: 0 4px 16px rgba(var(--main-rgb), 0.12);
}

.site-nav .drawer-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
}

.site-nav .drawer-cta i {
    font-size: 1rem;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.site-nav .drawer-cta:hover i {
    transform: translateX(3px) scale(1.1);
}

.site-nav .drawer-cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s cubic-bezier(0.2, 0, 0, 1);
}

.site-nav .drawer-cta:hover::after {
    left: 120%;
}

/* ---------- User chip ---------- */
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.85rem 0.35rem 0.4rem;
    border: 1.5px solid var(--border);
    border-radius: 99px;
    background: #fff;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}

.user-chip:hover {
    border-color: var(--main);
    box-shadow: 0 6px 20px rgba(var(--main-rgb), 0.2);
    transform: translateY(-1px);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--main), var(--extra));
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(var(--main-rgb), 0.3);
}

.user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    max-width: 220px;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-role {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--main);
}

.logout-form {
    display: inline-flex;
    margin: 0;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.15rem;
    font-size: 0.88rem;
    transition: border-color 0.25s, background 0.25s, color 0.25s, transform 0.2s;
}

.btn-logout:hover {
    transform: translateY(-1px);
}

.btn-logout i {
    font-size: 1rem;
}

/* ---------- Hamburger ---------- */
.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--secondary);
    cursor: pointer;
    z-index: 102;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.nav-toggle:hover {
    border-color: var(--main);
    box-shadow: 0 4px 12px rgba(var(--main-rgb), 0.12);
}

.nav-toggle-bars {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 20px;
    height: 16px;
}

.nav-toggle-bars span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--secondary);
    transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), opacity 0.2s;
}

.nav-toggle.open .nav-toggle-bars span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open .nav-toggle-bars span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open .nav-toggle-bars span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.drawer-head,
.drawer-divider,
.nav-backdrop {
    display: none;
}

/* The horizontal nav is always visible above the drawer breakpoint. */
@media (min-width: 1200px) {
    .nav-toggle {
        display: none;
    }
}

/* Keep the inline nav from crowding the logo as the viewport narrows: the
   member's avatar stays, while the name and the widest spacing give way first. */
@media (min-width: 1200px) and (max-width: 1499px) {
    .site-nav .user-meta {
        display: none;
    }

    .site-nav .user-chip {
        padding: 0.3rem;
    }
}

@media (min-width: 1200px) and (max-width: 1319px) {
    .site-nav {
        gap: 0.55rem;
    }

    .site-nav > a:not(.btn):not(.nav-login):not(.user-chip):not(.nav-bell) {
        font-size: 0.86rem;
    }

    .site-nav .drawer-cta {
        padding: 0.7rem 1.15rem;
    }
}

/* ---------- Footer ---------- */
.site-footer {
    position: relative;
    background:
        radial-gradient(ellipse 45% 60% at 100% 0%, rgba(var(--extra-rgb), 0.16), transparent 60%),
        radial-gradient(ellipse 40% 55% at 0% 100%, rgba(var(--main-rgb), 0.1), transparent 62%),
        var(--secondary);
    color: rgba(255, 255, 255, 0.72);
    padding: clamp(3rem, 6vw, 4.5rem) 0 0;
    scroll-margin-top: 76px;
}

/* Five comfortable columns instead of six cramped ones */
.footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)) minmax(0, 1.15fr);
    gap: clamp(2rem, 4vw, 3.5rem);
    padding-bottom: clamp(2.25rem, 4vw, 3rem);
}

.footer-logo {
    height: 52px;
    width: auto;
    margin-bottom: 1.1rem;
    filter: brightness(0) invert(1);
}

.footer-tagline {
    max-width: 40ch;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.98rem;
    line-height: 1.75;
    margin-bottom: 1.35rem;
}

.site-footer h4 {
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 1.15rem;
}

.site-footer .footer-col a {
    display: block;
    width: fit-content;
    margin-bottom: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.98rem;
    line-height: 1.5;
    /* An email or address is one long unbreakable token; let it wrap so it
       never widens the column past the viewport on a narrow screen. */
    overflow-wrap: anywhere;
    transition: color 0.25s, transform 0.25s;
}

.site-footer .footer-col a:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.site-footer .footer-col a i {
    color: var(--main);
}

/* Visit column — the icon hugs the first line of a wrapping address */
.footer-col--visit a,
.footer-visit-line {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
}

.footer-col--visit i,
.footer-visit-line i {
    flex: 0 0 auto;
    margin-top: 0.2rem;
}

.footer-visit-line {
    margin-bottom: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.98rem;
    line-height: 1.5;
}

.footer-more i {
    transition: transform 0.25s;
}

.site-footer .footer-more:hover i {
    transform: translateX(3px);
}

.site-footer .footer-social {
    display: flex;
    gap: 0.6rem;
}

.site-footer .footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.05rem;
    transition: background 0.25s, border-color 0.25s, transform 0.2s;
}

.site-footer .footer-social a:hover {
    background: var(--main);
    border-color: var(--main);
    color: #fff;
    transform: translateY(-2px);
}

/* Bottom bar — copyright left, legal links right */
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.4rem 0 1.75rem;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.4rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.9rem;
    transition: color 0.25s;
}

.footer-legal a:hover {
    color: var(--primary);
}

@media (max-width: 991px) {
    .footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-brand,
    .footer-col--areas,
    .footer-col--visit {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .footer-main {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================================
   Tablet + mobile — slide-in drawer
   ============================================================ */
@media (max-width: 1199px) {
    .header-inner {
        height: 64px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: auto;
        height: 100dvh;
        transform: translateX(-105%);
        z-index: 110;
        width: min(84vw, 340px);
        flex-direction: column;
        align-items: stretch;
        gap: 0.2rem;
        background: #fff;
        box-shadow: 20px 0 50px rgba(var(--secondary-rgb), 0.2);
        padding: 1.4rem 1.25rem 1.6rem;
        overflow-y: auto;
        transition: transform 0.35s cubic-bezier(0.2, 0, 0, 1), visibility 0.35s;
        visibility: hidden;
    }

    .site-nav.open {
        transform: translateX(0);
        visibility: visible;
    }

    .drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 1.1rem;
        padding-bottom: 0.9rem;
        border-bottom: 1px solid var(--border);
    }

    .drawer-title {
        font-family: var(--font-heading);
        font-weight: 700;
        font-size: 1.15rem;
        color: var(--secondary);
    }

    .drawer-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: 1.5px solid var(--border);
        border-radius: 10px;
        background: #fff;
        color: var(--secondary);
        font-size: 1.1rem;
        cursor: pointer;
    }

    .site-nav > a:not(.btn) {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.9rem 0.6rem;
        font-size: 1.02rem;
        font-weight: 500;
        color: var(--secondary);
        border-bottom: 1px solid var(--border);
    }

    .site-nav > a:not(.btn) i {
        display: inline-block;
        width: 1.4rem;
        text-align: center;
        font-size: 1.1rem;
        color: var(--main);
    }

    .site-nav > a:not(.btn):not(.nav-login)::after {
        display: none;
    }

    .site-nav > a:not(.btn):hover,
    .site-nav > a.is-current:not(.btn) {
        color: var(--main);
    }

    .site-nav .nav-login {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        border-bottom: none;
        color: var(--main);
        font-weight: 600;
    }

    .drawer-divider {
        display: block;
        height: 1px;
        background: var(--border);
        margin: 0.9rem 0 0.4rem;
    }

    .site-nav .user-chip {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 0.6rem;
        border: none;
        border-bottom: 1px solid var(--border);
        border-radius: 0;
        background: transparent;
        max-width: 100%;
    }

    .site-nav .user-chip:hover {
        border-color: transparent;
        box-shadow: none;
        transform: none;
    }

    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .user-meta {
        max-width: none;
    }

    .user-name {
        font-size: 0.98rem;
    }

    .user-role {
        font-size: 0.72rem;
    }

    .site-nav .btn {
        margin-top: 1.1rem;
        text-align: center;
    }

    .logout-form {
        margin-top: 0.9rem;
    }

    .logout-form .btn {
        width: 100%;
        justify-content: center;
    }

    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 105;
        background: rgba(var(--secondary-rgb), 0.55);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
    }

    .nav-backdrop.open {
        opacity: 1;
        visibility: visible;
    }

    body.nav-open {
        overflow: hidden;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-nav {
        transition: none;
    }
}

/* ---------- Account chip + notifications bell ---------- */
.site-nav a.user-chip {
    text-decoration: none;
    color: inherit;
}

.user-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.nav-bell {
    position: relative;
}

.site-nav .nav-bell-text {
    display: none;
}

.nav-bell-badge {
    position: absolute;
    top: 1px;
    right: 1px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: var(--danger);
    border-radius: 99px;
    box-shadow: 0 2px 6px rgba(var(--danger-rgb), 0.45);
}

/* Account sub-links only appear inside the mobile drawer. */
.site-nav .nav-drawer-only {
    display: none;
}

@media (max-width: 1199px) {
    .site-nav .nav-bell-text {
        display: inline;
    }

    .nav-bell {
        position: static;
    }

    .nav-bell-badge {
        position: static;
        margin-left: auto;
    }

    .site-nav .nav-drawer-only {
        display: flex;
    }
}

/* ---------- Newsletter signup (footer band) ---------- */
.footer-news {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: clamp(1.75rem, 3.5vw, 2.25rem) 0;
}

.footer-news .newsletter-signup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0.35rem 3rem;
}

.footer-news .newsletter-signup h4 {
    grid-column: 1;
    grid-row: 1;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    letter-spacing: normal;
    text-transform: none;
    margin: 0;
}

.footer-news .newsletter-lede {
    grid-column: 1;
    grid-row: 2;
    max-width: 54ch;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.98rem;
    line-height: 1.6;
    margin: 0;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.footer-news .newsletter-form {
    grid-column: 2;
    grid-row: 1 / 3;
    max-width: none;
}

.newsletter-form input[type="email"] {
    flex: 1;
    min-width: 0;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.25s, background 0.25s;
}

.newsletter-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--main);
    background: rgba(255, 255, 255, 0.14);
}

.newsletter-form button {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: var(--main);
    color: #fff;
    font-size: 1.05rem;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.newsletter-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

@media (max-width: 767px) {
    .footer-news .newsletter-signup {
        grid-template-columns: 1fr;
    }

    .footer-news .newsletter-signup h4,
    .footer-news .newsletter-lede,
    .footer-news .newsletter-form {
        grid-column: 1;
        grid-row: auto;
    }

    .footer-news .newsletter-form {
        margin-top: 1rem;
    }
}
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--extra), var(--main));
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.25s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.3s;
    box-shadow: 0 6px 20px rgba(var(--extra-rgb), 0.3);
    position: relative;
    overflow: hidden;
}

