/*
 * Inter (variable), self-hosted so no visitor data goes to Google. License: assets/fonts/OFL.txt
 */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter-latin-wght-normal.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;
}

/*
 * Tokens
 */
:root {
    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --bs-border-radius: 8px;
    --bs-border-radius-sm: 6px;
    --bs-border-radius-lg: 12px;

    --nav-height: 64px;
}

[data-bs-theme=dark] {
    --bs-body-bg: #0f1113;
    --bs-body-bg-rgb: 15, 17, 19;
    --bs-tertiary-bg: #16191c;
    --bs-tertiary-bg-rgb: 22, 25, 28;
    --bs-secondary-bg: #1d2125;
    --bs-secondary-bg-rgb: 29, 33, 37;
    --bs-border-color: #2a2f34;
    --bs-secondary-color: rgba(222, 226, 230, 0.62);
}

[data-bs-theme=light] {
    --bs-body-bg: #f9f4ea;
    --bs-body-bg-rgb: 249, 244, 234;
    --bs-body-color: #2b2620;
    --bs-body-color-rgb: 43, 38, 32;
    --bs-secondary-color: rgba(43, 38, 32, 0.68);
    --bs-tertiary-bg: #f0e8d9;
    --bs-tertiary-bg-rgb: 240, 232, 217;
    --bs-secondary-bg: #e8dfcc;
    --bs-secondary-bg-rgb: 232, 223, 204;
    --bs-border-color: #ddd2bb;
}

html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    font-feature-settings: "cv11", "ss03";
    -webkit-font-smoothing: antialiased;
}

#app {
    flex-shrink: 0;
}

a {
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 650;
    letter-spacing: -0.02em;
}

.content {
    margin-top: 3.5rem;
    margin-bottom: 5rem;
}

.card {
    background: var(--bs-tertiary-bg);
    border-color: var(--bs-border-color);
}

.btn {
    --bs-btn-font-weight: 550;
}

/*
 * Navbar
 */
.site-nav {
    min-height: var(--nav-height);
    background: rgba(var(--bs-body-bg-rgb), 0.9);
    border-bottom: 1px solid var(--bs-border-color);
    backdrop-filter: blur(8px);
}

.site-nav .navbar-brand {
    padding: 0.4rem 0;
}

.site-nav .navbar-brand img {
    height: 56px;
    width: auto;
}

.site-nav .nav-link {
    padding: 0.5rem 0.85rem;
    font-size: 0.94rem;
    font-weight: 500;
    color: var(--bs-secondary-color);
    border-radius: var(--bs-border-radius);
}

.site-nav .nav-link:hover,
.site-nav .nav-link:focus-visible {
    color: var(--bs-body-color);
}

.site-nav .nav-link.active {
    color: var(--bs-body-color);
    box-shadow: inset 0 -2px 0 var(--bs-primary);
    border-radius: 0;
}

.nav-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

/* theme selector and notifications render <li>, which would show a bullet here */
.nav-tools li {
    list-style: none;
}

.btn-shop {
    font-weight: 650;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

@media (max-width: 991.98px) {
    .site-nav .navbar-brand img {
        height: 44px;
    }

    .site-nav .navbar-collapse {
        padding: 0.75rem 0 1rem;
    }

    .site-nav .nav-link.active {
        box-shadow: none;
        color: var(--bs-primary);
    }

    /* the open menu can be taller than the screen, and the sticky bar can't scroll with the page */
    .site-nav .navbar-collapse {
        max-height: calc(100vh - 5rem);
        max-height: calc(100dvh - 5rem);
        margin-inline: -0.25rem;
        padding-inline: 0.25rem;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .nav-tools {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--bs-border-color);
    }

    /*
     * Bootstrap skips Popper inside .navbar, so a dropdown-menu-end menu stays
     * pinned to the right edge of its button and runs off the left side of the
     * screen when the button sits at the start of the row. Open it in the flow
     * instead, on its own full-width row, like the .navbar-nav dropdowns.
     */
    .nav-tools > :has(.dropdown-menu.show) {
        flex: 1 0 100%;
    }

    .site-nav .nav-tools .dropdown-menu {
        position: static;
        transform: none;
        float: none;
        width: 100%;
        margin: 0.5rem 0 0;
    }
}

.server-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.7rem;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    color: var(--bs-secondary-color);
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bs-secondary-color);
}

.status-dot.is-online {
    background: #3fb950;
}

/* Desktop: slightly larger than the mobile sizes above */
@media (min-width: 992px) {
    .site-nav .navbar-brand {
        padding: 0.5rem 0;
        margin-right: 1.5rem;
    }

    .site-nav .navbar-brand img {
        height: 62px;
    }

    .site-nav .nav-link {
        padding: 0.6rem 1rem;
        font-size: 1rem;
    }

    .nav-tools {
        gap: 0.7rem;
    }

    .nav-tools .btn {
        --bs-btn-padding-y: 0.4rem;
        --bs-btn-padding-x: 0.9rem;
        --bs-btn-font-size: 0.94rem;
    }

    .site-nav .server-status {
        padding: 0.35rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 1400px) {
    .site-nav .navbar-brand img {
        height: 66px;
    }
}

/*
 * Home: hero
 */
.hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 460px;
    padding: 5rem 0 4rem;
    background:
        linear-gradient(to top, var(--bs-body-bg) 0%, rgba(var(--bs-body-bg-rgb), 0.55) 55%, rgba(var(--bs-body-bg-rgb), 0.35) 100%),
        var(--hero-image, none) center / cover no-repeat,
        var(--bs-tertiary-bg);
}

