/* ============================================================
   DS VideoArt: room-specific design system
   "Screening Room": a dark editing-bay base lit by warm film
   light-leaks (amber, magenta, teal) and extreme type contrast.
   Loaded after ../ds-shared.css, which supplies the generic
   reset, nav/footer/button/form structure, and type scale that
   every DS room shares. Only VideoArt's own color tokens and
   brand-specific flourishes (light-leaks, filmstrip, room
   transitions) live here.
   ============================================================ */

:root {
  --bg: #0c0c0d;
  --bg-elevated: #141416;
  --bg-card: #19191b;
  --accent: #d1414c;
  --accent-soft: rgba(209, 65, 76, 0.14);
  --accent-border: rgba(209, 65, 76, 0.4);
  --cream: #ede4d3;
  --text-primary: #f2f1ee;
  --text-muted: rgba(242, 241, 238, 0.64);
  --text-faint: rgba(242, 241, 238, 0.62);
  --border: rgba(242, 241, 238, 0.1);
  --border-strong: rgba(242, 241, 238, 0.2);

  /* Film light-leak accents: used for category identity + ambient glows */
  --leak-amber: #e8a23d;
  --leak-teal: #3fb8a8;
  --leak-magenta: #d1499a;

  --shadow-accent: 0 3px 12px rgba(209, 65, 76, 0.28);
}

/* ============================================================
   Film light-leaks: warm color washes drifting behind content
   ============================================================ */

.light-leaks {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.light-leaks span {
  position: absolute;
  width: 55vw;
  height: 55vw;
  max-width: 620px;
  max-height: 620px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.28;
  mix-blend-mode: screen;
  animation: leak-drift 22s ease-in-out infinite alternate;
}

.light-leaks span:nth-child(1) {
  background: var(--leak-amber);
  top: -10%;
  inset-inline-start: -12%;
}

.light-leaks span:nth-child(2) {
  background: var(--leak-magenta);
  top: 35%;
  inset-inline-end: -18%;
  animation-delay: 6s;
  animation-duration: 26s;
}

.light-leaks span:nth-child(3) {
  background: var(--leak-teal);
  bottom: -15%;
  inset-inline-start: 20%;
  animation-delay: 12s;
  animation-duration: 30s;
}

@keyframes leak-drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(6%, 8%) scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .light-leaks span {
    animation: none;
  }
}

/* ============================================================
   Hero flourish (rec-dot pulse). Hero structure itself lives in
   ../ds-shared.css.
   ============================================================ */

.rec-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 28px;
}

.rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: rec-pulse 1.6s ease-in-out infinite;
}

@keyframes rec-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* ============================================================
   Value grid
   ============================================================ */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.value-card {
  background: var(--bg-card);
  padding: 36px 32px;
  opacity: 0;
  transform: translateY(20px);
}

.value-card.in-view {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.value-card h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.value-card p {
  color: var(--text-muted);
  font-size: 15px;
}

.value-index {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 18px;
  display: block;
  transition: color 0.2s var(--ease-out);
}

.value-card {
  transition: background 0.25s var(--ease-out);
}

.value-card:hover {
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-card));
}

.value-card:nth-child(2):hover {
  background: color-mix(in srgb, var(--leak-magenta) 6%, var(--bg-card));
}

.value-card:nth-child(2) .value-index {
  color: var(--leak-magenta);
}

.value-card:nth-child(3):hover {
  background: color-mix(in srgb, var(--leak-teal) 6%, var(--bg-card));
}

.value-card:nth-child(3) .value-index {
  color: var(--leak-teal);
}

/* ============================================================
   Flagship showcase banner (links to showcase.html)
   ============================================================ */

.flagship-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(120deg, var(--bg-card) 0%, color-mix(in srgb, var(--accent) 10%, var(--bg-card)) 100%);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  margin-bottom: 48px;
  transition: transform 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.flagship-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.flagship-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--accent);
  margin-bottom: 10px;
}

.flagship-body h3 {
  font-size: clamp(20px, 2.6vw, 30px);
  margin-bottom: 10px;
}

.flagship-body p {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 560px;
}

.flagship-arrow {
  font-size: 28px;
  color: var(--accent);
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .flagship-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
  }
  .flagship-arrow {
    transform: rotate(-90deg);
  }
}

/* ============================================================
   Category filter pills
   ============================================================ */

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 48px;
}

.filter-pill {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: border-color 0.2s var(--ease-out), color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.filter-pill:hover {
  color: var(--text-primary);
}

.filter-pill.active {
  background: var(--accent);
  color: var(--text-primary);
  border-color: var(--accent);
}

.filter-pill[data-filter="creative"].active,
.filter-pill[data-filter="insights"].active {
  background: var(--leak-magenta);
  border-color: var(--leak-magenta);
}

.filter-pill[data-filter="product"].active,
.filter-pill[data-filter="guides"].active {
  background: var(--leak-teal);
  border-color: var(--leak-teal);
}

.filter-pill[data-filter="social"].active {
  background: var(--leak-amber);
  border-color: var(--leak-amber);
}

/* ============================================================
   Film-strip portfolio
   ============================================================ */

.filmstrip-wrap {
  position: relative;
}

.filmstrip-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
  cursor: grab;
  direction: ltr;
}

.filmstrip-viewport.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.filmstrip-viewport.autoplay {
  overflow: hidden;
  cursor: default;
}

.filmstrip-viewport::-webkit-scrollbar {
  height: 5px;
}

.filmstrip-viewport::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 999px;
}

.filmstrip-viewport::-webkit-scrollbar-track {
  background: transparent;
}

.filmstrip-track {
  display: flex;
  gap: 24px;
  width: max-content;
}

