:root {
    --bg: #0e0e10;
    --bg-elev: #16161a;
    --bg-card: #1a1a1f;
    --border: #27272e;
    --border-strong: #3a3a44;
    --text: #ececee;
    --muted: #9b9ba5;
    --muted-dim: #6d6d78;
    --accent: #c9a96a;
    --accent-soft: rgba(201, 169, 106, 0.15);
    --radius: 10px;
    --header-h: 68px;
    --maxw: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    max-width: 100%;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(14, 14, 16, 0.72);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: var(--maxw);
    height: 100%;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    white-space: nowrap;
}

.brand-svg {
    width: 36px;
    height: 36px;
    display: block;
    flex-shrink: 0;
}

.brand-name {
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    gap: 6px;
}

.site-nav a {
    position: relative;
    padding: 8px 14px;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.site-nav a.active {
    color: var(--text);
}

.site-nav a.active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 2px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

/* Hamburger toggle (shown on mobile only) */
.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    border-radius: 8px;
    flex-shrink: 0;
}
.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle.is-active .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-active .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Layout ---------- */
.site-main {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 56px 28px 40px;
    min-height: calc(100vh - var(--header-h) - 120px);
}

/* Homepage: hero + gallery run edge-to-edge */
.site-main--full {
    max-width: none;
    padding: 0;
    min-height: 0;
}

.page-head {
    margin-bottom: 44px;
}

.page-head h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-head .subtitle {
    margin-top: 10px;
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 60ch;
}

/* ---------- Gallery ---------- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 1;
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: transform 0.35s ease, border-color 0.35s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
}

.gallery-item .caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 16px 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item:hover .caption {
    opacity: 1;
    transform: translateY(0);
}

.state {
    text-align: center;
    color: var(--muted);
    padding: 80px 20px;
    font-size: 1.05rem;
}

/* ---------- Carousel background (scrolls away with the hero) ---------- */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: #08080a;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.4s ease;
    will-change: opacity;
}

.hero-slide.active {
    opacity: 1;
}

