/* Trier Welterbe 3D – Einstiegsseite, Mobile First
   Gleiches Erscheinungsbild wie die Erlebnisse (angelehnt an trier-info.de):
   Aubergine #450C34, Weiss/Hellgrau, Source Sans, Versal-Ueberschriften mit weiter Laufweite. */
:root {
  --brand: #450c34;
  --brand-dark: #320824;
  --brand-soft: #f3ebf0;
  --brand-tint: #e7d6e0;
  --accent: #e73452;
  --ink: #111;
  --text: #2b2b2b;
  --muted: #6b6a6a;
  --line: #d9d9d9;
  --surface: #fff;
  --surface-2: #efefef;
  --radius: 4px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --bar-h: 56px;
  --gutter: 16px;
  --font: 'Source Sans 3', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + var(--safe-t)); }
body {
  margin: 0;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.kicker {
  margin: 0 0 8px; font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
}

/* ------------------------------------------------------------ Kopfzeile */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: calc(var(--bar-h) + var(--safe-t));
  display: flex; align-items: center;
  padding: var(--safe-t) max(var(--gutter), calc((100% - 1200px) / 2 + var(--gutter))) 0;
  background: var(--brand); color: #fff;
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: #fff; line-height: 1; }
.brand-city { font-size: 26px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.brand-name { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.9; }

/* ------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  border: 2px solid transparent; border-radius: var(--radius);
  font-size: 14px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.btn-light { background: #fff; color: var(--brand); }
.btn-light:hover { background: var(--brand-soft); }
.btn-primary { background: var(--brand); color: #fff; }

/* ------------------------------------------------------------ Hero */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 100%, rgba(231, 52, 82, 0.22), transparent 60%),
    linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
}
/* zartes Mauerwerk-Raster als Anspielung auf die Quader der Porta Nigra */
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.07;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.9) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.9) 1px, transparent 1px);
  background-size: 96px 32px, 96px 64px;
  -webkit-mask-image: linear-gradient(to left, #000, transparent 75%);
  mask-image: linear-gradient(to left, #000, transparent 75%);
}
.hero-inner {
  position: relative; max-width: 1200px; margin: 0 auto;
  padding: 32px var(--gutter) 0;
  display: grid; gap: 4px;
}
.hero .kicker { color: #f5c7d6; }
.hero h1 {
  margin: 0; font-weight: 700; text-transform: uppercase;
  font-size: clamp(38px, 11vw, 72px); line-height: 0.98; letter-spacing: 0.1em;
}
.hero-sub { margin: 14px 0 22px; font-size: 18px; font-weight: 300; line-height: 1.45; letter-spacing: 0.02em; max-width: 34ch; }

.hero-guide { display: flex; align-items: flex-end; gap: 4px; margin: 18px 0 0 -10px; }
.guide-img { width: 128px; height: auto; flex: none; order: -1; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35)); }
.bubble {
  position: relative; margin: 0 0 34px; padding: 12px 14px;
  background: #fff; color: var(--text); border-radius: 10px;
  font-size: 15px; line-height: 1.45; max-width: 30ch;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}
.bubble::before {
  content: ''; position: absolute; left: -8px; bottom: 18px;
  border: 8px solid transparent; border-left: 0; border-right-color: #fff;
}
.bubble strong { font-family: 'Cinzel', Georgia, serif; color: var(--brand); letter-spacing: 0.06em; }

