/*
 * Shared core stylesheet. Every page loads this file first; a page sheet from
 * src/styles/ follows when the page has one.
 *
 * Layer order, declared once here: tokens, base, components, page. Page
 * sheets wrap their rules in `@layer page`, so a page can adjust a shared
 * component without a specificity hack.
 *
 * Owns:
 *   tokens      custom properties
 *   base        base elements and the skip link
 *   components  chrome (header, navigation, footer), buttons, containers,
 *               typography, shared layout utilities, shared page components,
 *               and their responsive blocks
 * Font faces stay unlayered, before the layer declaration.
 */
@layer tokens, base, components, page;

@font-face {
    font-family: "Geist";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("assets/fonts/geist/geist-latin-v5.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("assets/fonts/inter/inter-latin-v20.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "PT Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("assets/fonts/pt-sans/pt-sans-700-latin-v18.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@layer tokens {
:root {
    --font-main: "Geist", "Inter", sans-serif;
    --font-alt: "Inter", sans-serif;
    --font-nav: "PT Sans", "Inter", sans-serif;

    --c-navy-900: #0f172a;
    --c-navy-800: #102542;
    --c-slate-900: #1e293b;
    --c-slate-700: #334155;
    --c-slate-500: #64748b;
    --c-slate-400: #94a3b8;
    --c-slate-300: #cbd5e1;
    --c-slate-200: #e2e8f0;
    --c-slate-100: #f1f5f9;
    --c-white: #ffffff;

    --c-accent: #e77d1a;
    --c-accent-2: #e87040;
    --c-blue-tag: #eef4fb;
    --c-warm-50: #fff8f2;
    --c-warm-100: #fdf3ea;
    --c-warm-200: #fcefe4;

    /* The brand gradient pair every call to action draws on. */
    --gradient-brand: linear-gradient(180deg, #ee892f 0%, #df701a 100%);
    --gradient-brand-hover: linear-gradient(180deg, #f0933f 0%, #e27622 100%);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --space-1: 8px;
    --space-2: 12px;
    --space-3: 16px;
    --space-4: 24px;
    --space-5: 32px;
    --space-6: 48px;
    --space-7: 64px;
    --space-8: 96px;

    --border-soft: #dbe5ee;
    --shadow-soft: 0 6px 20px rgba(16, 37, 66, .08);
    --shadow-soft-hover: 0 10px 28px rgba(16, 37, 66, .12);
    --transition-base: 220ms ease;
}
}

@layer base {
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-main);
    color: var(--c-slate-900);
    background: #fff;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: 0;
    transform: translateY(-140%);
    background: #0b2442;
    color: #fff;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    z-index: 1000;
}

.skip-link:focus-visible {
    transform: translateY(12px);
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

a,
button,
input,
select,
textarea,
summary,
.btn {
    transition: color var(--transition-base), background-color var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.btn:focus-visible {
    outline: 3px solid var(--c-accent);
    outline-offset: 2px;
}
}

@layer components {
.top-nav a:hover,
.footer-nav a:hover {
    color: #0b2442;
}

.btn-primary:hover {
    background: var(--gradient-brand-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(231, 125, 26, .32);
}

.btn-primary:active {
    background: #c9651a;
    transform: translateY(0);
}

.container {
    width: min(1440px, 100% - 48px);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 500;
    background: #fff;
    min-height: 76px;
    display: flex;
    align-items: center;
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    padding: 0;
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--c-slate-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-shrink: 0;
}

.mobile-menu-toggle .hamburger-line {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--c-slate-700);
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.brand {
    width: 205px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

/* CTA inside the mobile dropdown only — hidden in the desktop inline nav. */
.top-nav a.nav-cta {
    display: none;
}

/* Legal section inside the mobile dropdown only — hidden in the desktop inline nav. */
.nav-legal {
    display: none;
}

.brand img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font: 700 15.52px/25.608px var(--font-nav);
    color: #566273;
    white-space: nowrap;
    margin-left: auto;
    margin-right: 8px;
}

.top-nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 2px 0;
}

.top-nav a[aria-current="page"] {
    color: #0b2442;
}

.top-nav a.nav-lang:hover,
.top-nav a.nav-lang:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.btn-top {
    min-height: 46px;
    padding: 12.48px 17.92px;
    font-family: var(--font-alt);
    font-weight: 700;
    font-size: 15px;
    border-radius: 8px;
}

h1,
h2,
h3,
h4,
p,
ul {
    margin: 0;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.1;
    color: var(--c-white);
}

h2 {
    margin-top: var(--space-3);
    font-size: clamp(1.8rem, 3.4vw, 2.5rem);
    line-height: 1.18;
    letter-spacing: -.01em;
}

h3 {
    font-size: 1.1rem;
}

p {
    color: var(--c-slate-500);
    line-height: 1.65;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    border-radius: var(--radius-sm);
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--gradient-brand);
    color: #fff;
    box-shadow: 0 8px 20px rgba(231, 125, 26, .28);
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.footer {
    border-top: 1px solid #efd8c5;
    background: rgb(255, 248, 242);
    padding: clamp(56px, 7vw, 72px) 0;
}

.footer-nav a {
    text-underline-offset: 3px;
}

.footer-nav a:hover {
    text-decoration: underline;
}

.footer-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 64px;
    min-height: 126px;
}

.footer-logo img {
    width: 158px;
    height: 126px;
    object-fit: cover;
}

.footer-nav {
    display: flex;
    gap: 64px;
    font-family: var(--font-alt);
}

.footer-nav h3 {
    font-size: 14px;
    color: #111827;
    margin-bottom: 16px;
}

.footer-nav>div {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav a {
    display: block;
    color: #605f5f;
    font-size: 15px;
    font-weight: 500;
    line-height: 22px;
}

.footer-nav a[aria-current="page"] {
    color: #0b2442;
    font-weight: 600;
}

/* The switcher trails every other header item. Taking it out of the flex flow
 * lets it sit at the container's right edge without widening the navigation;
 * the reserved right padding keeps the CTA clear of it. */
@media (min-width: 901px) {

    .header-inner {
        position: relative;
        padding-right: calc(72px + 16px);
    }

    .top-nav a.nav-lang {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        margin: 0;
        width: 72px;
        justify-content: flex-end;
        text-align: right;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 1280px) {

    .container {
        width: min(1440px, 100% - 32px);
    }

    .top-nav {
        gap: 18px;
        font-size: 15px;
    }
}

/* The desktop navigation only has to fit the narrow band above the mobile
 * breakpoint; tighten its spacing there so the header does not overflow. */
@media (min-width: 901px) and (max-width: 1050px) {

    .header-inner {
        gap: 12px;
    }

    .top-nav {
        gap: 6px;
        font-size: 14px;
    }

    .btn-top {
        padding-left: 14px;
        padding-right: 14px;
    }
}

@media (max-width: 900px) {

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

    html:not(.js) .mobile-menu-toggle {
        display: none;
    }

    .header-inner {
        min-height: auto;
        padding: 12px 0;
    }

    .top-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 100;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        margin: 0;
        padding: 8px 16px 16px;
        background: #fff;
        border-bottom: 1px solid var(--c-slate-200);
        box-shadow: var(--shadow-soft);
        font-size: 15px;
        white-space: normal;
    }

    html:not(.js) .top-nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        position: static;
        gap: 16px;
        padding: 8px 0 0;
        border-bottom: 1px solid var(--c-slate-200);
        box-shadow: none;
        font-size: 14px;
        white-space: normal;
    }

    html:not(.js) .top-nav a {
        width: auto;
        padding: 8px 0;
        border-bottom: none;
    }

    .top-nav.open {
        display: flex;
        max-height: calc(100vh - 100%);
        max-height: calc(100dvh - 100%);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .top-nav a.nav-cta {
        display: inline-flex;
        width: 100%;
        justify-content: center;
        margin: 4px 0 12px;
        padding: 12px 16px;
        background: var(--gradient-brand);
        color: #fff;
        border-radius: var(--radius-sm);
        font-weight: 700;
        border-bottom: none;
    }

    .top-nav a.nav-cta:hover {
        background: var(--gradient-brand-hover);
        color: #fff;
    }

    .top-nav a {
        width: 100%;
        padding: 12px 4px;
        border-bottom: 1px solid var(--c-slate-100);
        justify-content: flex-start;
    }

    .nav-legal {
        display: block;
        width: 100%;
    }

    .nav-legal-title {
        display: block;
        width: 100%;
        margin-top: 8px;
        padding: 16px 4px 4px;
        border-top: 1px solid var(--c-slate-200);
        font: 700 12px var(--font-alt);
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--c-slate-500);
    }

    .nav-legal a {
        font-size: 13px;
        font-weight: 500;
        color: var(--c-slate-500);
        padding: 10px 4px;
    }

    .nav-legal a:last-child {
        border-bottom: none;
    }

    .top-nav a[aria-current="page"] {
        color: #0b2442;
        box-shadow: none;
    }
}

@media (hover: none) {

    .btn-primary:hover {
        transform: none;
        box-shadow: var(--shadow-soft);
    }
}

@media (max-width: 640px) {

    .container {
        width: min(1440px, 100% - 24px);
    }

    .site-header,
    .header-inner {
        min-height: 64px;
    }

    .header-inner {
        gap: 12px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-nav {
        gap: 32px;
        flex-direction: column;
    }

    .footer-nav a {
        padding: 6px 0;
        line-height: 24px;
    }

    .brand {
        width: 150px;
        height: auto;
    }

    .btn-top {
        min-height: 40px;
        padding: 10px 14px;
        font-size: 13px;
        line-height: 14px;
        width: auto;
        white-space: nowrap;
    }
}

@media (max-width: 400px) {

    .btn-top {
        display: none;
    }

    .brand {
        width: auto;
        max-width: 150px;
    }

    .header-inner {
        justify-content: space-between;
    }
}

/* Page hero: one module for the contact and legal hero bands. */
.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 237px;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    background: var(--c-navy-900);
}

.page-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-hero-inner {
    position: relative;
    padding: clamp(56px, 8vw, 80px) 0;
    min-height: clamp(180px, 30vw, 237px);
    display: flex;
    align-items: center;
}

.page-hero-inner h1 {
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.2;
}

/*
 * Load-bearing order: `.page-hero--prose h1` and `.page-hero-inner h1` have
 * equal specificity, so the shared 640px block below must stay after the
 * variant. Moving it earlier changes the contact heading on small screens.
 */
.page-hero--prose h1 {
    max-width: 980px;
    font-size: clamp(2rem, 3.8vw, 56px);
    line-height: 1.1;
}

@media (max-width: 640px) {

    .page-hero-inner h1 {
        font-size: clamp(2rem, 10vw, 2.35rem);
        line-height: 1.12;
        max-width: 14ch;
    }
}
}
