:root {
    --base: #fff9ef;
    --base-soft: #f7f0de;
    --contrast: #1c1a18;
    --muted: #5a5248;
    --accent: #8f1f2f;
    --accent-deep: #234f39;
    --line: rgba(28, 26, 24, 0.18);
    --shadow: 0 14px 32px rgba(16, 14, 12, 0.14);
    --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--contrast);
    background-image: url('../images/backgrounds/tartan_seul_original_sBord.jpg');
    background-position: 0 0;
    background-size: auto;
    background-repeat: repeat;
    background-attachment: fixed;
    font: 16px/1.6 Georgia, 'Times New Roman', serif;
}

a { color: inherit; }

.shell {
    width: min(1120px, calc(100vw - 32px));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(10px);
    background: rgba(255, 250, 239, 0.9);
    border-bottom: 2px solid rgba(143, 31, 47, 0.35);
}

.topbar__inner,
.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
}

.topbar__identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand__logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    padding: 4px;
    flex: 0 0 auto;
}

.brand {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
}

.brand__name {
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.brand__tagline,
.footer__small {
    color: var(--muted);
    font-size: 0.92rem;
    max-width: 56ch;
}

.topbar__actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.topbar__dropdown {
    position: relative;
    display: inline-flex;
    padding-bottom: 8px;
    margin-bottom: -8px;
}

.topbar__dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: rgba(255, 250, 239, 0.98);
    border: 1px solid rgba(35, 79, 57, 0.35);
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(16, 14, 12, 0.2);
    padding: 8px;
    display: none;
    z-index: 30;
}

.topbar__dropdown:hover .topbar__dropdown-menu,
.topbar__dropdown:focus-within .topbar__dropdown-menu {
    display: block;
}

.topbar__dropdown::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 10px;
}

.topbar__dropdown-link {
    display: block;
    text-decoration: none;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    font-weight: 600;
}

.topbar__dropdown-link:hover,
.topbar__dropdown-link:focus-visible {
    background: rgba(35, 79, 57, 0.1);
}

.topbar__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(35, 79, 57, 0.45);
    border-radius: 999px;
    padding: 0.5rem 0.9rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.topbar__link:hover {
    background: rgba(35, 79, 57, 0.1);
}

.topbar__link--active {
    border-color: rgba(143, 31, 47, 0.52);
    background: rgba(143, 31, 47, 0.12);
}

h1, h2, h3, p { margin: 0; }

.muted {
    color: var(--muted);
}

.footer {
    margin-top: 24px;
    padding: 24px 0 36px;
    border-top: 2px solid rgba(143, 31, 47, 0.35);
    background: rgba(255, 250, 239, 0.9);
}

.to-top {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 2px solid rgba(35, 79, 57, 0.4);
    background: rgba(255, 249, 239, 0.95);
    display: grid;
    place-items: center;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(17, 17, 17, 0.14);
    z-index: 40;
}

@media (max-width: 860px) {
    .topbar__inner,
    .footer__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar__identity,
    .topbar__actions {
        width: 100%;
    }

    .topbar__dropdown {
        width: 100%;
    }

    .topbar__dropdown-trigger {
        width: 100%;
    }

    .topbar__dropdown-menu {
        position: static;
        display: block;
        margin-top: 8px;
        width: 100%;
    }

    .brand__logo {
        width: 52px;
        height: 52px;
    }
}
