/*
 * The static archive's pages (landing, gallery pickers, galleries, the
 * participant list, private participant pages). Copied into each archive's
 * assets/v{version}/ folder by App\Services\Archive\ArchivePages - not part
 * of the Mix bundle, and never loaded by the live site. Self-contained: no
 * Bootstrap, no web fonts, no CDN.
 */
:root {
    --bg: #0a0a0c;
    --surface: #141519;
    --surface-2: #1b1c21;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --text: #f4f4f6;
    --muted: #a4a5ae;
    --faint: #70717a;
    --accent: #e8b75d;
    --accent-ink: #1c1406;
    --award: #f0c45a;
    --accept: #5fd3a5;
    --radius: 16px;
    --radius-sm: 10px;
    --gap: 20px;
    --pad: clamp(16px, 4vw, 40px);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

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

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

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

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

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

.wrap {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 var(--pad);
}

.wrap.wide {
    max-width: 1680px;
}

.muted {
    color: var(--muted);
}

.eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

/* ---------------------------------------------------------------- top bar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(10, 10, 12, 0.82);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--line);
}

.topbar .wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 64px;
}

.topbar .heading {
    flex: 1;
    min-width: 0;
}

.topbar .heading strong {
    display: block;
    font-size: 16px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar .heading span {
    display: block;
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.back {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    color: var(--text);
    font-size: 18px;
    transition: background 0.2s, border-color 0.2s;
}

.back:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.28);
}

.count-chip {
    flex: none;
    font-size: 13px;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 12px;
    white-space: nowrap;
}

/* ------------------------------------------------------------------- hero */
.hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-mosaic {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 1fr;
    opacity: 0.38;
}

.hero-mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 90% at 20% 30%, rgba(10, 10, 12, 0.35) 0%, rgba(10, 10, 12, 0.9) 70%),
        linear-gradient(180deg, rgba(10, 10, 12, 0.2) 0%, var(--bg) 100%);
}

.hero .wrap {
    position: relative;
    z-index: 1;
    padding-top: clamp(64px, 12vw, 136px);
    padding-bottom: clamp(40px, 7vw, 72px);
}

.hero.compact .wrap {
    padding-top: clamp(40px, 7vw, 72px);
    padding-bottom: clamp(32px, 5vw, 48px);
}

