/* ============================================================
   GALERIE · Mathias & Marian
   Immersive, photo-forward minimalism.
   Palette: sage / gold / cream · Type: Montserrat
   ============================================================ */

/* Self-hosted fallback fonts — used when Google Fonts is blocked or slow */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 200 600;
    font-display: swap;
    src: url('/fonts/montserrat-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 200 600;
    font-display: swap;
    src: url('/fonts/montserrat-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --sage:        #7A9B8E;
    --sage-mid:    #5F8176;
    --sage-deep:   #46615A;
    --sage-light:  #EDF2F0;
    --gold:        #BFA06A;
    --cream:       #F8F7F3;
    --cream-deep:  #F1EFE8;
    --charcoal:    #252525;
    --ink-soft:    #6B7B76;
    --border:      #DCE4E0;
    --white:       #FFFFFF;
    --error:       #A54040;

    --accent:      var(--gold);   /* toggled off → sage */

    --maxw:        1480px;
    --gap:         clamp(8px, 0.9vw, 16px);
    --ease:        cubic-bezier(0.4, 0, 0.2, 1);
}

body[data-gold="false"] { --accent: var(--sage); }

*, *::before, *::after {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--cream);
    color: var(--charcoal);
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.6;
}

/* ── SHARED TYPE ── */
.eyebrow {
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--sage-mid);
    margin: 0;
}
.eyebrow--light { color: var(--sage-mid); }
body[data-hero="full"] .hero .eyebrow--light { color: rgba(255,255,255,0.82); }

.block-head {
    font-weight: 200;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: 0.02em;
    color: var(--charcoal);
    margin: 0.5rem 0 0;
}

.block-sub {
    font-weight: 300;
    font-size: clamp(0.95rem, 1.4vw, 1.08rem);
    color: var(--ink-soft);
    max-width: 46ch;
    margin: 1.1rem auto 0;
    text-wrap: balance;
}

/* ── BUTTONS ── */
.btn-solid {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6em;
    background: var(--sage);
    color: var(--white);
    border: 1px solid var(--sage);
    padding: 15px 34px;
    font-family: inherit;
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    min-height: 48px;
    line-height: 1;
    border-radius: 2px;
    white-space: nowrap;
    transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.15s var(--ease);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.btn-solid:hover, .btn-solid:active { background: var(--sage-mid); border-color: var(--sage-mid); }
.btn-solid:active { transform: translateY(1px); }
.btn-solid:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-solid--gold { background: var(--gold); border-color: var(--gold); }
.btn-solid--gold:hover, .btn-solid--gold:active { background: #a8883a; border-color: #a8883a; }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--sage-mid);
    border: 1px solid var(--border);
    padding: 15px 34px;
    font-family: inherit;
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    cursor: pointer;
    min-height: 48px;
    line-height: 1;
    border-radius: 2px;
    transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.btn-ghost:hover, .btn-ghost:active { background: var(--sage-light); border-color: var(--sage); color: var(--sage-deep); }

/* ── FIELDS ── */
.field, .search-field { position: relative; }

input[type="text"], input[type="password"] {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: var(--charcoal);
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    border-radius: 0;
}
input::placeholder { color: #B7C2BD; letter-spacing: 0.1em; }
input:disabled { opacity: 0.4; cursor: not-allowed; }

.field-line {
    position: absolute;
    bottom: -1px; left: 0;
    width: 0; height: 2px;
    background: var(--sage-mid);
    transition: width 0.4s var(--ease);
}
input:focus ~ .field-line { width: 100%; }

/* ============================================================
   PASSWORD GATE
   ============================================================ */
#password-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.5s var(--ease);
}
.gate-bg {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    filter: saturate(0.9);
}
.gate-scrim {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(248,247,243,0.72) 0%, rgba(248,247,243,0.62) 100%),
        radial-gradient(ellipse 70% 60% at 50% 45%, rgba(248,247,243,0.55) 0%, rgba(248,247,243,0.85) 100%);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.password-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 340px;
    padding: 40px 28px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.gate-title {
    font-weight: 200;
    font-size: clamp(3rem, 13vw, 4.6rem);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--charcoal);
    margin: 0.5rem 0 0;
    line-height: 1;
}
.gate-date {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.36em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 1.1rem 0 0;
}
.gate-form {
    width: 100%;
    margin-top: 2.6rem;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}
.gate-form input { text-align: center; }
.gate-form .btn-solid { width: 100%; }
.gate-hint {
    margin-top: 1.6rem;
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--ink-soft);
    letter-spacing: 0.02em;
}

