:root {
  --bg: #03070f;
  --panel: #0a1120;
  --line: #33425f;
  --line-strong: #5f7196;
  --text: #eaf0fb;
  --muted: #a4b2ce;
  --clip-h: 156px;
  --tracking-tight: -0.05em;
  --ease: 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: var(--tracking-tight);
}

.app-shell {
  height: 100%;
}

.workspace {
  position: relative;
  height: 100%;
  width: 100%;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: rgba(8, 13, 22, 0.85);
  color: var(--text);
  cursor: pointer;
  transition: background-color var(--ease), transform var(--ease), opacity var(--ease);
}

.icon-btn:active {
  transform: translateY(1px);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
}

.icon-btn .icon-pause {
  display: none;
}

.play-btn.is-playing .icon-play {
  display: none;
}

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

.icon-btn.is-active {
  background: rgba(29, 39, 60, 0.88);
}

.viewer-panel {
  position: absolute;
  inset: 0;
  border: 0;
  background: #000;
  --active-ratio: 1;
  --viewer-stage-top: 14px;
  --viewer-stage-gap: 16px;
  --viewer-stage-bottom-space: min(28vh, 250px);
}

.viewer-panel::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: none;
  pointer-events: none;
  z-index: 4;
}

.viewer-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
}

.intro-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intro-bg-video {
  z-index: 0;
  opacity: 0;
  filter: saturate(0.86) contrast(1.06);
  transition: opacity 2000ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity;
}

.intro-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: #000;
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity 2000ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity;
}

.hero-stage {
  position: absolute;
  left: 50%;
  top: var(--viewer-stage-top);
  bottom: calc(var(--viewer-stage-bottom-space) + var(--viewer-stage-gap));
  transform: translateX(-50%);
  z-index: 2;
  opacity: 1;
  height: auto;
  width: auto;
  aspect-ratio: var(--active-ratio);
  max-height: calc(100% - var(--viewer-stage-top) - var(--viewer-stage-bottom-space) - var(--viewer-stage-gap));
  max-width: min(88vw, 1420px);
  transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-poster,
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

.hero-poster {
  z-index: 1;
}

.hero-poster[data-empty="1"] {
  opacity: 0;
}

.hero-video {
  z-index: 2;
  opacity: 0;
  transition: opacity 180ms linear;
}

.viewer-panel.is-playing .hero-video {
  opacity: 1;
}

.viewer-panel.is-intro .intro-bg-video {
  opacity: 0.86;
}

.viewer-panel.is-intro .intro-bg-overlay {
  opacity: 0.8;
}

.viewer-panel.is-cta .intro-bg-video {
  opacity: 0.86;
}

.viewer-panel.is-cta .intro-bg-overlay {
  opacity: 0.8;
}

.viewer-panel.is-portrait .hero-stage {
  max-width: min(72vw, 1120px);
}

.viewer-panel.is-landscape .hero-stage {
  max-width: min(90vw, 1520px);
}

.viewer-intro {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
  --intro-safe-bottom: clamp(150px, 21vh, 290px);
  --intro-card-width: min(56vmin, 560px);
  --intro-card-radius: clamp(18px, 2vw, 28px);
  --intro-photo-mask-stop: 82%;
  --intro-photo-inner-scale: 1.22;
  --intro-photo-offset: clamp(56px, 8vh, 110px);
}

.viewer-intro-photo-stage {
  position: relative;
  align-self: flex-start;
  width: 100%;
  aspect-ratio: 1;
  transform: translateY(var(--intro-photo-offset));
  border-radius: var(--intro-card-radius);
  overflow: hidden;
  isolation: isolate;
  background: #040913;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.48);
  --photo-mask-stop: var(--intro-photo-mask-stop);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) var(--photo-mask-stop), rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) var(--photo-mask-stop), rgba(0, 0, 0, 0) 100%);
}

.viewer-intro-photo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(100% * var(--intro-photo-inner-scale));
  height: calc(100% * var(--intro-photo-inner-scale));
  transform: translate(-50%, -50%);
  object-fit: cover;
  object-position: center 42%;
}

.viewer-intro-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0.78) 100%);
}

.viewer-intro-copy {
  position: absolute;
  left: 50%;
  bottom: var(--intro-safe-bottom);
  transform: translate(-50%, clamp(-96px, -10vh, -56px));
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  width: var(--intro-card-width);
  padding-right: 0;
}

