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

html {
    font-size: 16px;
}

body {
    font-family: 'Space Mono', monospace;
    margin: 0;
    overflow: hidden;
    /* Letterbox-Farbe passend zu den Bildkanten */
    background: #c8a878;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
}

/* ===== Page – immer exakt das Seitenverhältnis des Bildes (5211:3411) ===== */
.page {
    position: relative;
    container-type: size;
    /* Bild passt immer, egal wie breit oder hoch das Fenster ist */
    width: min(100vw, calc(100vh * 5211 / 3411));
    height: min(100vh, calc(100vw * 3411 / 5211));
    flex-shrink: 0;
    background: url('images/Hintergrund.jpg') no-repeat center center;
    background-size: cover;
}

/* ===== Patches – schweben über dem Bild ===== */
.patch {
    position: absolute;
    font-family: 'Space Mono', monospace;
    color: #2a2318;
}

.patch-clickable {
    cursor: pointer;
    transition: color 0.2s;
}

.patch-clickable:hover {
    color: #c0392b;
}

/* ===== Titel – links oben, oberes Rechteck ===== */
.patch-titel {
    top: 19%;
    left: 6.6%;
    width: 23%;
}

.patch-titel h1 {
    font-size: 2.1cqw;
    font-weight: 600;
    line-height: 1.2;
}

/* ===== Untertitel – links oben, unteres Rechteck ===== */
.patch-untertitel {
    top: 28.2%;
    left: 11.1%;
    width: 23%;
}

.patch-untertitel h2 {
    font-size: 0.65cqw;
    font-weight: 400;
    line-height: 1.3;
}

/* ===== Buchen – links unten ===== */
.patch-buchen {
    top: 67%;
    left: 12.5%;
    width: 23%;
}

