/* =============================================================================
 * styles.css — escapegame.bio hub. Dark, on-brand, mobile-first.
 * Critical above-the-fold rules are also inlined in index.html; this file is
 * the full sheet, loaded deferred.
 * ===========================================================================*/

:root {
  --bg: #083849;
  --surface: #0c4559;
  --surface-2: #11566b;
  --border: #1d6478;
  --text: #f5f6f8;
  --muted: #9fb6c0;
  --accent: #ff9900;
  --accent-hover: #ffb84d;
  --accent-ink: #06303d;
  --radius: 14px;
  --radius-lg: 20px;
  --tap: 48px;
  --maxw: 560px;
  --gap: 14px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* subtle brand pattern tiled over the page background, behind all content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url(/assets/pattern.png?v=1);
  background-repeat: repeat;
  background-size: 285px;
  opacity: .06;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; }

:focus-visible {
  outline: 3px solid var(--accent-hover);
  outline-offset: 2px;
  border-radius: 6px;
}

.app {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 16px;
}

/* skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { left: 16px; }

/* --- Header --------------------------------------------------------------- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 10px;
}
.header__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.header__logo { height: 38px; width: auto; }
.header__descriptor {
  font-size: 11px;
  letter-spacing: 1px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}
.lang-toggle {
  flex: none;
  min-width: 48px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.lang-toggle:hover { border-color: var(--accent); }

/* --- Generic layout ------------------------------------------------------- */
.view { flex: 1 0 auto; padding-bottom: 28px; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.section { margin: 22px 0; }
.section__title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 700;
}

.page-title { font-size: 26px; font-weight: 800; margin: 6px 0 2px; }
.page-sub { color: var(--muted); margin: 0 0 12px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  margin: 6px 0 4px;
  min-height: 40px;
}
.back-link:hover { color: var(--text); }

/* --- Buttons / list rows -------------------------------------------------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 12px 18px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
  transition: transform .08s ease, border-color .15s ease, background .15s ease;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(.99); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--big { min-height: 64px; font-size: 18px; }

.row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--tap);
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  cursor: pointer;
  color: var(--text);
  text-align: left;
  font-size: 16px;
  transition: border-color .15s ease, background .15s ease;
}
.row:hover { border-color: var(--accent); background: var(--surface-2); }
.row__icon { font-size: 24px; line-height: 1; flex: none; width: 30px; height: 24px; display: flex; align-items: center; justify-content: center; }
.row__icon svg { width: 24px; height: 24px; color: var(--accent); display: block; }
/* city chooser cards: uniform media box (photo or emoji tile) */
.row--city { gap: 16px; }
.row__media { width: 60px; height: 60px; border-radius: 12px; flex: none; object-fit: cover; display: block; }
.row__media--emoji { display: flex; align-items: center; justify-content: center; font-size: 30px; background: var(--surface-2); }
.row__body { flex: 1 1 auto; min-width: 0; }
.row__title { font-weight: 700; display: block; }
.row__meta { font-size: 13px; color: var(--muted); display: block; }
.row__chevron { color: var(--muted); flex: none; display: flex; }
.row__chevron svg { width: 18px; height: 18px; display: block; }
.row--accent { border-color: var(--accent); }
.row--accent .row__chevron { color: var(--accent); }

/* --- City chips ----------------------------------------------------------- */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 0 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); }
.chip--active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* --- City header ---------------------------------------------------------- */
.city-head { margin: 8px 0 6px; }
.city-head__addr { color: var(--muted); font-size: 14px; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.social {
  flex: none;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
}
.social svg { width: 22px; height: 22px; display: block; }
.social:hover { border-color: var(--accent); background: var(--surface-2); }

/* --- Room carousel -------------------------------------------------------- */
.carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.room-card {
  flex: 0 0 78%;
  max-width: 320px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  transition: transform .08s ease, border-color .15s ease, box-shadow .15s ease;
}
.room-card:hover { border-color: var(--accent); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.room-card:active { transform: scale(.995); }
/* a lone card (e.g. a single "Weitere Erlebnisse" entry) spans full width */
.carousel .room-card:only-child { flex: 0 0 100%; max-width: 100%; }
/* Photo at the top of the card. object-fit keeps any aspect ratio tidy. */
.room-card__media {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: var(--surface-2);
}
/* Fallback tile shown when a room has no `image` yet. */
.room-card__media--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
}
.room-card__content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 0 auto;
}
.room-card__name { font-weight: 800; font-size: 18px; }
.room-card__age {
  align-self: flex-start;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
}
.room-card__desc { color: var(--muted); font-size: 14px; flex: 1 0 auto; }
.room-card__genre { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }
.room-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.room-card__diff { display: inline-flex; align-items: center; gap: 2px; }
.room-card__diff .lock { display: inline-flex; color: var(--border); }
.room-card__diff .lock--on { color: var(--accent); }
.room-card__diff svg { width: 14px; height: 14px; }
.room-card__loc { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 600; }
.room-card__loc svg { width: 14px; height: 14px; color: var(--accent); flex: none; }