.viewer-intro-text-overlay {
  position: absolute;
  left: clamp(12px, 1.8vw, 18px);
  right: clamp(12px, 1.8vw, 18px);
  bottom: clamp(28px, 4.2vw, 58px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  pointer-events: none;
}

.viewer-intro-title {
  margin: 0;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  align-self: center;
  gap: 0.14em;
  font-size: clamp(1.7rem, 4.2vw, 3.1rem);
  line-height: 0.92;
  font-weight: 900;
  letter-spacing: 0;
  font-kerning: normal;
  font-feature-settings: "kern" 1;
  text-align: left;
  color: #edf2ff;
  text-shadow: 0 0 8px rgba(229, 236, 252, 0.2), 0 0 20px rgba(151, 180, 230, 0.14);
  text-transform: uppercase;
  white-space: nowrap;
}

.viewer-intro-ivan {
  display: inline-block;
  letter-spacing: -0.05em;
}

.viewer-intro-char-v {
  display: inline-block;
  margin-left: 0.035em;
  margin-right: -0.1em;
}

.viewer-intro-timeline {
  display: inline-block;
  letter-spacing: -0.03em;
}

.viewer-intro-description {
  margin: 0;
  width: 100%;
  max-width: 100%;
  align-self: center;
  font-family: "Poppins", "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: clamp(0.76rem, 0.92vw, 0.9rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  text-align: center;
  color: rgba(226, 233, 248, 0.92);
  text-shadow: 0 0 10px rgba(2, 7, 15, 0.35);
}

.viewer-panel.is-intro .viewer-intro {
  opacity: 1;
}

.viewer-panel.is-intro .hero-stage {
  opacity: 0;
}

.viewer-cta {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.viewer-cta-button {
  border: 1px solid #f2f6ff;
  border-radius: 18px;
  background: transparent;
  color: #eff4ff;
  text-transform: uppercase;
  font-family: "Poppins", "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(1rem, 2.2vw, 2rem);
  letter-spacing: 0.03em;
  line-height: 1;
  padding: clamp(14px, 2.2vw, 24px) clamp(20px, 3.2vw, 44px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.46);
}

.viewer-panel.is-cta .viewer-cta {
  opacity: 1;
  pointer-events: auto;
}

.viewer-panel.is-cta .hero-stage {
  opacity: 0;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 5, 10, 0.72);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.contact-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.contact-modal-panel {
  position: relative;
  width: min(560px, 92vw);
  border-radius: 18px;
  border: 1px solid rgba(220, 230, 248, 0.24);
  background: rgba(6, 10, 17, 0.96);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  padding: clamp(18px, 2.4vw, 26px);
}

.contact-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #eaf0fb;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.contact-title {
  margin: 0;
  color: #edf3ff;
  font-weight: 800;
  font-size: clamp(1.18rem, 2.1vw, 1.56rem);
  letter-spacing: 0.01em;
}

.contact-subtitle {
  margin: 8px 0 16px;
  color: rgba(222, 232, 248, 0.84);
  font-size: 0.9rem;
  line-height: 1.35;
}

.contact-form {
  display: grid;
  gap: 8px;
}

.contact-label {
  color: rgba(228, 236, 251, 0.92);
  font-size: 0.82rem;
  font-weight: 500;
}

.contact-input,
.contact-textarea {
  width: 100%;
  border: 1px solid rgba(207, 220, 245, 0.22);
  border-radius: 12px;
  background: rgba(10, 16, 28, 0.9);
  color: #eef3ff;
  font-family: "Poppins", "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0;
  padding: 11px 12px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.contact-textarea {
  resize: vertical;
  min-height: 130px;
  max-height: 280px;
}

.contact-input:focus-visible,
.contact-textarea:focus-visible,
.contact-submit:focus-visible,
.contact-close:focus-visible {
  border-color: rgba(240, 245, 255, 0.92);
  box-shadow: 0 0 0 2px rgba(240, 245, 255, 0.2);
}

.contact-submit {
  margin-top: 8px;
  width: 100%;
  border: none;
  border-radius: 12px;
  background: #e9eef9;
  color: #0a111e;
  font-family: "Poppins", "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 11px 12px;
  cursor: pointer;
}

.contact-submit[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-status {
  margin: 8px 0 0;
  min-height: 1.2em;
  color: rgba(222, 232, 248, 0.94);
  font-size: 0.82rem;
  line-height: 1.35;
}

.contact-status.is-error {
  color: #ffafaf;
}

.contact-status.is-success {
  color: #a9ffc2;
}

.viewer-play {
  position: absolute;
  z-index: 5;
  bottom: 26px;
}

.viewer-play {
  right: 26px;
}

.volume-float {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 7;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 6px;
  background: rgba(5, 9, 16, 0.72);
  backdrop-filter: blur(5px);
}

.volume-btn {
  width: 32px;
  height: 32px;
}

.volume-slider-wrap {
  position: relative;
  width: 28px;
  height: 138px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.volume-slider {
  appearance: none;
  width: 116px;
  height: 4px;
  margin: 0;
  transform: rotate(-90deg);
  transform-origin: center;
  background: transparent;
  cursor: pointer;
}

.volume-slider:focus-visible {
  outline: 2px solid #f0f3fa;
  outline-offset: 6px;
}

.volume-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(233, 239, 252, 0.26);
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border: none;
  border-radius: 999px;
  background: #f4f7ff;
  box-shadow: 0 0 0 2px rgba(4, 8, 15, 0.56);
}

.volume-slider::-moz-range-track {
  height: 4px;
  border: none;
  border-radius: 999px;
  background: rgba(233, 239, 252, 0.26);
}

.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 999px;
  background: #f4f7ff;
  box-shadow: 0 0 0 2px rgba(4, 8, 15, 0.56);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.mute-btn .icon-volume-off {
  display: none;
}

.mute-btn.is-muted .icon-volume-on {
  display: none;
}

.mute-btn.is-muted .icon-volume-off {
  display: block;
}

.viewer-meta {
  position: absolute;
  z-index: 5;
  right: 6vw;
  top: 50%;
  transform: translateY(-50%);
  width: min(42vw, 620px);
  max-width: calc(100vw - 32px);
  padding: 16px;
  border: none;
  background: rgba(5, 10, 19, 0.48);
  backdrop-filter: blur(4px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.viewer-panel.is-intro .viewer-meta,
.viewer-panel.is-cta .viewer-meta {
  opacity: 0;
  transform: translateY(-50%) translateX(12px);
  pointer-events: none;
}

.active-title {
  margin: 0;
  max-width: 100%;
  font-size: clamp(1.28rem, 2.2vw, 2.28rem);
  line-height: 1.06;
  white-space: normal;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.active-description {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  line-height: 1.45;
  max-width: 34ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.active-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 11px;
}

.badge {
  padding: 2px 7px;
  border: none;
  background: rgba(5, 11, 22, 0.74);
  color: #d6dff3;
  font-size: 10px;
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
}

.timeline-stage {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  height: min(28vh, 250px);
  border: none;
  background: transparent;
  backdrop-filter: none;
  overflow: hidden;
  z-index: 6;
}

.timeline-stage::before,
.timeline-stage::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(42px, 8vw, 120px);
  pointer-events: none;
  z-index: 2;
}

.timeline-stage::before {
  left: 0;
  background: linear-gradient(90deg, rgba(3, 7, 15, 0.9) 0%, rgba(3, 7, 15, 0) 100%);
}

.timeline-stage::after {
  right: 0;
  background: linear-gradient(270deg, rgba(3, 7, 15, 0.9) 0%, rgba(3, 7, 15, 0) 100%);
}

.timeline-timecode {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border: none;
  background: rgba(6, 10, 16, 0.86);
  backdrop-filter: blur(4px);
}

.tc-label {
  font-size: 11px;
  color: var(--muted);
}

.timecode {
  min-width: 110px;
  font-size: 14px;
  letter-spacing: var(--tracking-tight);
}

.scroll-right-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border: none;
  background: rgba(6, 10, 16, 0.86);
  backdrop-filter: blur(4px);
}

.scroll-right-label {
  font-size: 10px;
  color: #98a4ba;
  letter-spacing: var(--tracking-tight);
}

.scroll-right-arrow {
  font-size: 14px;
  color: #dce3f2;
  animation: hint-nudge 1.2s ease-in-out infinite;
}

@keyframes hint-nudge {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.7;
  }

  50% {
    transform: translateX(7px);
    opacity: 1;
  }
}

.timeline-scroll {
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  touch-action: pan-x;
  scroll-behavior: auto;
  scrollbar-width: thin;
  scrollbar-color: #4b5d81 #11192c;
}

.timeline-scroll::-webkit-scrollbar {
  height: 10px;
}

.timeline-scroll::-webkit-scrollbar-track {
  background: #0e1524;
}

.timeline-scroll::-webkit-scrollbar-thumb {
  background: #4b5a77;
  border: none;
}

.timeline-content {
  position: relative;
  min-width: 100%;
  height: 100%;
}

.markers-track {
  position: absolute;
  top: 14px;
  left: 0;
  height: 24px;
}

.marker {
  position: absolute;
  top: 0;
  transform: translateX(-1px);
  padding: 2px 8px;
  border: none;
  background: #111a2e;
  color: #d6dbea;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-tight);
  white-space: nowrap;
}

.marker::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1px;
  height: 10px;
  background: #6d7e9f;
}

.ruler-track {
  position: absolute;
  top: 50px;
  left: 0;
  height: 24px;
}

.ruler-tick {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 7px;
  background: #516082;
}

.ruler-tick.is-major {
  height: 12px;
  background: #a4aec4;
}

.tick-label {
  position: absolute;
  bottom: 12px;
  transform: translateX(-50%);
  color: #95a2bb;
  font-size: 9px;
  letter-spacing: var(--tracking-tight);
}

.clips-row {
  position: absolute;
  left: 0;
  top: 88px;
  display: flex;
  align-items: flex-end;
  gap: var(--clip-gap, 18px);
  height: calc(100% - 103px);
}

.edge-spacer {
  height: 1px;
  flex: 0 0 auto;
}

.clip {
  --focus: 0;
  position: relative;
  display: flex;
  justify-content: flex-start;
  flex: 0 0 auto;
  width: 220px;
  max-width: 420px;
  opacity: calc(0.34 + (var(--focus) * 0.66));
  filter: saturate(calc(0.62 + (var(--focus) * 0.5))) contrast(calc(0.86 + (var(--focus) * 0.24)));
  transform-origin: center bottom;
  transform: translateY(8px) scale(0.6);
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease, filter 280ms ease;
  outline: none;
  will-change: transform, opacity, filter;
}

.clip.is-active {
  z-index: 4;
  transform: translateY(0) scale(1);
  animation: clip-activate-bounce 280ms cubic-bezier(0.2, 0.85, 0.2, 1) both;
}

.clip.is-active .clip-media {
  box-shadow: 26px 0 34px rgba(1, 4, 10, 0.66);
  filter: brightness(1) saturate(1);
}

@keyframes clip-activate-bounce {
  0% {
    transform: translateY(8px) scale(0.6);
  }

  55% {
    transform: translateY(-1px) scale(1.1);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

.clip:focus-visible {
  outline: 2px solid #edf1f8;
  outline-offset: 4px;
}

.clip-media {
  position: relative;
  height: var(--clip-h);
  width: calc(var(--clip-h) * 0.5625);
  margin-inline: 0;
  border: none;
  background: #0f151f;
  overflow: hidden;
  filter: brightness(0.42) saturate(0.5);
  box-shadow: 18px 0 26px rgba(1, 4, 10, 0.5);
  transition: box-shadow 280ms cubic-bezier(0.22, 1, 0.36, 1), filter 220ms ease;
}

.clip-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 12, 0.84);
  opacity: 0.7;
  transition: opacity 240ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 3;
}

.clip.is-partial:not(.is-active) .clip-media {
  filter: brightness(0.33) saturate(0.42);
}

.clip.is-partial:not(.is-active) .clip-media::after {
  opacity: 0.8;
}

.clip.is-offscreen:not(.is-active) .clip-media {
  filter: brightness(0.25) saturate(0.34);
}

.clip.is-offscreen:not(.is-active) .clip-media::after {
  opacity: 0.9;
}

.clip.is-active .clip-media::after {
  opacity: 0;
}

.clip-text-media {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #0e1521;
}

.clip-text-content {
  position: relative;
  z-index: 4;
  display: inline-flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
}

.clip-text-title {
  margin: 0;
  font-size: 12px;
  line-height: 1.05;
  text-align: center;
  letter-spacing: var(--tracking-tight);
  color: #e7ecf6;
}

.clip-text-arrow {
  margin: 0;
  font-size: 16px;
  color: #c7d0e2;
}

.clip-cta-media {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid rgba(228, 236, 248, 0.58);
  background: rgba(10, 14, 23, 0.92);
  box-shadow: 22px 0 30px rgba(0, 0, 0, 0.52);
}

.clip-cta-media::after {
  background: rgba(3, 6, 12, 0.26);
  opacity: 0.42;
}

.clip.is-active .clip-cta-media {
  border-color: rgba(241, 246, 255, 0.9);
}

.clip-cta-content {
  position: relative;
  z-index: 4;
  width: 100%;
  padding-inline: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clip-cta-title {
  margin: 0;
  font-size: clamp(10px, 1.3vw, 14px);
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 800;
  color: #eef3ff;
}

.clip-image,
.clip-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.clip-video {
  opacity: 0;
  transition: opacity 120ms linear;
}

.clip.is-previewing .clip-video {
  opacity: 1;
}

.clip-duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 1px 6px;
  border: none;
  background: rgba(8, 12, 19, 0.86);
  font-size: 11px;
  letter-spacing: var(--tracking-tight);
  z-index: 4;
}

.playhead {
  pointer-events: none;
  position: absolute;
  inset: 0 auto 0 50%;
  transform: translateX(-50%);
  width: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.playhead-tip {
  width: 0;
  height: 0;
  margin-top: 3px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 0;
  border-bottom: 8px solid #f0f3fa;
}

.playhead-line {
  margin-top: 2px;
  width: 1px;
  height: calc(100% - 13px);
  background: #f0f3fa;
}

.icon-btn:focus-visible,
.timeline-scroll:focus-visible {
  outline: 2px solid #f0f3fa;
  outline-offset: 2px;
}

@media (max-width: 1200px) {
  :root {
    --clip-h: 146px;
  }

  .viewer-panel {
    --viewer-stage-top: 12px;
    --viewer-stage-gap: 14px;
    --viewer-stage-bottom-space: min(30vh, 230px);
  }

  .viewer-panel::after {
    inset: 10px;
  }

  .viewer-meta {
    width: min(42vw, 430px);
  }

  .viewer-intro-copy {
    left: 50%;
  }

  .viewer-intro {
    --intro-card-width: min(54vmin, 500px);
  }

  .timeline-stage {
    left: 12px;
    right: 12px;
    bottom: 12px;
    height: min(30vh, 230px);
  }
}

@media (max-width: 980px) {
  :root {
    --clip-h: 136px;
  }

  .viewer-panel {
    --viewer-stage-top: 8px;
    --viewer-stage-gap: 10px;
    --viewer-stage-bottom-space: min(30vh, 220px);
  }

  .viewer-panel::after {
    inset: 8px;
  }

  .viewer-intro {
    --intro-safe-bottom: calc(min(30vh, 220px) + 44px);
    --intro-card-width: min(62vw, 440px);
    --intro-card-radius: 22px;
    --intro-photo-mask-stop: 78%;
  }

  .viewer-intro-copy {
    left: 50%;
    right: auto;
  }

  .viewer-intro-photo-stage {
    border-radius: var(--intro-card-radius);
    --photo-mask-stop: var(--intro-photo-mask-stop);
  }

  .viewer-intro-title {
    font-size: clamp(1.42rem, 7.6vw, 2.4rem);
    white-space: nowrap;
  }

  .viewer-intro-description {
    max-width: 100%;
    font-size: clamp(0.76rem, 1.8vw, 0.88rem);
  }

  .hero-poster,
  .hero-video {
    object-position: center center;
  }

  .viewer-meta {
    right: 16px;
    left: 16px;
    top: auto;
    bottom: calc(min(30vh, 220px) + 16px);
    width: auto;
    transform: none;
  }

  .viewer-panel.is-intro .viewer-meta,
  .viewer-panel.is-cta .viewer-meta {
    transform: translateY(10px);
  }

  .viewer-play {
    bottom: calc(min(30vh, 220px) + 18px);
    right: 16px;
    width: 32px;
    height: 32px;
  }

  .volume-float {
    right: 8px;
    padding: 6px 4px;
  }

  .volume-btn {
    width: 30px;
    height: 30px;
  }

  .volume-slider-wrap {
    width: 24px;
    height: 108px;
  }

  .volume-slider {
    width: 88px;
  }

  .timeline-stage {
    left: 8px;
    right: 8px;
    bottom: 8px;
    height: min(30vh, 220px);
  }

  .timeline-timecode,
  .scroll-right-hint {
    bottom: 8px;
  }

  .timeline-timecode {
    left: 8px;
  }

  .scroll-right-hint {
    right: 8px;
  }

  .clips-row {
    top: 82px;
    height: calc(100% - 96px);
  }
}

@media (max-width: 760px) {
  :root {
    --clip-h: 122px;
  }

  .viewer-panel {
    --viewer-stage-top: 8px;
    --viewer-stage-gap: 8px;
    --viewer-stage-bottom-space: min(31vh, 196px);
  }

  .viewer-intro {
    --intro-safe-bottom: calc(min(31vh, 196px) + 64px);
    --intro-card-width: min(70vw, 360px);
    --intro-card-radius: 18px;
    --intro-photo-mask-stop: 74%;
    --intro-photo-inner-scale: 1.24;
    --intro-photo-offset: clamp(28px, 4.6vh, 56px);
  }

  .viewer-intro-copy {
    left: 50%;
    right: auto;
    bottom: var(--intro-safe-bottom);
    transform: translate(-50%, clamp(-84px, -11vh, -48px));
  }

  .viewer-intro-photo-stage {
    border-radius: var(--intro-card-radius);
    --photo-mask-stop: var(--intro-photo-mask-stop);
  }

  .viewer-intro-title {
    font-size: clamp(1.16rem, 8.2vw, 1.82rem);
    gap: 0.12em;
  }

  .viewer-intro-text-overlay {
    bottom: clamp(20px, 4.8vw, 38px);
  }

  .viewer-intro-ivan {
    letter-spacing: -0.042em;
  }

  .viewer-intro-char-v {
    margin-left: 0.028em;
    margin-right: -0.085em;
  }

  .viewer-intro-timeline {
    letter-spacing: -0.024em;
  }

  .viewer-intro-description {
    max-width: 100%;
    font-size: clamp(0.72rem, 3vw, 0.82rem);
    line-height: 1.4;
  }

  .viewer-play {
    bottom: calc(min(31vh, 196px) + 14px);
    right: 12px;
    width: 30px;
    height: 30px;
  }

  .volume-float {
    top: 46%;
  }

  .timeline-stage {
    height: min(31vh, 196px);
  }

  .markers-track {
    top: 12px;
  }

  .ruler-track {
    top: 46px;
  }

  .clips-row {
    top: 78px;
    height: calc(100% - 92px);
  }

  .active-title {
    font-size: 1.08rem;
    line-height: 1.04;
  }

  .active-description {
    font-size: 0.82rem;
    max-width: 100%;
  }

  .contact-modal {
    padding: 12px;
  }

  .contact-modal-panel {
    width: 100%;
    border-radius: 14px;
    padding: 16px;
  }

  .contact-title {
    font-size: 1.08rem;
  }

  .contact-subtitle {
    font-size: 0.8rem;
  }
}

@media (max-width: 520px) {
  :root {
    --clip-h: 114px;
  }

  .viewer-panel {
    --viewer-stage-top: 6px;
    --viewer-stage-gap: 8px;
    --viewer-stage-bottom-space: min(31vh, 180px);
  }

  .viewer-intro {
    --intro-safe-bottom: calc(min(31vh, 180px) + 74px);
    --intro-card-width: min(74vw, 340px);
    --intro-photo-offset: clamp(22px, 3.8vh, 44px);
  }

  .viewer-intro-copy {
    left: 50%;
    right: auto;
  }

  .viewer-intro-title {
    font-size: clamp(1.06rem, 7.6vw, 1.54rem);
  }

  .viewer-intro-text-overlay {
    bottom: clamp(16px, 4vw, 30px);
  }

  .viewer-intro-description {
    font-size: 0.68rem;
  }

  .volume-slider-wrap {
    height: 96px;
  }

  .volume-slider {
    width: 80px;
  }

  .scroll-right-hint {
    display: none;
  }

  .timeline-timecode {
    padding: 3px 6px;
  }

  .tc-label {
    font-size: 10px;
  }

  .timecode {
    min-width: 94px;
    font-size: 12px;
  }
}

@media (max-height: 760px) {
  .viewer-panel {
    --viewer-stage-top: 6px;
    --viewer-stage-gap: 8px;
    --viewer-stage-bottom-space: min(32vh, 180px);
  }

  .viewer-intro {
    --intro-safe-bottom: calc(min(32vh, 180px) + 28px);
    --intro-card-width: min(48vh, 400px);
  }

  .viewer-intro-copy {
    width: var(--intro-card-width);
  }

  .timeline-stage {
    height: min(32vh, 180px);
  }

  .viewer-play {
    bottom: calc(min(32vh, 180px) + 10px);
  }

  .viewer-meta {
    bottom: calc(min(32vh, 180px) + 14px);
  }
}