.patch-buchen span {
    font-size: 1.5cqw;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ===== Wir – Mitte ===== */
.patch-wir {
    top: 51%;
    left: 55%;
    width: 16%;
}

.patch-wir span {
    font-size: 2cqw;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ===== Das Projekt – rechts oben ===== */
.patch-projekt {
    top: 34%;
    left: 50%;
    width: 17%;
}

.patch-projekt span {
    font-size: 1.7cqw;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ===== Making Of – rechts unten, oberes Rechteck ===== */
.patch-makingof {
    top: 56%;
    left: 73.5%;
    width: 11%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: -4px;
}

.makingof-vertical {
    font-size: 1.7cqw;
    font-weight: 700;
    text-transform: uppercase;
    writing-mode: vertical-lr;
    text-orientation: upright;
    letter-spacing: -0.35em;
}

.makingof-horizontal {
    font-size: 1.7cqw;
    font-weight: 700;
    text-transform: uppercase;
}

/* ===== Kontakt – rechts unten, unteres Rechteck ===== */
.patch-kontakt {
    top: 88%;
    left: 79%;
    width: 12%;
}

.patch-kontakt span {
    font-size: 1.8cqw;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ===== Slot-Buttons (im Termine-Modal) ===== */
.date-block {
    margin-bottom: 16px;
}

.date-block:last-child {
    margin-bottom: 0;
}

.date-heading {
    font-size: 0.95rem;
    color: #f0e8d8;
    line-height: 1.3;
    margin-bottom: 4px;
}

.slots {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.slot-btn {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    color: #f0e8d8;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    padding: 4px 8px;
    border-radius: 3px;
    transition: background 0.2s, color 0.2s;
}

.slot-btn:hover:not(:disabled) {
    background: rgba(192, 57, 43, 0.2);
    color: #c0392b;
}

.slot-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.seat-info {
    font-size: 0.8rem;
    color: #c0392b;
}

.seat-info.sold-out {
    color: #c0392b;
}

/* ===== Modals ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(42, 35, 24, 0.7);
    z-index: 100;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.modal-overlay.active {
    display: flex;
}

.paper-modal {
    background: transparent;
    border: none;
    border-radius: 2px;
    padding: 30px;
    max-width: 520px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: none;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.paper-modal h2 {
    font-family: 'Space Mono', monospace;
    font-size: 1.8rem;
    color: #f0e8d8;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(240, 232, 216, 0.4);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.8rem;
    color: #f0e8d8;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #c0392b;
}

.modal-content {
    font-size: 1.05rem;
    color: #f0e8d8;
    line-height: 1.6;
}

.modal-content p {
    margin-bottom: 12px;
}

/* ===== Team Grid ===== */
.team-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.team-member {
    text-align: center;
    padding: 12px;
    border: none;
    border-radius: 3px;
    background: rgba(235, 225, 205, 0.3);
}

.placeholder-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #b5a88c;
    margin: 0 auto 10px;
    border: 2px solid #3a3025;
}

.team-member h4 {
    font-family: 'Space Mono', monospace;
    font-size: 1.15rem;
    color: #2a2318;
    margin-bottom: 2px;
}

.team-member .role {
    font-size: 0.9rem;
    color: #6b5e4b;
    margin-bottom: 6px;
}

.insta-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #8a5a3a;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.insta-link:hover {
    color: #c0392b;
}

.insta-icon {
    width: 16px;
    height: 16px;
}

/* ===== Gallery ===== */
.gallery {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: 3px;
    overflow: hidden;
    border: none;
}

.placeholder-gallery {
    background:
        linear-gradient(135deg, #b5a88c 0%, #a89878 50%, #b5a88c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-gallery::after {
    content: '\1F4F7';
    font-size: 1.5rem;
    opacity: 0.5;
}

/* ===== Buchungsformular ===== */
.booking-modal {
    max-width: 420px;
}

.booking-info {
    font-size: 1.1rem;
    color: #c0392b;
    font-weight: 600;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 1rem;
    color: #f0e8d8;
    margin-bottom: 4px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    border: 2px solid rgba(240, 232, 216, 0.4);
    border-radius: 3px;
    background: rgba(255,255,255,0.1);
    color: #f0e8d8;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #c0392b;
}

.form-group input::placeholder {
    color: rgba(240, 232, 216, 0.4);
}

.submit-btn {
    font-family: 'Space Mono', monospace;
    font-size: 1.15rem;
    color: #fff;
    background: #c0392b;
    border: none;
    padding: 12px 28px;
    cursor: pointer;
    border-radius: 3px;
    width: 100%;
    margin-top: 6px;
    transition: background 0.2s, transform 0.1s;
}

.submit-btn:hover {
    background: #a93226;
}

.submit-btn:active {
    transform: scale(0.98);
}

.booking-success {
    text-align: center;
    padding: 20px 0;
}

.booking-success p {
    font-size: 1.1rem;
    color: #f0e8d8;
    margin-bottom: 8px;
}

/* ===== Footer-Links (Impressum + Datenschutz) ===== */
.footer-links {
    position: absolute;
    bottom: 1%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1.5em;
    z-index: 5;
}
.footer-link {
    font-size: 0.7cqw;
    color: rgba(42, 35, 24, 0.45);
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s;
    background: none;
    border: none;
    font-family: 'Space Mono', monospace;
    padding: 0;
}
.footer-link:hover { color: rgba(42, 35, 24, 0.85); }

/* ===== Mobile Banner ===== */
#mobile-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(42, 35, 24, 0.92);
    color: #f0e8d8;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    padding: 12px 16px;
    z-index: 9999;
    align-items: center;
    gap: 12px;
}
#mobile-banner span { flex: 1; }
#mobile-banner button {
    background: none;
    border: none;
    color: #f0e8d8;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    flex-shrink: 0;
}
@media (max-width: 900px) {
    #mobile-banner { display: flex; }
}

/* ===== Datenschutz-Modal ===== */
.datenschutz-modal { max-width: 620px; }

.datenschutz-modal h3 {
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    color: #2a2318;
    margin: 16px 0 6px;
}

.datenschutz-modal p,
.datenschutz-modal li {
    font-size: 0.88rem;
    color: #3a3025;
    line-height: 1.65;
    margin-bottom: 8px;
}

.datenschutz-modal ul {
    padding-left: 1.4em;
    margin-bottom: 8px;
}

.datenschutz-modal .placeholder {
    background: rgba(192, 57, 43, 0.12);
    color: #c0392b;
    border-radius: 2px;
    padding: 0 3px;
    font-style: italic;
}

/* ===== Scrollbar ===== */
.paper-modal::-webkit-scrollbar {
    width: 6px;
}

.paper-modal::-webkit-scrollbar-track {
    background: transparent;
}

.paper-modal::-webkit-scrollbar-thumb {
    background: #8a7d6b;
    border-radius: 3px;
}
