/* Schriften, lokal eingebunden */
@font-face {
  font-family: "Montserrat";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("../schriften/montserrat-700.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto Slab";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("../schriften/robotoslab-700.woff2") format("woff2");
}

:root {
  --ark-nacht: #0b1730;
  --ark-nacht-hell: #16294d;
  --ark-creme: #f6ecd2;
  --ark-akzent: #e8c36a;
  --ark-sans: "Montserrat", system-ui, sans-serif;
  --ark-serif: "Roboto Slab", Georgia, serif;
}

html, body { margin: 0; padding: 0; overflow: hidden; background: var(--ark-nacht); }

/* ---------- Start-Bildschirm ---------- */
#ark-start {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto;           /* Querformat und kleine Höhen: scrollbar */
  padding: 24px; box-sizing: border-box;
  background: radial-gradient(ellipse at 50% 30%, var(--ark-nacht-hell) 0%, var(--ark-nacht) 70%);
  color: var(--ark-creme); font-family: var(--ark-sans); text-align: center;
}
#ark-start.versteckt { display: none; }
#ark-start .karte {
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  width: 100%; max-width: 420px;
  margin: auto;               /* mittig, aber bei zu wenig Höhe von oben beginnend scrollbar */
}
#ark-start .logo { max-width: 200px; max-height: 56px; width: auto; height: auto; }
#ark-start h1 {
  margin: 0; font-family: var(--ark-serif); font-weight: 700;
  font-size: clamp(1.7rem, 7vw, 2.4rem); line-height: 1.15;
}
#ark-start .zeile2 { margin: -10px 0 0; font-size: 1.05rem; color: var(--ark-akzent); }
#ark-start button {
  appearance: none; border: 0; cursor: pointer;
  background: var(--ark-creme); color: var(--ark-nacht);
  font-family: var(--ark-sans); font-weight: 700; font-size: 1.1rem; letter-spacing: .02em;
  padding: 16px 40px; border-radius: 8px; min-height: 52px;
  -webkit-tap-highlight-color: transparent;
}
#ark-start button:focus-visible { outline: 3px solid var(--ark-akzent); outline-offset: 3px; }
#ark-start button:active { transform: translateY(1px); }
#ark-start .datenschutz { margin: 0; font-size: .85rem; line-height: 1.55; opacity: .85; max-width: 330px; }
#ark-start .rechtliches { display: flex; gap: 18px; font-size: .8rem; }
#ark-start .rechtliches a { color: var(--ark-creme); opacity: .8; }
#ark-start .zusatz { margin-top: -8px; }
#ark-start .meldung { margin: 0; color: var(--ark-akzent); font-size: .95rem; }

/* ---------- Hinweis nach dem Start ---------- */
#ark-hinweis {
  position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: 24px; box-sizing: border-box;
}
#ark-hinweis[hidden] { display: none; }
#ark-hinweis .rahmen {
  height: min(45vh, calc(min(80vw, 380px) * 105 / 148)); aspect-ratio: 148 / 105;   /* in kleinen Höhen begrenzt */
  border: 2px solid var(--ark-creme); border-radius: 10px; opacity: .85;
  box-shadow: 0 0 0 100vmax rgba(11, 23, 48, .25);
}
#ark-hinweis .text {
  margin: 0; padding: 12px 20px; border-radius: 8px;
  background: rgba(11, 23, 48, .8); color: var(--ark-creme);
  font-family: var(--ark-sans); font-weight: 700; font-size: 1rem; text-align: center;
}

/* Lade- und Kameraseiten der Erkennungs-Bausteine ausblenden: der eigene Start-Bildschirm
   bleibt Hintergrund, bis die Kamera läuft. */
#loadBackground, #requestingCameraPermissions, .poweredby-img { display: none !important; }

/* ---------- Bedienknöpfe im Ruhezustand ---------- */
#ark-ende {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9500;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); box-sizing: border-box;
}
#ark-ende[hidden] { display: none; }
#ark-ende button[hidden] { display: none; }
#ark-ende button, #ark-ende .knopf {
  appearance: none; border: 2px solid var(--ark-creme); cursor: pointer; text-decoration: none;
  background: rgba(11, 23, 48, .85); color: var(--ark-creme);
  font-family: var(--ark-sans); font-weight: 700; font-size: 1rem;
  padding: 12px 22px; border-radius: 8px; min-height: 48px; box-sizing: border-box;
  display: inline-flex; align-items: center;
  -webkit-tap-highlight-color: transparent;
}
#ark-ende .knopf { background: var(--ark-creme); color: var(--ark-nacht); }
#ark-ende button:focus-visible, #ark-ende .knopf:focus-visible { outline: 3px solid var(--ark-akzent); outline-offset: 3px; }
#ark-ende .knoepfe { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
#ark-ende .rechtliches-klein { display: flex; gap: 16px; font-family: var(--ark-sans); font-size: .75rem; }
#ark-ende .rechtliches-klein a { color: var(--ark-creme); opacity: .75; }

