/* Shared FR/EN navigation. Enhancement collapses links only after handlers are ready. */
body .navbar.gh-navigation.navbar-dark {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 80px;
    padding: 12px clamp(20px, 4vw, 64px);
    background: #103b32;
    color: #fff;
    border-bottom: 1px solid rgba(233, 244, 227, .18);
    box-shadow: 0 8px 28px rgba(0, 20, 15, .13);
    opacity: 1;
    transform: none;
    pointer-events: auto;
    animation: none;
    transition: background .2s ease, opacity 600ms ease, transform 600ms ease;
}
body .navbar.gh-navigation.navbar-dark .brand-link { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
body .navbar.gh-navigation.navbar-dark .brand-link img { width: 44px; height: 44px; object-fit: contain; }
body .navbar.gh-navigation.navbar-dark .brand-link span { font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 25px; letter-spacing: .5px; color: #fff; }
body .navbar.gh-navigation.navbar-dark .nav-links {
    position: static; inset: auto; display: flex; align-items: center; gap: 24px;
    width: auto; height: auto; min-height: 0; max-height: none; margin: 0; padding: 0;
    opacity: 1; transform: none; pointer-events: auto; background: none;
    border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none;
}
body .navbar.gh-navigation.navbar-dark .nav-links .navbar-nav { display: flex; flex-direction: row; gap: 4px; margin: 0; padding: 0; }
body .navbar.gh-navigation.navbar-dark .nav-links .nav-link {
    display: flex; align-items: center; justify-content: center; min-height: 44px;
    padding: 10px 12px; color: #f4f8ef; font-family: 'DM Sans', sans-serif;
    font-size: 14px; font-weight: 500; letter-spacing: 0; line-height: 1.3;
    text-transform: none; border: 0; border-radius: 6px; transition: background .18s ease;
}
body .navbar.gh-navigation.navbar-dark .nav-links .nav-link::after { display: none; }
body .navbar.gh-navigation.navbar-dark .nav-links .nav-link:hover,
body .navbar.gh-navigation.navbar-dark .nav-links .nav-link.active { background: #295448; color: #fff; }
body .navbar.gh-navigation.navbar-dark .nav-links .nav-link.active { box-shadow: inset 0 -2px #c7e79c; }
body .navbar.gh-navigation.navbar-dark .language-toggle { display: flex; gap: 2px; margin: 0; padding: 3px; border: 1px solid #537568; border-radius: 8px; }
body .navbar.gh-navigation.navbar-dark .language-toggle .lang-link { font-family: 'DM Sans', sans-serif; display: grid; place-items: center; min-width: 42px; min-height: 44px; padding: 4px; color: #e4eee7; font-size: 12px; border-radius: 5px; }
body .navbar.gh-navigation.navbar-dark .language-toggle .lang-link.active { background: #e6eed8; color: #103b32; }
body .navbar.gh-navigation.navbar-dark .mobile-menu-toggle { display: none; }
:focus-visible { outline: 3px solid #b8d884; outline-offset: 4px; }
.skip-link { clip-path: inset(50%); position: fixed; top: -100px; left: 16px; z-index: 200; padding: 12px 20px; color: #103b32; background: #fff; border-radius: 6px; }
.skip-link:focus { top: 12px; clip-path: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
/* Content and poster never depend on animation timers or successful autoplay. */
.cinematic-hero-content,
.cinematic-hero .cinematic-hero-content p,
.cinematic-hero .cinematic-hero-content .hero-buttons,
.cinematic-hero .cinematic-slogan span { opacity: 1; transform: none; animation: none; }
.cinematic-hero { min-height: 100svh; padding-bottom: 100px; }
.hero-video-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; pointer-events: none; }
.video-playing .hero-video-poster { visibility: hidden; }
.cinematic-hero .cinematic-logo-reveal { opacity: 1; }
.cinematic-wash { pointer-events: none; }
.cinematic-hero:has(.cinematic-intro-video[controls]) .hero-video-poster { display: none; }
.hero-video-toggle {
    position: absolute; left: clamp(20px, 6.5vw, 112px); bottom: 24px; z-index: 5;
    min-height: 44px; min-width: 136px; padding: 10px 18px; border-radius: 30px;
    border: 1px solid rgba(255,255,255,.65); background: #103b32; color: #fff;
    font-family: 'DM Sans', sans-serif; font-size: 13px; cursor: pointer;
}
.hero-video-toggle[hidden] { display: none; }
.hero-video-toggle:hover { background: #295448; }
@media (max-width: 1100px) {
    body .navbar.gh-navigation.navbar-dark { min-height: 76px; padding: 12px 24px; flex-wrap: wrap; }
    body .navbar.gh-navigation.navbar-dark .nav-links { width: 100%; display: flex; align-items: stretch; flex-direction: column; gap: 16px; }
    body .navbar.gh-navigation.navbar-dark .nav-links .navbar-nav { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 4px; }
    body .navbar.gh-navigation.navbar-dark .nav-links .nav-link { justify-content: flex-start; min-height: 48px; padding: 12px; }
    body .navbar.gh-navigation.navbar-dark .language-toggle { align-self: flex-start; }
    body .navbar.gh-navigation.navbar-dark:not(.nav-enhanced) { position: relative; }
    body .navbar.gh-navigation.navbar-dark.nav-enhanced .mobile-menu-toggle {
        display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 9px;
        position: static; width: auto; height: 44px; min-width: 98px; margin-left: auto; padding: 0 12px;
        background: transparent; color: #fff; border: 1px solid #6b8777; border-radius: 7px;
    }
    body .navbar.gh-navigation.navbar-dark .mobile-menu-toggle .menu-label { width: auto; height: auto; background: none; transform: none; opacity: 1; font: 500 13px 'DM Sans',sans-serif; }
    body .navbar.gh-navigation.navbar-dark .mobile-menu-toggle.active { background: #295448; }
    body .navbar.gh-navigation.navbar-dark.nav-enhanced .nav-links { display: none; }
    body .navbar.gh-navigation.navbar-dark.nav-enhanced .nav-links.active {
        display: flex; position: absolute; inset: calc(100% + 8px) 24px auto auto;
        width: min(480px, calc(100vw - 48px)); height: auto; min-height: 0;
        max-height: calc(100dvh - 110px); overflow-y: auto; padding: 20px;
        background: #103b32; border: 1px solid #537568; border-radius: 12px;
        box-shadow: 0 20px 55px rgba(0,20,15,.32);
    }
    body .navbar.gh-navigation.navbar-dark .nav-links .language-toggle { border-top: 1px solid #537568; }
}
@media (max-width: 560px) {
    body .navbar.gh-navigation.navbar-dark { min-height: 72px; padding: 10px 16px; gap: 12px; }
    body .navbar.gh-navigation.navbar-dark .brand-link img { width: 38px; height: 38px; }
    body .navbar.gh-navigation.navbar-dark .brand-link span { font-size: 23px; }
    body .navbar.gh-navigation.navbar-dark.nav-enhanced .nav-links.active { inset: calc(100% + 8px) 12px auto; width: auto; padding: 16px; }
    body .navbar.gh-navigation.navbar-dark .nav-links .navbar-nav { grid-template-columns: 1fr; }
    body .navbar.gh-navigation.navbar-dark .nav-links .nav-link { font-size: 16px; padding: 11px 12px; }
    body .navbar.gh-navigation.navbar-dark .nav-links .nav-item { width: auto; margin: 0; }
    .cinematic-hero-content { padding-right: 0; }
    .cinematic-hero .cinematic-logo-reveal { display: grid !important; width: 56px !important; max-width: 56px !important; top: 6.5rem; right: 1.2rem; transform: none; }
    .cinematic-hero-content .hero-buttons { gap: 10px; }
    .cinematic-hero-content .hero-buttons .btn { padding: 13px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; }
    body .navbar.gh-navigation.navbar-dark *, .cinematic-hero * { transition: none !important; animation: none !important; }
}

.scroll-video-copy [data-scroll-reveal] { opacity: 1; transform: none; filter: none; }
@media (max-width: 360px) {
    body .navbar.gh-navigation.navbar-dark .brand-link { gap: 7px; }
    body .navbar.gh-navigation.navbar-dark .brand-link img { width: 32px; height: 32px; }
    body .navbar.gh-navigation.navbar-dark .brand-link span { font-size: 20px; }
}

/* Keep the same wordmark on public and secondary pages. */
.site-footer .footer-logo span {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: .03em;
    color: var(--soft-white);
}

/* Secondary forms use the same readable body type as the public pages. */
body.secondary-page,
.secondary-page input,
.secondary-page button,
.secondary-page select,
.secondary-page textarea {
    font-family: 'DM Sans', sans-serif;
}
.secondary-page .login-container h1 { line-height: 1.1; }

/* Cinematic enhancement: first frames, then words, then supporting copy.
   The root class is added before paint and has an independent 6.5s safety timeout. */
.intro-enhanced .cinematic-hero .cinematic-slogan span {
    opacity: 0;
    transform: translateY(.16em);
    animation: none;
}
.intro-enhanced .cinematic-hero.intro-words-visible .cinematic-slogan span {
    animation: introWordReveal 400ms ease-out both;
    animation-delay: calc(var(--intro-word-index, 0) * 220ms);
}
.intro-enhanced .cinematic-hero .cinematic-hero-content p,
.intro-enhanced .cinematic-hero .hero-buttons,
.intro-enhanced .cinematic-hero .cinematic-logo-reveal {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.intro-enhanced .cinematic-hero:not(.has-playback-problem) .hero-video-toggle { visibility: hidden; }
@keyframes introWordReveal {
    from { opacity: 0; transform: translateY(.16em); }
    to { opacity: 1; transform: none; }
}

/* Normal cinematic start is video only, including above the fold.
   Controls return immediately for playback fallback or intentional navigation. */
.intro-enhanced body .navbar.gh-navigation.navbar-dark {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-16px);
}

/* Presentation, logo and navigation are deliberately separate beats. */
.intro-enhanced .cinematic-hero.intro-details-visible .cinematic-hero-content p,
.intro-enhanced .cinematic-hero.intro-details-visible .hero-buttons,
.intro-enhanced .cinematic-hero.intro-logo-visible .cinematic-logo-reveal {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
