/* Live theme font (copied from the Mission Pools theme). Figtree is the fallback. */
@font-face {
    font-family: "LT Superior";
    font-weight: 400;
    font-display: swap;
    src: url(../../gallery-assets/fonts/LTSuperior-Regular.woff2) format("woff2");
}
@font-face {
    font-family: "LT Superior";
    font-weight: 500;
    font-display: swap;
    src: url(../../gallery-assets/fonts/LTSuperior-Medium.woff2) format("woff2");
}
@font-face {
    font-family: "LT Superior";
    font-weight: 700;
    font-display: swap;
    src: url(../../gallery-assets/fonts/LTSuperior-Bold.woff2) format("woff2");
}

:root {
    --ink: #2f2e2e;
    --muted: #6b6f72;
    --line: #e4e7e9;
    --white: #fff;
    --mist: #f4f6f7;
    --slate: #577c8e;
    --slate-deep: #3f6070;
    --slate-tint: #e8eff2;
    --navy: #2e4157;
    --navy-deep: #223246;
    --serif: "DM Serif Display", Georgia, serif;
    --sans: "LT Superior", Figtree, system-ui, sans-serif;
    --r: 6px;
    --pill: 999px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: var(--sans);
    font-weight: 500;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}
img {
    display: block;
    max-width: 100%;
}
a {
    color: inherit;
    text-decoration: none;
}
button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}
:focus-visible {
    outline: 3px solid var(--slate);
    outline-offset: 3px;
}
.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* ============ HERO ============ */
.hero {
    position: relative;
    height: 560px;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}
.hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}
/* live theme overlay: navy at top fading toward the bottom */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgb(0, 30, 69) 0%, rgba(0, 30, 69, 0.2) 88.37%);
}
/* live theme wave */
.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -20px;
    height: 80px;
    background: url(../../gallery-assets/images/hero-after-shape-banner.svg) 50% 100% / cover no-repeat;
}
.hero-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 110px;
}
.hero h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(38px, 5.2vw, 60px);
    line-height: 1.08;
    max-width: 20ch;
    text-wrap: balance;
}
.hero p {
    font-size: 20px;
    max-width: 34ch;
    margin-top: 18px;
    text-wrap: balance;
}

/* ============ GALLERY ============ */
.gallery {
    padding: 40px 0 40px;
}
.g-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.g-head h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 46px;
    line-height: 1;
}
.g-head p {
    color: var(--muted);
    max-width: 52ch;
    margin-top: 10px;
}

#filterAnchor {
    height: 0;
    margin-top: 28px;
}
.filters {
    position: relative;
    z-index: 30;
    background: #ffffffeb;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    transition:
        transform 0.3s var(--ease),
        box-shadow 0.3s;
}
/* floating "back to filters" button, shown once the filter bar is off screen */
.to-filters {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 40;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--navy);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 13px 18px;
    border-radius: 4px;
    box-shadow: 0 8px 24px #0003;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: 0.25s var(--ease);
}
.to-filters.show {
    opacity: 1;
    visibility: visible;
    transform: none;
}
.to-filters:hover {
    background: var(--navy-deep);
}
.to-filters svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
}
.to-filters em {
    font-style: normal;
    font-weight: 500;
    opacity: 0.8;
}
@media (max-width: 760px) {
    .to-filters {
        right: 50%;
        transform: translate(50%, 12px);
        bottom: 16px;
    }
    .to-filters.show {
        transform: translate(50%, 0);
    }
}
.filters .container {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 14px;
    padding-bottom: 14px;
}
.filters.stuck {
    box-shadow: 0 6px 18px #0000000f;
}
.chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
    padding: 3px;
}
.chips::-webkit-scrollbar {
    display: none;
}
.chips.overflow {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
}
.chips.overflow.end {
    -webkit-mask-image: none;
    mask-image: none;
}
.chip {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #cdd5d9;
    border-radius: var(--pill);
    padding: 9px 16px;
    font-size: 15px;
    transition: 0.18s;
}
.chip i {
    font-style: normal;
    font-size: 12px;
    min-width: 22px;
    padding: 1px 6px;
    border-radius: var(--pill);
    background: var(--mist);
    color: var(--muted);
    text-align: center;
}
.chip:hover {
    border-color: var(--ink);
}
.chip[aria-pressed="true"] {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
.chip[aria-pressed="true"] i {
    background: #ffffff26;
    color: #fff;
}
.readout {
    font-size: 14px;
    color: var(--muted);
    white-space: nowrap;
}
.readout b {
    color: var(--ink);
}

.grid {
    columns: 3 300px;
    column-gap: 20px;
    padding-top: 28px;
}
.tile {
    break-inside: avoid;
    margin-bottom: 20px;
    animation: rise 0.45s var(--ease) both;
}
@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}
.card {
    display: block;
    width: 100%;
    text-align: left;
    border-radius: var(--r);
}
/* isolation + mask keep Safari clipping to the rounded corners while the tile animates */
.ph {
    position: relative;
    z-index: 1;
    border-radius: var(--r);
    overflow: hidden;
    background: var(--slate-tint);
    isolation: isolate;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}
