/* ============================================================
   Galerie – Rebecca & Marcus
   Standalone stylesheet, tuned to match the main wedding site
   (accent #b8d2e0, Cormorant Garamond + Nunito Sans + Alex Brush).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500&family=Nunito+Sans:ital,wght@0,300;0,400;0,600;0,700&display=swap');

:root {
    --accent: #8fb3c9;
    --accent-dark: #7699b1;
    --ink: #1f2328;
    --ink-soft: #6b7178;
    --bg: #faf8f7;
    --bg-2: #f2ece9;
    --line: #eadfd9;
    --white: #ffffff;
    --shadow: 0 18px 50px -20px rgba(60, 45, 40, 0.35);
    --serif: 'Cormorant Garamond', serif;
    --sans: 'Nunito Sans', sans-serif;
    --script: 'Alex Brush', cursive;
    --radius: 4px;
    --maxw: 1360px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink-soft);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--serif);
    color: var(--ink);
    font-weight: 500;
    line-height: 1.2;
    margin: 0 0 .5em;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

::selection { background: rgba(143, 179, 201, .8); color: #fff; }

/* thin accent scrollbar to match main site */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 8px; }

.eyebrow {
    display: inline-block;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .32em;
    text-transform: uppercase;
    color: var(--accent-dark);
    margin-bottom: 14px;
}

/* ===================== Top bar ===================== */
.g-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px clamp(18px, 4vw, 44px);
    transition: background .4s ease, box-shadow .4s ease, padding .4s ease;
}
.g-topbar.solid {
    background: rgba(250, 248, 247, .92);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 var(--line);
    padding-top: 12px;
    padding-bottom: 12px;
}
.g-monogram {
    font-family: var(--script);
    font-size: 30px;
    color: var(--ink);
    line-height: 1;
    transition: color .4s ease;
    cursor: pointer;
}
.g-topbar:not(.solid) .g-monogram,
.g-topbar:not(.solid) .g-topbar-link { color: #fff; }
.g-topbar-nav { display: flex; align-items: center; gap: 26px; }
.g-topbar-link {
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--ink);
    transition: color .3s ease, opacity .3s ease;
    opacity: .85;
    cursor: pointer;
}
.g-topbar-link:hover { opacity: 1; color: var(--accent-dark); }
.g-topbar:not(.solid) .g-topbar-link:hover { color: #fff; opacity: 1; }
@media (max-width: 680px) { .g-topbar-nav .g-topbar-link.hide-sm { display: none; } }

/* ===================== Hero ===================== */
.g-hero {
    position: relative;
    height: 100vh;
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}
.g-hero-bg {
    position: absolute; inset: 0;
    background: #333 center/cover no-repeat;
    transform: scale(1.06);
    will-change: transform;
}
.g-hero::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(25,20,18,.45), rgba(25,20,18,.30) 45%, rgba(25,20,18,.6));
}
.g-hero-inner { position: relative; z-index: 2; padding: 0 20px; }
.g-hero .script {
    font-family: var(--script);
    font-size: clamp(58px, 12vw, 130px);
    color: #fff;
    margin: 0 0 6px;
    text-shadow: 0 6px 40px rgba(0,0,0,.35);
    line-height: 1;
}
.g-hero .lead {
    font-family: var(--sans);
    text-transform: uppercase;
    letter-spacing: .42em;
    font-size: clamp(11px, 2vw, 15px);
    font-weight: 600;
    color: rgba(255,255,255,.92);
    margin: 18px 0 0;
}
.g-hero-rule {
    display: flex; align-items: center; justify-content: center;
    gap: 12px;
    margin: 26px auto 22px;
    color: rgba(255,255,255,.85);
}
.g-hero-rule::before,
.g-hero-rule::after {
    content: '';
    width: 46px; height: 1px;
    background: rgba(255,255,255,.6);
}
.g-hero-rule i { font-size: 13px; }
.g-hero .date {
    font-family: var(--serif);
    font-size: clamp(20px, 3vw, 27px);
    letter-spacing: .06em;
    color: #fff;
    font-weight: 400;
}
.g-hero-scroll {
    position: absolute;
    bottom: 30px; left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: #fff;
    font-size: 22px;
    animation: gbounce 2s infinite;
    opacity: .85;
    cursor: pointer;
}
@keyframes gbounce { 0%,100%{transform:translate(-50%,0)} 50%{transform:translate(-50%,10px)} }

/* ===================== Section shell ===================== */
.g-section { padding: clamp(64px, 9vw, 120px) clamp(18px, 4vw, 44px); }
.g-wrap { max-width: var(--maxw); margin: 0 auto; }
.g-section-head { text-align: center; max-width: 680px; margin: 0 auto clamp(40px, 6vw, 68px); }
.g-section-head h2 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 14px; }
.g-section-head p { margin: 0; font-size: 17px; }