/* ------------------------------------------------------------ Erlebnisse */
.experiences { max-width: 1200px; margin: 0 auto; padding: 32px var(--gutter) 8px; }
.section-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px;
  padding-bottom: 12px; margin-bottom: 18px; border-bottom: 1px solid var(--line);
}
.section-head h2, .about h2 {
  margin: 0; color: var(--ink); font-size: 22px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.section-count { margin: 0; font-size: 14px; color: var(--muted); }
.section-count strong { color: var(--brand); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.tile {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(50, 8, 36, 0.06);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.tile-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--brand-soft); }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.tile-body { display: flex; flex-direction: column; flex: 1; padding: 12px 12px 14px; }
.tile-kicker { margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.tile h3 {
  margin: 0; color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.15;
  letter-spacing: 0.08em; text-transform: uppercase; hyphens: manual;
}
.tile-text { margin: 6px 0 0; font-size: 14px; line-height: 1.45; }
.tile-place {
  display: flex; align-items: center; gap: 4px; margin: auto 0 0; padding-top: 10px;
  font-size: 12.5px; color: var(--muted);
}
.tile-place svg { width: 15px; height: 15px; color: var(--brand); }

.badge {
  position: absolute; left: 8px; top: 8px;
  padding: 5px 9px 6px; border-radius: 3px;
  background: rgba(50, 8, 36, 0.82); color: #fff;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1;
}
.badge-live { background: var(--accent); }
.badge-wip { background: #fff; color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }

/* Strichzeichnungen der kommenden Erlebnisse */
.art {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 14% 8% 6%;
  color: var(--brand); stroke-width: 2.2; opacity: 0.6;
  transition: transform 0.8s var(--ease), opacity 0.4s;
}
.art .thin { stroke-width: 1.4; }
.art .fill { fill: var(--brand-tint); }
.art .gap { stroke-dasharray: 2 6; }

/* Platzhalter: sichtbar, aber zurueckhaltend */
.is-soon { box-shadow: none; outline: 1px solid var(--line); outline-offset: -1px; }
.is-soon .tile-media { background: repeating-linear-gradient(135deg, var(--brand-soft) 0 10px, #f7f1f4 10px 20px); }
.is-soon .tile-text { color: var(--muted); }

/* Hauptkachel (verfuegbares Erlebnis) */
.tile-feature { grid-column: 1 / -1; }
.tile-feature .tile-body { padding: 16px 16px 18px; }
.tile-feature .tile-kicker { color: var(--accent); font-size: 12px; }
.tile-feature h3 { font-size: 26px; letter-spacing: 0.1em; }
.tile-feature .tile-text { font-size: 16px; line-height: 1.5; margin-top: 8px; }
.tile-feature .badge { left: 12px; top: 12px; font-size: 11.5px; padding: 6px 10px 7px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 14px; font-weight: 600; color: var(--brand); }
.facts li { display: flex; align-items: center; gap: 6px; }
.facts svg { width: 18px; height: 18px; }
.tile-cta { margin-top: 18px; align-self: stretch; }
.tile-cta svg { transition: transform 0.3s var(--ease); }

@media (hover: hover) {
  a.tile:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 16px 36px rgba(50, 8, 36, 0.16); }
  a.tile:hover .tile-media img { transform: scale(1.04); }
  a.tile:hover .tile-cta { background: var(--brand-dark); }
  a.tile:hover .tile-cta svg { transform: translateX(4px); }
  .is-soon:hover .art { opacity: 0.85; transform: translateY(-2px); }
}
a.tile:active { transform: scale(0.99); }

/* Vorladen eines Erlebnisses (start.js): Fortschritt auf dem Kachelbild */
.loader {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center; padding: 16px;
  background: linear-gradient(rgba(50, 8, 36, 0.35), rgba(50, 8, 36, 0.6));
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  color: #fff;
  animation: loader-in 0.25s var(--ease) both;
}
@keyframes loader-in { from { opacity: 0; } }
.loader-box {
  width: min(320px, 100%); padding: 16px 18px 14px; border-radius: 6px; text-align: center;
  background: rgba(50, 8, 36, 0.78); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.loader-title { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.loader-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.25); overflow: hidden; }
.loader-bar span {
  display: block; height: 100%; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.2s linear;
}
.loader-info { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0 0; font-size: 13px; font-variant-numeric: tabular-nums; opacity: 0.9; }
.loader-pct { font-weight: 700; }
.loader-hint { margin: 14px 0 0; font-size: 12px; opacity: 0.65; }
.loader.is-done .loader-hint { visibility: hidden; }
.tile.is-loading .badge { opacity: 0; }
.tile.is-loading .tile-media img { transform: scale(1.04); }

/* ------------------------------------------------------------ Ueber das Welterbe */
.about { max-width: 1200px; margin: 0 auto; padding: 24px var(--gutter) 8px; }
.about-card { background: var(--surface); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 20px 18px; }
.about h2 { font-size: 18px; line-height: 1.3; }
.about-card p:not(.kicker) { margin: 10px 0 0; font-size: 16px; line-height: 1.6; max-width: 70ch; }

.footer { max-width: 1200px; margin: 0 auto; padding: 20px var(--gutter) calc(28px + var(--safe-b)); }
.footer p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* ------------------------------------------------------------ Sehr schmale Handys */
@media (max-width: 359px) {
  .grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ Tablet */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .grid { gap: 16px; }
  .tile-body { padding: 14px 16px 16px; }
  .tile h3 { font-size: 17px; }
  .tile-text { font-size: 15px; }
  .tile-feature { flex-direction: row; }
  .tile-feature .tile-media { flex: 1.35; aspect-ratio: auto; min-height: 340px; }
  .tile-feature .tile-body { flex: 1; padding: 28px 28px 28px; justify-content: center; }
  .tile-feature h3 { font-size: 32px; }
  .tile-cta { align-self: flex-start; }
}

/* ------------------------------------------------------------ Desktop */
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.2fr 1fr; align-items: end; gap: 32px; padding-top: 56px; }
  .hero-text { padding-bottom: 56px; }
  .hero-sub { font-size: 20px; }
  .hero-guide { justify-content: flex-end; margin: 0; }
  .guide-img { width: 200px; }
  .bubble { font-size: 16px; margin-bottom: 70px; }
  .experiences { padding-top: 48px; }
  .grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .tile-feature .tile-media { flex: 1.6; min-height: 420px; }
  .tile-feature .tile-body { padding: 40px; }
  .tile-feature h3 { font-size: 40px; }
  .tile-feature .tile-text { font-size: 17px; max-width: 40ch; }
  .about { padding-top: 40px; }
  .about-card { padding: 28px 32px; }
  .about h2 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
