/* ============================================================
   Nordbeat — Messe-iPad (messe.nord-beat.de)
   Gleiche Marke wie nord-beat.de (Montserrat, Petrol, Orange, Segel),
   aber als Bildschirm-App: dunkles Petrol, damit das Licht leuchtet.
   Jede Ansicht füllt den Bildschirm und scrollt bei Bedarf in sich.
   ============================================================ */

@font-face { font-family: "Montserrat"; src: url("/fonts/Montserrat-Light-latin.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("/fonts/Montserrat-Regular-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("/fonts/Montserrat-SemiBold-latin.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --petrol-dark: #005254;
  --petrol: #007878;
  --turquoise-light: #C6E2E0;   /* auf --ink 11,4:1 */
  --orange: #F09000;
  --orange-bright: #F7B65A;     /* Overlines auf --ink 8,6:1 */
  --ink: #00393B;               /* Grund der App */
  --karte: #004547;             /* Flächen auf dem Grund */
  --linie: rgba(198, 226, 224, 0.18);
  --weiss: #FFFFFF;
  --fehler: #FFB4A6;            /* auf --ink 9,1:1 */

  --licht: #FF7FA8;             /* aktuelle Lichtfarbe, setzt messe.js */
  --radius: 16px;
  --rand: clamp(20px, 3.4vw, 44px);
  --oben: max(env(safe-area-inset-top), 0px);
  --unten: max(env(safe-area-inset-bottom), 0px);
}

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

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--turquoise-light);
  background: var(--ink);
  overflow: hidden;
  overscroll-behavior: none;
  /* Kiosk: kein Markieren, kein Lupen-Menü, kein Antipp-Blitz */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

input, textarea { -webkit-user-select: text; user-select: text; }

img { display: block; max-width: 100%; height: auto; -webkit-user-drag: none; }

button { font: inherit; color: inherit; touch-action: manipulation; }

:focus-visible { outline: 3px solid var(--orange-bright); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }   /* Überschriften bekommen beim Ansichtswechsel nur für VoiceOver den Fokus */

h1, h2, h3 { color: var(--weiss); font-weight: 300; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(48px, 6.4vw, 84px); line-height: 1.02; }
h2 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.08; }
h3 { font-size: 21px; font-weight: 600; letter-spacing: 0; }

.overline {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange-bright);
}

.lead { font-size: 20px; max-width: 62ch; margin: 16px 0 0; }

.optional { font-weight: 400; color: rgba(198, 226, 224, 0.72); font-size: 15px; margin-left: 6px; }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 34px;
  border: 0;
  border-radius: 999px;
  background: var(--orange);
  color: var(--ink);
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
}
.btn:active { transform: scale(0.97); background: #F7A51F; }
.btn--gross { min-height: 64px; padding: 0 42px; font-size: 20px; }
.btn--klein { min-height: 48px; padding: 0 24px; font-size: 16px; }
.btn--breit { width: 100%; }

.textlink {
  background: none;
  border: 0;
  padding: 0;
  color: var(--weiss);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  min-height: 44px;
}

/* ---------- Ansichten ---------- */
.screen {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(16px + var(--unten));
}
.screen[hidden] { display: none; }
.screen.rein { animation: rein 0.32s ease-out both; }
@keyframes rein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.leiste {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(14px + var(--oben)) var(--rand) 14px;
  background: rgba(0, 57, 59, 0.94);
  border-bottom: 1px solid var(--linie);
}

.zurueck {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px 0 6px;
  border: 0;
  background: none;
  color: var(--weiss);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}
.zurueck span { font-size: 34px; line-height: 1; font-weight: 300; margin-top: -4px; }

.inhalt { padding: 40px var(--rand) 24px; max-width: 1280px; margin: 0 auto; }
.inhalt--schmal { max-width: 980px; }

.frage {
  margin: 40px 0 0;
  padding: 22px 26px;
  background: var(--karte);
  border-radius: var(--radius);
  max-width: 820px;
}
.frage strong { display: block; color: var(--orange-bright); font-weight: 600; }

/* ---------- Licht: Foto + Farbe ----------
   Das Foto wird grau, darüber liegt die Farbe im Modus „color“:
   Helligkeit bleibt vom Foto, Farbton kommt vom Floorspot. */
.licht { position: relative; overflow: hidden; background: #000; }
.licht img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.12) brightness(1.08); }
/* Die Hofwand ist im Original dunkles Pink: grau wird sie zu dunkel, helle Farben wirkten matt */
.licht img[data-szene="wand"], .licht--start img { filter: grayscale(1) brightness(1.55) contrast(1.15); }
.licht-farbe {
  position: absolute;
  inset: 0;
  background: var(--licht);
  mix-blend-mode: color;
  transition: background-color 1.6s ease;
}