/* ===================== Album overview cards ===================== */
.g-albums {
    display: grid;
    grid-template-columns: 1fr;          /* phones: one album per row */
    gap: clamp(12px, 1.8vw, 22px);
}
@media (min-width: 600px) {
    .g-albums { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 860px) {
    .g-albums { grid-template-columns: repeat(3, 1fr); }
}
.g-album-card {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 3 / 2;
    cursor: pointer;
    box-shadow: var(--shadow);
    background: var(--bg-2);
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
}
.g-album-card.in { opacity: 1; transform: none; }
.g-album-card img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 1.1s cubic-bezier(.2,.7,.2,1);
}
.g-album-card::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(20,16,14,.72) 0%, rgba(20,16,14,.15) 45%, rgba(20,16,14,0) 70%);
    transition: background .5s ease;
}
.g-album-card[data-id="Alle"] img { object-position: 100% 25%; }
.g-album-card:hover img { transform: scale(1.07); }
.g-album-card:hover::after { background: linear-gradient(to top, rgba(20,16,14,.8) 0%, rgba(30,24,20,.25) 55%, rgba(20,16,14,.05) 100%); }
#alben { padding-top: clamp(92px, 11vh, 130px); padding-bottom: clamp(48px, 7vw, 90px); }
.g-section-head { margin-bottom: clamp(30px, 4vw, 46px); }

.g-album-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 2;
    padding: 20px 24px;
    color: #fff;
}
.g-album-caption .count {
    font-family: var(--sans);
    font-size: 11px; font-weight: 700;
    letter-spacing: .22em; text-transform: uppercase;
    color: rgba(255,255,255,.82);
    display: flex; align-items: center; gap: 7px;
    margin-bottom: 6px;
}
.g-album-caption h3 {
    color: #fff;
    font-size: clamp(26px, 3vw, 34px);
    margin: 0 0 2px;
}
.g-album-caption .sub { font-size: 13.5px; color: rgba(255,255,255,.85); margin: 0; line-height: 1.45; }
.g-album-cta {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 12px;
    font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    color: #fff;
    opacity: 0; transform: translateY(8px);
    transition: opacity .4s ease, transform .4s ease, gap .3s ease;
}
.g-album-card:hover .g-album-cta { opacity: 1; transform: none; }
.g-album-card:hover .g-album-cta { gap: 13px; }

/* ===================== Album view ===================== */
.g-album-view { display: none; }
.g-album-view.active { display: block; }
#overview.hidden { display: none; }

.g-album-hero {
    padding: clamp(96px, 12vw, 150px) clamp(18px, 4vw, 44px) clamp(30px, 4vw, 46px);
    text-align: center;
}
.g-back {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: max-content; max-width: 100%;
    margin: 0 auto 22px;           /* own line, centred, above the eyebrow */
    font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    color: var(--ink-soft);
    cursor: pointer;
    transition: color .3s ease, gap .3s ease;
}
.g-back:hover { color: var(--accent-dark); gap: 13px; }
.g-album-hero h1 { font-size: clamp(40px, 6vw, 68px); margin-bottom: 8px; }
.g-album-hero .sub { font-size: 17px; margin: 0 0 26px; }

