/*
 * Quark 2 — user customizations
 *
 * This file is safe to edit. It is loaded last so anything here overrides
 * theme.css without having to mark rules !important.
 */

/* Language switcher */
.langswitcher {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    margin-right: 0.5rem;
}

.langswitcher-link {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.2rem 0.45rem;
    border-radius: 0.35rem;
    text-decoration: none;
    opacity: 0.6;
}

.langswitcher-link:hover {
    opacity: 1;
}

.langswitcher-link.active {
    opacity: 1;
    background: var(--q2-accent, currentColor);
    color: var(--q2-accent-contrast, #fff);
}

/* Footer */
#footer.footer-dark {
    border-top: none;
    padding-block: 0;
    background: rgb(36, 36, 36);
    color: rgba(255, 255, 255, 0.85);
    width: 100%;
    text-align: left;
    font-size: 1rem;
}

.footer-columns {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2.5rem;
    padding-block: 3.5rem;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-brand-title {
    display: block;
    font-family: var(--pico-font-family-display);
    font-size: 1.375rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

#footer .footer-brand-desc {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 15px;
    max-width: 52ch;
}

.footer-legal-links {
    margin-top: 1.25rem;
    display: flex;
    gap: 1.25rem;
}

#footer .footer-legal-links a,
#footer .footer-nav-links a,
#footer .footer-social-list a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
}

#footer .footer-legal-links a:hover,
#footer .footer-nav-links a:hover,
#footer .footer-social-list a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-nav-links li,
.footer-social-list li {
    margin-bottom: 1rem;
}

.footer-social-list a i {
    width: 1.25em;
    text-align: center;
    margin-right: 0.4rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-block: 1.5rem;
}

#footer .footer-bottom p {
    margin: 0;
    text-align: left;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 768px) {
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Bump body text size in the content area */
.content-item p,
.content-item li,
.content-item td,
.content-item blockquote {
    font-size: 1.125rem;
}

/* Remove the accent bar above headings */
h2::before {
    display: none;
}

/* Remove max-width constraint on the content column */
#body-wrapper > .container > .content-item {
    max-width: none;
}

/* Content images default to full width */
.content-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Homepage hero */
.home-hero {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.75) 100%),
        url('/user/media/hero-bg.png');
    background-size: cover;
    background-position: center;
    border-radius: var(--q2-radius-lg, 1rem);
    padding: 2.5rem clamp(100px, 8vw, 160px);
    margin-bottom: 40px;
    overflow: hidden;
    position: relative;
}
.home-hero .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.8125rem;
    font-weight: 600;
    color: color-mix(in oklab, #ffffff 65%, transparent);
    margin-top: 40px;
    margin-bottom: 0.75rem;
}
.home-hero h1 {
    color: #ffffff;
    margin-top: 20px;
}
.home-hero .lead {
    max-width: 100%;
    text-align: center;
    color: #efefef;
}
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.hero-actions [role="button"] {
    margin: 0;
}
.hero-actions .outline.contrast {
    background-color: transparent;
    color: #ffffff;
    border-color: color-mix(in oklab, #ffffff 55%, transparent);
}
.hero-actions [role="button"]:hover {
    background-color: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

/* Homepage news teaser */
.home-news {
    margin-top: 0;
}

body.home-page #body-wrapper {
    padding-top: 0;
}
.home-news-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.home-news-header h2 {
    margin: 0;
}
.home-news-all {
    font-weight: 600;
    white-space: nowrap;
}
.home-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.home-news-grid .card-title h3 {
    margin: 0;
    font-weight: 400;
}
.home-news-grid .card-title a {
    color: inherit;
    text-decoration: none;
}
.home-news-grid .card-excerpt {
    font-size: 1rem;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-news-grid .card:hover {
    transform: none;
}

/* Screenshot gallery */
.screenshot-gallery {
    position: relative;
    margin: 1.75rem 0;
}
.screenshot-strip {
    display: grid;
    grid-auto-columns: calc(25% - 0.75rem);
    grid-auto-flow: column;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.screenshot-strip::-webkit-scrollbar {
    display: none;
}
.screenshot-strip .screenshot-thumb {
    scroll-snap-align: start;
}
.screenshot-thumb {
    display: block;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    cursor: zoom-in;
    border-radius: var(--q2-radius, 0.75rem);
    overflow: hidden;
    aspect-ratio: 1242 / 2688;
    line-height: 0;
}
.screenshot-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease;
}
.screenshot-thumb:hover img {
    transform: scale(1.03);
}
.gallery-nav-prev,
.gallery-nav-next {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    font-size: 1.2rem;
    z-index: 2;
    cursor: pointer;
}
.gallery-nav-prev { left: -1.1rem; }
.gallery-nav-next { right: -1.1rem; }
.gallery-nav-prev:hover,
.gallery-nav-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

@media (max-width: 700px) {
    .screenshot-strip {
        grid-auto-columns: 78%;
    }
    .screenshot-strip .screenshot-thumb {
        scroll-snap-align: center;
    }
    .gallery-nav-prev { left: -0.25rem; }
    .gallery-nav-next { right: -0.25rem; }
}

/* Lightbox */
.screenshot-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}
.screenshot-lightbox.open {
    display: flex;
}
body.lightbox-open {
    overflow: hidden;
}
.lightbox-image {
    max-width: min(90vw, 480px);
    max-height: 88vh;
    border-radius: 0.5rem;
    object-fit: contain;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-close {
    top: 1.25rem;
    right: 1.25rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.5rem;
    line-height: 1;
}
.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    font-size: 1.5rem;
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Mobile hero adjustments */
@media (max-width: 550px) {
    .home-hero {
        padding: 40px;
    }
}