/* ---------- Start ---------- */
.start { padding-bottom: 0; overflow: hidden; display: flex; flex-direction: column; }
.licht--start { position: absolute; inset: 0; }
.licht--start .licht-farbe { transition-duration: 2.4s; }
.start-verlauf {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 57, 59, 0.94) 0%, rgba(0, 57, 59, 0.78) 38%, rgba(0, 57, 59, 0.08) 72%),
    linear-gradient(0deg, rgba(0, 57, 59, 0.96) 0%, rgba(0, 57, 59, 0) 42%);
}

.start-inhalt {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
  padding: calc(28px + var(--oben)) var(--rand) 20px;
}
.start-logo { width: clamp(130px, 15vw, 200px); flex: none; }
.start-sub { font-size: 22px; margin: 18px 0 30px; color: var(--turquoise-light); }
.sterne { margin: 18px 0 0; font-size: 16px; }
/* Messerabatt: ein Satz über dem Knopf, die Zahl in Orange */
.rabatt { margin: -12px 0 22px; font-size: 20px; color: var(--weiss); }
.rabatt strong { color: var(--orange-bright); font-weight: 600; }
.st { color: var(--orange); letter-spacing: 2px; }

.start-jetzt {
  position: absolute;
  right: var(--rand);
  top: calc(24px + var(--oben));
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 330px;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(0, 57, 59, 0.72);
  color: var(--weiss);
  font-size: 16px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}
.start-jetzt strong { font-weight: 600; }
.punkt {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--licht);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2), 0 0 18px var(--licht);
  transition: background-color 2.4s ease, box-shadow 2.4s ease;
}

.kacheln {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 0 var(--rand) calc(58px + var(--unten));
}
.kachel {
  position: relative;
  display: block;
  height: clamp(140px, 19vh, 190px);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--karte);
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease;
}
.kachel:active { transform: scale(0.98); }
.kachel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kachel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 57, 59, 0.97) 10%, rgba(0, 57, 59, 0.7) 48%, rgba(0, 57, 59, 0.05) 100%); }
.kachel-text { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; }
.kachel-titel { display: block; color: var(--weiss); font-weight: 600; font-size: 19px; line-height: 1.25; }
.kachel-sub { display: block; font-size: 15px; color: var(--turquoise-light); margin-top: 2px; }

.warteschlange {
  position: absolute;
  left: var(--rand);
  bottom: calc(16px + var(--unten));
  margin: 0;
  font-size: 13px;
  color: var(--orange-bright);
  z-index: 3;
}

/* ---------- Team ---------- */
.team { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.team li { background: var(--karte); border-radius: var(--radius); overflow: hidden; padding-bottom: 20px; }
.team img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.team h3 { padding: 18px 20px 0; }
.team .jahre { margin: 4px 20px 0; font-size: 15px; color: var(--orange-bright); font-weight: 600; }
.team .zitat { margin: 12px 20px 0; font-size: 16px; line-height: 1.5; }

/* ---------- Licht-Ansicht ---------- */
.licht-raster { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(28px, 4vw, 52px); align-items: start; max-width: 1400px; }
.licht--gross { border-radius: var(--radius); aspect-ratio: 16 / 10; }
.licht--gross img { position: absolute; inset: 0; }
.licht--gross img[hidden] { display: none; }
.szenen { display: inline-flex; margin-top: 16px; padding: 4px; border-radius: 999px; background: var(--karte); }
.szenen button {
  min-height: 48px;
  min-width: 120px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--turquoise-light);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
}
.szenen button[aria-pressed="true"] { background: var(--weiss); color: var(--ink); }

.farben { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px 10px; margin: 28px 0 8px; }
.farbe {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 14px;
  color: var(--turquoise-light);
  cursor: pointer;
}
.farbe i {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--f);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.farbe[aria-checked="true"] { color: var(--weiss); font-weight: 600; }
.farbe[aria-checked="true"] i { transform: scale(1.08); box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--weiss), 0 0 24px var(--f); }
.farbe-gewaehlt { min-height: 28px; margin: 6px 0 22px; font-size: 16px; }

