/* ==========================================================
   APERTURE — tokens
========================================================== */
:root {
    --bg: #0d0c0a;
    --bg-2: #161512;
    --paper: #ece7dc;
    --ink: #ece7dc;
    --muted: #8a857a;
    --line: rgba(236, 231, 220, 0.14);
    --accent: #ff5b2e;

    --sans: "Inter Tight", system-ui, sans-serif;
    --serif: "Instrument Serif", Georgia, serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;

    --gutter: clamp(16px, 2.6vw, 40px);
    --gap: clamp(8px, 1.2vw, 18px);
    --ease: cubic-bezier(0.76, 0, 0.24, 1);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
    -webkit-text-size-adjust: 100%;
    background: var(--bg);
}

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.is-loading {
    overflow: hidden;
}

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

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

em {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
}

.mono {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

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

::selection {
    background: var(--accent);
    color: var(--bg);
}

:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 3px;
}

/* ==========================================================
   Preloader
========================================================== */
#loader {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--paper);
    color: var(--bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--gutter);
}

.loader-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.loader-count {
    font-family: var(--serif);
    font-size: clamp(120px, 28vw, 420px);
    line-height: 0.8;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    align-self: flex-end;
}

.loader-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
}

.loader-bar i {
    display: block;
    height: 100%;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
}

/* ==========================================================
   Grain + cursor
========================================================== */
.grain {
    position: fixed;
    inset: -50%;
    z-index: 90;
    pointer-events: none;
    opacity: 0.07;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    animation: grain 1s steps(6) infinite;
}

@keyframes grain {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-3%, 2%); }
    40% { transform: translate(2%, -4%); }
    60% { transform: translate(-4%, -1%); }
    80% { transform: translate(3%, 3%); }
    100% { transform: translate(0, 0); }
}

#cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 95;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: var(--paper);
    pointer-events: none;
    mix-blend-mode: difference;
    display: grid;
    place-items: center;
    transition: width 0.45s var(--ease-out), height 0.45s var(--ease-out), margin 0.45s var(--ease-out), background 0.3s;
}

#cursor.is-label {
    width: 84px;
    height: 84px;
    margin: -42px 0 0 -42px;
    mix-blend-mode: normal;
    background: var(--accent);
}

#cursor.is-down {
    transform: scale(0.8);
}

.cursor-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bg);
    opacity: 0;
    transition: opacity 0.2s;
}

#cursor.is-label .cursor-label {
    opacity: 1;
}

@media (hover: none), (pointer: coarse) {
    #cursor {
        display: none;
    }
}

/* ==========================================================
   Nav
========================================================== */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 18px var(--gutter);
    mix-blend-mode: difference;
    color: #fff;
}

.logo {
    font-family: var(--serif);
    font-size: 28px;
    line-height: 1;
    letter-spacing: -0.01em;
}

.logo sup {
    font-family: var(--sans);
    font-size: 10px;
    vertical-align: top;
    margin-left: 2px;
}

.nav-hud {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.nav-hud b {
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.hud-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: blink 1.6s infinite;
}

.hud-sep {
    opacity: 0.4;
}

.hud-rate-wrap[hidden] {
    display: none;
}

@keyframes blink {
    50% { opacity: 0.15; }
}

.nav-credit {
    justify-self: end;
    display: inline-block;
    padding: 9px 14px;
    border: 1px solid currentColor;
    border-radius: 100px;
}

@media (max-width: 760px) {
    #nav {
        grid-template-columns: 1fr auto;
    }

    .nav-hud {
        display: none;
    }
}

/* ==========================================================
   Hero
========================================================== */
.hero {
    position: relative;
    min-height: 100svh;
    padding: calc(90px + 4vh) var(--gutter) var(--gutter);
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    overflow: hidden;
    isolation: isolate;
}

.hero-meta {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    color: var(--muted);
    position: relative;
    z-index: 2;
}

.hero-meta span:last-child {
    text-align: right;
}

.hero-title {
    position: relative;
    z-index: 2;
    align-self: center;
    font-family: var(--sans);
    font-weight: 500;
    font-size: clamp(56px, 11.5vw, 210px);
    line-height: 0.88;
    letter-spacing: -0.055em;
    margin: 6vh 0 5vh;
    pointer-events: none;
    mix-blend-mode: difference;
}

.hero-title .line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.06em;
}

.hero-title .line > span {
    display: inline-block;
}

.hero-title .line:nth-child(2) {
    padding-left: 12vw;
}

.hero-title .line:nth-child(3) {
    text-align: right;
}

.hero-title em {
    letter-spacing: -0.03em;
}

/* floating photographs */
.hero-float {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.float {
    position: absolute;
    overflow: hidden;
    background: var(--bg-2);
    clip-path: inset(100% 0 0 0);
}

.float img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.3);
}

