/* VR Photo Gallery: dark theme consistent with the viewer. */

:root {
  --bg: #0b0c0e;
  --panel: #16181c;
  --panel-2: #1f2228;
  --fg: #f2f4f7;
  --muted: #9aa2ad;
  --accent: #4c8dff;
  --line: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.wrap {
  width: 100%;
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

a {
  color: var(--accent);
}

/* -------------------------------------------------------------------------- */
/* Header                                                                     */
/* -------------------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 20% 0%, #1a1d22, #0b0c0e 70%);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.brand-glyph {
  flex: none;
  display: block;
}
.site-header h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.tagline {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Header tool links: legacy upload into the viewer, and the reel exporter. */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.action {
  display: inline-block;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.action:hover {
  background: #3a7bf0;
}

/* -------------------------------------------------------------------------- */
/* Card grid                                                                  */
/* -------------------------------------------------------------------------- */
.grid {
  list-style: none;
  margin: 2rem 0 3rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1.25rem;
}
.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover {
  border-color: rgba(76, 141, 255, 0.6);
  transform: translateY(-2px);
}
.card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.card .thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--panel-2);
}
.card .thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card .body {
  padding: 0.85rem 1rem 1.1rem;
}
.card h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}
.card .meta {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.card .caption {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Badges */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}
.badge.stereo {
  color: #bcd3ff;
  border-color: rgba(76, 141, 255, 0.5);
}
.badge svg {
  width: 12px;
  height: 12px;
}

/* -------------------------------------------------------------------------- */
/* Empty / loading states                                                     */
/* -------------------------------------------------------------------------- */
.state {
  margin: 3rem auto;
  max-width: 34rem;
  text-align: center;
  color: var(--muted);
  line-height: 1.6;
}
.state h2 {
  color: var(--fg);
  margin-bottom: 0.5rem;
}
.state code {
  background: var(--panel-2);
  padding: 0.1em 0.4em;
  border-radius: 6px;
  color: var(--fg);
  font-size: 0.9em;
}

/* -------------------------------------------------------------------------- */
/* Footer                                                                     */
/* -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.5rem;
}
.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* -------------------------------------------------------------------------- */
/* Motion preferences                                                         */
/* -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
  .card:hover {
    transform: none;
  }
}
