/* ─── Video Demo Section ────────────────────────────────────────────────── */
.video-demo {
  position: relative;
  background: var(--color-bg-primary);
  padding-block: clamp(5rem, 9vw, 8rem);
  overflow: hidden;
}

.video-demo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(204,34,34,0.05) 0%, transparent 65%);
  pointer-events: none;
}

.video-demo__container {
  position: relative;
  z-index: 1;
}

.video-demo__header {
  text-align: center;
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.video-demo__sub {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-top: var(--space-4);
}

/* ─── Video wrapper ──────────────────────────────────────────────────────── */
.video-inline-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: 0 0 60px rgba(204,34,34,0.1), 0 32px 80px rgba(0,0,0,0.5);
  background: #000;
}

.video-inline {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ─── Controls bar ───────────────────────────────────────────────────────── */
.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1rem 0.85rem;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: opacity 300ms ease;
  z-index: 5;
}

/* ─── Scrubber ───────────────────────────────────────────────────────────── */
.video-scrubber-wrap {
  padding: 6px 0;
  cursor: pointer;
}

.video-scrubber {
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.video-scrubber__track {
  position: relative;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  transition: height 200ms ease;
}

.video-scrubber:hover .video-scrubber__track,
.video-scrubber.is-dragging .video-scrubber__track {
  height: 5px;
}

.video-scrubber__fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: var(--color-accent-red);
  border-radius: 2px;
  pointer-events: none;
}

.video-scrubber__thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%) scale(0);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(0,0,0,0.4);
  pointer-events: none;
  transition: transform 180ms ease;
}

.video-scrubber:hover .video-scrubber__thumb,
.video-scrubber.is-dragging .video-scrubber__thumb {
  transform: translate(-50%, -50%) scale(1);
}

/* ─── Bottom controls row ────────────────────────────────────────────────── */
.video-controls__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.video-ctrl-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background-color 150ms ease, transform 150ms ease;
}

.video-ctrl-btn:hover {
  background: var(--color-accent-red);
  border-color: var(--color-accent-red);
  transform: scale(1.1);
}

.video-ctrl-btn:focus-visible {
  outline: 2px solid var(--color-accent-red);
  outline-offset: 2px;
}

/* Play/pause icon swap */
.video-ctrl-btn .icon-pause { display: none; }
.video-ctrl-btn .icon-play  { display: block; }

.video-ctrl-btn.is-playing .icon-play  { display: none; }
.video-ctrl-btn.is-playing .icon-pause { display: block; }

/* Mute icon swap */
#video-mute-btn .icon-unmuted { display: none; }
#video-mute-btn .icon-muted   { display: block; }

#video-mute-btn.is-unmuted .icon-muted   { display: none; }
#video-mute-btn.is-unmuted .icon-unmuted { display: block; }

.video-time {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  min-width: 72px;
}

.video-controls__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Corner accent ──────────────────────────────────────────────────────── */
.video-thumb__corner {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  pointer-events: none;
  z-index: 6;
}

.video-thumb__corner::before,
.video-thumb__corner::after {
  content: '';
  position: absolute;
  background: var(--color-accent-red);
}

.video-thumb__corner::before { top: 0; right: 0; width: 2px; height: 40px; }
.video-thumb__corner::after  { top: 0; right: 0; width: 40px; height: 2px; }