.f1 { width: clamp(120px, 15vw, 260px); aspect-ratio: 3 / 4; top: 16%; right: 7%; }
.f2 { width: clamp(90px, 10vw, 180px); aspect-ratio: 1; top: 44%; left: 4%; }
.f3 { width: clamp(110px, 13vw, 230px); aspect-ratio: 4 / 5; bottom: 20%; right: 30%; }
.f4 { width: clamp(80px, 8vw, 150px); aspect-ratio: 3 / 4; top: 13%; left: 40%; }
.f5 { width: clamp(100px, 11vw, 200px); aspect-ratio: 4 / 3; bottom: 30%; left: 20%; }

@media (max-width: 760px) {
    .f4, .f5 { display: none; }
    .f1 { top: 12%; right: 4%; }
    .f2 { top: 52%; left: auto; right: 6%; }
    .f3 { bottom: 26%; right: auto; left: 6%; }
}

/* search */
.search--hero {
    position: relative;
    z-index: 3;
    max-width: 760px;
}

.search-label {
    display: block;
    color: var(--muted);
    margin-bottom: 12px;
}

.search-field {
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
    position: relative;
}

.search-field::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: var(--paper);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.9s var(--ease);
}

.search-field:focus-within::after {
    transform: scaleX(1);
}

.search-field input {
    flex: 1;
    min-width: 0;
    background: none;
    border: 0;
    outline: 0;
    color: var(--ink);
    font-family: var(--serif);
    font-size: clamp(28px, 3.4vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.search-field input::placeholder {
    color: var(--muted);
    opacity: 0.55;
}

input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.search-field kbd {
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 3px 7px;
    color: var(--muted);
}

.search-go {
    flex: none;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--paper);
    color: var(--bg);
    display: grid;
    place-items: center;
    transition: background 0.3s;
}

.search-go:hover {
    background: var(--accent);
}

.search-go svg,
.dock svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
}

.chips-label {
    color: var(--muted);
    margin-right: 4px;
}

.chip {
    font-size: 14px;
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 100px;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.chip:hover {
    background: var(--paper);
    color: var(--bg);
    border-color: var(--paper);
}

.hero-foot {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 6vh;
    color: var(--muted);
}

.hero-foot-line {
    flex: 1;
    height: 1px;
    background: var(--line);
    overflow: hidden;
}

.hero-foot-line i {
    display: block;
    width: 30%;
    height: 100%;
    background: var(--paper);
    animation: scan 2.4s var(--ease) infinite;
}

@keyframes scan {
    from { transform: translateX(-100%); }
    to { transform: translateX(340%); }
}

#hero-credit a {
    color: var(--ink);
}

@media (max-width: 760px) {
    .hero-meta {
        grid-template-columns: 1fr 1fr;
    }

    .hero-meta span:nth-child(2) {
        display: none;
    }

    .search-field kbd {
        display: none;
    }

    .search-go {
        width: 48px;
        height: 48px;
    }

    #hero-credit {
        display: none;
    }
}

/* ==========================================================
   Marquee
========================================================== */
.marquee {
    border-block: 1px solid var(--line);
    overflow: hidden;
    padding: 18px 0;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 38s linear infinite;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-group {
    display: flex;
    align-items: center;
    flex: none;
}

.marquee button {
    font-size: clamp(34px, 5vw, 76px);
    letter-spacing: -0.04em;
    line-height: 1.05;
    padding: 0 0.3em;
    transition: color 0.3s;
}

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

.marquee i {
    font-style: normal;
    font-size: clamp(16px, 2vw, 28px);
    color: var(--muted);
}

@keyframes marquee {
    to { transform: translateX(-50%); }
}

/* ==========================================================
   Results
========================================================== */
.results {
    padding: clamp(60px, 10vw, 140px) var(--gutter) 60px;
}

.results-head {
    margin-bottom: clamp(32px, 5vw, 64px);
}

.results-kicker {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    margin-bottom: 8px;
}

.results-title {
    font-weight: 500;
    font-size: clamp(56px, 13vw, 240px);
    line-height: 0.86;
    letter-spacing: -0.06em;
    overflow: hidden;
    padding-bottom: 0.08em;
    text-transform: capitalize;
    overflow-wrap: anywhere;
}

.results-title > span {
    display: inline-block;
}

.results-title em {
    letter-spacing: -0.02em;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.filters[hidden] {
    display: none;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.filter-label {
    color: var(--muted);
    margin-right: 6px;
}

.toggle {
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px solid var(--line);
    transition: background 0.3s, color 0.3s;
}

.toggle.is-active {
    background: var(--paper);
    color: var(--bg);
    border-color: var(--paper);
}

.swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--s, conic-gradient(#c7372f, #e8c53a, #3f8a4f, #2a8c8c, #2f5fc7, #7a45c2, #c7372f));
    box-shadow: 0 0 0 1px var(--line);
    transition: transform 0.4s var(--ease-out), box-shadow 0.3s;
}

.swatch:hover {
    transform: scale(1.15);
}

.swatch.is-active {
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--paper);
}

/* ---------- masonry ---------- */
.grid {
    display: flex;
    align-items: flex-start;
    gap: var(--gap);
}

.grid-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    will-change: transform;
}

.card {
    position: relative;
    --c: #222;
}

.card-media {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    background: var(--c);
    clip-path: inset(100% 0 0 0);
    transition: clip-path 1.2s var(--ease);
    transition-delay: var(--d, 0s);
    cursor: pointer;
}

.card.is-in .card-media {
    clip-path: inset(0 0 0 0);
}

.card-media::before {
    /* blurred low-res preview */
    content: "";
    position: absolute;
    inset: -10%;
    background: var(--lqip) center / cover;
    filter: blur(18px);
}

.card-media img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.25);
    transition: opacity 0.8s ease, transform 1.6s var(--ease-out);
}

