/* globALwerk: shared polish layer (animations + language switcher).
   Loaded after each page's own <style>, so it can override it. */

/* ---------- Header ---------- */
.nav-wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    transition: min-height .3s ease;
}

.nav-wrap .brand {
    margin-right: auto;
}

.site-header {
    transition: box-shadow .3s ease, background-color .3s ease;
}

.site-header.is-scrolled {
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 10px 30px rgba(18, 32, 51, .09);
}

.site-header.is-scrolled .nav-wrap {
    min-height: 66px;
}

/* ---------- Buttons: no colored glow ---------- */
.button.primary {
    box-shadow: none;
}

.button.primary:hover {
    background: var(--primary-dark);
}

/* ---------- Language switcher ---------- */
.lang-switch {
    display: inline-flex;
    flex: 0 0 auto;
    padding: 3px;
    border: 1px solid var(--line, #e7edf4);
    border-radius: 999px;
    background: #fff;
}

.lang-switch button {
    min-width: 38px;
    padding: 6px 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted, #607086);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

.lang-switch button:hover {
    color: var(--ink, #102033);
}

.lang-switch button[aria-pressed="true"] {
    background: var(--primary, #0f8fb3);
    color: #fff;
}

.lang-switch button:focus-visible {
    outline: 2px solid var(--primary, #0f8fb3);
    outline-offset: 2px;
}

@media (max-width: 860px) {
    .nav-wrap {
        gap: 12px;
    }
}

/* ---------- Hero entrance (home) ---------- */
@keyframes gwFadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
}

@keyframes gwFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.hero-title > span     { display: block; animation: gwFadeUp .8s .05s cubic-bezier(.2,.7,.2,1) both; }
.hero-title > strong   { animation: gwFadeUp .8s .17s cubic-bezier(.2,.7,.2,1) both; }
.hero .hero-text       { animation: gwFadeUp .8s .29s cubic-bezier(.2,.7,.2,1) both; }
.hero .hero-actions    { animation: gwFadeUp .8s .41s cubic-bezier(.2,.7,.2,1) both; }

/* Slow zoom-out + light parallax on the hero photo (values set by site.js) */
.hero::before {
    transform: scaleX(-1) translateY(var(--gw-shift, 0px)) scale(var(--gw-zoom, 1));
    will-change: transform;
}

.subpage-media {
    overflow: hidden;
}

.subpage-media img {
    transform: translateY(var(--gw-shift, 0px)) scale(var(--gw-zoom, 1));
    will-change: transform;
}

/* Subpage titles */
.subpage-title h1,
.page-title h1,
.contact-hero h1 {
    animation: gwFadeUp .8s .05s cubic-bezier(.2,.7,.2,1) both;
}

.about-hero,
.contact-hero {
    animation: gwFadeIn 1s ease both;
}

/* ---------- Scroll reveal ---------- */
.gw-reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
    transition-delay: var(--gw-delay, 0ms);
}

.gw-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Cards lift slightly on hover */
.feature.gw-reveal,
.process-card.gw-reveal {
    transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease;
    transition-delay: var(--gw-delay, 0ms);
}

.feature.is-visible:hover,
.process-card.is-visible:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 60px rgba(18, 32, 51, .12);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-delay: 0ms !important;
        transition-duration: .01ms !important;
        transition-delay: 0ms !important;
    }

    .gw-reveal {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Dark header + dark hero (more contrast on first load) ---------- */
:root {
    --gw-night: #0c1622;
    --gw-accent-on-dark: #4fcbeb;
}

.site-header,
.site-header.is-scrolled {
    background: rgba(12, 22, 34, .96);
    border-bottom-color: rgba(255, 255, 255, .07);
    box-shadow: 0 10px 30px rgba(5, 10, 18, .22);
}

.site-header.is-scrolled {
    background: rgba(12, 22, 34, .985);
    box-shadow: 0 12px 34px rgba(5, 10, 18, .35);
}

.desktop-nav,
.mobile-nav a {
    color: rgba(255, 255, 255, .82);
}

.desktop-nav a {
    transition: color .2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: #fff;
}

.desktop-nav a.active,
.mobile-nav a.active {
    color: var(--gw-accent-on-dark);
}

.desktop-nav a::after,
.mobile-nav a::after {
    background: var(--gw-accent-on-dark);
}

.mobile-nav {
    border-top-color: rgba(255, 255, 255, .08);
}

.menu-button {
    border-color: rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.lang-switch {
    border-color: rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .06);
}

.lang-switch button {
    color: rgba(255, 255, 255, .7);
}

.lang-switch button:hover {
    color: #fff;
}

/* Hero: dark wash instead of white */
.hero {
    background: var(--gw-night);
}

.hero::after {
    background:
        linear-gradient(90deg, rgba(12,22,34,.94) 0%, rgba(12,22,34,.84) 34%, rgba(12,22,34,.42) 60%, rgba(12,22,34,.12) 100%),
        linear-gradient(0deg, rgba(12,22,34,.55) 0%, rgba(12,22,34,0) 30%);
}

.hero-title {
    color: #fff;
}

.hero-title strong {
    color: var(--gw-accent-on-dark);
}

.hero .hero-text {
    color: rgba(255, 255, 255, .78);
}

.hero .button.secondary {
    border-color: rgba(255, 255, 255, .4);
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.hero .button.secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, .12);
}

@media (max-width: 860px) {
    .hero::after {
        background: linear-gradient(180deg, rgba(12,22,34,.86) 0%, rgba(12,22,34,.76) 100%);
    }
}
