/* Roboto (variable, self-hosted) */
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/roboto-latin-ext.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: "Roboto";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/roboto-latin.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: "Roboto";
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/roboto-italic-latin-ext.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: "Roboto";
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/roboto-italic-latin.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;
}

:root {
    --red: #a3140e;
    --blue: #006db2;
    --gray: #7c7c7c;
    --bg: #b1b1b1;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
    color: var(--gray);
    background: var(--bg);
}

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

a:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 4px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Page */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg) url("../img/background.webp") center top / cover no-repeat;
}

main {
    flex: 1;
}

/* Hero */
.hero {
    padding: clamp(40px, 7vh, 85px) 16px 0;
    text-align: center;
}

.hero__logo {
    margin: 0;
}

.hero__logo a {
    display: inline-block;
}

.hero__logo img {
    width: clamp(130px, 12vw, 165px);
}

.hero__tagline {
    margin: clamp(28px, 5vh, 48px) 0 0;
    color: var(--red);
    font-size: clamp(26px, 2.6vw, 38px);
    line-height: 1.2;
}

.t-italic { font-style: italic; font-weight: 400; }
.t-bold   { font-style: italic; font-weight: 700; }
.t-black  { font-style: italic; font-weight: 900; }

/* Companies */
.companies {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 56px 24px;
    max-width: 1840px;
    margin: 0 auto;
    padding: clamp(64px, 12vh, 140px) 24px clamp(64px, 14vh, 170px);
    list-style: none;
}

.company {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.company__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90px;
    transition: opacity .2s ease;
}

.company__logo:hover {
    opacity: .8;
}

.company__logo img {
    width: auto;
    max-height: 100%;
    max-width: 170px;
}

.company__name {
    max-width: 12em;
    margin: 18px 0 0;
    color: var(--red);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.2;
}

.company--tomp .company__name {
    color: var(--blue);
}

.company__address {
    margin: 12px 0 0;
    font-size: 16px;
    font-style: normal;
    line-height: 1.4;
}

.company__link {
    margin-top: auto;
    padding-top: 56px;
    color: var(--red);
    font-size: 14px;
    font-weight: 300;
    text-underline-offset: 2px;
}

.company__link:hover {
    text-decoration-thickness: 2px;
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gallery__item {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.gallery__item img {
    width: 100%;
    height: clamp(180px, 16vw, 260px);
    object-fit: cover;
}

.gallery__item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(232, 196, 195, .6);
    opacity: 0;
}

.gallery__item:hover::after,
.gallery__item:focus-visible::after {
    opacity: 1;
}

.gallery__item:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: -2px;
}

/* Lightbox */
html:has(.lightbox[open]) {
    overflow: hidden;
}

.lightbox {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    color: #fff;
    background: var(--red);
    overscroll-behavior: contain;
}

.lightbox::backdrop {
    background: var(--red);
}

.lightbox[open] {
    animation: lightbox-in .2s ease-out;
}

.lightbox__stage {
    position: absolute;
    inset: 74px 130px;
    touch-action: pan-y;
}

.lightbox__stage img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity .25s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox__stage img.is-active {
    opacity: 1;
}

.lightbox__btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    color: #fff;
    background: none;
    cursor: pointer;
}

.lightbox__btn[hidden] {
    display: none;
}

.lightbox__btn svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
}

.lightbox__btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.lightbox__fullscreen {
    top: 26px;
    left: 35px;
    width: 38px;
    height: 44px;
}

.lightbox__close {
    top: 30px;
    right: 30px;
    width: 38px;
    height: 44px;
}

.lightbox__close svg {
    width: 26px;
    height: 26px;
}

.lightbox__arrow {
    top: 50%;
    width: 50px;
    height: 50px;
    margin-top: -25px;
    opacity: .9;
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, .35));
}

.lightbox__prev {
    left: 20px;
}

.lightbox__next {
    right: 20px;
}

@keyframes lightbox-in {
    from { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .lightbox[open] {
        animation: none;
    }

    .lightbox__stage img {
        transition: none;
    }
}

@media (max-width: 1099px) {
    .companies {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 799px) {
    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery__item img {
        height: auto;
        aspect-ratio: 3 / 2;
    }

    .lightbox__stage {
        inset: 74px 0;
    }

    .lightbox__arrow {
        opacity: 1;
        filter: drop-shadow(0 0 2px rgba(0, 0, 0, .8)) drop-shadow(0 0 6px rgba(0, 0, 0, .5));
    }
}

@media (max-width: 559px) {
    .companies {
        grid-template-columns: minmax(0, 1fr);
    }

    .company__link {
        padding-top: 20px;
    }
}
