@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/roboto-latin-wght-normal.woff2") format("woff2");
}

:root {
    --bg: #282c34;
    --text: rgba(255, 255, 255, 0.88);
    --muted: #adafb2;
    --faint: rgba(255, 255, 255, 0.45);
    --line: rgba(255, 255, 255, 0.08);
    --placeholder: rgba(255, 255, 255, 0.06);
    --surface: #30353f;
    --accent: #f2a900;
    --accent-hover: #ffbd2e;
    --on-accent: #1d1f24;
    --radius: 6px;
    --header-height: 65px;
}

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

html {
    scroll-padding-top: calc(var(--header-height) + 8px);
}

body {
    margin: 0;
    font-family: "Roboto", sans-serif;
    -webkit-font-smoothing: antialiased;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: white;
}

h1,
h2 {
    color: white;
    line-height: 1.2;
}

h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 5vw, 40px);
    letter-spacing: -0.01em;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    flex: none;
}

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

button {
    font: inherit;
}

.page {
    position: relative;
    min-height: 100vh;
    overflow: clip;
}

.page::before {
    content: "";
    position: fixed;
    right: -8vw;
    bottom: -12vh;
    width: min(70vw, 700px);
    aspect-ratio: 70 / 99.1;
    background: url("bg.svg") center / contain no-repeat;
    opacity: 0.14;
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 5;
    margin-bottom: 24px;
    padding: 8px 0;
    background: rgba(40, 44, 52, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    height: 48px;
    width: auto;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 17px;
}

.site-nav .icon {
    font-size: 26px;
}

.site-nav a[aria-current="page"] {
    color: white;
    text-decoration: underline 2px var(--accent);
    text-underline-offset: 8px;
}

.site-nav a,
.breadcrumbs a,
.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 6px;
    margin: 0 -6px;
}

.site-footer {
    margin-top: 48px;
    padding-bottom: 24px;
    font-size: 15px;
    text-align: center;
    color: var(--muted);
}

.site-footer p {
    margin: 4px 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 28px;
}

.lead {
    max-width: 640px;
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 18px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    column-gap: 8px;
    margin-bottom: 4px;
    font-size: 14px;
}

.breadcrumbs a + a::before {
    content: "/";
    margin-right: 8px;
    color: var(--faint);
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    margin: 0 0 20px -20px;
    clip-path: inset(0 0 0 20px);
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.event-meta span:empty {
    display: none;
}

.event-meta span::before {
    content: "·";
    display: inline-block;
    width: 20px;
    text-align: center;
    color: var(--faint);
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
    background: transparent;
    color: white;
    white-space: nowrap;
    cursor: pointer;
}

.button:hover {
    border-color: white;
}

.button-primary {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 500;
}

.button-primary:hover {
    border-color: var(--accent-hover);
    background: var(--accent-hover);
    color: var(--on-accent);
}

.year-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 8px;
}

.year-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 22px;
    background: var(--surface);
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
}

.year-links a:hover {
    color: var(--on-accent);
    background: var(--accent);
}

.year-heading {
    position: sticky;
    top: var(--header-height);
    z-index: 2;
    margin: 24px 0 0;
    padding: 8px 0;
    background: rgba(40, 44, 52, 0.92);
    backdrop-filter: blur(6px);
    font-size: 24px;
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.event-card a {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface);
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-card a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.event-card img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    background: var(--placeholder);
}

.event-card-body {
    padding: 12px 14px 14px;
}

.event-card h3 {
    margin: 0 0 4px;
    color: white;
    font-size: 18px;
    line-height: 1.3;
}

.event-card .event-meta {
    margin-bottom: 0;
}

.event {
    max-width: 1080px;
}

.event > * {
    max-width: 720px;
}

.event > .hero {
    max-width: none;
}

.featured-photo {
    margin: 24px 0;
}

.featured-photo img {
    width: auto;
    max-height: 80vh;
    margin: 0 auto;
    border-radius: var(--radius);
    background: var(--placeholder);
}

.hero img {
    margin: 0;
}

