/* =========================================================
   Bewerbungsformular – Agnes Bernauer Festspiele
   Farben: Logo-Creme #eceae2 (aus dem Vereinslogo), dunkle Bühne.
   Schriften: Theme-Font der Festspiel-Site hier als Variable eintragen
   (WOFF2 lokal ablegen – kein Google-Fonts-Request, DSGVO).
   ========================================================= */
:root {
  --cream: #eceae2;
  --cream-70: rgba(236, 234, 226, .7);
  --cream-40: rgba(236, 234, 226, .4);
  --cream-12: rgba(236, 234, 226, .12);
  --stage: #1a1714;
  --stage-deep: #110f0d;
  --paper: #f6f4ee;
  --ink: #3b3b3b;
  --ink-60: #6e6a64;
  --rule: #d8d3c7;
  --accent: #4B95C4;      /* 2028er Festspiel-Farbe */
  --accent-hover: #71A5CD;
  --error: #b8433a;       /* Fehlerfarbe getrennt vom Akzent */
  --ok: #2f7d4f;
  --font-display: "Ardagh", "Georgia", "Times New Roman", serif;
  --font-body: "Borna", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.5;
  min-height: 100dvh;
}
/* Streifenband nur als Border oben – 1:1 von der Festspiel-Website gesampelt */
.curtain {
  position: absolute; top: 0; left: 0; right: 0; height: 40px; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(to right, #f2f0e8, #f2f0e8 15px, #eceae2 15px, #eceae2 30px);
}
a { color: inherit; }

/* ---- Kopf ---- */
.head { max-width: 720px; margin: 0 auto; padding: 68px 20px 20px; text-align: center; }
.head__logo img, .head__logoimg { width: min(240px, 60vw); height: auto; display: inline-block; }
.head__eyebrow { margin: 22px 0 8px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-60); }
.head__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(40px, 8vw, 62px); line-height: .8; padding-top: .14em; margin: 0 0 16px; }
.head__year { color: var(--accent); }
.head__sub { font-family: var(--font-body); font-weight: 500; font-size: clamp(17px, 3.4vw, 21px); color: var(--ink-60); margin: 0 0 14px; }
.head__lead { margin: 0 auto; max-width: 520px; color: var(--ink-60); font-size: 15px; }
.head__deadline { display: inline-block; margin: 16px auto 0; padding: 7px 16px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--ink); background: var(--cream); }

