/* ============================================================
   STYLES.CSS — Globales Design-System
   Rainer Günter Galerie
   
   CMS-HINWEIS: Farben und Schriften zentral in :root anpassen.
   ============================================================ */

/* ============================================================
   CSS VARIABLEN (Design Tokens)
   ============================================================ */
:root {
    /* Farben */
    --gold:        #c9a96e;
    --gold-dark:   #a8894f;
    --gold-light:  #e8d5b0;
    --warm-white:  #faf8f4;
    --cream:       #f3ede3;
    --charcoal:    #2a2520;
    --mid-gray:    #6b6259;
    --light-gray:  #e0d9d0;

    /* Typografie - Systemfonts (lizenzfrei, gerätunabhängig) */
    --font-display: 'Georgia', serif;
    --font-serif:   'Georgia', 'Garamond', serif;
    --font-sans:    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', system-ui, sans-serif;

    /* Abstände */
    --space-xs:  0.5rem;
    --space-s:   1rem;
    --space-m:   1.5rem;
    --space-l:   2.5rem;
    --space-xl:  4rem;

    /* Header-Höhe (für scroll-margin) */
    --header-h: 76px;

    /* Übergänge */
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition: 0.3s var(--ease);
}

/* ============================================================
   RESET & BASIS
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-sans);
    background-color: var(--warm-white);
    color: var(--charcoal);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

/* Anker-Offset für sticky Header */
h1[id], h2[id], h3[id], section[id] {
    scroll-margin-top: calc(var(--header-h) + 1rem);
}

/* ============================================================
   TYPOGRAFIE
   ============================================================ */
h1 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    line-height: 1.15;
    color: var(--charcoal);
    letter-spacing: -0.02em;
}

h2 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    line-height: 1.3;
}

h3 {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.lead {
    font-family: var(--font-serif);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    font-style: italic;
    color: var(--mid-gray);
    line-height: 1.7;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.75rem 1.5rem;
    border-radius: 2px;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    text-decoration: none;
    border: none;
}

.btn--primary, .btn.cta {
    background-color: var(--gold);
    color: white;
}
.btn--primary:hover, .btn.cta:hover {
    background-color: var(--gold-dark);
}

.btn--secondary {
    background-color: transparent;
    color: var(--gold);
    border: 1.5px solid var(--gold);
}
.btn--secondary:hover {
    background-color: var(--gold);
    color: white;
}

.btn--ghost {
    background-color: transparent;
    color: var(--mid-gray);
    border: 1.5px solid var(--light-gray);
}
.btn--ghost:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.btn--interest {
    background-color: var(--cream);
    color: var(--charcoal);
    border: 1px solid var(--light-gray);
    font-size: 0.78rem;
}
.btn--interest:hover {
    background-color: var(--gold);
    color: white;
    border-color: var(--gold);
}

/* Sold muss immer Vorrang vor Interest/Hover haben */
.btn--sold,
.btn--interest.btn--sold,
.btn--interest.btn--sold:hover {
    background-color: #b33232;
    color: #ffffff;
    border-color: #b33232;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--gold);
    height: var(--header-h);
    padding: 0 var(--space-m);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-link { display: flex; align-items: center; }

#logo {
    height: 52px;
    width: auto;
}

/* Hamburger */
#menu-toggle { display: none; }

nav label.menu-label {
    display: block;
    width: 44px;
    height: 44px;
    cursor: pointer;
    background-image: url('../images/icons/toggle-menu.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    z-index: 1001;
    transition: transform var(--transition);
}

nav ul {
    list-style: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    width: 100%;
    background: var(--gold);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease);
}

nav ul li a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--charcoal);
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 400;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    transition: background var(--transition), padding-left var(--transition);
}

nav ul li a:hover,
nav ul li a.active {
    background-color: var(--gold-dark);
    padding-left: 2rem;
    color: white;
}

#menu-toggle:checked ~ ul { max-height: 400px; }

#menu-toggle:checked + label.menu-label {
    background-image: url('../images/icons/toggle-x.svg');
    transform: rotate(90deg);
}

/* Desktop Navigation */
@media (min-width: 960px) {
    nav label.menu-label { display: none; }
    nav ul {
        position: static;
        max-height: none;
        overflow: visible;
        display: flex;
        flex-direction: row;
        background: transparent;
        width: auto;
    }
    nav ul li a {
        padding: 0.5rem 1rem;
        font-size: 1rem;
        border: none;
        background: transparent;
        white-space: nowrap;
    }
    nav ul li a:hover,
    nav ul li a.active {
        background: transparent;
        color: white;
        padding-left: 1rem;
        text-decoration: underline;
        text-underline-offset: 4px;
    }
}

/* ============================================================
   SCROLL-NACH-OBEN KNOPF
   ============================================================ */
a.oben {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gold);
    color: white;
    font-size: 1.3rem;
    border-radius: 50%;
    text-decoration: none;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

a.oben.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background-color: var(--charcoal);
    color: var(--light-gray);
    text-align: center;
    padding: var(--space-m);
    font-size: 0.85rem;
}

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

footer a:hover { color: white; }
