/* Gestaltung der Seite (Option 1: klar und freundlich).
   Alle Farben und Schriften stehen oben als Variablen, damit sie an einer Stelle änderbar sind. */

@font-face { font-family: 'Fredoka'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/fredoka-600.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/nunito-400.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/nunito-700.woff2') format('woff2'); }
/* Nur für die Namen in der Vorschau (Auswahl der Schriften, siehe Tabelle optionswerte, Gruppe schrift). */
@font-face { font-family: 'Caveat'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/caveat-700.woff2') format('woff2'); }
@font-face { font-family: 'Patrick Hand'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/patrick-hand-400.woff2') format('woff2'); }
@font-face { font-family: 'Dancing Script'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/dancing-script-700.woff2') format('woff2'); }
@font-face { font-family: 'Pacifico'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/pacifico-400.woff2') format('woff2'); }

:root {
    --seite: #ffffff;
    --unterlage: #f1eeea;
    --text: #2a2522;
    --text-leise: #6b625b;
    --linie: #e4e0da;
    --akzent: #ffa000;
    --akzent-dunkel: #d98700;
    --fehler: #b3261e;
    --schrift-text: 'Nunito', system-ui, sans-serif;
    --schrift-titel: 'Fredoka', 'Nunito', system-ui, sans-serif;
    --breite: 1160px;
    --rand: 18px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* Das Attribut hidden muss immer gewinnen, auch gegen display: grid o. ä. */
[hidden] { display: none !important; }

body {
    margin: 0;
    background: var(--seite);
    color: var(--text);
    font: 400 18px/1.5 var(--schrift-text);
}

h1, h2 { font-family: var(--schrift-titel); font-weight: 600; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(34px, 6vw, 56px); }
h2 { font-size: clamp(24px, 3.4vw, 32px); }
p { margin: 0 0 14px; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--akzent-dunkel); }

:focus-visible { outline: 3px solid var(--akzent); outline-offset: 3px; border-radius: 4px; }

.nur-leser { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.huelle { max-width: var(--breite); margin: 0 auto; padding: 0 var(--rand); }

/* Kopf */
.kopf { padding: 20px 0 6px; }
.logo { display: block; width: clamp(150px, 26vw, 230px); height: auto; }

.kopfzeile { display: grid; grid-template-columns: minmax(0, 1fr); }

/* Fertige Puschen: eine Reihe leicht schiefer Fotos zum Anklicken (wie aufgehängte Abzüge) */
.vorlagen h2 { font-size: 18px; margin: 6px 0 2px; }
.vorlagen ul { display: flex; gap: 14px; list-style: none; margin: 0; padding: 8px 4px 12px; overflow-x: auto; scroll-snap-type: x proximity; }
.vorlagen li { flex: none; scroll-snap-align: start; }
.vorlagen a { display: block; width: 104px; color: inherit; text-decoration: none; transform: rotate(-1.6deg); transition: transform .15s ease; }
.vorlagen li:nth-child(even) a { transform: rotate(1.4deg); }
.vorlagen a:hover, .vorlagen a:focus-visible { transform: rotate(0) scale(1.05); }
.vorlagen img { display: block; width: 104px; height: 104px; object-fit: cover; background: #fff; border: 3px solid #fff; border-radius: 12px; box-shadow: 0 2px 7px rgba(42, 37, 34, .28); }
.vorlagen small { display: block; margin-top: 2px; font-size: 12px; font-weight: 700; line-height: 1.2; text-align: center; color: var(--text-leise); }
.vorlagen span { display: block; margin-top: 6px; font-size: 14px; font-weight: 700; line-height: 1.2; text-align: center; }

/* Foto der Vorlage: kleines Bild neben dem Preis, Klick öffnet die Großansicht */
.vorbild { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; font: 700 13px/1.2 var(--schrift-text); color: var(--text-leise); }
.vorbild img { width: 46px; height: 46px; object-fit: cover; border: 2px solid #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(42, 37, 34, .4); transform: rotate(-3deg); }
.vorbild span { display: none; }
.foto-dialog { width: min(92vw, 640px); padding: 14px; border: 0; border-radius: 16px; color: var(--text); }
.foto-dialog::backdrop { background: rgba(42, 37, 34, .6); }
.foto-dialog img { display: block; width: 100%; height: auto; max-height: calc(92vh - 130px); object-fit: contain; border-radius: 10px; background: #f1eeea; }
.foto-dialog h2 { font-size: 20px; margin: 10px 0 2px; }
.foto-dialog p { margin: 0; font-size: 14px; color: var(--text-leise); }
.foto-dialog .zu { position: absolute; top: 20px; right: 20px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .35); font: 600 26px/1 var(--schrift-titel); cursor: pointer; }

/* Einleitung */
.intro { padding: 18px 0 18px; }
.intro h1 { margin-bottom: 12px; }
.intro p { max-width: 54ch; font-size: 20px; color: var(--text-leise); }

/* Konfigurator: auf dem Handy oben die Vorschau (bleibt stehen), darunter die Schritte.
   Auf dem Laptop links die Schritte, rechts die Vorschau. */
.konfigurator { display: grid; gap: 0; padding-bottom: 44px; }
.vorschau-spalte { position: sticky; top: 0; z-index: 5; background: var(--seite); padding: 6px 0 8px; }
.unterlage { background: var(--unterlage); border-radius: 16px; padding: 10px 12px 6px; }
.unterlage svg { display: block; width: 100%; height: auto; max-height: 25vh; margin: 0 auto; }
.preisleiste { display: flex; align-items: center; gap: 4px 10px; margin: 8px 4px 0; font-size: 17px; }
.preisleiste strong { font: 600 28px var(--schrift-titel); margin-left: auto; }
.weiter { display: none; }
.vorschau-hinweis { font-size: 14px; color: var(--text-leise); text-align: center; margin: 2px 6px 4px; }

.schritt { border-top: 1px solid var(--linie); padding: 24px 0 26px; }
.schritt h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.nr {
    display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
    background: var(--akzent); color: var(--text); font: 600 20px var(--schrift-titel); flex: none; transform: rotate(-4deg);
}
.hilfe { font-size: 15px; color: var(--text-leise); max-width: 60ch; margin: 10px 0 0; }
.info { font-weight: 700; margin: 10px 0 0; min-height: 1.5em; }
.schritt fieldset + fieldset { margin-top: 18px; }
.kappe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 12px; }
.kappe-name { font-weight: 700; font-size: 16px; min-width: 112px; }
.feld { margin-top: 16px; }
.feld > label:not(.haken) { display: block; font-weight: 700; font-size: 16px; margin-bottom: 6px; }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font: 700 16px var(--schrift-text); padding: 0; margin-bottom: 8px; }
legend small { font-weight: 400; color: var(--text-leise); }

.punkte { display: flex; flex-wrap: wrap; gap: 6px; }
.punkt { position: relative; display: inline-block; cursor: pointer; }
.punkt input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.punkt .farbe {
    display: block; width: 36px; height: 36px; border-radius: 50%;
    background: var(--farbe, #ccc); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .14);
    transition: transform .12s ease;
}
.punkt:hover .farbe { transform: scale(1.08); }
/* Aktuell nicht verfügbare Farbe: ausgegraut, durchgestrichen, nicht wählbar. */
.punkt.nicht-verfuegbar, .punkt.nicht-verfuegbar input { cursor: not-allowed; }
.punkt.nicht-verfuegbar .farbe { position: relative; opacity: .4; }
.punkt.nicht-verfuegbar:hover .farbe { transform: none; }
.punkt.nicht-verfuegbar .farbe::after { content: ''; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: var(--text); transform: rotate(45deg); }
.vorlage-hinweis { margin: 8px 0 0; padding: 8px 10px; border: 1px solid var(--akzent); border-radius: 8px; background: #fff8e8; font-size: 14px; }
.punkt input:checked + .farbe { box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .14), 0 0 0 3px var(--seite), 0 0 0 6px var(--text); }
.punkt input:focus-visible + .farbe { outline: 3px solid var(--akzent); outline-offset: 4px; }

.wahl { display: flex; flex-wrap: wrap; gap: 8px; }
.wahl label {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 2px solid var(--linie);
    border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 16px; background: var(--seite);
}
.wahl label:has(input:checked) { border-color: var(--text); background: var(--unterlage); }
.wahl label:has(input:focus-visible) { outline: 3px solid var(--akzent); outline-offset: 2px; }
.wahl input { margin: 0; accent-color: var(--text); }
/* Größen: kleine Zahlenfelder ohne sichtbaren Radio-Knopf */
.groessen label { min-width: 52px; justify-content: center; padding: 8px 10px; }
.groessen input { position: absolute; opacity: 0; width: 0; height: 0; }
.groessen label { position: relative; }

.eingabe { display: block; width: min(100%, 360px); font: 400 19px var(--schrift-text); padding: 10px 14px; border: 2px solid var(--linie); border-radius: 12px; color: var(--text); background: var(--seite); }
textarea.eingabe { width: min(100%, 520px); resize: vertical; }
.eingabe:focus-visible { border-color: var(--text); outline: 3px solid var(--akzent); outline-offset: 2px; }
.meldung { font-size: 16px; color: var(--fehler); margin: 6px 0 0; min-height: 1.4em; }
.meldung:empty { min-height: 0; margin: 0; }
.intro + .meldung { margin-bottom: 12px; }

.zusammenfassung { list-style: none; margin: 0 0 6px; padding: 0; max-width: 460px; }
.zusammenfassung li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px dashed var(--linie); font-size: 16px; }
.zusammenfassung span { color: var(--text-leise); }

.haken { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; max-width: 520px; }
.haken input { margin-top: 4px; width: 20px; height: 20px; flex: none; accent-color: var(--text); }
.lockfeld { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.knopf {
    margin-top: 18px; padding: 14px 28px; border: 0; border-radius: 999px; background: var(--akzent); color: var(--text);
    font: 600 20px var(--schrift-titel); cursor: pointer; box-shadow: 0 3px 0 var(--akzent-dunkel);
}
.knopf:hover { background: #ffb02e; }
.knopf:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--akzent-dunkel); }
.knopf:disabled { opacity: .6; cursor: wait; }

.danke { border: 2px solid var(--akzent); border-radius: 16px; padding: 24px; margin-top: 24px; max-width: 520px; }
.danke h2 { margin-bottom: 12px; }
.danke:focus { outline: none; }

/* Fuß */
.fuss { border-top: 1px solid var(--linie); padding: 22px 0 34px; color: var(--text-leise); font-size: 16px; }
.fuss .huelle { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }
.fuss ul { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }

/* Auf dem Handy steht der Hinweis nicht in der festen Leiste (sie soll wenig Platz brauchen), sondern in Schritt 5. */
@media (max-width: 859px) { .vorschau-spalte .vorschau-hinweis { display: none; } }

@media (min-width: 860px) {
    .vorbild span { display: block; max-width: 11ch; }
    .konfigurator { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 0 48px; align-items: start; }
    .vorschau-spalte { order: 2; top: 16px; padding-top: 18px; }
    .schritte { order: 1; }
    .unterlage { padding: 18px 16px 10px; }
    .unterlage svg { max-height: none; }
    .spalte > .schritt:first-child { border-top: 0; }
    .weiter { display: block; margin: 10px 4px 0; font-weight: 700; font-size: 16px; }
}

/* Laptop: Alles zum Auswählen (Schritt 1 bis 4) soll in ein Fenster passen. Die Schritte stehen dafür in zwei Spalten
   nebeneinander, Farbpunkte, Knöpfe und Abstände sind kleiner. Die Kontaktdaten (Schritt 5) stehen darunter. */
@media (min-width: 1000px) {
    :root { --breite: 1280px; }
    body { font-size: 16px; }
    h1 { font-size: 28px; }
    .kopf { padding: 10px 0 0; }
    .logo { width: 110px; }
    .kopfzeile { grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: 0 24px; align-items: center; }
    .vorlagen { display: flex; align-items: center; gap: 10px; min-width: 0; }
    .vorlagen h2 { flex: none; max-width: 92px; margin: 0; font-size: 14px; line-height: 1.15; }
    .vorlagen ul { gap: 10px; padding: 4px 4px 6px; }
    .vorlagen a, .vorlagen img { width: 58px; }
    .vorlagen img { height: 58px; border-width: 2px; border-radius: 9px; }
    .vorlagen span { display: none; }
    .intro { padding: 4px 0 8px; }
    .intro h1 { margin-bottom: 2px; }
    .intro p { font-size: 15px; margin: 0; max-width: none; }
    .konfigurator { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0 36px; padding-bottom: 30px; }
    .vorschau-spalte { top: 8px; padding-top: 6px; }
    .unterlage { padding: 10px 12px 6px; }
    .unterlage svg { max-height: calc(100vh - 230px); }
    .raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 32px; }
    .schritt { padding: 10px 0 12px; }
    .schritt h2 { font-size: 19px; margin-bottom: 8px; gap: 8px; }
    .nr { width: 26px; height: 26px; font-size: 15px; }
    legend { font-size: 14px; margin-bottom: 5px; }
    .schritt fieldset + fieldset { margin-top: 10px; }
    .punkte { gap: 3px; }
    .punkt .farbe { width: 23px; height: 23px; }
    .punkt input:checked + .farbe { box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .14), 0 0 0 2px var(--seite), 0 0 0 4px var(--text); }
    .wahl { gap: 5px; }
    .wahl label { padding: 4px 10px; font-size: 14px; }
    .kappe { margin-top: 8px; gap: 4px 10px; }
    .kappe-name { font-size: 14px; min-width: 96px; }
    .groessen { gap: 3px; }
    .groessen label { min-width: 31px; padding: 4px 3px; font-size: 13px; }
    .eingabe { padding: 6px 10px; font-size: 16px; width: 100%; }
    .feld { margin-top: 8px; }
    .feld > label:not(.haken) { font-size: 14px; margin-bottom: 3px; }
    .hilfe { font-size: 13px; margin-top: 6px; }
    .info { font-size: 14px; margin: 4px 0 0; min-height: 1.3em; }
    .meldung { font-size: 14px; margin: 2px 0 0; }
    .preisleiste { margin-top: 4px; }
    .preisleiste strong { font-size: 26px; }
    .vorschau-hinweis { font-size: 13px; }
    /* Beschriftung links neben dem Feld statt darüber (spart Höhe) */
    .feld.zeile { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; gap: 0 8px; }
    .feld.zeile > label { margin: 0; }
    .feld.zeile > .meldung { grid-column: 1 / -1; }
    .schritt-anfrage { margin-top: 6px; max-width: 640px; }
    .schritt-anfrage .eingabe { width: 100%; }
}

@media (prefers-reduced-motion: reduce) { .punkt .farbe { transition: none; } }
