/* plats.photos – Blue Hour Design System */

:root {
  --ink: #12151c;        /* Nachtblau, Blaue Stunde */
  --surface: #1a1f29;
  --surface-2: #222836;
  --line: #2c3444;
  --text: #eae7df;       /* warmes Papierweiss */
  --muted: #8d95a6;
  --gold: #e3a34c;       /* Goldene Stunde */
  --gold-soft: #f0c185;
  --bluehour: #7fa0c8;
  --danger: #d9705f;
  --radius: 10px;
  --wide: "wdth" 112;
  --narrow: "wdth" 75;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--gold-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ----- Kopf & Fuss ----- */
.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.4rem;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--ink) 92%, transparent);
  backdrop-filter: blur(8px);
  z-index: 500;
}

.brand {
  font-variation-settings: var(--wide);
  font-weight: 750;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.brand:hover { text-decoration: none; }
.brand-dot { color: var(--gold); font-weight: 500; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(180deg, var(--bluehour) 0%, var(--gold) 60%, #b3542f 100%);
  box-shadow: 0 0 18px rgba(227, 163, 76, 0.35);
}

.site-nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.site-nav a { color: var(--muted); font-weight: 500; }
.site-nav a.active, .site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav a.btn { color: var(--ink); }

.site-main { max-width: 1180px; margin: 0 auto; padding: 1.6rem 1.4rem 4rem; }

.site-foot {
  border-top: 1px solid var(--line);
  padding: 1.4rem;
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ----- Typografie ----- */
h1, h2, h3 {
  font-variation-settings: var(--wide);
  line-height: 1.15;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 780; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 650; }

.eyebrow {
  font-variation-settings: var(--narrow);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* ----- Buttons & Formulare ----- */
.btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { text-decoration: none; filter: brightness(1.12); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.85rem; }

.linklike {
  background: none; border: 0; padding: 0; color: var(--muted);
  font: inherit; font-weight: 500; cursor: pointer;
}
.linklike:hover { color: var(--text); }
.inline-form { display: inline; }

form.stack { display: grid; gap: 1rem; max-width: 460px; }
form.stack-wide { max-width: 760px; }

label { display: grid; gap: 0.3rem; font-weight: 600; font-size: 0.92rem; }
label .hint { font-weight: 400; color: var(--muted); font-size: 0.82rem; }

input[type="text"], input[type="email"], input[type="password"],
input[type="url"], input[type="date"], input[type="file"],
select, textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); outline: none; }

.checks { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.checks label {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.35rem 0.8rem; font-weight: 500; cursor: pointer;
  background: var(--surface);
}
.checks label:has(input:checked) { border-color: var(--gold); color: var(--gold-soft); }
.checks input { accent-color: var(--gold); }

/* ----- Flash ----- */
.flash {
  padding: 0.7rem 1rem; border-radius: var(--radius); margin-bottom: 1rem;
  border: 1px solid var(--line); background: var(--surface);
}
.flash-success { border-color: #4f8f5f; }
.flash-error { border-color: var(--danger); }
.flash-info { border-color: var(--bluehour); }

/* ----- Landing ----- */
.hero { padding: 3.5rem 0 2.5rem; max-width: 720px; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); }
.hero-actions { display: flex; gap: 0.8rem; margin-top: 1.4rem; flex-wrap: wrap; }

.hero-lightband {
  height: 14px; border-radius: 999px; margin: 2.2rem 0 0;
  background: linear-gradient(90deg,
    #0d1420 0%, #16223a 14%, #3d5a8a 24%, #7fa0c8 30%,
    #e3a34c 38%, #f4e3c0 50%, #e3a34c 62%,
    #b3542f 70%, #3d5a8a 78%, #16223a 88%, #0d1420 100%);
  box-shadow: 0 0 28px rgba(227, 163, 76, 0.25);
}
.hero-lightband-labels {
  display: flex; justify-content: space-between;
  color: var(--muted); font-size: 0.75rem; margin-top: 0.4rem;
  font-variation-settings: var(--narrow);
  text-transform: uppercase; letter-spacing: 0.1em;
}

.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem; margin-top: 2.5rem;
}
.feature {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 1.2rem;
}
.feature h3 { color: var(--gold-soft); }
.feature p { color: var(--muted); margin: 0; font-size: 0.92rem; }

/* ----- Location-Karten (Liste) ----- */
.toolbar {
  display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: end;
  margin-bottom: 1.4rem;
}
.toolbar label { min-width: 160px; flex: 1; }
.toolbar .grow { flex: 2; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.2rem;
}

.loc-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.loc-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.loc-card a.cover { display: block; aspect-ratio: 3 / 2; background: var(--surface-2); }
.loc-card a.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.loc-card .nocover {
  width: 100%; height: 100%;
  display: grid; place-items: center; color: var(--muted); font-size: 0.85rem;
}
.loc-card .body { padding: 0.9rem 1rem 1rem; display: grid; gap: 0.4rem; }
.loc-card .body h3 { margin: 0; }
.loc-card .body h3 a { color: var(--text); }
.loc-card .meta { color: var(--muted); font-size: 0.85rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag {
  font-size: 0.72rem; font-variation-settings: var(--narrow);
  text-transform: uppercase; letter-spacing: 0.08em;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.15rem 0.55rem; color: var(--muted);
}
.tag-gold { border-color: var(--gold); color: var(--gold-soft); }

/* ----- Detailseite ----- */
.loc-head { display: flex; justify-content: space-between; gap: 1rem; align-items: start; flex-wrap: wrap; }
.loc-columns {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 2rem; margin-top: 1.2rem;
}
@media (max-width: 860px) { .loc-columns { grid-template-columns: 1fr; } }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.6rem; }
.gallery a { display: block; aspect-ratio: 3 / 2; border-radius: 8px; overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }

.infobox {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 1.1rem 1.2rem; margin-bottom: 1.2rem;
}
.infobox h3 { display: flex; align-items: center; gap: 0.5rem; }
.infobox p:last-child { margin-bottom: 0; }

#detail-map, #picker-map { height: 300px; border-radius: var(--radius); border: 1px solid var(--line); }
#big-map { height: calc(100vh - 220px); min-height: 420px; border-radius: var(--radius); border: 1px solid var(--line); }

/* ----- Lichtfenster (Signatur) ----- */
.lichtfenster { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 1.1rem 1.2rem; }
.lichtfenster .lf-head { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.lichtfenster input[type="date"] { width: auto; }

.lf-band {
  position: relative; height: 34px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line);
}
.lf-hours {
  display: flex; justify-content: space-between;
  font-size: 0.7rem; color: var(--muted); margin-top: 0.25rem;
  font-variation-settings: var(--narrow);
}
.lf-times { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.6rem; margin-top: 1rem; }
.lf-time { border-left: 3px solid var(--line); padding-left: 0.6rem; }
.lf-time .k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-variation-settings: var(--narrow); }
.lf-time .v { font-weight: 700; font-size: 1.05rem; }
.lf-time.gold { border-left-color: var(--gold); }
.lf-time.blue { border-left-color: var(--bluehour); }
.lf-dir { margin-top: 0.8rem; color: var(--muted); font-size: 0.88rem; }
.lf-dir strong { color: var(--gold-soft); }

/* ----- Tabellen (Admin) ----- */
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); }
table.list th { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; font-variation-settings: var(--narrow); }

/* ----- Upload-Vorschau im Formular ----- */
.photo-admin { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.photo-admin .ph {
  width: 130px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  display: grid; gap: 0; background: var(--surface);
}
.photo-admin img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; }
.photo-admin button { border-radius: 0; }

.leaflet-container { background: #0d1017; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface-2); color: var(--text); }
.leaflet-popup-content a { color: var(--gold-soft); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