.card.is-in.is-loaded .card-media img {
    opacity: 1;
    transform: scale(1);
}

.card.is-in.is-loaded .card-media:hover img {
    transform: scale(1.06);
    transition: opacity 0.8s ease, transform 1.2s var(--ease-out);
}

.card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 45%);
    opacity: 0;
    transition: opacity 0.5s;
}

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

.card-cap {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #fff;
    z-index: 2;
    pointer-events: none;
}

.card-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    min-width: 0;
    overflow: hidden;
}

.card-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex: none;
}

.card-author span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-cap > *,
.card-idx {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s, transform 0.6s var(--ease-out);
}

.card-media:hover .card-cap > *,
.card-media:focus-visible .card-cap > *,
.card-media:hover + .card-idx {
    opacity: 1;
    transform: none;
}

.card-cap > *:nth-child(2) {
    transition-delay: 0.05s;
}

.card-hex {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: none;
}

.card-hex::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--c);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.card-idx {
    position: absolute;
    top: 12px;
    left: 14px;
    color: #fff;
    z-index: 2;
    pointer-events: none;
    mix-blend-mode: difference;
}

@media (hover: none) {
    .card-cap > * {
        opacity: 1;
        transform: none;
    }

    .card-media::after {
        opacity: 0.8;
    }

    .card-hex {
        display: none;
    }
}

.grid-state {
    text-align: center;
    padding: 12vh 0;
}

.grid-state h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(36px, 5vw, 72px);
    line-height: 1;
    margin-bottom: 14px;
}

.grid-state p {
    color: var(--muted);
    max-width: 44ch;
    margin: 0 auto 22px;
}

.grid-state .chips {
    justify-content: center;
}

.grid-foot {
    display: grid;
    place-items: center;
    padding-top: 60px;
}

#sentinel {
    width: 100%;
    height: 1px;
}

.more {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 30px 46px;
    border-radius: 200px;
    border: 1px solid var(--line);
    transition: background 0.4s, color 0.4s;
}

.more[hidden] {
    display: none;
}

.more:hover {
    background: var(--paper);
    color: var(--bg);
}

.more-label {
    font-family: var(--serif);
    font-size: 28px;
    line-height: 1;
}

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

.more.is-busy .more-label::after {
    content: "…";
}

/* skeleton pulse while fetching */
.grid.is-busy {
    opacity: 0.35;
    transition: opacity 0.4s;
}

/* ==========================================================
   Dock
========================================================== */
.dock {
    position: fixed;
    left: 50%;
    bottom: 22px;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px;
    border-radius: 100px;
    background: rgba(22, 21, 18, 0.72);
    border: 1px solid var(--line);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    transform: translate(-50%, 160%);
    transition: transform 0.9s var(--ease);
    max-width: calc(100vw - 32px);
}

.dock.is-visible {
    transform: translate(-50%, 0);
}

.search--dock {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px 0 14px;
    min-width: 0;
}

.dock-icon {
    flex: none;
    color: var(--muted);
    width: 18px !important;
    height: 18px !important;
}

.search--dock input {
    width: 220px;
    min-width: 0;
    background: none;
    border: 0;
    outline: 0;
    color: var(--ink);
    font-size: 15px;
    padding: 10px 0;
}

.search--dock input::placeholder {
    color: var(--muted);
}

.dock-density {
    display: flex;
    gap: 2px;
    padding-left: 6px;
    border-left: 1px solid var(--line);
}