.ph img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: var(--r);
    transition: transform 0.6s var(--ease);
}
.tile.tall .ph img {
    aspect-ratio: 3/4;
}
.card {
    cursor: pointer;
}
/* hover cue: photo dims and an outline button (same treatment as the hero ghost button) appears in the center */
.dim {
    position: absolute;
    inset: 0;
    background: rgba(10, 22, 34, 0.45);
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}
.view {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -40%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 2px solid #fff;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 12px 20px;
    border-radius: 4px;
    text-shadow: 0 1px 2px #0004;
    opacity: 0;
    transition: 0.25s var(--ease);
    pointer-events: none;
}
.view svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}
/* keyboard focus always shows the cue */
.card:focus-visible .dim {
    opacity: 1;
}
.card:focus-visible .view {
    opacity: 1;
    transform: translate(-50%, -50%);
}
.card:focus-visible .ph-tag {
    opacity: 0;
}
/* hover cue only on devices with a real mouse; phones and tablets fake hover on tap */
@media (hover: hover) and (pointer: fine) {
    .card:hover .ph img {
        transform: scale(1.045);
    }
    .card:hover .dim {
        opacity: 1;
    }
    .card:hover .view {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    .card:hover .ph-tag {
        opacity: 0;
    }
}
/* touch: no hover cue and no grey tap flash */
@media (hover: none), (pointer: coarse) {
    .card {
        -webkit-tap-highlight-color: transparent;
    }
}
.shade {
    position: absolute;
    inset: auto 0 0;
    height: 50%;
    background: linear-gradient(180deg, transparent, rgba(10, 22, 34, 0.6));
    pointer-events: none;
    transition: opacity 0.3s;
}
/* in a filtered view every tile shares the same category, so the label is hidden */
.grid.filtered .shade,
.grid.filtered .ph-tag {
    display: none;
}
.ph-tag {
    position: absolute;
    left: 14px;
    bottom: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 3px #0006;
    pointer-events: none;
    transition: opacity 0.2s;
}
.tag {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--slate-deep);
    background: var(--slate-tint);
    border-radius: 4px;
    padding: 3px 8px;
}

.more {
    text-align: center;
    padding: 20px 0 40px;
}
.g-progress {
    width: 240px;
    height: 3px;
    border-radius: 3px;
    background: var(--line);
    margin: 12px auto 20px;
    overflow: hidden;
}
.g-progress span {
    display: block;
    height: 100%;
    background: var(--slate);
    transition: width 0.4s var(--ease);
}
.more .readout {
    display: block;
}
.btn-outline {
    border: 1.5px solid var(--navy);
    color: var(--navy);
    padding: 13px 26px;
}
.btn-outline:hover {
    background: var(--navy);
    color: #fff;
}

