/* ==========================================================================
   Gewinnspiel der Rosenbrauerei - Stylesheet
   Markenfarben gemäß Corporate Design (Brandbook)
   ========================================================================== */

:root {
    --rot:        #D4021D;
    --rot-dunkel: #A80018;
    --gold:       #C9A227;
    --gold-hell:  #E8C84A;
    --creme:      #F8F4EE;
    --weiss:      #FFFFFF;
    --grau-hell:  #F0EDED;
    --grau:       #6B6B6B;
    --dunkel:     #1A1A1A;

    --radius: 14px;
    --schatten: 0 4px 18px rgba(0,0,0,0.10);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--creme);
    color: var(--dunkel);
    font-family: 'Barlow', sans-serif;
    font-size: 18px;
    line-height: 1.55;
}

.seite {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 18px 48px;
}

/* --- Kopf --- */
.kopf { text-align: center; padding: 8px 0 4px; }
.kopf .logo { max-height: 78px; width: auto; margin-bottom: 14px; }
.kopf h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-size: 2.2rem;
    color: var(--rot);
    margin: 0 0 6px;
    line-height: 1.05;
}
.kopf h1::after {
    content: "";
    display: block;
    width: 64px; height: 4px;
    background: var(--gold);
    margin: 12px auto 0;
    border-radius: 2px;
}
.kopf .gewinn {
    font-weight: 600;
    font-size: 1.15rem;
    margin: 16px auto 8px;
    max-width: 560px;
}
.kopf .hinweis { color: var(--grau); margin: 0 0 8px; }

/* --- Bloecke / Karten --- */
.block {
    background: var(--weiss);
    border-radius: var(--radius);
    box-shadow: var(--schatten);
    padding: 22px 20px;
    margin-top: 22px;
    border: 1px solid rgba(201,162,39,0.18);
}
.block-titel {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 1.4rem;
    color: var(--dunkel);
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--grau-hell);
}

/* --- Fragen --- */
.frage { margin-bottom: 22px; }
.frage:last-child { margin-bottom: 0; }
.frage-label { font-weight: 600; margin: 0 0 12px; }
.frage-nr {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; margin-right: 10px;
    background: var(--rot); color: #fff; border-radius: 50%;
    font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
    font-size: 0.95rem;
}

.optionen { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.optionen-inline { grid-template-columns: 1fr 1fr 1fr; }

.option { position: relative; display: block; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option span {
    display: flex; align-items: center; justify-content: center;
    text-align: center;
    min-height: 54px; padding: 8px 12px;
    background: var(--creme);
    border: 2px solid var(--grau-hell);
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.option input:checked + span {
    background: var(--rot);
    border-color: var(--rot-dunkel);
    color: #fff;
}
.option input:focus-visible + span { outline: 3px solid var(--gold-hell); }

/* --- Eingabefelder --- */
.feld { margin-bottom: 16px; }
.feld:last-child { margin-bottom: 0; }
.feld-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.feld label {
    display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem;
}
.feld input[type="text"],
.feld input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 1.05rem;
    font-family: inherit;
    border: 2px solid var(--grau-hell);
    border-radius: 10px;
    background: var(--creme);
}
.feld input:focus {
    outline: none; border-color: var(--gold); background: #fff;
}

/* --- Unterschrift --- */
.einwilligung { font-size: 0.95rem; color: var(--dunkel); margin: 0 0 14px; }
.signatur-box {
    position: relative;
    width: 100%; height: 200px;
    background: #fff;
    border: 2px dashed var(--gold);
    border-radius: 10px;
    overflow: hidden;
    touch-action: none;
}
#signaturFeld { display: block; width: 100%; height: 100%; }
.signatur-platzhalter {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: var(--grau); font-style: italic; pointer-events: none;
    user-select: none;
}
.signatur-box.hat-inhalt .signatur-platzhalter { display: none; }
.btn-loeschen {
    margin-top: 10px;
    background: transparent;
    border: 2px solid var(--grau);
    color: var(--grau);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    padding: 8px 18px; border-radius: 8px; cursor: pointer;
}
.btn-loeschen:active { background: var(--grau-hell); }

/* --- Checkboxen --- */
.check {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 6px 0; cursor: pointer;
}
.check + .check { margin-top: 10px; }
.check input { width: 26px; height: 26px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--rot); }
.check a { color: var(--rot); font-weight: 600; }

/* --- Buttons --- */
.btn-absenden {
    display: block; width: 100%;
    margin-top: 26px;
    background: var(--rot); color: #fff;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
    font-size: 1.3rem;
    padding: 18px; border: none; border-radius: 12px;
    cursor: pointer; transition: background 0.15s, transform 0.1s;
}
.btn-absenden:hover { background: var(--rot-dunkel); }
.btn-absenden:active { transform: translateY(1px); }
.btn-absenden:disabled { opacity: 0.6; cursor: not-allowed; }

.formular-fehler {
    color: var(--rot-dunkel); font-weight: 600; text-align: center;
    margin: 18px 0 0; min-height: 1.2em;
}

.fuss { text-align: center; color: var(--grau); font-size: 0.85rem; margin-top: 26px; }

/* --- Fehler-Markierung --- */
.frage.fehler .optionen .option span,
.feld.fehler input,
.signatur-box.fehler { border-color: var(--rot); }
.check.fehler span { color: var(--rot); }

/* --- Popup --- */
.popup-overlay, .danke-overlay {
    position: fixed; inset: 0;
    background: rgba(26,26,26,0.65);
    display: none; align-items: center; justify-content: center;
    padding: 20px; z-index: 1000;
}
.popup-overlay.offen, .danke-overlay.offen { display: flex; }
.popup {
    background: #fff; border-radius: var(--radius);
    max-width: 680px; width: 100%; max-height: 86vh;
    display: flex; flex-direction: column; overflow: hidden;
}
.popup-kopf {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; background: var(--rot); color: #fff;
}
.popup-kopf h2 { margin: 0; font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; font-size: 1.3rem; }
.popup-schliessen {
    background: none; border: none; color: #fff; font-size: 2rem;
    line-height: 1; cursor: pointer; padding: 0 6px;
}
.popup-inhalt { padding: 20px 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.popup-inhalt h2 { font-family: 'Barlow Condensed', sans-serif; color: var(--rot); font-size: 1.25rem; margin: 22px 0 8px; }
.popup-inhalt h3 { font-size: 1.05rem; margin: 18px 0 6px; }
.popup-inhalt p { font-size: 0.95rem; margin: 0 0 10px; }

/* --- Danke --- */
.danke { background: #fff; border-radius: var(--radius); padding: 44px 30px; text-align: center; max-width: 460px; }
.danke-haken {
    width: 84px; height: 84px; margin: 0 auto 18px;
    background: var(--rot); color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem;
}
.danke h2 { font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; color: var(--rot); font-size: 2rem; margin: 0 0 10px; }
.danke p { color: var(--dunkel); margin: 0; }

/* --- Schmale Geräte --- */
@media (max-width: 480px) {
    .optionen { grid-template-columns: 1fr; }
    .optionen-inline { grid-template-columns: 1fr 1fr 1fr; }
    .feld-reihe { grid-template-columns: 1fr; }
    .kopf h1 { font-size: 1.8rem; }
}
