/* Ideenwerkstatt – Charles-Farbwelt, ohne Kundenlogo.
   Volcano #31393b · Slate-Green #273c34 · Coral #ffc3a0 · Jade #8de3ca · Concrete #e3e3e3 */

@font-face {
  font-family: 'Space Grotesk';
  src: url('assets/SpaceGrotesk.ttf') format('truetype');
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --volcano: #31393b;
  --slate: #273c34;
  --coral: #ffc3a0;
  --coral-deep: #e8a37c;
  --jade: #8de3ca;
  --concrete: #e3e3e3;
  --bg: #f7f6f4;
  --card: #ffffff;
  --ink-soft: #6b7477;
  --radius: 18px;
  --shadow: 0 10px 40px rgba(49, 57, 59, 0.09);
  --shadow-soft: 0 4px 18px rgba(49, 57, 59, 0.06);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--volcano);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Feine Trennlinie in Coral – wiederkehrendes Element */
.rule {
  display: block;
  width: 56px;
  height: 2px;
  background: linear-gradient(90deg, var(--coral), var(--coral-deep));
  border-radius: 2px;
  margin: 0 auto;
}

.eyebrow, .gate-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

/* Sanftes Erscheinen beim Scrollen */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible, .reveal-now { opacity: 1; transform: none; }

/* ---------- Anmeldung ---------- */
#gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(141, 227, 202, 0.08), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(255, 195, 160, 0.10), transparent 60%),
    var(--slate);
  padding: 24px;
}
.gate-card {
  width: 100%;
  max-width: 430px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 52px 40px 44px;
  text-align: center;
  color: #fff;
  backdrop-filter: blur(6px);
}
.gate-eyebrow { color: var(--coral); margin: 0 0 18px; }
.gate-card h1 {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  margin: 0 0 18px;
}
.gate-card .rule { margin-bottom: 22px; }
.gate-card p { color: rgba(255, 255, 255, 0.72); font-size: 0.95rem; margin: 0 0 26px; }
.gate-card form { display: flex; flex-direction: column; gap: 14px; }
.gate-card input {
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font: inherit;
  text-align: center;
  letter-spacing: 0.06em;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.gate-card input:focus { border-color: var(--coral); background: rgba(255, 255, 255, 0.1); }
.gate-card input::placeholder { color: rgba(255, 255, 255, 0.4); letter-spacing: 0.04em; }

/* ---------- Buttons ---------- */
.btn {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  border-radius: 999px;
  padding: 13px 26px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s, opacity 0.15s;
}
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primary { background: linear-gradient(135deg, var(--coral), var(--coral-deep)); color: var(--volcano); }
.btn.primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(232, 163, 124, 0.4); }
.btn.ghost { background: transparent; color: inherit; border: 1px solid currentColor; opacity: 0.75; }
.btn.ghost:hover:not(:disabled) { opacity: 1; }
.btn.small { padding: 8px 16px; font-size: 0.72rem; }
.btn.edit { background: var(--slate); color: #fff; }
.btn.edit:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(39, 60, 52, 0.35); }
.btn.star-btn.active { background: var(--coral); border-color: var(--coral); color: var(--volcano); opacity: 1; }

/* ---------- Kopf ---------- */
.topbar { background: var(--slate); color: #fff; }
.topbar-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  padding: 44px clamp(20px, 5vw, 40px) 34px;
}
.topbar-text { flex: 1; }
.topbar .eyebrow { color: var(--coral); margin: 0 0 10px; }
.topbar h1 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  margin: 0;
}

.admin-bar {
  background: var(--volcano);
  color: var(--jade);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}
.admin-bar span { display: inline-block; padding: 9px 0; margin-right: 28px; }
.admin-bar { padding: 0 clamp(20px, 5vw, 40px); }

/* ---------- Inhalt ---------- */
.intro {
  max-width: 640px;
  margin: 64px auto 0;
  padding: 0 24px;
  text-align: center;
  font-size: 1.06rem;
  font-weight: 300;
}
.intro .rule { margin-bottom: 26px; }
.intro strong { font-weight: 500; }

.section-title {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 22px;
}

.grundriss-card, .room {
  max-width: 1060px;
  margin: 44px auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 34px clamp(20px, 4vw, 44px) 30px;
}
.grundriss-img { width: 100%; border-radius: 12px; }