/* ---- Infoblatt-Hinweis ---- */
.infosheet {
  display: flex; align-items: center; gap: 14px; margin: 0 0 20px; padding: 14px 16px;
  background: var(--ink); color: var(--cream); text-decoration: none; border-radius: var(--radius);
  transition: transform .1s, background .15s;
}
.infosheet:hover { background: #000; }
.infosheet:active { transform: scale(.99); }
.infosheet:focus-visible { outline: 3px solid rgba(59,59,59,.35); outline-offset: 2px; }
.infosheet__icon { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--cream); color: var(--ink); display: grid; place-items: center; }
.infosheet__text { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--cream-70); line-height: 1.4; min-width: 0; }
.infosheet__text strong { color: var(--cream); font-size: 15px; }
.infosheet__cta { flex: none; margin-left: auto; padding: 8px 14px; background: var(--accent); border: 1.5px solid var(--accent); border-radius: 999px; font-weight: 700; font-size: 13px; color: #fff; }
@media (max-width: 520px) { .infosheet__cta { display: none; } .infosheet__text strong::after { content: ' →'; } }
.btn--small { min-height: 42px; padding: 8px 16px; font-size: 14px; align-self: flex-start; }

/* ---- Bogen ---- */
.sheet {
  max-width: 720px; margin: 12px auto 28px; background: var(--paper); color: var(--ink);
  border-radius: 16px 16px 0 0; padding: 18px 20px 36px;
  box-shadow: 0 10px 40px rgba(59,59,59,.14);
  border: 1px solid rgba(59,59,59,.08);
}
@media (min-width: 720px) { .sheet { border-radius: 16px; padding: 28px 40px 44px; } }

.steps { list-style: none; display: flex; gap: 6px; margin: 0 0 22px; padding: 0; }
.steps__item { flex: 1; font-size: 12px; color: var(--ink-60); border-top: 3px solid var(--rule); padding-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps__item span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--rule); color: var(--ink); font-weight: 700; font-size: 11px; margin-right: 4px; }
.steps__item.is-active { border-top-color: var(--ink); color: var(--ink); }
.steps__item.is-active span { background: var(--ink); color: var(--cream); }
.steps__item.is-done { border-top-color: var(--ok); }
.steps__item.is-done span { background: var(--ok); color: #fff; }

.step { display: none; border: 0; margin: 0; padding: 0; min-width: 0; }
.step.is-active { display: block; animation: rise .28s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .step.is-active { animation: none; } }
.step__title { font-family: var(--font-display); font-size: 36px; font-weight: 500; margin: 0 0 16px; padding: .1em 0 0; line-height: .9; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f--full { grid-column: 1 / -1; }
.f--plz { grid-column: span 1; }
@media (max-width: 440px) { .grid { grid-template-columns: 1fr; } .f--plz { grid-column: 1; } }
.f label, .sig__label { font-size: 13px; font-weight: 600; color: var(--ink); }
.f label small, .sig__label small { font-weight: 400; color: var(--ink-60); margin-left: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=date], textarea {
  width: 100%; font: inherit; font-size: 16px; /* 16px = kein iOS-Zoom */
  padding: 12px 14px; border: 1.5px solid var(--rule); border-radius: var(--radius);
  background: #fff; color: var(--ink); min-height: 48px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(59,59,59,.12); }
input[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--error); }
.hint { margin: 12px 0 0; font-size: 13px; color: var(--ink-60); }
.hint--top { margin: -6px 0 14px; }
.err { display: none; margin: 6px 0 0; font-size: 13px; color: var(--error); font-weight: 600; }
.err.is-visible { display: block; }
.err--global { margin-top: 14px; }
.f .err { margin-top: 0; }

/* ---- Casting-Tafel ---- */
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role--wide { grid-column: 1 / -1; }
@media (max-width: 380px) { .roles { grid-template-columns: 1fr; } }
.role { position: relative; display: block; cursor: pointer; }
.role input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.role__box {
  display: flex; flex-direction: column; gap: 3px; min-height: 84px; padding: 14px 44px 14px 14px;
  border: 1.5px solid var(--rule); border-radius: var(--radius); background: #fff;
  transition: border-color .15s, background .15s, transform .1s;
}
.role__box::after {
  content: ""; position: absolute; right: 14px; top: 14px; width: 22px; height: 22px;
  border: 1.5px solid var(--rule); border-radius: 50%; background: #fff;
}
.role__name { font-weight: 700; font-size: 15px; }
.role__desc { font-size: 13px; color: var(--ink-60); }
.role input:checked + .role__box { border-color: var(--ink); background: var(--ink); color: var(--cream); }
.role input:checked + .role__box .role__desc { color: var(--cream-70); }
.role input:checked + .role__box::after { border-color: var(--cream); background: var(--cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%233b3b3b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center/14px no-repeat; }
.role input:focus-visible + .role__box { box-shadow: 0 0 0 3px rgba(59,59,59,.25); }
.role:active .role__box { transform: scale(.985); }
.f--sub { margin: 10px 0 0 0; padding: 14px; background: #fff; border: 1.5px dashed var(--rule); border-radius: var(--radius); }
.f--sub input { min-height: 44px; }
.step[data-step="2"] .f--full { margin-top: 18px; }

/* ---- Foto ---- */
.photo { position: relative; }
.photo input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.photo__drop {
  display: flex; align-items: center; gap: 16px; padding: 16px; cursor: pointer;
  border: 1.5px dashed var(--ink-60); border-radius: var(--radius); background: #fff; min-height: 120px;
}
.photo input:focus-visible + .photo__drop { box-shadow: 0 0 0 3px rgba(59,59,59,.25); }
.photo__drop.is-dragover { border-style: solid; border-color: var(--ink); }
.photo__preview { width: 84px; height: 104px; object-fit: cover; border-radius: 6px; border: 1px solid var(--rule); flex: none; }
.photo__text { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-60); }
.photo__text strong { color: var(--ink); font-size: 15px; }
.link { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 13px; color: var(--ink-60); text-decoration: underline; cursor: pointer; }

/* ---- Unterschrift ---- */
.sig { margin-top: 20px; }
.sig__pad { display: block; width: 100%; height: auto; aspect-ratio: 800 / 260; background: #fff; border: 1.5px solid var(--rule); border-radius: var(--radius); touch-action: none; margin-top: 6px; cursor: crosshair; }
.sig__pad.is-invalid { border-color: var(--error); }
.sig__tools { display: flex; justify-content: flex-end; }

/* ---- Einwilligungen ---- */
.consent { margin-top: 18px; display: grid; gap: 12px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.5; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); }
.check a { color: var(--ink); }

/* ---- Buttons ---- */
.nav { display: flex; gap: 10px; margin-top: 22px; }
.nav .btn--primary { flex: 1; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 22px;
  border-radius: 999px; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none;
  transition: transform .1s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--accent); color: #fff; border: 1.5px solid var(--accent); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--primary[disabled] { opacity: .6; cursor: wait; }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn:focus-visible { outline: 3px solid rgba(59,59,59,.35); outline-offset: 2px; }
.done .btn--ghost { color: var(--ink); }

/* ---- Erfolg ---- */
.done { text-align: center; padding: 20px 0 8px; }
.done__mark { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 30px; }
.done h2 { font-family: var(--font-display); font-size: 42px; margin: 0 0 8px; font-weight: 500; line-height: .9; }
.done p { color: var(--ink-60); max-width: 460px; margin: 0 auto 18px; }
.nav--center { justify-content: center; flex-wrap: wrap; }
.nav--center .btn--primary { flex: 0 1 auto; }
@media (max-width: 480px) { .nav--center .btn { flex: 1 1 100%; } }

.foot { text-align: center; font-size: 12px; color: var(--ink-60); padding: 8px 20px 40px; }
.foot p { margin: 4px 0; }
.foot a { color: var(--ink); }

.hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