.hero-inner {
    position: relative;
}

.hero-title {
    max-width: 14ch;
    margin: 0;
    font-size: clamp(2.75rem, 7vw, 5rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.035em;
    text-align: left;
    text-transform: none;
}

.hero-tagline {
    max-width: 44ch;
    margin: 1.25rem 0 0;
    font-size: 1.15rem;
    color: var(--bs-secondary-color);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
    color: var(--bs-secondary-color);
}

.copy-address {
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}

.notice-title {
    margin-bottom: 0.25rem;
    font-weight: 650;
}

.notice-text {
    margin-bottom: 0;
    color: var(--bs-secondary-color);
}

.notice-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.92rem;
    font-weight: 550;
}

.notice {
    margin-bottom: 3rem;
    padding: 1rem 1.25rem;
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-left: 3px solid var(--bs-primary);
    border-radius: var(--bs-border-radius);
}

/*
 * Home: news
 */
.section-title {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: left;
    text-transform: none;
}

.post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    color: var(--bs-body-color);
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-lg);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.post-card:hover {
    color: var(--bs-body-color);
    border-color: var(--bs-primary);
    transform: translateY(-2px);
}

.post-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-bottom: 1px solid var(--bs-border-color);
}

.post-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.25rem;
}

.post-card-date {
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
}

.post-card-title {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    line-height: 1.35;
}

.post-card-excerpt {
    margin-bottom: 1rem;
    font-size: 0.93rem;
    color: var(--bs-secondary-color);
}

.post-card-link {
    margin-top: auto;
    font-size: 0.88rem;
    font-weight: 550;
    color: var(--bs-primary);
}

.post-card-link .bi {
    display: inline-block;
    transition: transform 0.15s ease;
}

.post-card:hover .post-card-link .bi {
    transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
    .post-card,
    .post-card-link .bi {
        transition: none;
    }

    .post-card:hover,
    .post-card:hover .post-card-link .bi {
        transform: none;
    }
}

/*
 * Footer
 */
.site-footer {
    padding: 4rem 0 2rem;
    background: var(--bs-tertiary-bg);
    border-top: 1px solid var(--bs-border-color);
}

.footer-heading {
    margin-bottom: 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.footer-about {
    max-width: 46ch;
    font-size: 0.93rem;
    color: var(--bs-secondary-color);
}

.footer-social a {
    font-size: 1.25rem;
    color: var(--bs-secondary-color);
}

.footer-social a:hover {
    color: var(--bs-primary);
}

.footer-links li + li {
    margin-top: 0.5rem;
}

.footer-links a {
    font-size: 0.92rem;
    color: var(--bs-body-color);
}

.footer-links a:hover {
    color: var(--bs-primary);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 2rem;
    margin-top: 3.5rem;
    padding-top: 1.5rem;
    font-size: 0.84rem;
    color: var(--bs-secondary-color);
    border-top: 1px solid var(--bs-border-color);
}

.footer-bottom a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/*
 * Cookie banner
 */
.cookie-banner {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    z-index: 1080;
    width: calc(100% - 2rem);
    max-width: 420px;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: 1.25rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.cookie-banner[hidden],
.cookie-details[hidden],
.cookie-save[hidden] {
    display: none;
}

.cookie-title {
    margin-bottom: 0.4rem;
    font-weight: 650;
}

.cookie-text {
    margin-bottom: 1rem;
    font-size: 0.88rem;
    color: var(--bs-secondary-color);
}

.cookie-text a {
    color: var(--bs-body-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-details {
    margin-bottom: 1rem;
    border-top: 1px solid var(--bs-border-color);
}

.cookie-group {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--bs-border-color);
}

.cookie-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.cookie-group-name {
    font-size: 0.92rem;
    font-weight: 600;
}

.cookie-group-info {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    color: var(--bs-secondary-color);
}

.cookie-list {
    margin: 0.75rem 0 0;
    font-size: 0.8rem;
}

.cookie-list dt {
    font-family: var(--bs-font-monospace);
    font-weight: 500;
}

.cookie-list dd {
    margin-bottom: 0.5rem;
    color: var(--bs-secondary-color);
}

.cookie-duration {
    white-space: nowrap;
}

.cookie-duration::before {
    content: "· ";
}

/* reject and accept share one style and size on purpose */
.cookie-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.cookie-wide {
    grid-column: 1 / -1;
}

.cookie-save,
.cookie-toggle {
    grid-column: 1 / -1;
}

.footer-link-button {
    padding: 0;
    font-size: 0.92rem;
    color: var(--bs-body-color);
    background: none;
    border: 0;
}

.footer-link-button:hover {
    color: var(--bs-primary);
}