.hero h1 {
    margin: 16px 0 14px;
    max-width: 960px;
    font-size: clamp(30px, 4.6vw, 56px);
    font-weight: 750;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.hero .meta {
    color: var(--muted);
    font-size: 16px;
}

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.stat {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    font-size: 14px;
    color: var(--muted);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.stat b {
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
}

/* --------------------------------------------------------- page sections */
.section {
    padding-top: clamp(32px, 5vw, 56px);
}

.section:last-of-type {
    padding-bottom: clamp(32px, 5vw, 56px);
}

.section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-title h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.section-title span {
    font-size: 14px;
    color: var(--muted);
}

/* ---------------------------------------------------------- image cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    gap: var(--gap);
}

.cards.large {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}

.tile {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 220px;
    border-radius: var(--radius);
    background: linear-gradient(145deg, #1d1e24 0%, #121317 100%);
    border: 1px solid var(--line);
    isolation: isolate;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.cards.large .tile {
    min-height: 280px;
}

.tile:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.tile .cover {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.tile .cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.tile:hover .cover img {
    transform: scale(1.05);
}

.tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0.82) 100%);
}

.tile .body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 22px;
}

.tile h3 {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.tile p {
    margin-top: 4px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.78);
}

.tile .go {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    font-size: 17px;
    transition: background 0.2s;
}

.tile:hover .go {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: transparent;
}

/* A tile without a picture: an icon in its place. */
.tile .icon {
    position: absolute;
    top: 22px;
    left: 22px;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(232, 183, 93, 0.12);
    border: 1px solid rgba(232, 183, 93, 0.25);
    color: var(--accent);
}

.tile .tag {
    position: absolute;
    top: 18px;
    left: 18px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* ------------------------------------------------------------------ note */
.note {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}

.note .icon {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(232, 183, 93, 0.12);
    color: var(--accent);
    font-size: 20px;
}

.note h3 {
    font-size: 17px;
    margin-bottom: 6px;
}

.note p {
    color: var(--muted);
}

.note a {
    color: var(--accent);
}

.site-footer {
    padding: 36px 0 44px;
    color: var(--faint);
    font-size: 13px;
    text-align: center;
}

.site-footer a {
    color: var(--muted);
}

/* ------------------------------------------------------- section tabs */
.tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 18px 0 2px;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tabs a {
    flex: none;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
    transition: border-color 0.2s, color 0.2s;
}

.tabs a:hover {
    color: var(--text);
    border-color: var(--line-strong);
}

.tabs a.active {
    background: var(--text);
    border-color: var(--text);
    color: #0a0a0c;
    font-weight: 650;
}

/* --------------------------------------------------------- photo grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: var(--gap);
    padding: 24px 0 56px;
}

.photo {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.photo:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
}

/* Every frame the same 4:3 box, whatever the photo's shape - the picture
   is fitted inside it (never cropped), so a row of cards lines up. */
.photo .frame {
    position: relative;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0e0f12;
    cursor: zoom-in;
    overflow: hidden;
}

.photo .frame img {
    position: absolute;
    inset: 14px;
    width: calc(100% - 28px);
    height: calc(100% - 28px);
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.5s ease;
}

.photo:hover .frame img {
    transform: scale(1.02);
}

.photo .info .badge {
    position: static;
    align-self: flex-start;
    max-width: 100%;
    margin-bottom: 6px;
}

.photo .frame img.loaded {
    opacity: 1;
}

.photo .frame .none {
    color: var(--faint);
    font-size: 13px;
}

.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    max-width: calc(100% - 24px);
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(12, 12, 14, 0.82);
    border: 1px solid rgba(240, 196, 90, 0.4);
    color: var(--award);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.photo .info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px 18px;
}

.photo h4 {
    font-size: 15px;
    font-weight: 650;
    line-height: 1.35;
}

.photo .by {
    color: var(--muted);
    font-size: 14px;
}

.photo .meta {
    margin-top: 6px;
    color: var(--faint);
    font-size: 12.5px;
}

/* ------------------------------------------------------------- viewer */
.viewer {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    background: rgba(6, 6, 8, 0.96);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
    touch-action: pan-y;
}

.viewer.open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease;
}

.viewer-stage {
    position: relative;
    min-height: 0;
    margin: 64px 76px 0;
}

/* Two layers, so changing photo is a crossfade, centred on the screen. */
.viewer-stage img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.985);
    transition: opacity 0.35s ease, transform 0.35s ease;
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

.viewer-stage img.show {
    opacity: 1;
    transform: none;
}

.viewer-caption {
    padding: 18px var(--pad) 26px;
    text-align: center;
}

.viewer-caption .t {
    font-size: 17px;
    font-weight: 650;
}

.viewer-caption .s {
    margin-top: 4px;
    color: var(--muted);
    font-size: 14px;
}

.viewer-caption .badge {
    position: static;
    display: inline-block;
    margin-bottom: 10px;
}

.viewer-btn {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font: 22px/1 var(--font);
    cursor: pointer;
    transition: background 0.2s;
}

.viewer-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* --cap is the caption's height (archive.js): these sit in the middle of
   the photo's area, which runs from the 64px top margin to the caption. */
.viewer-prev,
.viewer-next {
    top: calc((100% - var(--cap, 96px) + 64px) / 2 - 24px);
}

.viewer-prev {
    left: 16px;
}

.viewer-next {
    right: 16px;
}

.viewer-close {
    top: 12px;
    right: 16px;
}

.viewer-count {
    position: absolute;
    top: 24px;
    left: 20px;
    color: var(--muted);
    font-size: 13px;
}

.viewer-spinner {
    position: absolute;
    top: calc((100% - var(--cap, 96px) + 64px) / 2 - 18px);
    left: calc(50% - 18px);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--accent);
    animation: viewer-spin 0.8s linear infinite;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.viewer.loading .viewer-spinner {
    opacity: 1;
}

