@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400&display=swap");

:root {
  --bg: #394968;
  --panel: #aab8dc;
  --panel-dark: #97a6cf;
  --card: #121b33;
  --text: #fffdf7;
  --muted: rgba(255, 253, 247, 0.72);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
}

.motion-page {
  width: min(86vw, 1500px);
  margin: 0 auto;
  padding: 36px 0 80px;
}

.breadcrumbs {
  display: flex;
  gap: 0;
  align-items: center;
  margin-bottom: 24px;
  font-size: clamp(16px, 1.1vw, 24px);
  font-weight: 300;
  color: var(--muted);
  letter-spacing: -0.04em;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--text);
}

.accordion {
  display: grid;
  gap: 18px;
}

.accordion-item {
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel-dark);
}

.accordion-head {
  width: 100%;
  min-height: 86px;
  padding: 0 26px;
  border: 0;
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);

  font-family: "IBM Plex Mono", monospace;
  font-weight: 300;
  font-size: clamp(20px, 1.4vw, 32px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-align: left;

  display: flex;
  align-items: center;
  gap: 14px;

  cursor: pointer;
}

.accordion-icon {
  width: 24px;
  flex: 0 0 24px;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

.accordion-body {
  position: relative;
  height: 0;
  padding: 0 58px;
  overflow: hidden;
  background: var(--panel-dark);

  transition:
    height 0.26s ease,
    padding 0.26s ease;
}

.accordion-item.is-open .accordion-body {
  height: 420px;
  padding: 40px 58px 32px;
}

.video-carousel {
  display: flex;
  gap: 18px;
  height: 100%;

  overflow-x: auto;
  overflow-y: hidden;

  scroll-behavior: smooth;
  padding-bottom: 18px;

  scrollbar-width: thin;
  scrollbar-color: rgba(255, 253, 247, 0.28) transparent;
}

.video-carousel::-webkit-scrollbar {
  height: 6px;
}

.video-carousel::-webkit-scrollbar-track {
  background: transparent;
}

.video-carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 253, 247, 0.22);
  border-radius: 999px;
}

.video-carousel::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 253, 247, 0.42);
}

.video-card {
  position: relative;
  flex: 0 0 42%;
  min-width: 420px;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: var(--card);
  display: block;
  text-decoration: none;
}

.video-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;

  transform: scale(1);
  transition:
    transform 0.5s ease,
    filter 0.4s ease;
}

.video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(8, 18, 48, 0.48);
  transition: opacity 0.35s ease;
}

.video-play {
  position: absolute;
  inset: 0;
  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: center;

  pointer-events: none;

  transition:
    transform 0.35s ease,
    opacity 0.35s ease;
}

.video-play img {
  width: 62px;
  height: 62px;
  opacity: 0.92;
}

.video-card:hover .video-overlay {
  opacity: 0;
}

.video-card:hover .video-preview {
  transform: scale(1.03);
}

.video-card:hover .video-play {
  transform: scale(1.08);
}



/* Social media video cards.
   They intentionally reuse .video-carousel and .video-card,
   so opening and closing animation is identical to the other tabs. */

.social-video-card {
  cursor: default;
}

.social-video-card:nth-child(2),
.social-video-card:nth-child(3),
.social-video-card:nth-child(5) {
  flex-basis: 362px;
  min-width: 362px;
}

.social-video-card video {
  width: 100%;
  height: 100%;

  display: block;
  object-fit: cover;

  transform: scale(1);
  transition: transform 0.5s ease;
}

.social-video-card:hover .video-overlay {
  opacity: 0;
}

.social-video-card:hover video {
  transform: scale(1.03);
}

.social-video-card {
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

/* Modal video */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.video-modal.is-open {
  display: flex;
}

.video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 48, 0.72);
  backdrop-filter: blur(4px);
}

.video-modal__window {
  position: relative;
  z-index: 1;
  width: min(88vw, 1180px);
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.video-modal__player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.video-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;

  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;

  background: rgba(255, 253, 247, 0.18);
  color: var(--text);

  font-family: "IBM Plex Mono", monospace;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;

  cursor: pointer;
}

.video-modal__close:hover {
  background: rgba(255, 253, 247, 0.32);
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .motion-page {
    width: min(90vw, 1500px);
    padding-top: 28px;
  }

  .accordion-head {
    min-height: 72px;
    padding: 0 18px;
    font-size: clamp(18px, 2.3vw, 26px);
  }

  .accordion-item.is-open .accordion-body {
    height: 320px;
    padding: 30px 42px 24px;
  }

  .video-card {
    flex-basis: 78%;
    min-width: 280px;
    border-radius: 22px;
  }

  .social-showcase {
    gap: 22px;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    padding-right: 4px;
  }
}

@media (max-width: 560px) {
  .motion-page {
    width: 92vw;
  }

  .breadcrumbs {
    font-size: 14px;
    margin-bottom: 18px;
  }

  .accordion {
    gap: 12px;
  }

  .accordion-head {
    min-height: 62px;
    padding: 0 14px;
    font-size: clamp(11px, 3.4vw, 18px);
    border-radius: 12px;
    gap: 10px;

    white-space: nowrap;
    overflow: hidden;
  }

  .accordion-head span:last-child {
    min-width: 0;
    flex: 1;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
  }

  .accordion-icon {
    width: 20px;
    flex: 0 0 20px;
    font-size: 20px;
  }

  .accordion-item {
    border-radius: 12px;
  }

  .accordion-item.is-open .accordion-body {
    height: 260px;
    padding: 24px 20px 18px;
  }

  .video-card {
    min-width: 230px;
  }

  .video-play img {
    width: 46px;
    height: 46px;
  }

  .social-showcase {
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 14px;

    overflow-x: auto;
    overflow-y: hidden;

    padding-right: 0;
    padding-bottom: 10px;

    scrollbar-width: thin;
    scrollbar-color: rgba(255, 253, 247, 0.28) transparent;
  }

  .social-card {
    height: 100%;
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;

    border-radius: 18px;
  }

  .social-showcase .social-card:nth-child(2),
  .social-showcase .social-card:nth-child(5) {
    aspect-ratio: 3 / 2;
  }

  .video-modal {
    padding: 14px;
  }

  .video-modal__window {
    width: 96vw;
    border-radius: 16px;
  }

  .video-modal__close {
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    font-size: 24px;
  }
}