:root {
  --bg: #0e0e0d;
  --ink: #f0ede6;
  --mut: #8a877f;
  --acc: #e8c15a;
  --line: rgba(255, 255, 255, 0.09);
  --card: #151513;
  --ok: #7fd4a8;
  --bad: #e07a5f;
  --font-d: 'Syne', sans-serif;
  --font-b: 'Space Grotesk', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--bg); }

body {
  min-height: 100vh;
  font-family: var(--font-b);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(232, 193, 90, 0.07), transparent 70%),
    repeating-linear-gradient(0deg, transparent 0 79px, rgba(255, 255, 255, 0.022) 79px 80px),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(255, 255, 255, 0.022) 79px 80px);
}

.grain {
  position: fixed;
  inset: -100%;
  z-index: 30;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(10) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-5%, 3%); }
  50% { transform: translate(4%, -6%); }
  75% { transform: translate(-6%, -2%); }
  100% { transform: translate(5%, 5%); }
}

button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 6px; }

.wrap { position: relative; z-index: 1; max-width: 940px; margin: 0 auto; padding: 30px 22px 90px; }

/* ---------------- header ---------------- */
.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 54px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.orb {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.85), transparent 42%),
    conic-gradient(from 0deg, #1a3a2d, #7fd4a8, #e8c15a, #10241c, #1a3a2d);
  box-shadow: inset -5px -7px 12px rgba(0, 0, 0, 0.7);
}
.brand b { font-family: var(--font-d); font-weight: 700; font-size: 15px; letter-spacing: 0.03em; }
.brand sup { font-size: 8px; }
.brand span { color: var(--mut); font-size: 13px; margin-left: 2px; }

.ghost {
  font-size: 13px; color: var(--mut); padding: 9px 16px;
  border: 1px solid var(--line); border-radius: 999px; transition: color .25s, border-color .25s;
}
.ghost:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.3); }

/* ---------------- type ---------------- */
h1 {
  font-family: var(--font-d); font-weight: 800;
  font-size: clamp(34px, 6vw, 62px); line-height: 1.02;
  letter-spacing: -0.02em; text-wrap: balance;
}
.kicker {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.26em;
  color: var(--acc); margin-bottom: 14px;
}
.lead { margin-top: 14px; color: var(--mut); font-size: 15px; line-height: 1.6; max-width: 60ch; }

/* ---------------- drop zone ---------------- */
.drop {
  margin-top: 34px; border: 1.5px dashed rgba(255, 255, 255, 0.16); border-radius: 20px;
  padding: 54px 26px; text-align: center; cursor: pointer;
  transition: border-color .25s, background .25s, transform .25s;
  background: rgba(255, 255, 255, 0.012);
}
.drop:hover { border-color: rgba(232, 193, 90, 0.5); background: rgba(232, 193, 90, 0.035); }
.drop.over { border-color: var(--acc); background: rgba(232, 193, 90, 0.08); transform: scale(1.008); }
.drop h2 { font-family: var(--font-d); font-weight: 700; font-size: 21px; margin-bottom: 8px; }
.drop p { color: var(--mut); font-size: 13px; }
.drop .plus {
  width: 46px; height: 46px; margin: 0 auto 18px; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center;
  font-size: 22px; color: var(--acc);
}

/* ---------------- file list ---------------- */
.files { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.file {
  display: grid; grid-template-columns: 46px 1fr auto auto; gap: 14px;
  align-items: center; padding: 10px 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px;
}
.file .th {
  width: 46px; height: 46px; border-radius: 8px; overflow: hidden; background: #24241f;
  display: grid; place-items: center; font-size: 10px; color: var(--mut);
  text-transform: uppercase; letter-spacing: .08em;
}
.file .th img { width: 100%; height: 100%; object-fit: cover; }
.file .nm { min-width: 0; }
.file .nm b { display: block; font-weight: 400; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .nm i { font-style: normal; font-size: 12px; color: var(--mut); font-variant-numeric: tabular-nums; }
.file .pct { font-size: 12px; color: var(--mut); font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }
.file .x { color: var(--mut); font-size: 18px; padding: 0 4px; transition: color .2s; }
.file .x:hover { color: var(--bad); }
.file .bar { grid-column: 1 / -1; height: 2px; background: rgba(255, 255, 255, 0.08); border-radius: 2px; overflow: hidden; }
.file .bar i { display: block; height: 100%; width: 0; background: var(--acc); transition: width .25s; }
.file.done .pct { color: var(--ok); }

/* ---------------- form ---------------- */
.form { margin-top: 26px; display: grid; gap: 14px; }
label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--mut); margin-bottom: 7px; }
input[type=text], input[type=password], textarea, select {
  width: 100%; background: var(--card); border: 1px solid var(--line);
  border-radius: 11px; padding: 13px 15px; font-size: 14px;
  transition: border-color .25s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: rgba(232, 193, 90, 0.55); }