.dock button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--muted);
    transition: background 0.3s, color 0.3s;
}

.dock button:hover {
    color: var(--ink);
}

.dock button.is-active {
    background: var(--paper);
    color: var(--bg);
}

.dock-density svg {
    width: 16px !important;
    height: 16px !important;
    fill: currentColor;
    stroke: none !important;
}

.dock-top {
    background: var(--accent) !important;
    color: var(--bg) !important;
}

.dock-top svg {
    width: 18px !important;
    height: 18px !important;
}

@media (max-width: 600px) {
    .search--dock input {
        width: 100%;
    }

    .search--dock {
        flex: 1;
    }

    .dock {
        left: 16px;
        right: 16px;
        transform: translateY(160%);
    }

    .dock.is-visible {
        transform: none;
    }

    .dock-density button[data-density="4"] {
        display: none;
    }
}

/* ==========================================================
   Lightbox
========================================================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 400px);
    --c: #222;
}

.lightbox[hidden] {
    display: none;
}

.lb-bg {
    position: absolute;
    inset: 0;
    background: var(--bg);
    background-image: radial-gradient(ellipse at 35% 50%, color-mix(in srgb, var(--c) 34%, transparent), transparent 70%);
    transition: background-image 0.8s;
}

.lb-stage {
    position: relative;
    height: 100svh;
}

.lb-img {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2;
    object-fit: cover;
    background: var(--c);
    will-change: transform, width, height;
}

.lb-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    z-index: 3;
}

.lb-prev { left: 0; }
.lb-next { right: 0; }

.lb-panel {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 22px var(--gutter) var(--gutter);
    border-left: 1px solid var(--line);
    background: rgba(13, 12, 10, 0.55);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    height: 100svh;
    overflow-y: auto;
}

.lb-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
}

.lb-close {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink);
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 100px;
    transition: background 0.3s, color 0.3s;
}

.lb-close:hover {
    background: var(--paper);
    color: var(--bg);
}

.lb-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
}

.lb-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(32px, 3vw, 46px);
    line-height: 1.02;
    letter-spacing: -0.01em;
}

.lb-title::first-letter {
    text-transform: uppercase;
}

.lb-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lb-author img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-2);
}

.lb-author b {
    display: block;
    font-weight: 500;
}

.lb-author small {
    color: var(--muted);
}

.lb-author:hover b {
    color: var(--accent);
}

.lb-meta div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-top: 1px solid var(--line);
}

.lb-meta dt {
    color: var(--muted);
    white-space: nowrap;
}

.lb-meta dd {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: right;
}

.lb-swatch {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--c);
    box-shadow: 0 0 0 1px var(--line);
}

.lb-actions {
    display: grid;
    gap: 8px;
}

.btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    border-radius: 100px;
    border: 1px solid var(--line);
    font-size: 15px;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.btn:hover {
    border-color: var(--paper);
}

.btn--solid {
    background: var(--paper);
    color: var(--bg);
    border-color: var(--paper);
}

.btn--solid:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.lb-hint {
    color: var(--muted);
    text-align: center;
}

.lb-fade {
    will-change: transform, opacity;
}

@media (max-width: 860px) {
    .lightbox {
        grid-template-columns: 1fr;
        grid-template-rows: 58svh 1fr;
    }

    .lb-stage {
        height: 58svh;
    }

    .lb-panel {
        height: auto;
        min-height: 0;
        background: var(--bg-2);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        border-left: 0;
        border-top: 1px solid var(--line);
        gap: 18px;
    }

    .lb-body {
        justify-content: flex-start;
        gap: 18px;
    }


    .lb-hint {
        display: none;
    }
}

/* ==========================================================
   Footer
========================================================== */
.footer {
    padding: clamp(80px, 12vw, 180px) var(--gutter) calc(var(--gutter) + 70px);
    border-top: 1px solid var(--line);
    overflow: hidden;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-lede {
    font-size: clamp(26px, 3.2vw, 48px);
    line-height: 1.05;
    letter-spacing: -0.03em;
    max-width: 18ch;
}

.footer-links {
    list-style: none;
    display: grid;
    gap: 10px;
    text-align: right;
}

.footer-links a,
.linklike {
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    transition: color 0.3s;
}

.footer-links a:hover,
.linklike:hover {
    color: var(--accent);
}

.footer-mark {
    font-family: var(--serif);
    font-size: 27vw;
    line-height: 0.8;
    letter-spacing: -0.05em;
    text-align: center;
    margin: 8vw 0 3vw;
    white-space: nowrap;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
}

/* ==========================================================
   Reduced motion
========================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }

    .float,
    .card-media {
        clip-path: none !important;
    }

    .marquee-track {
        animation: none;
    }
}
