/* Site layout: fixed top bar, optional hero, card content */

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.7;
    margin: 0;
    --topbar-height: 3.75rem;
    --page-bg: #f8f9fa;
    --page-text: #222;
    --page-text-muted: #666;
    --heading: #003087;
    --link: #003087;
    --section-bg: #fff;
    --section-shadow: rgba(0, 0, 0, 0.08);
    --topbar-bg: #fff;
    --topbar-text: #222;
    --topbar-border: #e8ecf0;
    --topbar-link: #003087;
    --topbar-current: #111;
    --focus-ring: #003087;
    padding-top: var(--topbar-height);
    background: var(--page-bg);
    color: var(--page-text);
}

.dark body {
    --page-bg: #050a14;
    --page-text: #e8eef8;
    --page-text-muted: #9aa8bc;
    --heading: #a8c4f0;
    --link: #7eb0ff;
    --section-bg: #0c1528;
    --section-shadow: rgba(0, 0, 0, 0.35);
    --topbar-dark: #050a14;
    --topbar-bg: var(--topbar-dark);
    --topbar-border: rgba(255, 255, 255, 0.08);
    --focus-ring: #7eb0ff;
}

address {
    font-style: normal;
}

main h2,
main h3 {
    color: var(--heading);
    font-weight: 600;
}

main a:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.btn {
    display: inline-block;
    background: #003087;
    color: white;
    padding: 14px 28px;
    border-radius: 6px;
    margin-top: 20px;
    font-weight: 500;
    text-decoration: none;
}

.btn:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
}

.legal-note {
    font-size: 0.85rem;
    color: var(--page-text-muted);
    margin-top: 35px;
}

.site-topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 1.25rem;
    background: var(--topbar-bg);
    color: var(--topbar-text);
    border-bottom: 1px solid var(--topbar-border);
}

.dark .site-topbar {
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

/* Stays visible while hero and page content scroll beneath */
.site-topbar--fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.dark .site-topbar--fixed {
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

.site-topbar .logo {
    flex: 0 0 auto;
    margin: 0;
    margin-right: auto;
}

.site-topbar .logo a {
    display: inline-block;
    text-decoration: none;
}

.site-topbar .logo img {
    max-height: 44px;
    width: auto;
    height: auto;
    margin-bottom: 0;
    vertical-align: middle;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
}

.dark .site-topbar__logo-img--day {
    display: none;
}
html:not(.dark) .site-topbar__logo-img--night {
    display: none;
}

.site-topbar__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem 1.25rem;
    margin-left: auto;
    line-height: 1;
}

.site-topbar .lang-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.2;
    letter-spacing: 0.02em;
    opacity: 1;
}

.site-topbar .lang-nav span[aria-hidden] {
    padding: 0 .25rem;
}

.site-topbar .lang-nav a {
    color: var(--topbar-link);
    font-weight: 500;
}

.dark .site-topbar .lang-nav a {
    color: var(--link);
}

.site-topbar .lang-nav a:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.site-topbar .lang-nav .current {
    color: var(--topbar-current);
    font-weight: 700;
}

.dark .site-topbar .lang-nav .current {
    color: #f0f4ff;
}

/* Day / night theme toggle */
.hero-theme-toggle {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid #d0d8e4;
    border-radius: 6px;
    background: #f4f7fb;
    color: #003087;
    cursor: pointer;
}

.dark .hero-theme-toggle {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: var(--link);
}

.hero-theme-toggle:hover {
    background: #e8eef8;
}

.dark .hero-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

.hero-theme-toggle:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.hero-theme-toggle__icon {
    display: block;
    width: 1.1rem;
    height: 1.1rem;
    fill: currentColor;
}

.hero-theme-toggle__icon--moon {
    display: none;
}

.hero-theme-toggle[aria-pressed="true"] .hero-theme-toggle__icon--sun {
    display: none;
}

.hero-theme-toggle[aria-pressed="true"] .hero-theme-toggle__icon--moon {
    display: block;
}