@keyframes shake {
    0%,100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}
.shake { animation: shake 0.4s var(--ease); }

/* ============================================================
   STICKY TOP BAR
   ============================================================ */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px clamp(18px, 4vw, 48px);
    background: rgba(248,247,243,0.86);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}
.topbar.visible { transform: translateY(0); opacity: 1; }

.topbar-mono {
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--sage-deep);
}
.topbar-mono--btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s;
}
.topbar-mono--btn:hover { opacity: 0.65; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.topbar-search {
    display: inline-flex;
    align-items: center;
    gap: 0.7em;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--sage-deep);
    padding: 10px 18px;
    font-family: inherit;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    min-height: 42px;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.topbar-search:hover { border-color: var(--sage); background: var(--sage-light); }
.topbar-search .ico-search { width: 15px; height: 15px; }

.topbar-dl {
    display: inline-flex;
    align-items: center;
    background: var(--sage);
    color: var(--white);
    text-decoration: none;
    padding: 10px 18px;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    border-radius: 2px;
    min-height: 42px;
    transition: background 0.2s var(--ease);
}
.topbar-dl:hover { background: var(--sage-mid); }

.ico-search {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

/* ============================================================
   LAYOUT WRAPPER
   ============================================================ */
.main-wrapper { width: 100%; }

/* content rails respect the width tweak */
main {
    padding: clamp(56px, 8vw, 110px) clamp(18px, 4vw, 48px);
    display: flex;
    flex-direction: column;
    gap: clamp(56px, 8vw, 104px);
}
body[data-width="contained"] main { max-width: 1180px; margin: 0 auto; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    isolation: isolate;
    z-index: 0;
}

/* — Variant: FULL (photo bg + overlaid title) — */
body[data-hero="full"] .hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    padding: 0 24px 7vh;
    overflow: hidden;
}
body[data-hero="full"] .hero-media {
    position: absolute;
    top: 0; left: 0; right: 0;
    bottom: -35%;
    z-index: -1;
    overflow: hidden;
    will-change: transform;
}
body[data-hero="full"] .hero-img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 30%;
    display: block;
    transform-origin: center center;
    animation: ken-burns 28s ease-in-out infinite;
    will-change: transform;
}
body[data-hero="full"] .hero-img.hero-img--fading {
    transition: opacity 0.5s ease;
}

@keyframes ken-burns {
    0%   { transform: scale(1.00) translate( 0%,    0%);   }
    40%  { transform: scale(1.06) translate(-1.2%, -0.5%); }
    70%  { transform: scale(1.04) translate( 0.8%, -0.8%); }
    100% { transform: scale(1.00) translate( 0%,    0%);   }
}
body[data-hero="full"] .hero-scrim {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(30,40,36,0.18) 0%, rgba(30,40,36,0) 30%, rgba(30,40,36,0.12) 55%, rgba(25,33,30,0.62) 100%);
}
body[data-hero="full"] .hero-title { color: var(--white); }
body[data-hero="full"] .hero-date  { color: rgba(255,255,255,0.9); }

/* — Variant: STACKED (title on cream, photo band below) — */
body[data-hero="stacked"] .hero { display: block; }
body[data-hero="stacked"] .hero-content {
    text-align: center;
    padding: clamp(64px, 10vw, 130px) 24px clamp(40px, 6vw, 70px);
}
body[data-hero="stacked"] .hero-media {
    position: relative;
    height: clamp(280px, 52vh, 620px);
    overflow: hidden;
}
body[data-hero="stacked"] .hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }
body[data-hero="stacked"] .hero-scrim { display: none; }

