/* =========================================================
   Buchbinderei Prouza – Neues Homepage-Design
   Reines CSS, kein Framework. Palette: warm & handwerklich.
   ========================================================= */

:root {
    --paper: #f8f3e9;
    --paper-alt: #efe4cf;
    --paper-line: #ddc9a3;
    --ink: #2a2018;
    --ink-soft: #5b4a3a;
    --leather: #6b3f24;
    --leather-dark: #3f2414;
    --leather-light: #a9764a;
    --gold: #b3822f;
    --gold-light: #d9ab5c;
    --white: #fffdf8;

    --font-heading: 'Lora', Georgia, serif;
    --font-body: 'Montserrat', 'Segoe UI', sans-serif;

    --max-width: 1140px;
    --nav-height: 76px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--leather);
    text-decoration: none;
}

a:hover {
    color: var(--gold);
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--leather-dark);
    line-height: 1.25;
    margin: 0 0 .6em;
}

h2 {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
}

h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    margin: .5em auto 0;
    background: var(--gold);
}

.text-center h2::after {
    margin: .5em auto 0;
}

h3 {
    font-size: 1.2rem;
    color: var(--leather);
}

p {
    margin: 0 0 1em;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5.5rem 0;
    scroll-margin-top: var(--nav-height);
}

.section-alt {
    background: var(--paper-alt);
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.lead {
    font-size: 1.15rem;
    color: var(--ink-soft);
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: .78rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: .6em;
}

.narrow {
    max-width: 760px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: .8em 1.8em;
    border: 2px solid var(--leather);
    color: var(--leather-dark);
    border-radius: 2px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .9rem;
    letter-spacing: .04em;
    transition: background .2s ease, color .2s ease;
}

.btn:hover {
    background: var(--leather);
    color: var(--white);
}

/* ---------- Skip link ---------- */
.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--leather-dark);
    color: var(--white);
    padding: .8em 1.2em;
    z-index: 1000;
}

.skip-link:focus {
    left: 0;
}

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 500;
    background: transparent;
    transition: background .3s ease, box-shadow .3s ease;
}

.navbar .container {
    height: 100%;
}

.navbar.is-scrolled {
    background: rgba(42, 32, 24, .94);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-family: var(--font-heading);
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 600;
}

.navbar-brand:hover {
    color: var(--gold-light);
}

.navbar-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255, 255, 255, .6);
    color: var(--white);
    padding: .5em .7em;
    border-radius: 3px;
    cursor: pointer;
}

.navbar-nav {
    list-style: none;
    display: flex;
    gap: 1.9rem;
    margin: 0;
    padding: 0;
}

.navbar-nav a {
    color: rgba(255, 253, 248, .88);
    font-size: .88rem;
    letter-spacing: .03em;
    font-weight: 500;
    padding: .3em 0;
    border-bottom: 2px solid transparent;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--white);
    border-bottom-color: var(--gold);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(180deg, rgba(30, 20, 12, .78), rgba(30, 20, 12, .62) 55%, rgba(30, 20, 12, .85)),
        url('../img/gallery/process/001.jpg') center / cover no-repeat;
    color: var(--white);
    padding: var(--nav-height) 1.5rem 4rem;
}

.hero-inner {
    max-width: 720px;
}

.hero .eyebrow {
    color: var(--gold-light);
}

.hero h1 {
    color: var(--white);
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    margin-bottom: .3em;
}

.hero-tagline {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.3rem;
    color: rgba(255, 253, 248, .92);
    margin-bottom: 1.8em;
}

.hero-scroll {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 2px solid rgba(255, 255, 255, .7);
    border-radius: 50%;
    color: var(--white);
    animation: bounce 2.2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(8px); }
    60% { transform: translateY(4px); }
}

/* ---------- Notice banner ---------- */
.notice-bar {
    background: var(--gold);
    color: var(--leather-dark);
    text-align: center;
    padding: .9rem 1.5rem;
    font-family: var(--font-body);
}

.notice-bar strong {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    margin-right: .4em;
}

/* ---------- About ---------- */
.about-block + .about-block {
    margin-top: 3rem;
}

/* ---------- Products ---------- */
.product-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 3.5rem 0;
    border-bottom: 1px solid var(--paper-line);
}

.product-row:last-of-type {
    border-bottom: none;
}

.product-row.reverse .product-copy {
    order: 2;
}

.product-row img {
    border-radius: 4px;
    box-shadow: 0 18px 40px -18px rgba(42, 32, 24, .45);
}

.product-copy h2::after {
    margin: .5em 0 0;
}

.product-copy ul {
    padding-left: 1.2em;
    margin: 0;
}

.product-copy li {
    margin-bottom: .5em;
    color: var(--ink-soft);
}

.unique-banner {
    text-align: center;
    margin-top: 3.5rem;
}

.unique-banner h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--leather-dark);
}

/* ---------- Repair / Vorher-Nachher ---------- */
.repair-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 760px;
    margin: 2.5rem auto 0;
}

.repair-compare figure {
    margin: 0;
    position: relative;
}