.featured-photo figcaption,
.photo-view figcaption {
    margin-top: 8px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

.event-body {
    margin: 24px 0;
    font-size: 18px;
}

.event-body a {
    color: white;
    text-decoration: underline;
}

.event-pager {
    display: flex;
    gap: 12px;
    margin: 40px 0 8px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.event-pager a {
    display: flex;
    flex: 0 1 calc(50% - 6px);
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: background 0.2s ease;
}

.event-pager a:hover {
    background: #383e4a;
}

.event-pager-newer {
    margin-left: auto;
    text-align: right;
}

.event-pager-label {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
}

.event-pager-newer .event-pager-label {
    justify-content: flex-end;
}

.event-pager-title {
    font-weight: 500;
}

.event-pager-date {
    color: var(--muted);
    font-size: 14px;
}

.event-pager-date:empty {
    display: none;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 24px 0;
}

.preview-grid a {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--placeholder);
}

.preview-grid img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.preview-more span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 22, 26, 0.65);
    color: white;
    font-size: clamp(16px, 3vw, 22px);
    font-weight: 700;
    transition: background 0.2s ease;
}

.preview-more:hover span {
    background: rgba(20, 22, 26, 0.4);
}

.gallery-day {
    position: sticky;
    top: var(--header-height);
    z-index: 2;
    margin: 24px 0 8px;
    padding: 8px 0;
    background: rgba(40, 44, 52, 0.92);
    backdrop-filter: blur(6px);
    color: var(--muted);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}

.photo-grid a {
    border-radius: var(--radius);
    background: var(--placeholder);
}

.photo-grid img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: var(--radius);
}

.photo-view {
    margin: 0;
    text-align: center;
}

.photo-stage {
    position: relative;
    overflow: hidden;
    padding: 16px;
    border-radius: var(--radius);
    background: #1a1d22;
}

.photo-frame {
    display: inline-block;
    max-width: 100%;
    touch-action: pan-y pinch-zoom;
}

.photo-frame img {
    max-height: 80vh;
    width: auto;
    border-radius: var(--radius);
    background: var(--placeholder);
}

.photo-peek {
    position: absolute;
    border-radius: var(--radius);
    background: var(--placeholder);
    object-fit: cover;
    pointer-events: none;
}

.photo-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 12px 0 4px;
    color: var(--muted);
}

.photo-bar-step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 18px;
}

.photo-bar-step:hover {
    color: var(--on-accent);
    background: var(--accent);
}

.photo-bar-placeholder {
    visibility: hidden;
}

.photo-day {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.photo-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 12px;
    margin: 6px 0 0;
}

.photo-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
}

.photo-neighbours {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 20px 0 8px;
    overflow-x: auto;
    padding: 4px;
}

.photo-neighbours a {
    flex: 0 0 auto;
    border-radius: var(--radius);
    background: var(--placeholder);
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.photo-neighbours a:hover,
.photo-neighbours a[aria-current] {
    opacity: 1;
}

.photo-neighbours a[aria-current] {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.photo-neighbours img {
    width: 96px;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: var(--radius);
}

.photo-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 12px 0;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    z-index: 20;
    transform: translateX(-50%);
    padding: 10px 16px;
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    font-size: 15px;
    animation: lightbox-fade-in 0.2s ease;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.feed-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.feed-filter h1 {
    margin: 0;
}

.feed-grid {
    --feed-gap: 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--feed-gap);
    align-items: start;
}

.feed-grid.masonry {
    grid-auto-rows: 4px;
    row-gap: 0;
}

.feed-next {
    grid-column: 1 / -1;
    height: 1px;
}

.feed-tile {
    position: relative;
    border-radius: var(--radius);
    background: var(--placeholder);
}

.feed-tile > a {
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
}

.feed-tile img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    transition: opacity 0.35s ease, transform 0.35s ease, filter 0.2s ease;
}

.feed-tile.is-loading img {
    opacity: 0;
    transform: translateY(8px);
}

.feed-tile > a:hover img {
    filter: brightness(1.08);
}

.feed-tile.skeleton {
    aspect-ratio: 1 / var(--ratio, 1);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 250% 100%;
    animation: placeholder-shimmer 1.4s infinite;
}

.feed-tile-caption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    margin: 0;
    padding: 28px 12px 10px;
    overflow: hidden;
    border-radius: 0 0 var(--radius) var(--radius);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 500;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}

.feed-tile-caption a {
    display: inline-block;
    min-height: 24px;
    margin-left: 2px;
    padding: 4px;
    line-height: 16px;
    color: rgba(255, 255, 255, 0.85);
    pointer-events: auto;
}

.feed-tile-caption a:hover {
    color: white;
}