.filmstrip-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 5;
  transition: border-color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.filmstrip-arrow:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.filmstrip-prev {
  inset-inline-start: -22px;
}

.filmstrip-next {
  inset-inline-end: -22px;
}

@media (max-width: 700px) {
  .filmstrip-arrow {
    display: none;
  }
}

.frame {
  position: relative;
  width: min(72vw, 460px);
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.frame-media {
  aspect-ratio: 16/10;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #101012;
  cursor: pointer;
  overflow: hidden;
}

.frame[data-category="ads"] .frame-media:not(:has(img)) {
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 35%, var(--bg-card)) 0%, var(--bg-card) 70%);
}

.frame[data-category="creative"] .frame-media:not(:has(img)) {
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--leak-magenta) 35%, var(--bg-card)) 0%, var(--bg-card) 70%);
}

.frame[data-category="product"] .frame-media:not(:has(img)) {
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--leak-teal) 35%, var(--bg-card)) 0%, var(--bg-card) 70%);
}

.frame[data-category="social"] .frame-media:not(:has(img)) {
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--leak-amber) 35%, var(--bg-card)) 0%, var(--bg-card) 70%);
}

.frame-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame-media::before,
.frame-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s var(--ease-out);
}

.frame-media::before {
  background: repeating-linear-gradient(
    0deg,
    rgba(242, 241, 238, 0.06) 0px,
    rgba(242, 241, 238, 0.06) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

.frame-media::after {
  background: linear-gradient(180deg, transparent 0%, var(--accent-soft) 45%, transparent 55%);
  transform: translateY(-100%);
}

.frame-media:hover::before {
  opacity: 1;
}

.frame-media:hover::after {
  opacity: 1;
  animation: scan-sweep 1s var(--ease-out);
}

@keyframes scan-sweep {
  from { transform: translateY(-100%); }
  to { transform: translateY(100%); }
}

.play-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 1px solid rgba(242, 241, 238, 0.3);
  color: var(--text-primary);
  transition: transform 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.frame-media:hover .play-icon {
  transform: scale(1.08);
  border-color: var(--accent);
}

.frame-badge {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-strong);
  color: var(--cream);
}

.frame-body {
  padding: 20px;
}

.frame-cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.frame[data-category="creative"] .frame-cat,
.card[data-category="insights"] .card-cat {
  color: var(--leak-magenta);
}

.frame[data-category="product"] .frame-cat,
.card[data-category="guides"] .card-cat {
  color: var(--leak-teal);
}

.frame[data-category="social"] .frame-cat {
  color: var(--leak-amber);
}

.frame-body h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.frame-body p {
  font-size: 14px;
  color: var(--text-muted);
}

.frame-meta {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-faint);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

/* ============================================================
   Blog cards
   ============================================================ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
  opacity: 0;
  transform: translateY(20px);
}

.card.in-view {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
}

.card-media {
  aspect-ratio: 16/10;
  background: #101012;
  overflow: hidden;
}

.card[data-category="news"] .card-media:not(:has(img)) {
  background: radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--accent) 30%, var(--bg-card)) 0%, var(--bg-card) 70%);
}

.card[data-category="insights"] .card-media:not(:has(img)) {
  background: radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--leak-magenta) 30%, var(--bg-card)) 0%, var(--bg-card) 70%);
}

.card[data-category="guides"] .card-media:not(:has(img)) {
  background: radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--leak-teal) 30%, var(--bg-card)) 0%, var(--bg-card) 70%);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 22px;
}

.card-cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

.card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.card p {
  font-size: 14px;
  color: var(--text-muted);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-faint);
}

/* ============================================================
   Single post page
   ============================================================ */

.post-header {
  max-width: 760px;
  margin: 0 auto 40px;
  text-align: center;
}

.post-header .card-cat {
  display: block;
  margin-bottom: 16px;
}

.post-header h1 {
  font-size: clamp(28px, 5vw, 48px);
  margin-bottom: 16px;
}

.post-meta {
  color: var(--text-faint);
  font-size: 14px;
}

.post-cover {
  max-width: 900px;
  margin: 0 auto 48px;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 21/9;
}

.post-body {
  max-width: 720px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.85;
  color: rgba(242, 241, 238, 0.85);
}

.post-body p {
  margin-bottom: 20px;
}

.post-body strong {
  color: var(--text-primary);
  font-weight: 700;
}

.post-body a {
  color: var(--accent);
  text-decoration: underline;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 32px;
}

.back-link:hover {
  color: var(--text-primary);
}

/* ============================================================
   Responsive (VideoArt-specific grids; shared breakpoints for
   nav/footer/forms live in ../ds-shared.css)
   ============================================================ */

@media (max-width: 1024px) {
  .grid-3,
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid-3,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .frame {
    width: 78vw;
  }
}

/* ============================================================
   Room transitions: the film-gate shutter between pages
   ============================================================ */

#view {
  display: block;
}

#roomShutter {
  position: fixed;
  inset: 0;
  z-index: 4000;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}

#roomShutter.active {
  visibility: visible;
  opacity: 1;
}

.rt-panel {
  position: absolute;
  inset-inline: 0;
  height: 52%;
  background: var(--bg);
  transform: translateY(-100%);
}

.rt-panel-a {
  top: 0;
}

.rt-panel-a .sprocket-row {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
}

.rt-panel-b {
  bottom: 0;
  transform: translateY(100%);
}

.rt-panel-b .sprocket-row {
  position: absolute;
  top: 0;
  inset-inline: 0;
}

.rt-flash {
  position: absolute;
  top: 50%;
  inset-inline: 0;
  height: 4px;
  transform: translateY(-50%);
  opacity: 0;
  filter: blur(2px);
}