.repair-compare img {
    border-radius: 4px;
    box-shadow: 0 18px 40px -18px rgba(42, 32, 24, .5);
}

.repair-compare figcaption {
    margin-top: .7em;
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--ink-soft);
}

/* ---------- Gallery ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.gallery-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 4 / 3;
    background: var(--leather-dark);
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.gallery-card:hover img {
    transform: scale(1.08);
}

.gallery-card .caption {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 1.2rem;
    background: linear-gradient(180deg, transparent 40%, rgba(20, 14, 8, .88));
}

.gallery-card .caption span {
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    text-align: left;
}

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.contact-block h2 {
    text-align: left;
}

.contact-block h2::after {
    margin: .5em 0 0;
}

.icon-line {
    display: flex;
    gap: .7em;
    margin-bottom: .5em;
}

.icon-line svg {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: .25em;
    color: var(--gold);
}

.route-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.map-responsive {
    position: relative;
    overflow: hidden;
    padding-top: 42%;
    border-radius: 4px;
    box-shadow: 0 18px 40px -18px rgba(42, 32, 24, .45);
}

.map-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------- Subpage header (galleries, impressum, audio/video) ---------- */
.navbar-brand.is-back {
    display: inline-flex;
    align-items: center;
    gap: .5em;
}

.navbar-brand.is-back svg {
    width: 16px;
    height: 16px;
}

.page-hero {
    position: relative;
    min-height: 42vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(180deg, rgba(30, 20, 12, .72), rgba(30, 20, 12, .8)),
        var(--page-hero-img, none) center / cover no-repeat;
    background-color: var(--leather-dark);
    color: var(--white);
    padding: calc(var(--nav-height) + 2.5rem) 1.5rem 3rem;
}

.page-hero h1 {
    color: var(--white);
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    margin-bottom: .3em;
}

.page-hero p {
    max-width: 620px;
    margin: 0 auto;
    color: rgba(255, 253, 248, .88);
}

/* ---------- Thumbnail grid + lightbox ---------- */
.thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.thumb-grid button {
    all: unset;
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 1 / 1;
    background: var(--paper-alt);
    cursor: zoom-in;
}

.thumb-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.thumb-grid button:hover img {
    transform: scale(1.07);
}

.thumb-grid button:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(20, 14, 8, .94);
    padding: 4rem 1.5rem;
}

.lightbox.is-open {
    display: flex;
}

.lightbox-figure {
    max-width: min(1100px, 92vw);
    max-height: 84vh;
    text-align: center;
}

.lightbox-figure img {
    max-width: 100%;
    max-height: 74vh;
    border-radius: 3px;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .6);
    margin: 0 auto;
}

.lightbox-caption {
    color: rgba(255, 253, 248, .9);
    font-family: var(--font-heading);
    font-style: italic;
    margin-top: 1rem;
}

.lightbox-caption:empty {
    display: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    background: rgba(255, 253, 248, .1);
    border: 1px solid rgba(255, 253, 248, .35);
    color: var(--white);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 253, 248, .2);
}

.lightbox-close {
    top: 1.5rem;
    right: 1.5rem;
}

.lightbox-prev {
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 640px) {
    .thumb-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: .6rem;
    }

    .lightbox-prev, .lightbox-next {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
}

/* ---------- Media page (Audio & Video) ---------- */
.media-list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.media-item {
    text-align: center;
}

.media-item audio,
.media-item video {
    width: 100%;
    border-radius: 4px;
    background: var(--paper-alt);
}

.media-item h3 {
    margin-top: 1.2rem;
}

/* ---------- Legal / text pages (Impressum) ---------- */
.legal-content h2 {
    text-align: left;
    margin-top: 2em;
}

.legal-content h2::after {
    margin: .5em 0 0;
}

.legal-content h3 {
    margin-top: 1.6em;
}

.legal-content p {
    color: var(--ink-soft);
}

/* ---------- 404 ---------- */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--paper);
}

.error-page .eyebrow {
    color: var(--gold);
}

.error-page h1 {
    font-size: clamp(3rem, 8vw, 5rem);
}

/* ---------- Footer ---------- */
footer {
    background: var(--leather-dark);
    color: rgba(255, 253, 248, .75);
    text-align: center;
    padding: 2.2rem 1.5rem;
    font-size: .9rem;
}

footer a {
    color: var(--gold-light);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .contact-grid,
    .route-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 780px) {
    .navbar-toggle {
        display: inline-flex;
    }

    .navbar-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(42, 32, 24, .97);
        padding: 1rem 1.5rem 1.5rem;
        gap: .3rem;
        display: none;
    }

    .navbar-nav.is-open {
        display: flex;
    }

    .navbar-nav a {
        display: block;
        padding: .6em 0;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
    }

    .product-row,
    .product-row.reverse .product-copy {
        grid-template-columns: 1fr;
        order: initial;
    }

    .product-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-row.reverse .product-image {
        order: -1;
    }

    .repair-compare {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 3.5rem 0;
    }
}
