/* =========================================================================
   WIAI25 – Analoge Fotografie / Foto-Versand
   Design abgeleitet aus wiai25.de:
   - Hintergrund:  #000   Text: #fff   Akzent (Gelb): #facc15
   - Sekundärtext: #9ca3af   Linien: rgba(255,255,255,.12)
   - Schriften: Rubik (Fließtext/Headlines), IBM Plex Mono (Labels/Code)
   ========================================================================= */

@font-face {
  font-family: rubik;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../fonts/rubik-latin.woff2) format("woff2");
}
@font-face {
  font-family: "ibm plex mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono-latin.woff2) format("woff2");
}
@font-face {
  font-family: "ibm plex mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono-latin-500.woff2) format("woff2");
}

:root {
  --bg: #000;
  --fg: #fff;
  --accent: #facc15;
  --muted: #9ca3af;
  --line: rgba(255, 255, 255, 0.12);
  --field-bg: #0c0c0c;
  --field-border: rgba(255, 255, 255, 0.18);
  --danger: #f87171;
  --ok: #4ade80;
  --sans: rubik, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "ibm plex mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); }

/* ---- Layout ---- */
.wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header ---- */
header.site {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
header.site .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
header.site img.logo {
  width: 40px;
  height: 40px;
  display: block;
}
header.site .brand {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.3;
}
header.site .brand b { color: var(--fg); }

/* ---- Skewed badge (Signature-Element von wiai25.de) ---- */
.badge {
  display: inline-block;
  background: var(--accent);
  color: #000;
  padding: 10px 26px 10px 20px;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transform: skewX(-6deg);
}
.badge > span { display: inline-block; transform: skewX(6deg); }

/* ---- Main ---- */
main { flex: 1 0 auto; padding: 48px 0 64px; }

h1 {
  font-size: clamp(1.9rem, 6vw, 2.7rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 22px 0 14px;
}
h1 .hl { color: var(--accent); }

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 56ch;
  margin: 0 0 8px;
}

/* ---- Mono eyebrow line ---- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

/* ---- Code chip ---- */
.codechip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px;
  margin-top: 18px;
  max-width: 100%;
}
.codechip b { color: var(--fg); font-weight: 500; word-break: break-all; }
.codechip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }

/* ---- Form ---- */
form { margin-top: 36px; }

fieldset {
  border: none;
  margin: 0 0 26px;
  padding: 0;
}
fieldset > legend {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 0 14px;
  width: 100%;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.field.full { grid-column: 1 / -1; }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.field label .req { color: var(--accent); }
.field .opt { color: var(--muted); font-weight: 400; }

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 10px;
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: #5a5a5a; }
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.18);
}
input:user-invalid { border-color: var(--danger); }

/* ---- Consent ---- */
.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--field-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin: 6px 0 28px;
}
.consent input[type="checkbox"] {
  width: 20px; height: 20px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex: none;
  cursor: pointer;
}
.consent label { font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.consent label a { text-decoration: underline; }

/* ---- Submit button (skewed gelb auf schwarz, invertiertes Hover) ---- */
.btn {
  appearance: none;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: #000;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 34px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.05s;
  width: 100%;
}
.btn:hover { background: transparent; color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn[aria-busy="true"] { color: transparent; position: relative; }
.btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  color: var(--accent);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Form-level message ---- */
.formnote {
  font-family: var(--mono);
  font-size: 0.8rem;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  display: none;
}
.formnote.show { display: block; }
.formnote.err { color: var(--danger); border: 1px solid rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.08); }
.formnote.demo { color: var(--accent); border: 1px solid rgba(250, 204, 21, 0.4); background: rgba(250, 204, 21, 0.08); }

/* ---- States: success / invalid (per JS umgeschaltet) ---- */
.state { display: none; }
body[data-state="form"] #view-form { display: block; }
body[data-state="success"] #view-success { display: block; }
body[data-state="missing"] #view-missing { display: block; }

.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
}
.panel .mark {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 800;
}
.panel.ok .mark { background: rgba(74, 222, 128, 0.15); color: var(--ok); }
.panel.warn .mark { background: rgba(248, 113, 113, 0.15); color: var(--danger); }
.panel h2 { margin: 0 0 10px; font-size: 1.5rem; font-weight: 800; }
.panel p { color: var(--muted); margin: 0 auto; max-width: 46ch; }

/* ---- Footer ---- */
footer.site {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  color: var(--muted);
  font-size: 0.8rem;
}
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--fg); }
footer.site .uba { display: flex; align-items: center; gap: 10px; }
footer.site .uba img { height: 26px; opacity: 0.85; }
