/* ==========================================================================
   AssetForge — Design System
   Signature element: the "viewfinder" frame — corner focus-brackets,
   a live REC dot, and a mono timecode/GPS overlay, echoing a camera's
   on-screen display. Every clip on the platform is shown inside one.
   ========================================================================== */

:root {
  --bg: #121110;
  --bg-panel: #1a1917;
  --bg-panel-raised: #201f1c;
  --text: #f1ede4;
  --text-dim: #9a968f;
  --text-faint: #635f58;
  --accent-rec: #e23d28;
  --accent-rec-dim: #7a2a20;
  --accent-amber: #d9a441;
  --border: #33312d;
  --border-bright: #4a4741;
  --radius: 3px;

  --font-display: "Big Shoulders Display", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(ellipse at top left, rgba(226, 61, 40, 0.05), transparent 45%),
    radial-gradient(ellipse at bottom right, rgba(217, 164, 65, 0.04), transparent 50%);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 0.95;
  margin: 0;
  text-transform: uppercase;
}

p { line-height: 1.55; color: var(--text-dim); margin: 0; }

.mono { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-amber);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

/* Focus visibility, kept even on dark UI */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-amber);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- Layout */

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.navbar {
  border-bottom: 1px solid var(--border);
  background: rgba(18, 17, 16, 0.9);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.navbar .shell {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand .rec-dot { width: 9px; height: 9px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.nav-links a { transition: color 0.15s ease; }
.nav-links a:hover { color: var(--text); }

.nav-cta {
  border: 1px solid var(--border-bright);
  padding: 9px 18px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text) !important;
}
.nav-cta:hover { border-color: var(--accent-amber); color: var(--accent-amber) !important; }

.nav-cta.primary {
  background: var(--accent-rec);
  border-color: var(--accent-rec);
  color: var(--bg) !important;
  font-weight: 600;
}
.nav-cta.primary:hover { background: #ff4a30; border-color: #ff4a30; color: var(--bg) !important; }

/* ------------------------------------------------------------- REC dot */

.rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-rec);
  box-shadow: 0 0 0 0 rgba(226, 61, 40, 0.6);
  animation: pulse-rec 1.8s infinite;
  flex-shrink: 0;
}

@keyframes pulse-rec {
  0%   { box-shadow: 0 0 0 0 rgba(226, 61, 40, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(226, 61, 40, 0); }
  100% { box-shadow: 0 0 0 0 rgba(226, 61, 40, 0); }
}

/* --------------------------------------------------------- Viewfinder */
/* The signature component. Wrap any thumbnail/preview with:
   <div class="viewfinder"> ... corners ... <img/video> ... hud ... </div> */

.viewfinder {
  position: relative;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.vf-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  z-index: 3;
  pointer-events: none;
}
.vf-corner::before, .vf-corner::after {
  content: "";
  position: absolute;
  background: rgba(241, 237, 228, 0.85);
}
.vf-corner::before { width: 100%; height: 2px; }
.vf-corner::after { width: 2px; height: 100%; }

.vf-tl { top: 8px; left: 8px; }
.vf-tr { top: 8px; right: 8px; }
.vf-tr::before { right: 0; }
.vf-tr::after { right: 0; }
.vf-bl { bottom: 8px; left: 8px; }
.vf-bl::before { bottom: 0; }
.vf-bl::after { bottom: 0; }
.vf-br { bottom: 8px; right: 8px; }
.vf-br::before { bottom: 0; right: 0; }
.vf-br::after { bottom: 0; right: 0; }

.viewfinder img, .viewfinder video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.92;
}

.viewfinder .vf-hud-top {
  position: absolute;
  top: 12px;
  left: 30px;
  right: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.viewfinder .vf-live {
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.08em;
}

.viewfinder .vf-hud-bottom {
  position: absolute;
  bottom: 12px;
  left: 30px;
  right: 30px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.viewfinder .vf-price {
  background: var(--accent-amber);
  color: #17130a;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 0.72rem;
}

.viewfinder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, transparent 22%, transparent 78%, rgba(0,0,0,0.45) 100%);
  z-index: 1;
  pointer-events: none;
}

/* ------------------------------------------------------------ Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 13px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border-bright);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn:hover { border-color: var(--accent-amber); color: var(--accent-amber); }

.btn-primary {
  background: var(--accent-rec);
  border-color: var(--accent-rec);
  color: #fff;
  font-weight: 600;
}
.btn-primary:hover { background: #ff4a30; border-color: #ff4a30; color: #fff; }

.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ------------------------------------------------------------- Forms */

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.field input, .field textarea, .field select {
  width: 100%;
  background: var(--bg-panel-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
}

.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent-amber);
}

.field textarea { resize: vertical; min-height: 90px; }

.form-error {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-rec);
  background: rgba(226, 61, 40, 0.08);
  border: 1px solid var(--accent-rec-dim);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 18px;
  display: none;
}
.form-error.show { display: block; }

/* -------------------------------------------------------------- Cards */

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.clip-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.clip-card:hover { border-color: var(--border-bright); transform: translateY(-2px); }

.clip-card .clip-body { padding: 16px; }

.clip-card h3 {
  font-size: 1.1rem;
  text-transform: none;
  margin-bottom: 6px;
}

.clip-meta {
  display: flex;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-top: 8px;
}

/* --------------------------------------------------------------- Misc */

.section { padding: 64px 0; }
.section-head { margin-bottom: 32px; }
.section-head h2 { font-size: 2rem; margin-top: 6px; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-box .stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.stat-box .stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  margin-top: 6px;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  border: 1px dashed var(--border-bright);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 60px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  display: flex;
  justify-content: space-between;
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .stat-row { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 8px; }
}