textarea { resize: vertical; min-height: 88px; line-height: 1.55; }
select { appearance: none; cursor: pointer; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.cta {
  background: var(--ink); color: #101010; font-weight: 500; font-size: 15px;
  padding: 15px 30px; border-radius: 999px; justify-self: start;
  display: inline-flex; align-items: center; gap: 10px;
  transition: transform .3s cubic-bezier(.22,1,.36,1), background .3s, opacity .2s;
}
.cta:hover:not(:disabled) { transform: scale(1.04); background: var(--acc); }
.cta:disabled { opacity: .4; cursor: not-allowed; }

.note { font-size: 13px; line-height: 1.5; }
.note.bad { color: var(--bad); }
.note.ok { color: var(--ok); }

/* ---------------- result ---------------- */
.result { margin-top: 30px; padding: 26px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.linkbox { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.linkbox input {
  flex: 1 1 260px; font-family: var(--font-b); font-size: 13px; color: var(--acc);
}
.copy { background: var(--acc); color: #101010; font-weight: 500; font-size: 14px; padding: 13px 22px; border-radius: 11px; transition: transform .25s; }
.copy:hover { transform: scale(1.04); }

/* ---------------- transfers table ---------------- */
.tlist { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.trow {
  display: grid; grid-template-columns: 1fr auto auto auto; gap: 16px; align-items: center;
  padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  font-size: 13px;
}
.trow a { font-family: var(--font-d); font-weight: 700; font-size: 16px; text-decoration: none; }
.trow a:hover { color: var(--acc); }
.trow .meta { color: var(--mut); font-size: 12px; margin-top: 3px; }
.trow .st { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--mut); }
.trow.gone { opacity: .5; }
.trow .st.live { color: var(--ok); }

/* ---------------- download grid ---------------- */
/* Spaltenraster: jede Kachel behält ihr echtes Seitenverhältnis, dadurch
   stehen Hoch- und Querformat natürlich nebeneinander und nichts springt
   beim Nachladen. */
.grid {
  margin-top: 30px;
  columns: 3;
  column-gap: 12px;
}
@media (max-width: 900px) { .grid { columns: 2; } }
@media (max-width: 520px) { .grid { columns: 1; } }

.cell {
  display: block;
  width: 100%;
  break-inside: avoid;
  margin: 0 0 12px;
  padding: 0;
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #1c1c19;
  cursor: pointer;
  transition: transform .35s cubic-bezier(.22,1,.36,1);
}
.cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .4s;
}
.cell:hover { transform: translateY(-2px); }
.cell:hover img { transform: scale(1.035); }
.cell::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.cell:hover::after, .cell:focus-visible::after { opacity: 1; }
.cell .cap {
  position: absolute;
  left: 12px; right: 12px; bottom: 10px;
  font-size: 12px;
  color: #fff;
  text-align: left;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s, transform .35s;
  pointer-events: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cell:hover .cap, .cell:focus-visible .cap { opacity: 1; transform: none; }
.cell .play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 30px;
  color: rgba(255,255,255,.9);
  text-shadow: 0 2px 18px rgba(0,0,0,.6);
  pointer-events: none;
}
.cell.noimg {
  aspect-ratio: 3/2 !important;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
}
.cell.noimg .cap { position: static; opacity: 1; transform: none; color: var(--mut); text-align: center; }

/* ---------------- Vollbild-Ansicht ---------------- */
.box {
  position: fixed;
  inset: 0;
  z-index: 40;
  /* deckend: beim Bildbetrachten soll nichts vom Seiteninhalt durchscheinen */
  background: #080807;
  display: none;
  touch-action: pan-y;
}
.box.is-open { display: block; }
.box__stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 62px 16px 74px; }
.box__stage img, .box__stage video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  transition: opacity .35s;
}
/* Unscharfe Sofortvorschau aus dem Rasterbild, bis die größere Fassung da ist */
.box__blur {
  position: absolute;
  inset: 62px 16px 74px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(16px);
  transform: scale(.99);
  opacity: .7;
}
.box__nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.09);
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
  display: grid; place-items: center;
  transition: background .25s, transform .25s;
  backdrop-filter: blur(6px);
}
.box__nav:hover { background: rgba(255,255,255,.2); transform: translateY(-50%) scale(1.07); }
.box__prev { left: 14px; }
.box__next { right: 14px; }
.box__close {
  position: absolute;
  top: 14px; right: 16px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.09);
  color: var(--ink);
  font-size: 22px;
  display: grid; place-items: center;
  transition: background .25s, transform .3s;
  backdrop-filter: blur(6px);
}
.box__close:hover { background: rgba(255,255,255,.2); transform: rotate(90deg); }
.box__bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
}
.box__info { min-width: 0; }
.box__info b { display: block; font-weight: 400; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.box__info i { font-style: normal; font-size: 12px; color: var(--mut); font-variant-numeric: tabular-nums; }
.box__dl {
  flex: none;
  background: var(--acc);
  color: #101010;
  font-size: 13px;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform .25s;
}
.box__dl:hover { transform: scale(1.05); }

@media (max-width: 600px) {
  .box__nav { width: 44px; height: 44px; font-size: 25px; background: rgba(255,255,255,.06); }
  .box__prev { left: 6px; } .box__next { right: 6px; }
  .box__bar { padding: 12px 14px; }
  .box__dl { padding: 10px 16px; font-size: 12px; }
}

.msg {
  margin-top: 22px; padding: 20px 22px; background: var(--card);
  border: 1px solid var(--line); border-left: 2px solid var(--acc);
  border-radius: 12px; line-height: 1.65; font-size: 15px; white-space: pre-wrap;
}
.center { text-align: center; padding: 16vh 0; }
.center h1 { margin-bottom: 12px; }

.hide { display: none !important; }
.spin { display: inline-block; width: 13px; height: 13px; border: 2px solid rgba(0,0,0,.25); border-top-color: #101010; border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

@media (max-width: 680px) {
  .wrap { padding: 22px 16px 70px; }
  .row2 { grid-template-columns: 1fr; }
  .trow { grid-template-columns: 1fr auto; }
  .file { grid-template-columns: 40px 1fr auto; }
  .file .x { grid-row: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  * { transition-duration: .01ms !important; }
}


/* ---------------- Kategorie-Tabs (Kundenseite) ---------------- */
.tabs {
  margin-top: 30px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 2px;
}

/* Auf schmalen Bildschirmen eine einzige Zeile zum seitlichen Wischen —
   sonst füllen lange Kategorienamen den halben Bildschirm, bevor das
   erste Foto zu sehen ist. */
@media (max-width: 760px) {
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    /* über die Seitenränder hinaus, damit es wie eine durchlaufende
       Leiste wirkt */
    margin-left: -16px;
    margin-right: -16px;
    padding: 2px 16px;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
    mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; scroll-snap-align: start; }
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--mut);
  font-size: 14px;
  white-space: nowrap;
  transition: color .25s, border-color .25s, background .25s;
}
.tab i {
  font-style: normal;
  font-size: 11px;
  opacity: .6;
  font-variant-numeric: tabular-nums;
}
.tab:hover { color: var(--ink); border-color: rgba(255,255,255,.28); }
.tab.is-on {
  background: var(--ink);
  color: #101010;
  border-color: var(--ink);
}
.tab.is-on i { opacity: .55; }
.tabs + .grid { margin-top: 18px; }

/* ---------------- Kategoriefeld (Upload-Seite) ---------------- */
.catbar { margin-top: 30px; }
.catbar input { max-width: 520px; }
.hint-sm { font-size: 12px; color: var(--mut); opacity: .8; }
.file .catin {
  width: 128px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  color: var(--acc);
}
.file .catin::placeholder { color: var(--mut); opacity: .7; }
.file { grid-template-columns: 46px 1fr auto auto auto; }
@media (max-width: 680px) {
  .file { grid-template-columns: 40px 1fr auto; }
  .file .catin { grid-column: 2 / 4; width: 100%; }
}

.prep { margin-top: 16px; color: var(--acc); font-size: 13px; }
