:root {
    --bg: #f4f1ea;
    --text: #1f2433;
    --muted: #6b6f7d;
    --accent: #2f4fd0;
    --heading-font: "Unbounded", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 32px 16px 48px;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
}

header,
.grid,
footer {
    max-width: 980px;
    margin: 0 auto;
}

header {
    margin-bottom: 24px;
}

.back {
    font-size: 14px;
    color: var(--muted);
    text-decoration: none;
}

.back:hover {
    color: var(--accent);
}

h1 {
    margin: 12px 0 0;
    font-family: var(--heading-font);
    font-size: clamp(32px, 7vw, 48px);
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--accent);
}

.tagline {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(8px, 2vw, 14px);
}

@media (min-width: 560px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.cell {
    position: relative;
    display: block;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    -webkit-tap-highlight-color: transparent;
}

.cell img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cell:hover img,
.cell:focus-visible img {
    transform: scale(1.04);
}

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

footer {
    margin-top: 28px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--muted);
}

footer p {
    margin: 0;
}

footer a {
    font-weight: 600;
    color: var(--accent);
}

/* A round play button marks the video. */
.play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
}

.play::after {
    content: "";
    position: absolute;
    left: 22px;
    top: 17px;
    border-style: solid;
    border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent #fff;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 48px);
    background: rgba(0, 0, 0, 0.92);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

body.lb-open {
    overflow: hidden;
}

.lightbox__media {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox__media[hidden] {
    display: none;
}

.lightbox__close,
.lightbox__nav {
    position: absolute;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    line-height: 1;
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.lightbox__close:hover,
.lightbox__nav:hover {
    background: rgba(0, 0, 0, 0.65);
}

.lightbox__close {
    top: clamp(12px, 2.5vw, 22px);
    right: clamp(12px, 2.5vw, 22px);
    width: 42px;
    height: 42px;
    font-size: 28px;
}

.lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    font-size: 36px;
    padding-bottom: 3px;
}

.lightbox__nav--prev {
    left: clamp(8px, 2vw, 22px);
}

.lightbox__nav--next {
    right: clamp(8px, 2vw, 22px);
}