/* — Variant: MINIMAL (title only on cream, slim framed photo) — */
body[data-hero="minimal"] .hero {
    display: block;
    padding-top: clamp(96px, 14vh, 200px);
}
body[data-hero="minimal"] .hero-content { text-align: center; padding: 0 24px; }
body[data-hero="minimal"] .hero-media {
    position: relative;
    margin: clamp(40px, 6vw, 72px) clamp(18px, 4vw, 48px) 0;
    height: clamp(220px, 38vh, 440px);
    overflow: hidden;
    border-radius: 3px;
}
body[data-hero="minimal"] .hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }
body[data-hero="minimal"] .hero-scrim { display: none; }

/* shared hero content */
.hero-content { position: relative; z-index: 1; }
.hero-title {
    font-weight: 200;
    font-size: clamp(3.4rem, 13vw, 9rem);
    line-height: 0.95;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0.7rem 0 0;
    color: var(--charcoal);
}
.hero-date {
    font-size: clamp(0.7rem, 1.4vw, 0.84rem);
    font-weight: 500;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin: 1.3rem 0 0;
    color: var(--accent);
}


/* ============================================================
   SEARCH BLOCK
   ============================================================ */
.search-block {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
}
.search-block--bottom {
    margin-top: clamp(48px, 8vw, 80px);
}
#personal-search-results {
    max-width: 460px;
    margin: 1.6rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 0.5rem;
}
.search-field {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 460px;
    margin: 2.4rem auto 0;
    border-bottom: 1px solid var(--border);
}
.search-field .ico-search {
    width: 20px; height: 20px;
    color: var(--sage);
    flex-shrink: 0;
}
.search-field input {
    border-bottom: none;
    text-align: left;
    font-size: 1.15rem;
}
.search-field .field-line { bottom: -1px; }

/* ============================================================
   SELECTION LIST
   ============================================================ */
#selection-area {
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
    text-align: center;
}
#selection-info { margin-bottom: 1.4rem; }
#selection-list { display: flex; flex-direction: column; gap: 10px; }

.selection-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: 16px 22px;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--charcoal);
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}
.selection-item:hover, .selection-item:active {
    background: var(--sage);
    border-color: var(--sage);
    color: var(--white);
    transform: translateY(-1px);
}

/* ============================================================
   RESULT (personal gallery)
   ============================================================ */
#result-text { text-align: center; max-width: 720px; margin: 0 auto; }
.result-greeting {
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--sage-mid);
    margin: 0;
}
.big-name-display {
    font-weight: 200;
    font-size: clamp(2.2rem, 7vw, 4.4rem);
    line-height: 1.08;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--charcoal);
    margin: 0.6rem 0 0;
    overflow-wrap: break-word;
}
.table-label {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.36em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 1.4rem 0 0;
}
#personal-download-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2.2rem;
}
#personal-grid { margin-top: clamp(28px, 4vw, 48px); }
.back-wrap { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 2.6rem; }

/* ============================================================
   GALLERY  (masonry / uniform)
   ============================================================ */
.gallery-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: clamp(28px, 4vw, 48px);
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}
.gallery-head-text { text-align: left; }
.gallery-head .block-head { font-size: clamp(1.8rem, 4vw, 2.8rem); }

/* MASONRY (Pinterest — JS columns) */
.masonry {
    display: flex;
    align-items: flex-start;
    gap: var(--gap);
}
.masonry-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

/* UNIFORM (square grid) */
body[data-grid="uniform"] .masonry {
    display: grid;
    grid-template-columns: repeat(var(--cols, 5), 1fr);
    gap: var(--gap);
}
body[data-grid="uniform"] .masonry-col { display: contents; }
body[data-grid="uniform"] .masonry .photo-item { aspect-ratio: 1; }
body[data-grid="uniform"] .photo-item img { height: 100%; }

