/* Shared visual system */

:root {
    /* Carpet & walnut palette, from the home page photo: ivory wool, walnut
       wood, madder-red carpet, brass. Every text/background pair used below
       meets WCAG AA (4.5:1). */
    --color-canvas: #f7f0e6;        /* page background (ivory) */
    --color-surface: #fffbf5;       /* cards, panels */
    --color-surface-2: #f2e8da;     /* subtle fills: table heads, hovers */
    --color-ink: #2b1d15;           /* main text (walnut) */
    --color-ink-2: #4a382c;         /* strong secondary text */
    --color-muted: #6b5747;         /* secondary text */
    --color-faint: #8c7663;         /* placeholders, hints (3:1+) */
    --color-line: #e6d8c4;          /* borders */
    --color-line-strong: #cdb89c;   /* inputs, emphasised borders */
    --color-brand: #9a2f1e;         /* madder red: buttons, links */
    --color-brand-dark: #741f12;
    --color-brand-soft: #f7e4da;
    --color-brass: #a8772f;         /* accent: focus rings, details */
    --color-brass-soft: #f5e8cc;    /* highlights (active subtitle line) */
    --color-walnut: #2a1c14;        /* footer, dark panels */
    --color-walnut-2: #3a2a1e;
    --color-cream: #f3e3c3;         /* text on walnut */
    --color-cream-muted: #cdb79a;
    --color-info: #2f4a6b;          /* carpet indigo */
    --color-info-soft: #e4e9f1;
    --color-success: #2f6b3a;
    --color-success-soft: #e3efdc;
    --color-warning: #7d520e;
    --color-warning-soft: #f8ecd1;
    --color-danger: #a3261a;
    --color-danger-soft: #f8e1dc;
    --color-focus-ring: rgba(154, 47, 30, .16);
    --shadow-sm: 0 1px 2px rgba(43, 29, 21, .05), 0 8px 24px rgba(43, 29, 21, .06);
    --shadow-md: 0 18px 48px rgba(43, 29, 21, .12);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--color-ink);
    background: var(--color-canvas);
    -webkit-font-smoothing: antialiased;
}

.navbar {
    /* solid (no backdrop blur): cheaper to repaint while scrolling */
    background: var(--color-surface);
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* thin carpet strip along the bottom of the header (3.8 KB image) */
.navbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 6px;
    background: var(--color-walnut) url("../img/carpet_strip.6171e8003172.jpg") center / auto 100% repeat-x;
    pointer-events: none;
}

.logo {
    height: 64px;
    display: block;
}

.nav-link,
.nav-button {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-ink-2);
    text-decoration: none;
    transition: color .18s ease, background .18s ease;
}

.nav-link:hover,
.nav-button:hover {
    color: var(--color-brand);
}

.nav-link:focus-visible,
.nav-button:focus-visible,
.footer-link:focus-visible {
    outline: 2px solid var(--color-brass);
    outline-offset: 3px;
    border-radius: 4px;
}

.nav-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-spacer {
    flex: 1;
}

.main-content {
    flex: 1;
    padding: 0;
}

.footer {
    background: var(--color-walnut);
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-text,
.footer-link {
    font-size: 0.78rem;
    color: var(--color-cream-muted);
    text-decoration: none;
}

.footer-link:hover {
    color: var(--color-cream);
}

.language-select {
    font-size: 0.78rem;
    border: 1px solid var(--color-line-strong);
    border-radius: 999px;
    padding: 6px 28px 6px 10px;
    color: var(--color-ink-2);
    /* iOS Safari fills selects grey and draws its own chevron unless the
       native appearance is switched off */
    -webkit-appearance: none;
    appearance: none;
    background-color: transparent;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='none' stroke='%236b5747' stroke-width='1.5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    font-family: inherit;
}

.lang-form {
    display: flex;
    margin: 0;
    flex: 0 0 auto;
}


.nav-items {
    display: contents;   /* desktop: children participate in navbar's flex directly */
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    margin-left: auto;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 22px;
    background: var(--color-ink-2);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .navbar {
        height: auto;
        min-height: 56px;
        padding: 8px 14px;
        gap: 12px;
        flex-wrap: wrap;
    }

    .logo {
        height: 40px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-items {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 8px 0 4px;
        border-top: 1px solid var(--color-line);
    }

    .navbar.open .nav-items {
        display: flex;
    }

    .nav-spacer {
        display: none;
    }

    .nav-items .nav-link,
    .nav-items .nav-button {
        font-size: 0.95rem;
        padding: 10px 0;
        width: 100%;
    }

    .nav-items .nav-link:hover,
    .nav-items .nav-button:hover {
        background: var(--color-brand-soft);
        border-radius: 8px;
        padding-left: 10px;
    }

    .nav-items form {
        width: 100%;
    }

        .language-select {
        font-size: 0.85rem;
        padding: 4px 6px;
    }

    .main-content {
        padding: 0 14px;
        box-sizing: border-box;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px;
    }
}

img, video, iframe {
    max-width: 100%;
}

/* reCAPTCHA v3 badge (added by Google on login, registration and contact
   pages): 70 % of its size. `zoom` (not transform) also scales Google's own
   offsets, so the logo stays visible at the window edge and still slides
   open on hover. Google requires the badge to stay visible. */
.grecaptcha-badge {
    zoom: 0.7;
}
