@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,500;9..144,700&display=swap");

:root {
  --ink: #0c0a09;
  --paper: #f3eee6;
  --gold: #d4a85a;
  --gold-soft: rgba(212, 168, 90, 0.85);
  --muted: rgba(243, 238, 230, 0.72);
  --line: rgba(243, 238, 230, 0.18);
  --panel: rgba(28, 22, 18, 0.92);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.df-home {
  margin: 0;
  min-height: 100%;
  color: var(--paper);
  font-family: "Outfit", sans-serif;
  background: var(--ink);
}

.df-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}

.df-hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.df-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.04);
  animation: df-ken 28s ease-in-out infinite alternate;
}

.df-hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(12, 10, 9, 0.45) 0%, rgba(12, 10, 9, 0.62) 45%, rgba(12, 10, 9, 0.88) 100%),
    radial-gradient(ellipse 70% 45% at 50% 60%, rgba(212, 168, 90, 0.16), transparent 65%);
}

.df-hero-inner {
  width: min(40rem, calc(100% - 2.5rem));
  padding: 2rem 0;
  animation: df-rise 0.9s ease-out both;
}

.df-brand {
  margin: 0 0 1.75rem;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: clamp(3.4rem, 11vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--paper);
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.df-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  background: var(--gold);
  color: var(--ink);
  transition: transform 0.2s ease, background 0.2s ease;
}

.df-cta-primary:hover {
  transform: translateY(-1px);
  background: #e0b96a;
}