/* Blurred, cover-sized fill so vertical photos never sit on flat black */
.hero-blur,
.hero-sharp {
    position: absolute;
    inset: 0;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-blur {
    background-size: cover;
    filter: blur(42px) saturate(1.15) brightness(0.55);
    transform: scale(1.2);
}

/* Sharp photo, contained so it's fully visible in height, keeping proportion */
.hero-sharp {
    background-size: contain;
}

.hero-slide.active .hero-blur {
    animation: heroZoom 10s ease-out forwards;
}

@keyframes heroZoom {
    from { transform: scale(1.2); }
    to   { transform: scale(1.32); }
}

.hero-scrim {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(to bottom,
            rgba(14, 14, 16, 0.72) 0%,
            rgba(14, 14, 16, 0.20) 20%,
            rgba(14, 14, 16, 0.20) 50%,
            rgba(14, 14, 16, 0.88) 100%);
}

/* Click/tap zones over the hero: left = prev, middle = pause/play, right = next.
   Icons hint the action on mouse hover; on touch they stay hidden (a JS-driven
   flash gives tap feedback instead). */
.hero-zones {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    pointer-events: none;
}

.hero-zone {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0;
    background: transparent;
    color: #fff;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}

.hz-prev { cursor: pointer; justify-content: flex-start; padding-left: clamp(12px, 5vw, 60px); }
.hz-next { cursor: pointer; justify-content: flex-end; padding-right: clamp(12px, 5vw, 60px); }
.hz-mid  { cursor: pointer; }

.hz-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(14, 14, 18, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.hz-icon svg { display: block; }

/* Middle zone swaps pause <-> play with the paused state */
.hz-play { display: none; }
.hero-zones.paused .hz-pause { display: none; }
.hero-zones.paused .hz-play { display: flex; }

/* Reveal the hint only for real mouse pointers (not on touch) */
@media (hover: hover) and (pointer: fine) {
    .hero-zone:hover .hz-icon { opacity: 0.82; transform: scale(1); }
}

/* Brief flash on tap/click so touch users get feedback */
.hero-zone.flash .hz-icon { animation: hzFlash 0.55s ease; }

@keyframes hzFlash {
    0%   { opacity: 0;    transform: scale(0.85); }
    30%  { opacity: 0.85; transform: scale(1); }
    100% { opacity: 0;    transform: scale(1); }
}

/* Immersive first screen: carousel background fills the viewport */
.hero {
    position: relative;
    z-index: 2;
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100dvh - var(--header-h));
    display: flex;
    flex-direction: column;
    pointer-events: none;
    overflow: hidden;
}

/* Overlay column (title + controls) sits above the click target */
.hero-content {
    position: relative;
    z-index: 2;
    flex: 1;
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 40px 28px 0;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.hero-content .state { pointer-events: auto; }

.hero .page-head {
    margin-bottom: 0;
    text-align: center;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.hero .page-head .lead {
    margin: 0 auto;
    max-width: 640px;
    color: var(--text);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 300;
    letter-spacing: 0.04em;
}

/* Scroll cue → jumps to the all-photos gallery */
.scroll-cue {
    position: relative;
    z-index: 4;
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 8px auto 22px;
    padding: 8px 16px;
    border-radius: 999px;
    color: var(--text);
    background: rgba(20, 20, 24, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    pointer-events: auto;
    transition: background 0.2s ease, transform 0.2s ease;
}

.scroll-cue:hover { background: rgba(30, 30, 36, 0.72); transform: translateY(2px); }
.scroll-cue svg { animation: cueBounce 1.8s ease-in-out infinite; }

@keyframes cueBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

.hero-controls {
    margin-top: auto;
    padding-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.hero-caption {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
    min-height: 24px;
}

.hero-caption .cap-counter {
    color: var(--accent);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.1em;
}

.hero-caption .cap-title {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Like / dislike / enquire row under the caption. Direct child of .hero so it
   sits above the full-area click zones (z-index 3) and stays interactive. */
.hero-actions {
    position: relative;
    z-index: 4;
    align-self: center;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px auto 18px;
    pointer-events: auto;
    flex-wrap: wrap;
    justify-content: center;
    text-shadow: none;
}
.hero-actions[hidden] { display: none; }

.hero .state { pointer-events: auto; }

@media (max-width: 700px) {
    .hz-icon { width: 54px; height: 54px; }
    .hero { min-height: calc(100vh - var(--header-h)); min-height: calc(100dvh - var(--header-h)); }
}


.state.error {
    color: #e88;
    border: 1px solid rgba(238, 136, 136, 0.25);
    background: rgba(238, 136, 136, 0.06);
    border-radius: var(--radius);
}

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.94);
    animation: fadeIn 0.3s ease;
}

.lightbox[hidden] { display: none; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lb-figure {
    position: relative;
    margin: 0;
    max-width: min(1100px, 94vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.lb-figure img {
    max-width: min(1100px, 92vw);
    max-height: 80vh;
    object-fit: contain;
    border-radius: 6px;
    display: block;
}

.lb-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: center;
    color: #fff;
    max-width: 60ch;
}

.lb-info .lb-title { font-weight: 600; font-size: 1.05rem; }
.lb-info .lb-desc { color: var(--muted); font-size: 0.92rem; }
.lb-info .lb-specs { color: var(--muted-dim); font-size: 0.82rem; letter-spacing: 0.02em; }

.lb-close,
.lb-nav {
    position: fixed;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    z-index: 2;
}

.lb-close:hover,
.lb-nav:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #17140c;
}

.lb-close {
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    font-size: 22px;
}

.lb-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    font-size: 26px;
}

.lb-prev { left: 18px; }
.lb-next { right: 18px; }

@media (max-width: 600px) {
    .lightbox { padding: 12px; }
    .lb-figure img { max-width: 92vw; max-height: 72vh; }
    .lb-close { width: 40px; height: 40px; font-size: 20px; top: 12px; right: 12px; }
    .lb-nav { width: 44px; height: 44px; font-size: 22px; top: auto; bottom: 16px; transform: none; }
    .lb-prev { left: 20px; }
    .lb-next { right: 20px; }
}


/* ---------- All-photos justified masonry ---------- */
.gallery-section {
    position: relative;
    z-index: 2;
    background: var(--bg);
    padding: 48px 0 64px;
}

.section-head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    max-width: var(--maxw);
    margin: 0 auto 22px;
    padding: 0 24px;
}

.section-head h2 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.section-sub {
    color: var(--muted);
    font-size: 0.9rem;
}

/* ---------- Dedicated gallery page ---------- */
.gallery-page {
    position: relative;
    background: var(--bg);
    padding: 40px 0 64px;
    min-height: calc(100vh - var(--header-h) - 120px);
}

.gallery-page .section-head { margin-bottom: 18px; }

.gallery-page .section-head h1 {
    font-size: 1.7rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.gallery-filter {
    max-width: var(--maxw);
    margin: 0 auto 24px;
    padding: 0 24px;
}

.filter-search {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

#tagSearch {
    flex: 1;
    min-width: 0;
    padding: 11px 15px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
}

#tagSearch:focus { outline: none; border-color: var(--accent); }

.filter-clear {
    flex: 0 0 auto;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.filter-clear:hover { border-color: var(--accent); color: var(--accent); }

.tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.tag-chip:hover { border-color: var(--accent); color: var(--text); }

.tag-chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #17140c;
    font-weight: 600;
}

.tag-chip .tag-n {
    font-size: 0.72rem;
    opacity: 0.7;
}

.tag-chip.active .tag-n { opacity: 0.85; }

.tag-empty { color: var(--muted-dim); font-size: 0.85rem; }

.filter-count {
    margin-top: 12px;
    color: var(--muted-dim);
    font-size: 0.82rem;
}

.lb-info .lb-tags {
    color: var(--accent);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    margin-top: 2px;
}

/* Full-bleed grid; the 1px gaps reveal this divider colour between photos */
.masonry {
    width: 100%;
    background: var(--border);
}

.masonry-row {
    display: flex;
    justify-content: flex-start;
}

/* Last row that can't fill the width: center it and hide the divider strip */
.masonry-row--partial {
    justify-content: center;
    background: var(--bg);
}

.masonry-row--partial .masonry-cell:last-child { margin-right: 0 !important; }

/* Gallery pagination */
.gallery-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 32px 16px 8px;
}
.gallery-page-btn {
    min-width: 40px;
    padding: 9px 14px;
    background: var(--bg-elev);
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.gallery-page-btn:hover:not(:disabled):not(.active) { border-color: var(--accent); color: var(--accent); }
.gallery-page-btn.active { background: var(--accent); border-color: var(--accent); color: #12100a; font-weight: 600; }
.gallery-page-btn:disabled { opacity: 0.4; cursor: default; }

.masonry-cell {
    position: relative;
    padding: 0;
    border: 0;
    overflow: hidden;
    cursor: zoom-in;
    background: var(--bg-card);
    flex: 0 0 auto;
}

.masonry-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

/* Fade thumbnails in over the dominant-colour placeholder background. */
.masonry-cell img.masonry-img { opacity: 0; }
.masonry-cell img.masonry-img.is-loaded { opacity: 1; }

.masonry-cell:hover img { transform: scale(1.05); }

.masonry-cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px 10px 8px;
    font-size: 0.78rem;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.masonry-cell:hover .masonry-cap { opacity: 1; transform: translateY(0); }

@media (max-width: 600px) {
    .gallery-section { padding: 36px 0 48px; }
    .section-head { padding: 0 14px; flex-direction: column; gap: 4px; margin-bottom: 16px; }
    .gallery-page { padding: 28px 0 48px; }
    .gallery-filter { padding: 0 14px; }
}

/* ---------- Tetris ---------- */
.tetris-layout {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.tetris-shell,
.tetris-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)), var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

.tetris-shell {
    padding: 18px;
}

.tetris-stage {
    position: relative;
    width: min(100%, 300px);
    margin: 0 auto;
}

#tetris,
#nextPiece {
    display: block;
    width: 100%;
    background: #111217;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
}

#nextPiece {
    max-width: 160px;
    margin: 10px auto 0;
}

.tetris-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 8, 10, 0.72);
    border-radius: 12px;
    padding: 20px;
}

.tetris-overlay[hidden] {
    display: none;
}

.tetris-overlay-card {
    text-align: center;
    max-width: 240px;
}

.tetris-overlay-card h2 {
    font-size: 1.35rem;
    margin-bottom: 10px;
}

.tetris-overlay-card p {
    color: var(--muted);
    margin-bottom: 18px;
}

.tetris-panel {
    display: grid;
    gap: 18px;
}

.tetris-card {
    padding: 20px;
}

.tetris-card h2 {
    font-size: 1.05rem;
    margin-bottom: 14px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-grid div {
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 12px;
}

.stat-label {
    display: block;
    color: var(--muted-dim);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.stat-grid strong {
    font-size: 1.35rem;
}

.tetris-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.tetris-actions .btn {
    flex: 1;
    text-align: center;
}

.tetris-btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-strong);
}

.tetris-controls {
    list-style: none;
    display: grid;
    gap: 10px;
    color: var(--muted);
}

.tetris-controls li {
    display: flex;
    align-items: center;
    gap: 10px;
}

kbd {
    min-width: 56px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    background: var(--bg-elev);
    color: var(--text);
    font: inherit;
    font-size: 0.85rem;
    text-align: center;
    box-shadow: inset 0 -2px 0 rgba(255,255,255,0.04);
}

/* ---------- About ---------- */
.about {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 48px;
    align-items: start;
}

.about-portrait {
    aspect-ratio: 4 / 5;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(145deg, #1c1c22, #131317);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-dim);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    overflow: hidden;
}

.about-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prose p {
    color: var(--muted);
    margin-bottom: 18px;
    font-size: 1.05rem;
}

.prose p strong {
    color: var(--text);
    font-weight: 600;
}

.prose h2 {
    font-size: 1.3rem;
    margin: 32px 0 12px;
    color: var(--text);
}

/* ---------- Legal / policy pages ---------- */
.legal {
    max-width: 760px;
}

.legal.prose p {
    font-size: 1rem;
    line-height: 1.7;
}

.legal .legal-meta {
    color: var(--muted-dim);
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    margin-bottom: 28px;
}

.legal.prose a {
    color: var(--accent);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.legal.prose a:hover {
    border-color: var(--accent);
}

.legal.prose ul {
    margin: 0 0 18px 20px;
    padding: 0;
}

.legal.prose li {
    color: var(--muted);
    margin-bottom: 8px;
    font-size: 1rem;
    line-height: 1.7;
}

.legal.prose li strong,
.legal.prose p em {
    color: var(--text);
    font-style: normal;
}

/* ---------- Contact ---------- */
.contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.contact-intro p {
    color: var(--muted);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.contact-intro a {
    color: var(--accent);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.contact-intro a:hover {
    border-color: var(--accent);
}

.form-consent {
    color: var(--muted-dim);
    font-size: 0.82rem;
    line-height: 1.55;
    margin: 4px 0 18px;
}

.form-consent a {
    color: var(--accent);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.form-consent a:hover {
    border-color: var(--accent);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 13px 14px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: #191915;
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.btn {
    display: inline-block;
    padding: 13px 28px;
    background: var(--accent);
    color: #17140c;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.15s ease;
}

.btn:hover {
    filter: brightness(1.08);
}

.btn:active {
    transform: translateY(1px);
}

.alert {
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.alert.success {
    background: rgba(120, 200, 120, 0.1);
    border: 1px solid rgba(120, 200, 120, 0.3);
    color: #a6e0a6;
}

.alert.error {
    background: rgba(238, 136, 136, 0.08);
    border: 1px solid rgba(238, 136, 136, 0.28);
    color: #eaa;
}

.alert.info {
    background: rgba(120, 170, 230, 0.08);
    border: 1px solid rgba(120, 170, 230, 0.28);
    color: #bcd6f5;
}

/* Per-photo enquiry banner with a thumbnail so visitors can confirm the shot. */
.photo-inquiry {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    margin-bottom: 24px;
    border-radius: 10px;
    background: var(--surface, rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-inquiry-thumb {
    flex: 0 0 auto;
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    background: rgba(255, 255, 255, 0.05);
}

.photo-inquiry-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.photo-inquiry-eyebrow {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
}

.photo-inquiry-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    overflow-wrap: anywhere;
}

.photo-inquiry-hint {
    font-size: 0.85rem;
    color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer {
    position: relative;
    z-index: 2;
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 32px 28px;
    text-align: center;
    color: var(--muted-dim);
    font-size: 0.85rem;
    letter-spacing: 0.03em;
}

.footer-legal {
    margin-top: 8px;
}

.footer-legal a {
    color: var(--muted);
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-legal a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.footer-sep {
    margin: 0 8px;
    color: var(--border-strong);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .tetris-layout,
    .about,
    .contact {
        grid-template-columns: 1fr;
    }

    .about-portrait {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
}

@media (max-width: 760px) {
    .header-inner {
        padding: 0 16px;
        gap: 12px;
        position: relative;
    }

    .brand-name {
        font-size: 0.9rem;
        letter-spacing: 0.1em;
    }

    .brand-svg {
        width: 30px;
        height: 30px;
    }

    .nav-toggle {
        display: flex;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        right: 12px;
        flex-direction: column;
        gap: 2px;
        min-width: 200px;
        padding: 8px;
        background: rgba(20, 20, 24, 0.96);
        backdrop-filter: saturate(160%) blur(14px);
        -webkit-backdrop-filter: saturate(160%) blur(14px);
        border: 1px solid var(--border-strong);
        border-radius: 12px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    }

    .site-nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .site-nav a {
        padding: 11px 14px;
        font-size: 0.8rem;
        letter-spacing: 0.1em;
        border-radius: 8px;
    }

    .site-nav a.active { background: rgba(255, 255, 255, 0.05); }
    .site-nav a.active::after { display: none; }

    .site-main {
        padding: 40px 18px 32px;
    }

    .hero-content {
        padding: 30px 16px 0;
    }

    .tetris-shell {
        padding: 12px;
    }

    .tetris-actions {
        flex-direction: column;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Collections page ---- */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 8px;
}
.collection-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: #1a1a1f;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.18s ease, transform 0.18s ease;
}
.collection-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}
.collection-media {
    aspect-ratio: 3 / 2;
    background: #222;
    overflow: hidden;
}
.collection-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.collection-media img.is-loaded { opacity: 1; }
.collection-card:hover .collection-media img { transform: scale(1.04); }
.collection-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.collection-title {
    font-size: 1.15rem;
    margin: 0;
    color: #ececee;
}
.collection-desc {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.4;
}
.collection-count {
    color: var(--accent);
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
@media (max-width: 560px) {
    .collections-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ---------- Lightbox actions (overlaid on photo bottom) ---------- */
.lb-media {
    position: relative;
    display: inline-flex;
    max-width: 100%;
}
.lb-actions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 14px 12px;
    border-radius: 0 0 6px 6px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
    opacity: 0.85;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.lb-media:hover .lb-actions,
.lb-actions:focus-within { opacity: 1; }
.lb-actions > * { pointer-events: auto; }

.lb-react-group { display: inline-flex; align-items: center; gap: 4px; }
.lb-react {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.82rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}
.lb-react:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.lb-react .lb-ic { display: block; transition: fill 0.15s ease; }
.lb-react .lb-react-n { font-variant-numeric: tabular-nums; min-width: 1ch; text-align: left; }
.lb-like.is-active { color: var(--accent); }
.lb-like.is-active .lb-ic { fill: var(--accent); }
.lb-dislike.is-active { color: #e79a9a; }
.lb-dislike.is-active .lb-ic { fill: #e79a9a; }

.lb-inquire {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(0, 0, 0, 0.25);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.8rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.lb-inquire:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #17140c;
}
.lb-inquire .lb-ic { display: block; }

/* Touch devices can't hover — keep the bar fully opaque. */
@media (hover: none) {
    .lb-actions { opacity: 1; }
}
@media (max-width: 600px) {
    .lb-actions { opacity: 1; padding: 20px 10px 10px; }
    .lb-inquire span { display: none; }
    .lb-inquire { padding: 7px; }
}

/* ============ Interactive map page ============ */
.map-page { width: 100%; }
.map-head { max-width: var(--maxw); margin: 0 auto; padding: 28px 28px 18px; }
.map-head h1 { margin: 0 0 4px; }
.map-wrap {
    position: relative;
    width: 100%;
    height: calc(100vh - 240px);
    min-height: 460px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-elev);
}
#worldMap { position: absolute; inset: 0; z-index: 0; background: var(--bg-elev); }
.map-empty {
    position: absolute; inset: 0; z-index: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; color: var(--muted); pointer-events: none;
}
.map-empty p { margin: 2px 0; }
.map-empty-sub { color: var(--muted-dim); font-size: 0.85em; }

/* Gold teardrop pin */
.map-pin span {
    display: block; width: 16px; height: 16px; margin: 3px;
    background: var(--accent);
    border: 2px solid #1a1a1d;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 0 0 1px rgba(201, 169, 106, 0.5), 0 2px 6px rgba(0, 0, 0, 0.5);
}
/* Cluster badge (Booking-style count bubble) */
.map-cluster { background: none; }
.map-cluster-inner {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(201, 169, 106, 0.92);
    color: #14140f; font-weight: 700; font-size: 0.9em;
    border: 2px solid #14140f;
    box-shadow: 0 0 0 4px rgba(201, 169, 106, 0.28), 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Dark popup theme */
.map-popup .leaflet-popup-content-wrapper {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}
.map-popup .leaflet-popup-content { margin: 0; }
.map-popup .leaflet-popup-tip { background: var(--bg-card); border: 1px solid var(--border-strong); }
.map-popup a.leaflet-popup-close-button { color: var(--muted); }
.map-pop { display: block; width: 100%; text-align: left; text-decoration: none; color: var(--text); background: none; border: 0; padding: 0; margin: 0; font: inherit; cursor: pointer; }
.map-pop img { display: block; width: 100%; height: 140px; object-fit: cover; border-radius: 8px 8px 0 0; }
.map-pop-title { display: block; padding: 8px 10px 2px; font-weight: 600; font-size: 0.9em; }
.map-pop-place { display: block; padding: 0 10px 10px; color: var(--muted); font-size: 0.78em; }
.map-pop:hover .map-pop-title { color: var(--accent); }

/* Leaflet control tweaks for the dark theme */
.leaflet-bar a {
    background: var(--bg-card); color: var(--text);
    border-bottom-color: var(--border);
}
.leaflet-bar a:hover { background: var(--bg-elev); color: var(--accent); }
.leaflet-control-attribution {
    background: rgba(14, 14, 16, 0.7) !important;
    color: var(--muted-dim) !important;
}
.leaflet-control-attribution a { color: var(--muted) !important; }

@media (max-width: 700px) {
    .map-head { padding: 18px 16px 14px; }
    .map-wrap { height: calc(100vh - 200px); min-height: 380px; }
}
