/* ===========================================================================
   Emperium Clips — public theme: "Terminal"
   Tactical editorial. Acid-green accent, mono HUD details, rounded surfaces.
   All colour tokens (--c-*) inject per-request from admin settings, so every
   colour here is user-editable from /admin/settings.
   =========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --font-display: 'Oswald', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --maxw: 1180px;
  --radius: 12px;
  --radius-lg: 16px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 30px; }

/* --- entrance animations ------------------------------------------------- */
@keyframes rcFadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rcFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rcBlink  { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.rc-rise { opacity: 0; animation: rcFadeUp 0.6s cubic-bezier(.2,.8,.2,1) forwards; }
.rc-rise.d1 { animation-delay: .05s; } .rc-rise.d2 { animation-delay: .12s; }
.rc-rise.d3 { animation-delay: .19s; } .rc-rise.d4 { animation-delay: .26s; }

/* --- Type ---------------------------------------------------------------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1; margin: 0; text-transform: uppercase; }
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--c-accent);
}
.eyebrow::before { content: '> '; }

/* --- Top bar ------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--c-bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand-mark { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 21px; text-transform: uppercase; letter-spacing: 0.04em; }
.brand-mark .dot { width: 10px; height: 10px; background: var(--c-accent); box-shadow: 0 0 10px var(--c-accent); }
.nav-links { display: flex; gap: 8px; }
.nav-links a {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--c-muted); padding: 8px 14px;
  border: 1px solid transparent; border-radius: 8px; transition: color .18s, border-color .18s;
}
.nav-links a:hover { color: var(--c-accent); border-color: var(--c-line); }

/* --- Hero ---------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--c-line); }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg video { width: 100%; height: 100%; object-fit: cover; opacity: 0.22; filter: saturate(.9) contrast(1.05); }
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, transparent 0%, var(--c-bg) 80%),
    linear-gradient(180deg, transparent 40%, var(--c-bg) 100%);
}
.hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, var(--c-accent), transparent 42%); }
.hero-inner { position: relative; z-index: 1; padding: 84px 0 66px; }
.hero-photo { width: 60px; height: 60px; border-radius: 14px; object-fit: cover; border: 1px solid var(--c-accent); margin-bottom: 24px; }
.hero h1 { font-size: clamp(56px, 10vw, 128px); letter-spacing: 0.005em; max-width: 18ch; }
.hero h1 .ox { color: var(--c-accent); animation: rcBlink 1.1s step-end infinite; }
.hero .eyebrow { display: block; margin-bottom: 22px; }
.hero .subtitle { margin-top: 26px; font-size: clamp(16px, 2vw, 20px); color: var(--c-muted); max-width: 52ch; }
.hero-meta { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta span {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  padding: 10px 16px; border-radius: 8px; background: var(--c-surface); border: 1px solid var(--c-line); color: var(--c-text);
}
.hero-meta b { color: var(--c-accent); }

/* --- Section heading ----------------------------------------------------- */
.section { padding: 54px 0 96px; }
.section-head { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 36px); letter-spacing: 0.01em; }
.section-head .line { flex: 1; border-bottom: 1px dashed var(--c-line); }
.section-head .count { font-family: var(--font-mono); font-weight: 700; color: var(--c-accent); font-size: 13px; letter-spacing: 0.08em; }
.section-head .count::before { content: '[ '; } .section-head .count::after { content: ' ]'; }

/* --- Clip grid ----------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 20px; margin-bottom: 56px; }
.grid:last-child { margin-bottom: 0; }

.card {
  position: relative; background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--c-accent); box-shadow: 0 14px 36px -18px color-mix(in srgb, var(--c-accent) 55%, transparent); }
.card .thumb { position: relative; aspect-ratio: 16 / 9; background: var(--c-surface2); overflow: hidden; display: grid; place-items: center; }
.card .thumb img, .card .thumb video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.card .thumb video { opacity: 0; transition: opacity 0.25s ease; }
.card:hover .thumb video { opacity: 1; }
.card .thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 58%, rgba(0,0,0,.5)); z-index: 1; }

.card .dur {
  position: absolute; bottom: 11px; right: 12px; z-index: 3;
  font-family: var(--font-mono); font-weight: 700; font-size: 11px; padding: 4px 8px;
  background: rgba(0,0,0,.6); color: var(--c-text); border-radius: 6px;
}
.card .play {
  position: relative; z-index: 2; width: 56px; height: 56px; border-radius: 12px;
  background: var(--c-accent); display: grid; place-items: center;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--c-accent) 40%, transparent);
  transition: transform .2s ease;
}
.card:hover .play { transform: scale(1.12); }
.card .play svg { width: 22px; height: 22px; }
.card .play svg path { fill: var(--c-bg); }

.card .body { padding: 15px 18px 18px; }
.card .body h3 { font-size: 21px; letter-spacing: 0.01em; line-height: 1.1; }
.card .tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 8%, transparent);
  border: 1px solid var(--c-line); padding: 2px 8px; border-radius: 6px;
}

/* --- Watch page ---------------------------------------------------------- */
.watch { padding: 40px 0 90px; }
.player-shell {
  position: relative; background: #000; border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9;
  box-shadow: 0 24px 60px -28px color-mix(in srgb, var(--c-accent) 35%, transparent);
}
.player-shell video { width: 100%; height: 100%; background: #000; }

.watch-head { margin-top: 26px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.watch-head h1 { font-size: clamp(28px, 4.4vw, 44px); letter-spacing: 0.01em; }
.watch .desc { margin-top: 14px; color: var(--c-muted); max-width: 70ch; white-space: pre-wrap; }
.watch .tags { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; }

.share-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.btn {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--c-surface); color: var(--c-text); border: 1px solid var(--c-line);
  padding: 11px 16px; border-radius: 10px; cursor: pointer; transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--c-surface2); border-color: var(--c-accent); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-bg); }
.btn.primary:hover { background: var(--c-accent2); border-color: var(--c-accent2); }

/* --- Empty state --------------------------------------------------------- */
.empty {
  border: 1px dashed var(--c-line); border-radius: var(--radius-lg);
  padding: 64px 24px; text-align: center; color: var(--c-muted);
}
.empty h3 { color: var(--c-text); font-size: 26px; margin-bottom: 8px; }

/* --- Footer -------------------------------------------------------------- */
.footer { border-top: 1px solid var(--c-line); padding: 36px 0; color: var(--c-muted); font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer a:hover { color: var(--c-accent); }

/* --- Focus / a11y -------------------------------------------------------- */
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto; } .hero-bg video { display: none; } .rc-rise { opacity: 1; } }

@media (max-width: 640px) {
  .nav-links { gap: 6px; }
  .hero-inner { padding: 60px 0 50px; }
  .section { padding: 44px 0 70px; }
  .wrap { padding: 0 20px; }
}