.photo-item {
    position: relative;
    overflow: hidden;
    background: var(--sage-light);
    cursor: pointer;
    border-radius: 2px;
    display: block;
    opacity: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.photo-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.6s var(--ease), filter 0.4s var(--ease);
    user-select: none;
    -webkit-user-drag: none;
}
.photo-item::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(25,33,30,0.34) 100%);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
}
.photo-item:hover img { transform: scale(1.04); }
.photo-item:hover::after { opacity: 1; }
.photo-filename-label {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 2;
    padding: 3px 6px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-family: monospace;
    font-size: 10px;
    line-height: 1.4;
    word-break: break-all;
    pointer-events: none;
}

/* Loading spinner shown while image dimensions are pre-fetched */
.grid-spinner {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 5rem 0;
}
.grid-spinner::after {
    content: '';
    width: 2.4rem;
    height: 2.4rem;
    border: 3px solid var(--sage-light);
    border-top-color: var(--sage);
    border-radius: 50%;
    animation: gridSpin 0.75s linear infinite;
}
@keyframes gridSpin { to { transform: rotate(360deg); } }

/* gentle staggered reveal */
.photo-item.reveal { animation: photoIn 0.6s var(--ease) both; }
@keyframes photoIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
#lightbox {
    position: fixed; inset: 0;
    z-index: 1001;
    background: rgba(18,24,21,0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 0 84px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    overscroll-behavior: none;
}
#lightbox.hidden { display: none !important; }
#lightbox-img {
    max-width: 92vw;
    max-height: 100%;
    width: auto; height: auto;
    object-fit: contain;
    display: block;
    border-radius: 2px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    user-select: none;
    -webkit-user-drag: none;
}
.lightbox-meta {
    position: fixed;
    bottom: 22px; left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
    color: rgba(255,255,255,0.7);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 1002;
}
.lightbox-close {
    position: fixed;
    top: 14px; right: 18px;
    background: none; border: none;
    color: var(--white);
    font-size: 2.2rem; font-weight: 200; line-height: 1;
    cursor: pointer;
    min-width: 48px; min-height: 48px;
    z-index: 1002;
    opacity: 0.78;
    transition: opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-prev, .lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.07);
    border: none;
    color: var(--white);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 18px 16px;
    min-width: 52px; min-height: 70px;
    z-index: 1002;
    opacity: 0.7;
    transition: opacity 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.lightbox-prev:hover, .lightbox-next:hover { opacity: 1; background: rgba(255,255,255,0.16); }
.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }

/* ============================================================
   PHOTOGRAPHER TIP
   ============================================================ */
.photographer-tip {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: clamp(12px, 2vw, 20px);
    margin-top: calc(clamp(56px, 8vw, 110px) * -0.3);
}
.photographer-tip-text {
    font-size: 1rem;
    font-weight: 300;
    color: var(--sage-deep);
    letter-spacing: 0.04em;
    margin: 0;
}
.photographer-ig {
    display: inline-flex;
    align-items: center;
    gap: 0.55em;
    color: var(--ink-soft);
    text-decoration: none;
    font-family: inherit;
    font-size: 0.63rem;
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    border: 1px solid var(--border);
    padding: 9px 18px;
    border-radius: 2px;
    transition: background 0.22s var(--ease), border-color 0.22s var(--ease), color 0.22s var(--ease);
}
.photographer-ig:hover {
    background: var(--sage-light);
    border-color: var(--sage);
    color: var(--sage-deep);
}
.ico-instagram { width: 15px; height: 15px; flex-shrink: 0; }
.photographer-ig-btn { gap: 0.6em; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    text-align: center;
    padding: clamp(56px, 8vw, 96px) 24px clamp(48px, 6vw, 72px);
    border-top: 1px solid var(--border);
    margin: 0 clamp(18px, 4vw, 48px);
}
body[data-width="contained"] footer { max-width: 1180px; margin: 0 auto; }
.footer-mono {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--sage-deep);
    margin: 0;
}
.footer-meta {
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 1rem 0 0;
}