/* Figuren / Kapitel */
body.df-figuren {
  margin: 0;
  min-height: 100%;
  color: var(--paper);
  font-family: "Outfit", sans-serif;
  background-color: #1a1410;
  background-image:
    linear-gradient(
      180deg,
      rgba(26, 20, 16, 0.42) 0%,
      rgba(26, 20, 16, 0.5) 45%,
      rgba(18, 14, 12, 0.62) 100%
    ),
    radial-gradient(ellipse 90% 55% at 50% -5%, rgba(212, 168, 90, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 80%, rgba(120, 72, 40, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 0% 70%, rgba(80, 52, 36, 0.14), transparent 45%),
    url("img/hero-ballroom.jpg");
  background-size: auto, auto, auto, auto, cover;
  background-position: center, center, center, center, center 40%;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.df-top {
  position: relative;
  z-index: 30;
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 0.5rem;
  padding-top: max(1.25rem, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  pointer-events: auto;
}

.df-top a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  min-height: 44px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(212, 168, 90, 0.45);
  background: rgba(12, 10, 9, 0.55);
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.df-top a:hover {
  text-decoration: none;
  border-color: var(--gold);
}

.df-page-title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.df-filter-bar {
  width: min(1100px, calc(100% - 2rem));
  margin: 0.5rem auto 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.df-filter-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.df-select {
  min-width: min(100%, 280px);
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(28, 22, 18, 0.95);
  color: var(--paper);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
}

.df-select:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.df-chapters {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
  display: grid;
  gap: 2.5rem;
}

.df-status-band {
  animation: df-rise 0.7s ease-out both;
  display: grid;
  gap: 1.25rem;
}

.df-status-head {
  display: grid;
  gap: 0.35rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.df-status-title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.45rem, 3.2vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.df-status-lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 36rem;
}

.df-status-live .df-status-title {
  color: var(--paper);
}

.df-status-wip {
  opacity: 0.92;
}

.df-status-wip .df-status-title {
  color: rgba(243, 238, 230, 0.82);
}

.df-hub-rohlinge {
  padding-bottom: 4rem;
}

.df-hub-rohlinge .df-chapter[hidden] {
  display: none;
}

.df-status-hub {
  opacity: 0.95;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.df-status-hub .df-status-title {
  color: rgba(243, 238, 230, 0.78);
}

.df-tile-hub {
  border-style: dashed;
  border-color: rgba(212, 168, 90, 0.35);
}

.df-tile-hub .df-tile-type {
  color: rgba(212, 168, 90, 0.85);
}

.df-tile-hub:not(:has(img)) {
  aspect-ratio: auto;
  min-height: 7.5rem;
  background: rgba(28, 22, 18, 0.55);
}

.df-tile-hub:not(:has(img)) .df-tile-body {
  position: relative;
  inset: auto;
  padding: 0.95rem 1rem 1.05rem;
}

.df-tile-note {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.35;
}

.df-chapter {
  display: grid;
  gap: 0.65rem;
}

.df-chapter-title {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.df-chapter-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.df-tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--paper);
  isolation: isolate;
  background: var(--panel);
  border: 1px solid var(--line);
}

.df-tile-live {
  border-color: rgba(212, 168, 90, 0.45);
}

.df-tile-wip {
  border-style: dashed;
  border-color: rgba(243, 238, 230, 0.22);
  background: rgba(28, 22, 18, 0.72);
}

.df-tile-wip .df-tile-type {
  color: rgba(243, 238, 230, 0.55);
}

.df-tile-wip:not(:has(img)) .df-tile-body {
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Ghost-Fußspuren in Vektorgrafiken */
.ghost-print {
  transition: opacity 0.25s ease;
}
.ghost-print.is-done {
  opacity: 0.55 !important;
}
.ghost-print.is-current {
  opacity: 0.9 !important;
}
.foot-live.is-moving {
  filter: drop-shadow(0 0 6px rgba(201, 162, 39, 0.55));
}

.df-tile img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.df-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 30%, rgba(12, 10, 9, 0.9) 100%);
}

.df-tile:hover img {
  transform: scale(1.05);
}

.df-tile-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0.85rem 0.95rem 1rem;
}

.df-tile-type {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.2rem;
}

.df-tile-title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 500;
}

.df-empty {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Editor */
body.df-editor {
  margin: 0;
  min-height: 100%;
  color: var(--paper);
  font-family: "Outfit", sans-serif;
  background: var(--ink);
}

.df-editor-wrap {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.df-editor-wrap h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  margin: 0 0 0.5rem;
}

.df-editor-wrap .hint {
  color: var(--muted);
  margin: 0 0 1.25rem;
  line-height: 1.45;
}

.df-editor-cols {
  display: grid;
  gap: 1rem;
}

@media (min-width: 860px) {
  .df-editor-cols {
    grid-template-columns: 1fr 1fr;
  }
}

.df-board {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
  min-height: 280px;
}

.df-board h2 {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.df-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  min-height: 3rem;
}

.df-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(12, 10, 9, 0.55);
  border: 1px solid var(--line);
  cursor: grab;
  user-select: none;
}

.df-item:active {
  cursor: grabbing;
}

.df-item.dragging {
  opacity: 0.45;
}

.df-item-title {
  flex: 1;
  font-weight: 600;
  font-size: 0.92rem;
}

.df-item-meta {
  font-size: 0.72rem;
  color: var(--muted);
}

.df-chapter-block {
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.df-chapter-block:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.df-chapter-block input {
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(12, 10, 9, 0.65);
  color: var(--paper);
  font: inherit;
}

.df-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.df-actions button,
.df-actions a.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  min-height: 2.5rem;
  padding: 0 1.1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.df-btn-gold {
  background: var(--gold);
  color: var(--ink);
}

.df-btn-ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line) !important;
}

@keyframes df-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes df-ken {
  from {
    transform: scale(1.04);
  }
  to {
    transform: scale(1.1) translate3d(-1.2%, -0.8%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .df-hero-media img,
  .df-hero-inner,
  .df-chapter {
    animation: none;
  }
  .df-tile img {
    transition: none;
  }
}

/* Link zum Konto auf der Startseite */
.df-account-links {
  display: block;
  margin-top: 1.1rem;
  font-size: 0.9rem;
  color: rgba(244, 237, 226, 0.6);
}

.df-account-links a {
  display: inline-block;
  padding: 6px 4px;
  color: rgba(244, 237, 226, 0.85);
  text-decoration: none;
  border-bottom: 1px solid rgba(228, 193, 122, 0.45);
}

.df-account-links a:hover {
  color: #e4c17a;
}
