/* ============================================================
   ClipLab — Browser-Videostudio
   Tiefes Studio-Schwarz, Aurora-Licht, Glas-Panels, Mint-Akzent.
   ============================================================ */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url('../fonts/Jost-400-Book.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url('../fonts/jost-600-semi.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --bg: #0a0a11;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.09);
  --line-bright: rgba(255, 255, 255, 0.16);
  --text: #eef0f6;
  --muted: #8b91a7;
  --mint: #34f5c5;
  --violet: #a78bfa;
  --grad: linear-gradient(100deg, var(--violet), var(--mint));
  --danger: #ff6b7a;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15.5px;
  line-height: 1.6;
  min-height: 100vh;
}

/* Aurora-Hintergrund */
.aurora {
  position: fixed; inset: 0; z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.aurora::before, .aurora::after {
  content: "";
  position: absolute;
  width: 60vw; height: 60vw;
  min-width: 480px; min-height: 480px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.16;
}
.aurora::before { background: var(--violet); top: -25vw; right: -15vw; }
.aurora::after { background: var(--mint); bottom: -30vw; left: -18vw; opacity: 0.1; }

::selection { background: var(--mint); color: #04211a; }
a { color: var(--mint); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }

.wrap { max-width: 1020px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; padding: 24px 0 0; }
.wordmark {
  font-family: 'Jost', sans-serif;
  font-weight: 600; font-size: 24px; letter-spacing: 0.5px;
  color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 10px;
}
.wordmark__dot {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center;
}
.wordmark__dot svg { width: 15px; height: 15px; color: #071018; }
.wordmark .lab { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top__note { font-family: var(--mono); font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .top__note { display: none; } }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 54px 0 36px; }
h1 {
  font-family: 'Jost', sans-serif;
  font-weight: 600;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.5px;
}
h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub {
  max-width: 620px; margin: 18px auto 0;
  color: var(--muted);
  font-size: clamp(15px, 2.2vw, 17px);
}
.hero__sub b { color: var(--text); font-weight: 600; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 22px; }
.hbadge {
  font-size: 12.5px; font-weight: 500; color: var(--muted);
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 100px;
  padding: 6px 14px;
  backdrop-filter: blur(8px);
}
.hbadge b { color: var(--mint); font-weight: 600; }

/* ---------- Panels ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ---------- Upload ---------- */
.stage { margin-bottom: 90px; }
.drop {
  padding: 12px;
}
.drop__inner {
  border: 1.5px dashed var(--line-bright);
  border-radius: 14px;
  padding: 64px 24px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: border-color .2s, background .2s;
}
.drop__inner:hover, .drop--over .drop__inner { border-color: var(--mint); background: rgba(52, 245, 197, 0.04); }
.drop__orb {
  width: 74px; height: 74px; margin: 0 auto 20px;
  border-radius: 24px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 44px -10px rgba(52, 245, 197, 0.45);
}
.drop__orb svg { width: 32px; height: 32px; color: #071018; }
.drop__title { font-family: 'Jost', sans-serif; font-weight: 600; font-size: 22px; }
.drop__title .link { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.drop__meta { margin-top: 8px; font-size: 13px; color: var(--muted); font-family: var(--mono); }
.drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.loadnote {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  margin-top: 16px;
  font-size: 13px; color: var(--muted);
}
.loadnote__bar {
  width: 160px; height: 4px; border-radius: 100px;
  background: var(--panel-strong); overflow: hidden;
}
.loadnote__fill { height: 100%; width: 0; background: var(--grad); border-radius: 100px; transition: width .3s; }

.errbox {
  margin-top: 14px;
  border: 1px solid var(--danger);
  background: rgba(255, 107, 122, 0.08);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14px;
}
.errbox b { color: var(--danger); }

/* ---------- Editor ---------- */
.editor { display: grid; gap: 18px; }

/* Player */
.player { padding: 12px; }
.player video {
  width: 100%;
  max-height: 54vh;
  border-radius: 12px;
  display: block;
  background: #000;
}
.player__row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 6px 2px;
  flex-wrap: wrap;
}
.player__name {
  font-family: var(--mono); font-size: 12.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 46%;
}
.player__time { font-family: var(--mono); font-size: 13px; color: var(--text); margin-left: auto; }
.player__time .dim { color: var(--muted); }

/* ---------- Timeline (Signatur) ---------- */
.timeline { padding: 18px 18px 20px; }
.timeline__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 6px; }
.timeline__title { font-family: 'Jost', sans-serif; font-weight: 600; font-size: 16px; letter-spacing: 0.3px; }
.timeline__sel { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.timeline__sel b { color: var(--mint); font-weight: 600; }

.strip {
  position: relative;
  height: 76px;
  border-radius: 12px;
  overflow: hidden;
  background: #05050a;
  touch-action: none;
  user-select: none;
}
.strip__film { position: absolute; inset: 0; display: flex; }
.strip__film canvas { height: 100%; flex: 1; display: block; }
.strip__shade { position: absolute; top: 0; bottom: 0; background: rgba(5, 5, 10, 0.72); pointer-events: none; }
.strip__shade--l { left: 0; }
.strip__shade--r { right: 0; }
.strip__window {
  position: absolute; top: 0; bottom: 0;
  border: 2px solid var(--mint);
  border-radius: 10px;
  box-shadow: 0 0 22px rgba(52, 245, 197, 0.25), inset 0 0 14px rgba(52, 245, 197, 0.06);
  pointer-events: none;
}
.handle {
  position: absolute; top: 0; bottom: 0;
  width: 26px;
  cursor: ew-resize;
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
  border: none; background: transparent; padding: 0;
}
.handle::before {
  content: "";
  width: 14px; height: 46px;
  border-radius: 8px;
  background: var(--grad);
  box-shadow: 0 4px 16px rgba(52, 245, 197, 0.45);
  transition: transform .15s;
}
.handle::after {
  content: "";
  position: absolute;
  width: 2.5px; height: 16px;
  border-radius: 2px;
  background: rgba(7, 16, 24, 0.75);
}
.handle:hover::before, .handle:active::before { transform: scaleY(1.12); }
.playhead {
  position: absolute; top: 0; bottom: 0;
  width: 2px; background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  pointer-events: none;
  z-index: 2;
}
.timeline__marks {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  margin-top: 8px;
}
.timeline__actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* ---------- Tool-Karten ---------- */
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .tools { grid-template-columns: 1fr; } }
.tool { padding: 22px; }
.tool__head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.tool__icon {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.tool__icon svg { width: 18px; height: 18px; color: var(--mint); }
.tool__title { font-family: 'Jost', sans-serif; font-weight: 600; font-size: 17px; }
.tool__desc { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }

.radio {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 8px;
  transition: border-color .15s, background .15s;
}
.radio:hover { border-color: var(--line-bright); }
.radio input { accent-color: var(--mint); margin-top: 3px; }
.radio input:checked ~ .radio__txt .radio__label { color: var(--text); }
.radio:has(input:checked) { border-color: var(--mint); background: rgba(52, 245, 197, 0.05); }
.radio__label { font-weight: 600; font-size: 14px; color: var(--muted); }
.radio__hint { font-size: 12.5px; color: var(--muted); }

.audiofile { margin-top: 10px; }
.audiofile[hidden] { display: none; }
.filebtn {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px dashed var(--line-bright);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 13.5px; color: var(--muted);
  position: relative;
  transition: border-color .15s;
}
.filebtn:hover { border-color: var(--mint); }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.filebtn svg { width: 16px; height: 16px; color: var(--mint); flex: none; }
.filebtn.has { border-style: solid; border-color: var(--mint); color: var(--text); }
.mixrow { display: flex; align-items: center; gap: 9px; margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.mixrow input { accent-color: var(--mint); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: none; cursor: pointer;
  border-radius: 12px;
  padding: 13px 22px;
  font-family: 'Inter', sans-serif;
  font-size: 14.5px; font-weight: 600;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn--grad {
  background: var(--grad);
  color: #071018;
  box-shadow: 0 10px 30px -8px rgba(52, 245, 197, 0.5);
}
.btn--ghost {
  background: var(--panel-strong);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn--sm { padding: 9px 16px; font-size: 13px; border-radius: 10px; }
.btn svg { width: 16px; height: 16px; }

/* ---------- Export-Leiste ---------- */
.exportbar {
  padding: 22px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.exportbar__info { flex: 1; min-width: 200px; }
.exportbar__title { font-family: 'Jost', sans-serif; font-weight: 600; font-size: 17px; }
.exportbar__hint { font-size: 12.5px; color: var(--muted); font-family: var(--mono); }
@media (max-width: 640px) {
  .exportbar { flex-direction: column; align-items: stretch; }
  .exportbar .btn { width: 100%; }
}

/* ---------- Fortschritt / Ergebnis ---------- */
.progress { padding: 26px 22px; text-align: center; }
.progress__label { font-family: 'Jost', sans-serif; font-weight: 600; font-size: 17px; margin-bottom: 4px; }
.progress__pct { font-family: var(--mono); font-size: 13px; color: var(--mint); margin-bottom: 14px; }
.progress__track { height: 8px; border-radius: 100px; background: var(--panel-strong); overflow: hidden; max-width: 520px; margin: 0 auto; }
.progress__fill { height: 100%; width: 0; background: var(--grad); border-radius: 100px; transition: width .25s; }
.progress__note { margin-top: 12px; font-size: 12.5px; color: var(--muted); }

.result { padding: 26px 22px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.result__orb {
  width: 52px; height: 52px; border-radius: 16px; flex: none;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
}
.result__orb svg { width: 24px; height: 24px; color: #071018; }
.result__info { flex: 1; min-width: 180px; }
.result__title { font-family: 'Jost', sans-serif; font-weight: 600; font-size: 17px; }
.result__meta { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) { .result .btn { width: 100%; } }

/* ---------- Feature-Sektion ---------- */
.feats { margin: 70px 0 60px; }
.feats h2 {
  font-family: 'Jost', sans-serif; font-weight: 600;
  font-size: clamp(24px, 4vw, 32px);
  text-align: center; margin-bottom: 24px;
}
.feats__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .feats__grid { grid-template-columns: 1fr; } }
.feat { padding: 24px; }
.feat__num {
  font-family: var(--mono); font-size: 12px;
  color: var(--mint);
  margin-bottom: 10px; display: block;
}
.feat h3 { font-family: 'Jost', sans-serif; font-weight: 600; font-size: 17px; margin-bottom: 6px; }
.feat p { font-size: 13.5px; color: var(--muted); }

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 24px 0 36px;
  display: flex; flex-wrap: wrap; gap: 10px 24px;
  justify-content: space-between;
  font-size: 13px; color: var(--muted);
}
.foot a { color: var(--muted); }
.foot a:hover { color: var(--mint); }

[hidden] { display: none !important; }

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