.room-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.room-nav a {
  text-decoration: none;
  color: var(--volcano);
  background: var(--bg);
  border: 1px solid var(--concrete);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  transition: background 0.15s, border-color 0.15s;
}
.room-nav a:hover { background: var(--coral); border-color: var(--coral); }

/* ---------- Raum ---------- */
.room { scroll-margin-top: 24px; }
.room-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 20px;
}
.room-nr {
  font-size: 2.6rem;
  font-weight: 300;
  color: var(--coral-deep);
  line-height: 1;
  letter-spacing: 0.02em;
  min-width: 62px;
}
.room-head h2 {
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0;
  flex: 1;
}
.version-label {
  font-size: 0.8rem;
  color: var(--ink-soft);
  letter-spacing: 0.03em;
  max-width: 40%;
  text-align: right;
}

.big-wrap { position: relative; }
.big-img {
  width: 100%;
  border-radius: 12px;
  display: block;
  background: var(--concrete);
  min-height: 220px;
  cursor: zoom-in;
  transition: filter 0.2s;
}
.big-img:hover { filter: brightness(1.02); }

.busy-overlay {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: rgba(39, 60, 52, 0.6);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  padding: 24px;
  backdrop-filter: blur(3px);
}
.busy-overlay p { margin: 0; font-weight: 300; letter-spacing: 0.04em; font-size: 1.02rem; }
.busy-line {
  width: 180px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
  position: relative;
}
.busy-line::after {
  content: '';
  position: absolute;
  left: -40%;
  top: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--coral), transparent);
  animation: sweep 1.8s ease-in-out infinite;
}
@keyframes sweep { to { left: 100%; } }

/* Miniaturen */
.thumbs { display: flex; gap: 12px; margin-top: 14px; overflow-x: auto; padding: 4px 2px 8px; }
.thumb {
  position: relative;
  flex: 0 0 auto;
  width: 124px;
  height: 82px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  background: var(--concrete);
  transition: transform 0.15s ease, border-color 0.15s, box-shadow 0.15s;
}
.thumb:hover { transform: translateY(-2px); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.selected { border-color: var(--coral-deep); box-shadow: 0 4px 14px rgba(232, 163, 124, 0.35); }
.thumb .star {
  position: absolute;
  top: 4px; right: 6px;
  font-size: 0.85rem;
  color: var(--coral);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
.thumb .tag {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(49, 57, 59, 0.75));
  color: #fff;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  padding: 10px 7px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

/* Aktionen */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: center; }
.actions .spacer { flex: 1; }
.actions a.btn { text-decoration: none; display: inline-block; }

/* Bearbeiten-Formular */
.edit-form {
  margin-top: 18px;
  background: var(--bg);
  border: 1px solid var(--concrete);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: unfold 0.25s ease;
}
@keyframes unfold { from { opacity: 0; transform: translateY(-6px); } }
.edit-form label { font-size: 0.85rem; color: var(--ink-soft); letter-spacing: 0.02em; }
.edit-form input[type="text"] {
  font: inherit;
  font-weight: 300;
  font-size: 1.02rem;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid var(--concrete);
  outline: none;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.edit-form input[type="text"]:focus { border-color: var(--coral-deep); box-shadow: 0 0 0 3px rgba(255, 195, 160, 0.25); }
.file-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.file-row input[type="file"] { font-size: 0.82rem; color: var(--ink-soft); }
.file-preview { height: 54px; border-radius: 8px; border: 1px solid var(--concrete); }
.form-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

.hint { font-size: 0.78rem; color: var(--ink-soft); margin: 0; letter-spacing: 0.02em; }
.error {
  background: #fbe9e2;
  color: #8a3a1e;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.9rem;
  margin: 14px 0 0;
}

/* ---------- Großansicht ---------- */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(30, 37, 38, 0.93);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  cursor: zoom-out;
  padding: 3vh 3vw;
}
#lightbox img {
  max-width: 96vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
}
.lightbox-hint { color: rgba(255, 255, 255, 0.5); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; margin: 0; }

/* ---------- Fuß ---------- */
.footer {
  text-align: center;
  padding: 60px 20px 56px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 300;
}
.footer .rule { margin-bottom: 24px; }
.footer-small {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .topbar-inner { padding-top: 30px; padding-bottom: 24px; }
  .room-nr { font-size: 1.9rem; min-width: 46px; }
  .version-label { display: none; }
  .thumb { width: 100px; height: 66px; }
}