.hero-visual {
    position: relative;
    width: 100%;
    background: linear-gradient(120deg, #0a2a66 0%, #1a5fb4 45%, #001f5c 100%);
    overflow: hidden;
}

.dark .hero-visual {
    background: linear-gradient(120deg, #050a14 0%, #0a1224 45%, #001020 100%);
}

/* Fills the screen below the fixed top bar; scrolls up with the page */
.hero-visual--photo {
    min-height: calc(100vh - var(--topbar-height));
    min-height: calc(100dvh - var(--topbar-height));
    height: calc(100vh - var(--topbar-height));
    height: calc(100dvh - var(--topbar-height));
}

/* Hero photo: single <picture> injected by hero-theme.js */
.hero-visual .hero-picture {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
}

.hero-visual__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Favour lower part of the tree photograph */
    object-position: center 72%;
}

.hero-text-band {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: clamp(4.5rem, 18vh, 7rem) 1.5rem 2.5rem;
    background: linear-gradient(
        to bottom,
        rgba(0, 16, 48, 0.25) 0%,
        rgba(0, 16, 48, 0.08) 35%,
        rgba(0, 16, 48, 0.08) 55%,
        rgba(0, 16, 48, 0.55) 100%
    );
    color: #fff;
    text-align: center;
    pointer-events: none;
}

.dark .hero-text-band {
    background: linear-gradient(
        to bottom,
        rgba(5, 10, 20, 0.15) 0%,
        rgba(5, 10, 20, 0.02) 35%,
        rgba(5, 10, 20, 0.02) 55%,
        rgba(5, 10, 20, 0.35) 100%
    );
}

.hero-text-band .tagline {
    margin: 0 0 0.5rem;
    opacity: 0.95;
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

.hero-text-band .site-title {
    color: #fff;
    font-size: clamp(1.5rem, 5vw, 2.25rem);
    font-weight: 600;
    margin: 0 0 0.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.hero-text-band .hero-lead {
    margin: 0;
    max-width: 36rem;
    opacity: 0.92;
    font-size: clamp(1rem, 2.8vw, 1.15rem);
    text-shadow: 0 1px 16px rgba(0, 0, 0, 0.4);
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 2.5rem 15px 0;
    position: relative;
}

main > section + section {
    margin-top: 1.5rem;
}

main > section {
    background: var(--section-bg);
    color: var(--page-text);
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--section-shadow);
    padding: 2rem 1.5rem 2.25rem;
}

main > section h2 {
    margin-top: 0;
}

.dark main h2,
.dark main h3 {
    color: var(--heading);
}

.dark main a {
    color: var(--link);
}

.dark main a:focus-visible {
    outline-color: var(--focus-ring);
}

.dark .btn {
    background: #2563b8;
    color: #fff;
}

.dark .btn:focus-visible {
    outline-color: var(--focus-ring);
}

.dark .legal-note {
    color: var(--page-text-muted);
}

/* In-page nav links sit below the fixed top bar when scrolled to */
main [id] {
    scroll-margin-top: calc(var(--topbar-height) + 0.75rem);
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1rem;
    margin-top: 70px;
    padding: 25px;
    color: var(--page-text-muted);
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--link);
    font-weight: 500;
}

.site-footer a:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .site-topbar {
        padding: 0.5rem 0.75rem;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .site-topbar .logo {
        flex-shrink: 0;
    }

    .site-topbar__nav {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 0.5rem 0.65rem;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .site-topbar__nav::-webkit-scrollbar {
        display: none;
    }

    .site-topbar .lang-nav {
        flex-wrap: nowrap;
        flex-shrink: 0;
        font-size: 0.8rem;
    }

    .site-topbar .logo img {
        max-height: 38px;
    }

    .hero-text-band {
        padding: clamp(3.5rem, 14vh, 5rem) 1rem 2rem;
    }

    .hero-visual__img {
        object-position: center 68%;
    }

    main h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    body {
        --topbar-height: 3.25rem;
    }

    .site-topbar {
        padding: 0.45rem 0.6rem;
    }

    .site-topbar .logo img {
        max-height: 32px;
    }

    .site-topbar .lang-nav {
        font-size: 0.75rem;
    }

    p, li {
        font-size: 1.02rem;
    }
}

@media (max-width: 640px) {
    main > section {
        padding: 1.5rem 1.15rem 1.75rem;
    }
}

/* Legal / policy pages: single content card, no hero */
main.content {
    background: var(--section-bg);
    color: var(--page-text);
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--section-shadow);
    padding: 2rem 1.5rem 2.25rem;
}

main.content h2 {
    color: var(--heading);
    font-weight: 600;
    margin-top: 2rem;
    font-size: 1.35rem;
}

main.content h2:first-of-type {
    margin-top: 0;
}

main.content h3 {
    color: var(--heading);
    font-weight: 600;
    margin-top: 1.5rem;
    font-size: 1.15rem;
}

main.content ul {
    margin: 0.75rem 0 1rem;
    padding-left: 1.35rem;
}

main.content li {
    margin-bottom: 0.35rem;
}

main.content .intro {
    font-size: 1.05rem;
}

.page-head {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--topbar-border);
}

.page-head__back {
    margin: 0 0 1rem;
}

.page-head__back a {
    color: var(--link);
    font-size: 0.95rem;
    text-decoration: none;
    font-weight: 500;
}

.page-head__back a:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.page-head__title {
    color: var(--heading);
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    line-height: 1.25;
}

.page-head__lead {
    margin: 0;
    color: var(--page-text-muted);
    font-size: 1.05rem;
}

.dark main.content .legal-note {
    color: var(--page-text-muted);
    border-top-color: rgba(255, 255, 255, 0.12);
}

main.content .legal-note {
    font-size: 0.9rem;
    color: var(--page-text-muted);
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

@media (max-width: 768px) {
    main.content {
        padding: 1.5rem 1.15rem 1.75rem;
    }

    .page-head__title {
        font-size: 1.45rem;
    }

    main.content h2 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    main.content {
        padding: 1.25rem 1rem 1.5rem;
    }

    main.content p,
    main.content li {
        font-size: 1.02rem;
    }
}