.g-btn {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
    padding: 13px 30px;
    border-radius: 50px;
    font-family: var(--sans);
    font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 8px 22px -8px rgba(143,179,201,.9);
    transition: background .3s ease, transform .3s ease, box-shadow .3s ease;
}
.g-btn:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 12px 26px -8px rgba(118,153,177,.95); }
.g-btn:active { transform: translateY(0); }
.g-btn.ghost {
    background: transparent; color: var(--accent-dark);
    box-shadow: none;
}
.g-btn.ghost:hover { background: var(--accent); color: #fff; }
.g-btn i { font-size: 15px; }

/* ===================== Photo grid (12 cols, Bootstrap-style) =====================
   Querformat = span 6 (col-6), Hochformat = span 3 (col-3).
   --g-col ist eine Spaltenbreite: Gesamtbreite minus 13 gaps
   (11 innen + 2 außen als Padding) geteilt durch 12.
   Eine Zeile ist 4 Spalteneinheiten hoch -> col-6 wird exakt 3:2,
   col-3 wird 3:4; was nicht passt, schneidet object-fit: cover zu. */
.g-grid {
    --g-gap: 6px;
    --g-col: calc((min(100vw, var(--maxw)) - 13 * var(--g-gap)) / 12);
    max-width: var(--maxw);
    margin: 0 auto clamp(60px, 8vw, 100px);
    padding: var(--g-gap);
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: calc(4 * var(--g-col) + 3 * var(--g-gap));
    grid-auto-flow: dense;
    gap: var(--g-gap);
}
.g-tile.is-wide { grid-column: span 6; }
.g-tile.is-tall { grid-column: span 3; }
@media (max-width: 700px) {
    .g-grid { grid-auto-rows: calc(8 * var(--g-col) + 7 * var(--g-gap)); }
    .g-tile.is-wide { grid-column: span 12; }
    .g-tile.is-tall { grid-column: span 6; }
}
.g-tile {
    position: relative;
    overflow: hidden;
    background: var(--bg-2);
    cursor: pointer;
    opacity: 0;
    animation: gfade .6s ease forwards;
}
@keyframes gfade { to { opacity: 1; } }
.g-tile img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .9s cubic-bezier(.2,.7,.2,1), filter .5s ease;
}
.g-tile::after {
    content: '';
    position: absolute; inset: 0;
    background: rgba(184,210,224,0);
    transition: background .4s ease;
}
.g-tile:hover img { transform: scale(1.06); }
.g-tile:hover::after { background: rgba(31,35,40,.12); }
.g-tile .g-tile-dl {
    position: absolute;
    top: 10px; right: 10px;
    z-index: 3;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    color: var(--ink);
    font-size: 15px;
    opacity: 0; transform: translateY(-6px) scale(.9);
    transition: opacity .3s ease, transform .3s ease, background .3s ease, color .3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.g-tile:hover .g-tile-dl { opacity: 1; transform: none; }
.g-tile .g-tile-dl:hover { background: var(--accent); color: #fff; }

/* ===================== Lightbox ===================== */
.g-lb {
    position: fixed; inset: 0;
    z-index: 500;
    background: rgba(16, 13, 12, .96);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
    -webkit-user-select: none; user-select: none;
}
.g-lb.open { opacity: 1; visibility: visible; }
.g-lb-stage {
    position: relative;
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    padding: 5vh 6vw;
}
.g-lb-img {
    max-width: 100%; max-height: 90vh;
    width: auto; height: auto;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,.8);
    opacity: 0;
    transition: opacity .3s ease;
    background: rgba(255,255,255,.03);
}
.g-lb-img.loaded { opacity: 1; }
.g-lb-spinner {
    position: absolute;
    width: 42px; height: 42px;
    border: 3px solid rgba(255,255,255,.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: gspin .8s linear infinite;
    pointer-events: none;
    opacity: 0; transition: opacity .2s ease;
}
.g-lb.loading .g-lb-spinner { opacity: 1; }
@keyframes gspin { to { transform: rotate(360deg); } }

.g-lb-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 3;
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px clamp(16px, 3vw, 32px);
    background: linear-gradient(to bottom, rgba(0,0,0,.5), transparent);
    color: #fff;
}
.g-lb-counter { font-family: var(--serif); font-size: 20px; letter-spacing: .05em; }
.g-lb-counter b { font-weight: 600; }
.g-lb-actions { display: flex; align-items: center; gap: 10px; }
.g-lb-btn {
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 17px;
    cursor: pointer;
    transition: background .3s ease, transform .2s ease;
    border: none;
}
.g-lb-btn:hover { background: rgba(255,255,255,.28); }
.g-lb-btn:active { transform: scale(.92); }
.g-lb-btn.dl { background: var(--accent); }
.g-lb-btn.dl:hover { background: var(--accent-dark); }

.g-lb-nav {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    z-index: 3;
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: #fff; font-size: 22px;
    cursor: pointer; border: none;
    transition: background .3s ease, transform .2s ease;
}
.g-lb-nav:hover { background: rgba(255,255,255,.26); }
.g-lb-nav.prev { left: clamp(10px, 2.5vw, 34px); }
.g-lb-nav.next { right: clamp(10px, 2.5vw, 34px); }
.g-lb-nav:active { transform: translateY(-50%) scale(.9); }
.g-lb-caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 3;
    text-align: center;
    padding: 22px 20px;
    color: rgba(255,255,255,.7);
    font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
    background: linear-gradient(to top, rgba(0,0,0,.45), transparent);
    pointer-events: none;
}
@media (max-width: 680px) {
    .g-lb-nav { width: 44px; height: 44px; font-size: 18px; }
    .g-lb-stage { padding: 8vh 2vw; }
    .g-lb-caption { display: none; }
}

/* ===================== Footer ===================== */
.g-footer {
    text-align: center;
    padding: clamp(56px, 8vw, 96px) 20px clamp(46px, 6vw, 70px);
    background: var(--bg-2);
    border-top: 1px solid var(--line);
}
.g-footer .script { font-family: var(--script); font-size: 46px; color: var(--ink); margin: 0 0 8px; }
.g-footer .date { font-family: var(--serif); font-size: 18px; letter-spacing: .08em; color: var(--ink-soft); margin: 0 0 22px; }
.g-footer .back-home {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    color: var(--accent-dark);
    transition: gap .3s ease;
    cursor: pointer;
}
.g-footer .back-home:hover { gap: 13px; }

/* ===================== Mobile refinements ===================== */
@media (max-width: 560px) {
    .g-topbar { padding: 12px 16px; }
    .g-monogram { font-size: 23px; }
    .g-topbar-nav { gap: 14px; }
    .g-topbar-link { font-size: 10.5px; letter-spacing: .12em; }
    .g-btn {
        font-size: 12px;
        padding: 12px 22px;
        max-width: 100%;
        text-align: center;
        white-space: normal;
        line-height: 1.35;
    }
    .g-album-hero h1 { font-size: 40px; }
    .g-hero .lead { letter-spacing: .3em; }

    /* One full-width album per row on phones – there's room for the subtitle,
       only the hover-CTA (no hover on touch) stays hidden. */
    .g-album-caption { padding: 18px 20px; }
    .g-album-caption h3 { font-size: 26px; }
    .g-album-cta { display: none; }
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .g-tile { opacity: 1 !important; }
}
