@font-face {
  font-family: "DM Sans";
  src: url("/fonts/font-0.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url("/fonts/font-8.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --black: #090909;
  --ink: #101010;
  --paper: #f0f0f0;
  --muted: #b4b4b4;
  --line: #404040;
  --mono: "Consolas", "Liberation Mono", monospace;
  --display: Manrope, "DM Sans", system-ui, sans-serif;
  --page-width: 1260px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--black); }
body { margin: 0; min-height: 100svh; color: var(--paper); font: 16px "DM Sans", system-ui, sans-serif; isolation: isolate; }
body.cinematic { display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, label.button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }
.cursor-flow {
  position: fixed; left: 0; top: 0; width: 0; height: 0;
  z-index: 8; pointer-events: none; opacity: 0; transition: opacity .3s;
}
.cursor-flow::before {
  content: ""; position: absolute; width: 170px; height: 170px;
  left: -85px; top: -85px; border-radius: 50%;
  background: radial-gradient(circle, #ffffff15, #ffffff06 35%, transparent 70%);
}
.cursor-flow.visible { opacity: 1; }
.cursor-flow::after {
  content: ""; position: absolute; width: 34px; height: 34px;
  left: -17px; top: -17px; border: 1px solid #ffffffb0;
  border-radius: 50%; box-shadow: 0 0 18px #ffffff35, inset 0 0 12px #ffffff18;
}
.cursor-flow::before { background: radial-gradient(circle, #ffffff30, #ffffff12 35%, transparent 70%); }
.flow-particle {
  position: fixed; z-index: 9; width: 3px; height: 3px;
  background: #eee; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 7px #fff9; animation: flow-fade 1.1s ease-out forwards;
}
@keyframes flow-fade {
  from { opacity: .85; transform: translate(0, 0) scale(1.2); }
  to { opacity: 0; transform: translate(var(--drift), -28px) scale(.1); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html:not([data-motion="paused"]) :is(.login-card, .upload-panel, .video-card) {
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
  }
  html:not([data-motion="paused"]) :is(.login-card, .upload-panel, .video-card):hover {
    transform: translateY(-3px); border-color: #b0b0b0;
    box-shadow: 0 0 0 1px #ffffff09, 0 10px 38px #ffffff0b;
  }
  html:not([data-motion="paused"]) :is(.button, .primary, .brand) {
    transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
  }
  html:not([data-motion="paused"]) :is(.button, .primary):hover {
    transform: translateY(-2px); box-shadow: 0 0 22px #ffffff18;
  }
  html:not([data-motion="paused"]) .brand:hover { transform: translateY(-1px); }
  html:not([data-motion="paused"]) .primary:active { transform: translateY(0) scale(.98); }
}
@media (prefers-reduced-motion: reduce), (pointer: coarse) {
  .cursor-flow, .flow-particle { display: none; }
}

/* The artwork stays behind the interface; motion is limited to soft light and grain. */
.scene { position: fixed; z-index: -1; inset: 0; overflow: hidden; pointer-events: none; background: var(--black); }
.scene::before, .scene::after { content: ""; position: absolute; inset: 0; }
.scene::before {
  background: url("/pop-smoke-tribute.png") left center / cover no-repeat;
  animation: street-drift 36s ease-in-out infinite alternate;
}
.scene::after {
  background: linear-gradient(90deg, transparent, #00000016 45%, #00000075),
              linear-gradient(0deg, #080808 0%, transparent 40%, #08080825 100%);
}
.scene-light, .scene-grain { position: absolute; pointer-events: none; }
.scene-light {
  inset: -22%;
  background: radial-gradient(ellipse 29% 40% at 34% 48%, #dedede30, transparent 72%);
  animation: light-sweep 19s ease-in-out infinite alternate;
}
.scene-grain {
  inset: -18px;
  z-index: 1;
  background: url("/film-grain.svg") repeat;
  opacity: .16;
  animation: film-step 1.8s steps(1, end) infinite;
}
@keyframes street-drift { from { transform: scale(1.02); } to { transform: scale(1.085) translateX(-.8%); } }
@keyframes light-sweep { from { transform: translate(-8%, 2%); opacity: .35; } to { transform: translate(16%, -4%); opacity: .82; } }
@keyframes film-step {
  0%, 100% { transform: translate(0); } 20% { transform: translate(-8px, 6px); }
  40% { transform: translate(5px, -7px); } 60% { transform: translate(-3px, -5px); }
  80% { transform: translate(7px, 3px); }
}
[data-motion="paused"] .scene::before,
[data-motion="paused"] :is(.scene-light, .scene-grain) { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .scene::before, .scene-light, .scene-grain { animation: none; }
  .motion-toggle { display: none; }
}

.masthead, .site-footer {
  position: relative;
  padding-inline: max(24px, calc((100% - var(--page-width)) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.masthead { min-height: 75px; border-bottom: 1px solid #ffffff24; background: #0a0a0ae8; }
.brand { display: inline-flex; align-items: center; gap: 11px; font: 800 23px/1 var(--display); letter-spacing: -.055em; }
.mark { display: grid; place-items: center; width: 32px; height: 32px; background: var(--paper); color: #111; }
.mark svg { width: 18px; height: 18px; }
.mast-meta, .site-footer, .eyebrow, .frame-tag, .micro { font: 400 11px/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.mast-meta { color: #c9c9c9; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.mast-meta::before { content: ""; width: 6px; height: 6px; border: 1px solid currentColor; }
.site-footer { min-height: 61px; padding-block: 16px; color: var(--muted); border-top: 1px solid #ffffff24; background: #0a0a0aeb; }
.footer-brand { color: var(--paper); }
.motion-toggle { color: var(--muted); background: transparent; border: 0; padding: 5px 0 5px 5px; text-align: right; font: inherit; }
.motion-toggle:hover { color: white; }
.motion-toggle[aria-pressed="true"] { color: white; text-decoration: underline; text-underline-offset: .25em; }
.eyebrow, .frame-tag { color: #d0d0d0; }
.button, .primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 45px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: var(--paper);
  text-align: center;
  font-weight: 700;
  line-height: 1.25;
}
.primary { background: var(--paper); color: #101010; }
.primary:hover { background: #d7d7d7; }
.secondary { border-color: #565656; }
.secondary:hover { border-color: var(--paper); background: #242424; }

@media (max-width: 640px) {
  .masthead, .site-footer { padding-inline: 20px; }
  .masthead { min-height: 63px; }
  .mast-meta { font-size: 9px; letter-spacing: .08em; }
  .site-footer { font-size: 9px; gap: 12px; }
  .footer-brand { display: none; }
  .scene::before { background-position: 25% top; background-size: auto 660px; }
  .scene::after { background: linear-gradient(0deg, #080808 0%, #080808ee 30%, transparent 73%); }
}