.farben--klein { grid-template-columns: repeat(10, 1fr); margin: 14px 0 0; gap: 10px 6px; }
.farben--klein .farbe { font-size: 12px; }
.farben--klein .farbe i { width: 44px; height: 44px; }

/* ---------- Extras ---------- */
.extras { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.extra { position: relative; overflow: hidden; background: var(--karte); border-radius: var(--radius); padding: 0 0 22px; }
.extra img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.extra h3 { padding: 18px 22px 0; }
.extra p { margin: 6px 22px 0; font-size: 16px; line-height: 1.5; }
.extra--text { display: flex; flex-direction: column; justify-content: flex-end; min-height: 100%; padding-top: 22px; background: var(--petrol-dark); }
.extra[role="button"] { cursor: pointer; }
.extra[role="button"] p { color: var(--weiss); }
.wm { position: absolute; width: 280px; height: 280px; right: -70px; top: -60px; transform: rotate(-14deg); fill: rgba(255, 255, 255, 0.07); pointer-events: none; }

/* ---------- Eindrücke ---------- */
.galerie { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-auto-rows: 210px; gap: 14px; margin-top: 32px; }
.galerie figure { margin: 0; border-radius: var(--radius); overflow: hidden; }
.galerie .hoch { grid-row: span 2; }
.galerie img { width: 100%; height: 100%; object-fit: cover; }
.stimmen { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-top: 28px; }
.stimmen blockquote { margin: 0; padding: 24px 26px; background: var(--karte); border-radius: var(--radius); }
.stimmen p { margin: 10px 0 12px; font-size: 18px; color: var(--weiss); }
.stimmen footer { font-size: 15px; }

/* ---------- Formular ---------- */
.felder { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; margin-top: 32px; }
.feld label, .gruppe legend { display: block; margin-bottom: 8px; color: var(--weiss); font-weight: 600; font-size: 17px; }
.feld input {
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: var(--weiss);
  color: var(--ink);
  font: 400 19px/1.3 "Montserrat", "Helvetica Neue", Arial, sans-serif; /* ≥ 16 px: Safari zoomt nicht */
  -webkit-appearance: none;
  appearance: none;
}
.feld input::placeholder { color: #7A8A8A; -webkit-text-fill-color: #7A8A8A; }
.feld input:focus { outline: none; border-color: var(--orange); }
.feld input { scroll-margin-top: 120px; scroll-margin-bottom: 40px; }
.feld input[aria-invalid="true"] { border-color: var(--fehler); }
/* Weiße Felder: helles Farbschema, sonst färbt Safari das Datum türkis (dunkles Schema der App) */
.feld input { color-scheme: light; -webkit-text-fill-color: var(--ink); }
.feld input[type="date"].leer { -webkit-text-fill-color: #7A8A8A; }
.feld input[type="date"] { display: flex; align-items: center; }
.feld input[type="date"]::-webkit-datetime-edit,
.feld input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.feld input[type="date"]::-webkit-datetime-edit-day-field,
.feld input[type="date"]::-webkit-datetime-edit-month-field,
.feld input[type="date"]::-webkit-datetime-edit-year-field,
.feld input[type="date"]::-webkit-datetime-edit-text { color: var(--ink); }
.feld input[type="date"].leer::-webkit-datetime-edit,
.feld input[type="date"].leer::-webkit-datetime-edit-fields-wrapper,
.feld input[type="date"].leer::-webkit-datetime-edit-day-field,
.feld input[type="date"].leer::-webkit-datetime-edit-month-field,
.feld input[type="date"].leer::-webkit-datetime-edit-year-field,
.feld input[type="date"].leer::-webkit-datetime-edit-text { color: #7A8A8A; }
.feld input[type="date"]::-webkit-datetime-edit-day-field:focus,
.feld input[type="date"]::-webkit-datetime-edit-month-field:focus,
.feld input[type="date"]::-webkit-datetime-edit-year-field:focus { background: rgba(240, 144, 0, 0.25); color: var(--ink); border-radius: 4px; }
.feld-fehler { display: block; margin-top: 6px; color: var(--fehler); font-size: 15px; font-weight: 600; }

.gruppe { border: 0; padding: 0; margin: 30px 0 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(198, 226, 224, 0.5);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  color: var(--turquoise-light);
  transition: background 0.16s ease, color 0.16s ease;
}
.chip input:checked + span { background: var(--weiss); border-color: var(--weiss); color: var(--ink); }
.chip input:checked + span::before { content: "✓"; margin-right: 8px; }
.chip input:focus-visible + span { outline: 3px solid var(--orange-bright); outline-offset: 3px; }

.honig { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.hinweis { margin: 30px 0 18px; font-size: 15px; }
.formular-fehler { margin: 0 0 16px; padding: 14px 18px; border-radius: 12px; background: rgba(255, 180, 166, 0.12); color: var(--fehler); font-weight: 600; }

/* ---------- Fertig ---------- */
.fertig { display: flex; align-items: center; justify-content: center; text-align: center; padding: var(--rand); }
.fertig-glow {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 115%, var(--licht) 0%, transparent 62%);
  opacity: 0.8;
  pointer-events: none;
}
.fertig-inhalt { position: relative; max-width: 760px; }
.fertig h2 { font-size: clamp(64px, 9vw, 120px); }
.fertig-satz { font-size: 24px; color: var(--weiss); margin: 22px 0 10px; }
.fertig-mail { font-size: 18px; margin: 0 0 40px; }

/* Gutschein wie der gedruckte: Karte mit gestricheltem Rand, Nummer groß */
.fertig:has(.gutschein:not([hidden])) h2 { font-size: clamp(48px, 6vw, 76px); }
.gutschein {
  margin: 8px auto 22px;
  max-width: 560px;
  padding: 22px 28px 24px;
  border: 2px dashed var(--orange-bright);
  border-radius: var(--radius);
  background: rgba(0, 57, 59, 0.72);
}
.gutschein-kopf { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--orange-bright); }
.gutschein-nr { margin: 6px 0 4px; font-size: clamp(72px, 10vw, 120px); line-height: 1; font-weight: 600; color: var(--weiss); font-variant-numeric: lining-nums tabular-nums; }
.gutschein.ohne-nr .gutschein-nr { display: none; }
.gutschein-text { margin: 10px 0 0; font-size: 19px; color: var(--turquoise-light); }
.gutschein-team { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: rgba(240, 144, 0, 0.16); color: var(--weiss); font-size: 16px; font-weight: 600; }

/* ---------- Fuß und Blatt ---------- */
/* Impressum und Datenschutz stehen am Ende jeder Ansicht (messe.js hängt sie an) */
.fuss {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  padding: 24px var(--rand) 0;
}
.start > .fuss, .fertig > .fuss { position: absolute; right: 0; bottom: calc(8px + var(--unten)); padding: 0 var(--rand); z-index: 3; }
.fuss button {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: none;
  font-size: 13px;
  color: rgba(198, 226, 224, 0.8);
  cursor: pointer;
}

.blatt {
  width: min(900px, 92vw);
  height: min(88vh, 1000px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: #FAFAF8;
  overflow: hidden;
}
.blatt::backdrop { background: rgba(0, 20, 21, 0.7); }
.blatt[open] { display: flex; flex-direction: column; }
.blatt-kopf { display: flex; justify-content: flex-end; padding: 12px 16px; background: var(--ink); }
.blatt iframe { flex: 1; width: 100%; border: 0; }

/* ---------- Hochformat und kleine iPads ---------- */
@media (orientation: portrait), (max-width: 1000px) {
  .kacheln { grid-template-columns: repeat(2, 1fr); }
  .start-inhalt { flex-direction: column; align-items: flex-start; justify-content: center; }
  .start-logo { width: 120px; }
  .start-jetzt { max-width: 280px; }
  .team { grid-template-columns: repeat(2, 1fr); }
  .licht-raster { grid-template-columns: 1fr; }
  .extras { grid-template-columns: repeat(2, 1fr); }
  .farben--klein { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 700px) {
  .felder, .stimmen { grid-template-columns: 1fr; }
  .galerie { grid-template-columns: 1fr 1fr; }
  .start-jetzt { position: relative; top: auto; right: auto; margin: 0 var(--rand) 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .screen.rein { animation: none; }
  .licht-farbe, .punkt { transition: none; }
}