@keyframes viewer-spin {
    to {
        transform: rotate(360deg);
    }
}

/* --------------------------------------------------------- participants */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 24px 0 18px;
}

.search {
    width: 100%;
    max-width: 440px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font: 15px var(--font);
    outline: none;
    transition: border-color 0.2s;
}

.search::placeholder {
    color: var(--faint);
}

.search:focus {
    border-color: var(--line-strong);
}

.table-wrap {
    overflow: auto;
    margin-bottom: 56px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
}

table.list {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table.list th {
    position: sticky;
    top: 0;
    padding: 14px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

table.list th[data-sort] {
    cursor: pointer;
}

table.list th[data-sort]:hover {
    color: var(--text);
}

table.list td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    color: #d6d6dc;
    vertical-align: middle;
}

table.list tr:last-child td {
    border-bottom: 0;
}

table.list tbody tr:hover td {
    background: rgba(255, 255, 255, 0.025);
}

table.list td.num {
    color: var(--faint);
    width: 56px;
}

table.list td .name {
    color: var(--text);
    font-weight: 600;
}

table.list td .reg {
    display: block;
    margin-top: 2px;
    color: var(--faint);
    font-size: 12px;
}

.pill {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.pill.success {
    background: rgba(95, 211, 165, 0.13);
    color: #73e2b6;
}

.pill.warning {
    background: rgba(240, 186, 90, 0.14);
    color: #f2c46e;
}

.pill.danger {
    background: rgba(240, 100, 100, 0.14);
    color: #f58c8c;
}

.pill.primary {
    background: rgba(110, 160, 255, 0.14);
    color: #92b8ff;
}

.people {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 16px;
    padding-bottom: 56px;
}

.person {
    padding: 20px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}

.person .avatar {
    width: 52px;
    height: 52px;
    margin-bottom: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #343641, #1d1e24);
    border: 1px solid var(--line-strong);
    font-weight: 700;
    font-size: 17px;
}

.person h4 {
    font-size: 16px;
    margin-bottom: 2px;
}

.person .line {
    color: var(--muted);
    font-size: 13.5px;
}

.person .pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.empty {
    padding: 48px 0;
    text-align: center;
    color: var(--muted);
}

/* -------------------------------------------------- private participant */
.private {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    background: var(--surface-2);
    color: var(--text);
    font: 600 14px/1.2 var(--font);
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.btn svg {
    flex: none;
    transition: transform 0.2s ease;
}

.btn:hover svg {
    transform: translateY(1px);
}

.btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

.btn.award {
    background: rgba(240, 196, 90, 0.1);
    border-color: rgba(240, 196, 90, 0.38);
    color: var(--award);
}

.btn.accept {
    background: rgba(95, 211, 165, 0.1);
    border-color: rgba(95, 211, 165, 0.36);
    color: var(--accept);
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.panel {
    padding: 24px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}

.panel h3 {
    font-size: 17px;
    margin-bottom: 14px;
}

.certs {
    display: grid;
    gap: 16px;
}

.cert {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}

.cert .thumb {
    aspect-ratio: 4 / 3;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: #0e0f12;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert .thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cert h4 {
    font-size: 17px;
    margin-bottom: 4px;
}

.cert .sub {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 14px;
}

.cert .sub .award-name {
    color: var(--award);
    font-weight: 600;
}

@media (max-width: 640px) {
    :root {
        --gap: 14px;
    }

    .topbar .wrap {
        gap: 12px;
        min-height: 58px;
    }

    .count-chip {
        display: none;
    }

    .hero-mosaic {
        grid-template-columns: repeat(2, 1fr);
    }

    .tile {
        min-height: 180px;
    }

    .cards.large .tile {
        min-height: 220px;
    }

    .note {
        flex-direction: column;
        padding: 20px;
    }

    .viewer-stage {
        margin: 60px 10px 0;
    }

    .viewer-prev,
    .viewer-next {
        top: auto;
        bottom: 18px;
    }

    .viewer-caption {
        padding: 16px 72px 24px;
    }

    .cert {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cert .btn {
        flex: 1 1 auto;
    }
}