/* ============ LIGHTBOX ============ */
.lb {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0a131cf7;
    color: #fff;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s;
}
.lb.open {
    opacity: 1;
    visibility: visible;
}
/* no double-tap page zoom on the viewer controls (iOS zooms the page when arrows are tapped quickly) */
.lb,
.lb button,
.lb a,
.chip,
.card,
#moreBtn,
.to-filters {
    touch-action: manipulation;
}
.lb-top {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 22px;
}
.lb-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff1a;
    border-radius: var(--pill);
    padding: 9px 16px 9px 12px;
    font-size: 14px;
}
.lb-back:hover {
    background: #ffffff33;
}
.lb-back svg,
.lb-nav svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
}
.lb-pos {
    font-size: 14px;
    opacity: 0.8;
}
.lb-top .btn {
    margin-left: auto;
}
/* touch-action none: the viewer handles swipe, pinch, pan and double-tap itself */
.lb-stage {
    --pad: 88px;
    position: relative;
    min-height: 0;
    touch-action: none;
    overflow: hidden;
}
/* slide track: previous, current and next photo sit side by side; swiping moves the track */
.lb-track {
    position: absolute;
    inset: 0;
    will-change: transform;
}
.lb-track.animating {
    transition: transform 0.32s cubic-bezier(0.22, 0.8, 0.3, 1);
}
.lb-slide {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    left: calc(var(--slot) * (100% + var(--gap, 24px)));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--pad);
}
.lb-nav {
    z-index: 2;
}
.lb-stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 60px #0008;
    transition:
        opacity 0.25s,
        transform 0.25s var(--ease);
    transform-origin: center;
    user-select: none;
    -webkit-user-drag: none;
    cursor: zoom-in;
}
.lb-stage img.gesturing {
    transition: opacity 0.25s;
}
.lb-stage img.zoomed {
    cursor: grab;
}
.lb-track.fading #lbImg {
    animation: lbfade 0.25s ease;
}
@keyframes lbfade {
    from {
        opacity: 0;
    }
}
.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #ffffff1a;
    display: grid;
    place-items: center;
    transition: 0.15s;
}
.lb-nav:hover {
    background: #ffffff38;
}
.lb-prev {
    left: 20px;
}
.lb-next {
    right: 20px;
}
.lb-foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 14px 22px 22px;
}
.lb-cap {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 15px;
    flex-wrap: wrap;
    justify-content: center;
}
.lb-cap .tag {
    background: #ffffff22;
    color: #fff;
}
/* arrows-below layout: phones, and touch tablets held upright. Desktop keeps the side arrows. */
.lb-bar {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 28px;
}
.lb-bar-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #ffffff1a;
    display: grid;
    place-items: center;
}
.lb-bar-btn:active {
    background: #ffffff38;
}
.lb-bar-btn svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
}
.lb-bar-pos {
    min-width: 84px;
    text-align: center;
    font-size: 15px;
}
@media (max-width: 760px), (pointer: coarse) and (orientation: portrait) {
    .lb-bar {
        display: flex;
    }
    .lb-nav,
    .lb-pos {
        display: none;
    }
    .lb-stage {
        --pad: 8px;
    }
    .lb-foot {
        padding-bottom: max(22px, env(safe-area-inset-bottom));
    }
}

/* ============ RESPONSIVE ============ */
/* desktop + tablet: chips wrap onto a second line instead of scrolling sideways (mouse users can't easily scroll horizontally) */
@media (min-width: 761px) {
    .chips {
        flex-wrap: wrap;
        overflow: visible;
    }
    .chips.overflow {
        -webkit-mask-image: none;
        mask-image: none;
    }
}
@media (max-width: 1100px) {
    .menu {
        display: none;
    }
    .burger {
        display: block;
    }
    .site-header .container {
        justify-content: flex-end;
    }
    .logo {
        margin-right: auto;
    }
    .contact-mobile {
        display: inline-flex;
    }
    .f-wrap {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 760px) {
    .site-header {
        padding: 14px 0;
    }
    .logo img {
        width: 70px;
    }
    .hero {
        height: auto;
        min-height: 440px;
    }
    .hero-inner {
        padding: 120px 20px 90px;
    }
    .hero h1 {
        font-size: 36px;
    }
    .hero p {
        font-size: 17px;
    }
    .g-head h2 {
        font-size: 38px;
    }
    .g-head p {
        font-size: 18px;
        line-height: 1.45;
    }
    .grid {
        columns: 2;
        column-gap: 12px;
    }
    .tile {
        margin-bottom: 18px;
    }
    .readout.top {
        display: none;
    }
    .ph-tag {
        left: 10px;
        bottom: 9px;
        font-size: 13px;
    }
    .site-header .btn-slate span,
    .contact-mobile {
        display: none;
    }
    .lb-stage {
        --pad: 8px;
    }
    .lb-nav {
        width: 42px;
        height: 42px;
        background: #0006;
    }
    .lb-prev {
        left: 10px;
    }
    .lb-next {
        right: 10px;
    }
    .lb-top .btn {
        display: none;
    }
    .f-wrap {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}
@media (max-width: 340px) {
    .grid {
        columns: 1;
    }
}
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
    html {
        scroll-behavior: auto;
    }
}