/* second-level location filter chips */
.chips--loc { margin-top: -2px; padding-top: 0; }

/* genre filter chips: sit between a section title and its carousel */
.chips--genre { margin-top: 18px; padding-top: 0; padding-bottom: 12px; }

/* --- Featured / hero ------------------------------------------------------ */
.hero {
  display: block;
  background: linear-gradient(135deg, rgba(255,153,0,.16), rgba(255,153,0,.03));
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin: 14px 0 28px;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
}
.hero:hover { background: linear-gradient(135deg, rgba(255,153,0,.24), rgba(255,153,0,.06)); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.hero:active { transform: scale(.995); }
.hero__label { display: block; color: var(--accent); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.hero__name { font-size: 22px; font-weight: 800; margin: 4px 0 10px; }
/* metadata (venue, genre, age + difficulty) — matches the room-card spacing */
.hero__facts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.hero__img { border-radius: 12px; margin-bottom: 12px; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.hero__media-ph {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border-radius: 12px;
  margin-bottom: 12px;
}

/* --- Forms ---------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; }
.field .req { color: var(--accent); }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  min-height: var(--tap);
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field--error input, .field--error select, .field--error textarea { border-color: var(--accent); }
.field__error { color: var(--accent-hover); font-size: 13px; min-height: 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.consent input { width: 22px; height: 22px; min-height: 0; flex: none; margin-top: 1px; accent-color: var(--accent); }
.consent a { color: var(--text); text-decoration: underline; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 14px 16px; border-radius: var(--radius); font-weight: 600; }
.form-status--ok { background: rgba(34,197,94,.12); border: 1px solid #22c55e; color: #d6ffe2; }
.form-status--err { background: rgba(225,29,42,.12); border: 1px solid var(--accent); color: #ffd9dc; }

/* --- Footer --------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding: 18px 0 28px;
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}
.footer a { min-height: 40px; display: inline-flex; align-items: center; }
.footer a:hover { color: var(--text); }

/* --- Suggested badge ------------------------------------------------------ */
.stack > * + * { margin-top: 10px; }

/* --- Legal pages (Impressum / Datenschutz, rendered in-app) -------------- */
.legal { padding-bottom: 24px; }
.legal h1 { font-size: 26px; font-weight: 800; margin: 8px 0 4px; }
.legal h2 { font-size: 18px; font-weight: 800; color: var(--text); margin: 28px 0 6px; }
.legal h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 16px 0 1px; }
.legal p, .legal li { color: var(--muted); margin: 2px 0; }
.legal a { color: var(--text); text-decoration: underline; }
.legal .todo { color: var(--accent); }
/* per-operator label + separator on the market-level (all operators) legal page */
.legal__cities { color: var(--accent) !important; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin: 0 0 2px; }
/* space between consecutive operator blocks on the market-level legal page */
.legal__op + .legal__op { margin-top: 22px; }
.legal__sep { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
.legal-tag {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent);
  border-radius: 999px; padding: 3px 10px; margin-bottom: 8px;
}

/* --- Consent banner ------------------------------------------------------- */
.consent-banner {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: var(--maxw);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px;
  z-index: 90;
}
.consent-banner[hidden] { display: none; }
.consent-banner__text { font-size: 14px; color: var(--text); margin-bottom: 12px; }
.consent-banner__text a { color: var(--accent-hover); text-decoration: underline; }
.consent-banner__actions { display: flex; gap: 10px; }
.consent-banner__actions .btn { width: auto; flex: 1; min-height: 46px; }

/* --- Empty / 404 ---------------------------------------------------------- */
.notice { text-align: center; padding: 40px 0; }
.notice h1 { font-size: 24px; margin: 0 0 8px; }
.notice p { color: var(--muted); margin: 0 0 18px; }

@media (min-width: 480px) {
  .room-card { flex-basis: 60%; }
}
@media (prefers-reduced-motion: reduce) {
  .view { animation: none; }
  .btn:active { transform: none; }
}
