/* New gallery app: landing tiles + Slideshow (public/slideshow/) */

:root {
    --bg: #0a0d18;
    --panel: #121831;
    --panel-hi: #1a2244;
    --line: #2a3f5f;
    --accent: #4a9eff;
    --text: #e0e6f0;
    --muted: #8a9aaa;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

[hidden] { display: none !important; }

/* ── Landing page ─────────────────────────────────────────────────────── */

.home {
    min-height: 100vh;
    padding: 48px 16px 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: radial-gradient(ellipse at top, #16204a 0%, var(--bg) 60%);
}

.home-header { text-align: center; margin-bottom: 36px; }
.home-header h1 { margin: 0 0 8px; font-size: clamp(1.8em, 5vw, 2.8em); font-weight: 600; letter-spacing: 0.02em; }
.home-header p  { margin: 0; color: var(--muted); }

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
}

.tile {
    position: relative;
    display: block;
    padding: 28px 22px;
    background: var(--panel);
    border: 2px solid var(--line);
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    text-align: center;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
a.tile:hover, a.tile:focus-visible {
    border-color: var(--accent);
    background: var(--panel-hi);
    transform: translateY(-3px);
    outline: none;
}
.tile-icon { display: block; font-size: 2.6em; margin-bottom: 10px; }
.tile h2 { margin: 0 0 8px; font-size: 1.2em; color: var(--accent); }
.tile p  { margin: 0; font-size: 0.9em; line-height: 1.5; color: var(--muted); }

.tile.soon { opacity: 0.45; cursor: default; }
.soon-tag {
    display: inline-block;
    margin-top: 12px;
    padding: 2px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 0.72em;
    color: var(--muted);
}

/* ── Slideshow ────────────────────────────────────────────────────────── */

.slideshow {
    display: none;
    position: fixed;
    inset: 0;
    background: #000;
    overflow: hidden;
    z-index: 10;
}
.slideshow.active { display: block; }
.slideshow.idle { cursor: none; }

.ss-stage { position: absolute; inset: 0; }

.ss-img {
    position: absolute;
    max-width: none;
    transform-origin: center center;
    transition: opacity 0.35s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.ss-overlay {
    position: absolute;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.2em;
    padding: 3em 1.3em 0.9em;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 100%);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: rgba(255, 255, 255, 0.74);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
    pointer-events: none;
    transition: opacity 0.35s ease;
}

/* Caption: one line, one face and size (Inter, a variable font, so any
   weight renders). The name and separator dots are a little heavier and
   the name and signature a little brighter than the details. */
.ov-line {
    min-width: 0;
    white-space: pre-wrap;
    font-style: italic;
    letter-spacing: 0.03em;
    line-height: 1.35;
}
.ov-name { font-weight: 310; color: rgba(255, 255, 255, 0.9); }
.ov-sep  { font-weight: 310; }
.ov-det  { font-weight: 230; }
.ov-sig {
    flex-shrink: 0;
    font-family: "Herr Von Muellerhoff", "Segoe Script", cursive;
    font-weight: 400;
    font-size: 2.4em;
    line-height: 1;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.9);
}

.slideshow.fading .ss-img,
.slideshow.fading .ss-overlay { opacity: 0; }
.slideshow.no-overlay .ss-overlay { opacity: 0; }

.ss-empty {
    position: absolute;
    top: 50%;
    width: 100%;
    margin: 0;
    text-align: center;
    color: var(--muted);
}

/* Controls fade out after a few seconds without input */
.ss-ctl { position: absolute; z-index: 5; transition: opacity 0.4s ease; }
.slideshow.idle .ss-ctl { opacity: 0; pointer-events: none; }

.ss-top-left  { top: 16px; left: 16px; }
.ss-top-right { top: 16px; right: 16px; display: flex; align-items: center; gap: 10px; }

.ss-btn, .ss-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid rgba(74, 158, 255, 0.7);
    border-radius: 50%;
    background: rgba(10, 13, 24, 0.45);
    cursor: pointer;
    transition: background 0.15s;
}
.ss-btn:hover, .ss-arrow:hover { background: rgba(74, 158, 255, 0.4); }
.ss-btn svg, .ss-arrow svg { width: 24px; height: 24px; fill: #fff; }

/* Screen orientation dropdown (Auto / Landscape / Portrait), slideshow and viewer */
.orient-select {
    height: 36px;
    padding: 0 28px 0 12px;
    border: 2px solid rgba(74, 158, 255, 0.7);
    border-radius: 18px;
    background: rgba(10, 13, 24, 0.45)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E")
        no-repeat right 6px center / 18px;
    color: #fff;
    font: inherit;
    font-size: 0.85em;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}
.orient-select:hover { background-color: rgba(74, 158, 255, 0.4); }
.orient-select option { background: var(--panel); color: var(--text); }

.ss-counter {
    padding: 4px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.5);
    color: #9aa0a6;
    font-size: 0.82em;
}

#ss-feat .ic-all { display: none; }
.slideshow.all-images #ss-feat .ic-all  { display: block; }
.slideshow.all-images #ss-feat .ic-feat { display: none; }

#ss-play .ic-play { display: none; }
.slideshow.paused #ss-play .ic-play  { display: block; }
.slideshow.paused #ss-play .ic-pause { display: none; }

.ss-arrow {
    top: 50%;
    width: 52px;
    height: 52px;
    margin-top: -26px;
}
.ss-arrow-left  { left: 16px; }
.ss-arrow-right { right: 16px; }

@media (max-width: 600px) {
    .ss-btn { width: 40px; height: 40px; }
    .ss-arrow { width: 44px; height: 44px; margin-top: -22px; }
    .ss-top-left  { top: 10px; left: 10px; }
    .ss-top-right { top: 10px; right: 10px; gap: 8px; }
    .orient-select { height: 32px; font-size: 0.8em; padding: 0 24px 0 10px; }
}