/* Ton einschalten (nur wenn der Browser das Abspielen ablehnt) */
#ark-ton-knopf {
  position: fixed; top: 12px; right: 12px; z-index: 9600;
  appearance: none; border: 2px solid var(--ark-creme); cursor: pointer;
  background: rgba(11, 23, 48, .85); color: var(--ark-creme);
  font-family: var(--ark-sans); font-weight: 700; font-size: .9rem;
  padding: 8px 14px; border-radius: 8px; min-height: 44px;
}
#ark-ton-knopf[hidden] { display: none; }

/* Karte nicht erreichbar */
#ark-fehler {
  position: fixed; inset: 0; z-index: 10001; display: flex; align-items: center; justify-content: center;
  padding: 24px; box-sizing: border-box; text-align: center;
  background: var(--ark-nacht); color: var(--ark-creme); font-family: var(--ark-sans); font-weight: 700; font-size: 1.1rem;
}
#ark-fehler p { max-width: 22em; margin: 0; line-height: 1.5; }
#ark-ende .film-hinweis { margin: 0; font-family: var(--ark-sans); font-size: .85rem; color: var(--ark-creme); text-align: center; }
#ark-ende .film-hinweis[hidden] { display: none; }

/* ---------- Kontaktleiste der Visitenkarte ---------- */
#ark-kontakt {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9500;
  padding: 0 12px calc(8px + env(safe-area-inset-bottom)); box-sizing: border-box;
  font-family: var(--ark-sans, "Montserrat", system-ui, sans-serif);
  pointer-events: none;
}
#ark-kontakt[hidden] { display: none; }
#ark-kontakt .leiste {
  pointer-events: auto;
  max-width: 420px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  padding: 12px 6px 9px;
  border-radius: 24px;
  background: rgba(24, 25, 27, .58);
  -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .11), 0 10px 30px rgba(0, 0, 0, .35);
}
#ark-kontakt .leiste a {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 0 2px; min-height: 76px; border-radius: 16px;
  color: #fff; text-decoration: none; text-align: center;
  font-weight: 700; font-size: .6875rem; line-height: 1.2; letter-spacing: .01em;
  -webkit-tap-highlight-color: transparent;
  opacity: 0; transform: translateY(10px);
  animation: ark-kontakt-rein .42s cubic-bezier(.2, .8, .2, 1) forwards;
}
#ark-kontakt .leiste a:nth-child(2) { animation-delay: .06s; }
#ark-kontakt .leiste a:nth-child(3) { animation-delay: .12s; }
#ark-kontakt .leiste a:nth-child(4) { animation-delay: .18s; }
#ark-kontakt .leiste .rund {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .13);
  transition: transform .12s ease-out, background-color .12s ease-out;
}
#ark-kontakt .leiste svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
#ark-kontakt .leiste a.haupt .rund { background: #ffc800; color: #1d1f21; }
#ark-kontakt .leiste a:active .rund { transform: scale(.92); background: rgba(255, 255, 255, .24); }
#ark-kontakt .leiste a.haupt:active .rund { background: #ffd84a; }
#ark-kontakt .leiste a:focus-visible { outline: 2px solid #ffc800; outline-offset: 2px; }
#ark-kontakt .recht {
  pointer-events: auto;
  display: flex; justify-content: center; gap: 22px; margin-top: 2px;
  font-weight: 700; font-size: .6875rem; letter-spacing: .02em;
}
#ark-kontakt .recht a {
  color: rgba(255, 255, 255, .78); text-decoration: none; padding: 9px 4px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
}
@keyframes ark-kontakt-rein { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  #ark-kontakt .leiste a { animation: none; opacity: 1; transform: none; }
  #ark-kontakt .leiste .rund { transition: none; }
}
/* Der Hinweis zum erneuten Abspielen sitzt über der Leiste und verlängert sie nicht */
#ark-kontakt .film-hinweis {
  position: absolute; left: 12px; right: 12px; bottom: 100%; margin: 0 auto 6px; width: max-content; max-width: calc(100% - 24px);
  padding: 6px 12px; border-radius: 10px; text-align: center; pointer-events: none;
  background: rgba(24, 25, 27, .7); color: #fff; font-weight: 700; font-size: .75rem;
}
#ark-kontakt .film-hinweis[hidden] { display: none; }