/* ============================================================
   DOWNLOAD DROPDOWN
   ============================================================ */
.dl-dropdown { position: relative; display: inline-flex; }

.dl-chevron {
    width: 9px; height: 6px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    transition: transform 0.22s var(--ease);
}
.dl-dropdown.open .dl-chevron { transform: rotate(180deg); }

.dl-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    min-width: 100%;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 2px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    z-index: 200;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}
.dl-dropdown.open .dl-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.dl-menu--up {
    top: auto;
    bottom: calc(100% + 5px);
    transform: translateY(6px);
}
.dl-dropdown.open .dl-menu--up { transform: translateY(0); }
.dl-menu--right { left: auto; right: 0; }

.dl-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 13px 22px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.63rem;
    font-weight: 500;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--charcoal);
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.dl-option:hover { background: var(--sage-light); color: var(--sage-deep); }
.dl-option + .dl-option { border-top: 1px solid var(--border); }
.dl-option--parent { justify-content: space-between; }
.dl-sub-chevron {
    width: 9px; height: 6px;
    fill: none; stroke: currentColor;
    stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
    flex-shrink: 0; margin-left: auto;
    transition: transform 0.22s var(--ease);
}
.dl-option--parent.open .dl-sub-chevron { transform: rotate(180deg); }
.dl-sub-menu {
    display: none;
    border-top: 1px solid var(--border);
}
.dl-sub-menu.open { display: block; }
.dl-sub-item { padding-left: 36px; }
.dl-sub-menu + .dl-option { border-top: 1px solid var(--border); }

/* lightbox overlay variant */
.dl-trigger--overlay {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    background: var(--gold);
    border: 1px solid var(--gold);
    color: var(--white);
    padding: 7px 14px;
    font-family: inherit;
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    min-height: 34px;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.dl-dropdown--overlay.open .dl-trigger--overlay,
.dl-trigger--overlay:hover {
    background: #a8883a;
    border-color: #a8883a;
    color: var(--white);
}
.dl-dropdown--overlay .dl-menu {
    background: rgba(28,38,34,0.95);
    border-color: rgba(255,255,255,0.12);
    box-shadow: 0 8px 28px rgba(0,0,0,0.4);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.dl-dropdown--overlay .dl-option { color: rgba(255,255,255,0.82); }
.dl-dropdown--overlay .dl-option:hover { background: rgba(255,255,255,0.1); color: rgba(255,255,255,1); }
.dl-dropdown--overlay .dl-option + .dl-option { border-top-color: rgba(255,255,255,0.1); }

/* button reset when topbar-dl is used on a <button> */
button.topbar-dl { border: none; font-family: inherit; cursor: pointer; gap: 0.6em; }

/* ── BURGER BUTTON ── */
.topbar-burger {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
    color: var(--sage-deep);
    cursor: pointer;
    border-radius: 2px;
    width: 42px; height: 42px;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.topbar-burger:hover { border-color: var(--sage); background: var(--sage-light); }
.ico-burger { display: block; width: 18px; height: 13px; }
.ico-close-x { display: none; width: 14px; height: 14px; }
.topbar.menu-open .ico-burger { display: none; }
.topbar.menu-open .ico-close-x { display: block; }
.topbar-dl--personal {
    background: var(--gold);
    gap: 0.6em;
    animation: personal-dl-attention 1.8s ease-in-out 3;
}
.topbar-dl--personal:hover, .topbar-dl--personal:active { background: #a8883a; }

@keyframes personal-dl-attention {
    0%,  100% { box-shadow: 0 0 0 0   rgba(191,160,106,0); }
    50%        { box-shadow: 0 0 0 7px rgba(191,160,106,0.5); }
}

/* ============================================================
   PAGE LOADER
   ============================================================ */
#page-loader {
    position: fixed;
    inset: 0;
    z-index: 960;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.4s ease;
}
.page-loader-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--sage-light);
    border-top-color: var(--sage);
    border-radius: 50%;
    animation: loader-spin 0.75s linear infinite;
}
@keyframes loader-spin { to { transform: rotate(360deg); } }

/* ============================================================
   UTILITIES
   ============================================================ */
.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    .photo-item.reveal { animation: none; opacity: 1; }
    html { scroll-behavior: auto; }
    body[data-hero="full"] .hero-img { animation: none; }
    .shake { animation: none; }
    .topbar-dl--personal { animation: none; }
}