.feed-tile-text {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.feed-more,
.feed-end,
.feed-empty,
.feed-error {
    margin: 32px 0 0;
    text-align: center;
    color: var(--muted);
}

.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.back-to-top[hidden] {
    display: none;
}

.back-to-top:hover {
    color: var(--on-accent);
    background: var(--accent);
}

.text-page {
    max-width: 720px;
    font-size: 17px;
    line-height: 1.7;
}

.text-page h2 {
    margin: 28px 0 8px;
    font-size: 22px;
}

.text-page p {
    margin: 0 0 12px;
}

.text-page a {
    color: white;
    text-decoration: underline;
}

.message-page {
    padding: 48px 0;
    text-align: center;
}

.message-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.92);
    animation: lightbox-fade-in 0.2s ease;
    touch-action: pan-y pinch-zoom;
}

.lightbox[hidden] {
    display: none;
}

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

    to {
        opacity: 1;
    }
}

@keyframes placeholder-shimmer {
    from {
        background-position: 250% 0;
    }

    to {
        background-position: -250% 0;
    }
}

.lightbox-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    margin: 0;
}

.lightbox-figure img {
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    border-radius: var(--radius);
}

.lightbox-peek {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.lightbox-placeholder {
    display: block;
    --ratio: 1;
}

.lightbox img.loading,
.lightbox-placeholder {
    aspect-ratio: var(--ratio);
    width: min(var(--width, 90vw), 90vw, calc(80vh * var(--ratio)));
    border-radius: var(--radius);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 250% 100%;
    animation: placeholder-shimmer 1.4s infinite;
}

.lightbox-figure figcaption {
    max-width: 600px;
    margin-top: 12px;
    padding: 0 14px;
    color: var(--muted);
    font-size: clamp(13px, 2.5vw, 16px);
    line-height: 1.5;
    text-align: center;
}

.lightbox-figure figcaption a {
    color: var(--text);
}

.lightbox-figure figcaption a:hover {
    color: white;
}

.lightbox-figure figcaption:empty {
    display: none;
}

.lightbox-toolbar {
    position: fixed;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 8px;
}

.lightbox-toolbar a,
.lightbox-toolbar button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
}

.lightbox-toolbar a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.22);
}

.lightbox-toolbar .lightbox-instagram {
    padding: 0;
    width: 44px;
    justify-content: center;
    font-size: 20px;
}

.lightbox-toolbar .lightbox-instagram[hidden] {
    display: none;
}

.lightbox-toolbar .lightbox-share {
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 500;
}

.lightbox-toolbar .lightbox-share:hover {
    background: var(--accent-hover);
}

.lightbox-close,
.lightbox-previous,
.lightbox-next {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.lightbox-close[hidden],
.lightbox-previous[hidden],
.lightbox-next[hidden] {
    display: none;
}

.lightbox-close {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    background: transparent;
    font-size: 24px;
    opacity: 0.8;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-previous,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 18px;
}

.lightbox-previous:hover,
.lightbox-next:hover {
    color: var(--on-accent);
    background: var(--accent);
}

.lightbox-previous {
    left: 16px;
}

.lightbox-next {
    right: 16px;
}

@media (max-width: 1023px) {
    .feed-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

@media (max-width: 599px) {
    .feed-grid {
        --feed-gap: 12px;
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .event-pager {
        flex-direction: column;
    }

    .event-pager a {
        flex-basis: auto;
    }

    .event-pager-newer {
        margin-left: 0;
    }

    :root {
        --header-height: 53px;
    }

    .site-nav {
        gap: 14px;
        font-size: 15px;
    }

    .logo {
        height: 36px;
    }

    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }

    .hero {
        margin-left: -16px;
        margin-right: -16px;
    }

    .hero img {
        border-radius: 0;
    }

    .hero figcaption {
        padding: 0 16px;
    }

    .preview-grid {
        gap: 4px;
    }

    .button-label {
        display: none;
    }

    .photo-stage {
        margin: 0 -16px;
        padding: 8px 0;
        border-radius: 0;
    }

    .photo-stage img {
        border-radius: 0;
    }

    .photo-neighbours {
        justify-content: flex-start;
    }

    .photo-neighbours img {
        width: 72px;
    }

    .lightbox .lightbox-previous,
    .lightbox .lightbox-next {
        display: none;
    }
}