/* ============================================================
   RESPONSIVE COLUMN COUNTS  (override --cols on small screens)
   ============================================================ */
@media (max-width: 1100px) { body { --cols: 4 !important; } }
@media (max-width: 760px)  {
    body { --cols: 3 !important; }
    .gallery-head { flex-direction: column; align-items: stretch; }
    .gallery-head .btn-solid { width: 100%; }
    .topbar-search span { display: none; }
    .topbar-search { padding: 10px 14px; }
}
@media (max-width: 640px) {
    .topbar { flex-wrap: wrap; }
    .topbar-mono { flex: 1; }
    .topbar-burger { display: flex; }

    .topbar-actions {
        display: none;
        order: 3;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 4px;
        padding-top: 10px;
        margin-top: 6px;
        border-top: 1px solid var(--border);
    }
    .topbar.menu-open .topbar-actions { display: flex; }

    .topbar-actions .topbar-search,
    .topbar-actions .dl-dropdown { width: 100%; }
    .topbar-actions .topbar-search {
        justify-content: flex-start;
        min-height: 48px;
        padding: 12px 16px;
        gap: 0.8em;
    }
    .topbar-actions .topbar-search span { display: inline; }
    .topbar-actions button.topbar-dl {
        width: 100%;
        min-height: 48px;
        justify-content: space-between;
        padding: 12px 16px;
    }
    .topbar-actions .dl-menu { min-width: 100%; left: 0; right: auto; }
}

@media (max-width: 480px)  {
    body { --cols: 2 !important; --gap: 7px; }
    main { padding-top: clamp(40px, 9vw, 64px); }
    #personal-download-wrap .btn-solid,
    .back-wrap .btn-ghost { width: 100%; }
}

/* ============================================================
   MOBILE · kein Massen-Download, Lightbox als primärer Weg
   ============================================================ */
.dl-desktop-hint {
    display: none;
    font-size: 0.78rem;
    color: var(--sage);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 500;
}
.mobile-dl-hint {
    font-size: 0.88rem;
    color: var(--sage-mid);
    text-align: center;
    background: var(--sage-light);
    border: 1px solid var(--sage);
    border-radius: 8px;
    padding: 0.9rem 1.2rem;
    margin-bottom: 1.4rem;
    line-height: 1.6;
}
@media (pointer: coarse) {
    #all-dl-dropdown    { display: none; }
    #topbar-dl-dropdown { display: none; }
    .dl-desktop-hint    { display: block; }
}

/* ============================================================
   RAINBOW · easter egg for Lukas
   ============================================================ */
@keyframes rainbow-scroll { from { background-position: 0 0; } to { background-position: 320px 0; } }
.selection-item.rainbow-lukas {
    background: repeating-linear-gradient(90deg,
        #E40303 0,#E40303 53px,#FF8C00 53px,#FF8C00 106px,#FFED00 106px,#FFED00 160px,
        #008026 160px,#008026 213px,#004DFF 213px,#004DFF 266px,#750787 266px,#750787 320px) !important;
    background-size: 320px 100% !important;
    animation: rainbow-scroll 1.6s linear infinite;
    color: #fff !important;
    border-color: transparent !important;
    font-weight: 600 !important;
    letter-spacing: 0.22em;
    text-shadow: 0 1px 6px rgba(0,0,0,0.55);
}
.selection-item.rainbow-lukas:hover, .selection-item.rainbow-lukas:active { color: #fff !important; }
