html.ai-video-page,
html.ai-video-page body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  background: var(--color-black);
}

html.ai-video-page { scroll-behavior: smooth; }

.ai-video-page #main-container { padding: 0; }

.ai-video-page #header-container {
  background: linear-gradient(to bottom, #000000b8 0, #00000070 48%, transparent 100%);
}

.ai-video-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--color-black);
}

.ai-video-hero__media,
.ai-video-hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ai-video-hero__media {
  object-fit: cover;
  object-position: center;
}

.ai-video-hero__shade {
  pointer-events: none;
  background:
    linear-gradient(90deg, #00000070 0, #00000020 42%, transparent 68%),
    linear-gradient(to top, #0000008f 0, transparent 34%);
}

.ai-video-hero__copy {
  position: absolute;
  z-index: 1;
  top: clamp(20rem, 20vh, 20rem);
  left: max(2rem, 4vw);
  color: var(--color-white);
  text-shadow: 0 1px .4rem var(--color-black), 0 1px 2rem #000000b8;
}

.ai-video-hero__copy h1 {
  margin: 0;
  font-size: clamp(10rem, 15vw, 22rem);
  font-weight: 500;
  line-height: .68;
  letter-spacing: -.08em;
}

.ai-video-hero__copy p {
  margin: 3rem 0 0;
  color: var(--color-light);
  font-size: clamp(1rem, 1vw, 1.2rem);
  line-height: 1.55;
}

.ai-project-dock {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 10vh;
  left: 0;
  height: 30vh;
  min-height: 22rem;
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) 5rem;
  padding: 1.2rem 0;
  background: var(--color-ink);
}

.ai-project-dock__label {
  position: absolute;
  top: 0;
  left: 5rem;
  margin: 0;
  padding: 1rem 1.6rem .9rem;
  background: var(--color-ink);
  color: var(--color-light);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .16em;
  transform: translateY(-100%);
}

.ai-project-dock__viewport {
  position: relative;
  min-width: 0;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  touch-action: pan-x;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}

.ai-project-dock__viewport.is-dragging {
  scroll-snap-type: none;
  cursor: grabbing;
  user-select: none;
}

.ai-project-dock__viewport::-webkit-scrollbar { display: none; }

.ai-project-dock__track {
  width: max-content;
  height: 100%;
  display: flex;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}

.ai-project-card {
  flex: 0 0 auto;
  height: 100%;
  overflow: hidden;
  list-style: none;
  scroll-snap-align: start;
}

.ai-project-card--portrait { aspect-ratio: 2 / 3; }
.ai-project-card--landscape { aspect-ratio: 3 / 2; }

.ai-project-card a {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: var(--color-white);
  -webkit-user-drag: none;
}

.ai-project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transition: filter .4s ease, transform .6s ease;
}

.ai-project-card span {
  position: absolute;
  inset: auto 0 0;
  padding: 5rem 1.4rem 1.4rem;
  background: linear-gradient(to top, #000000b8, transparent);
  color: var(--color-white);
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity .3s ease;
}

.ai-project-card a:hover img,
.ai-project-card a:focus-visible img {
  filter: brightness(.82);
  transform: scale(1.025);
}

.ai-project-card a:hover span,
.ai-project-card a:focus-visible span { opacity: 1; }

.ai-project-dock__control {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  color: var(--color-light);
  font-size: 3rem;
  opacity: .7;
}

.ai-project-dock__control:hover,
.ai-project-dock__control:focus-visible { opacity: 1; }
.ai-project-dock__control:disabled { opacity: .12; cursor: default; }

.ai-project-dock__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--color-muted);
  font-size: 1.3rem;
}

.ai-project-dock__empty[hidden] { display: none; }

.ai-project-filter {
  position: absolute;
  z-index: 2;
  bottom: max(3rem, env(safe-area-inset-bottom));
  left: max(2rem, 4vw);
  display: flex;
  align-items: center;
  gap: clamp(.8rem, 1.4vw, 1.8rem);
  color: var(--color-light);
  font-size: 1.2rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.ai-project-filter button {
  padding: 0;
  background: transparent;
  color: var(--color-light);
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  opacity: .78;
  transition: color .25s ease, opacity .25s ease;
}

.ai-project-filter button:hover,
.ai-project-filter button:focus-visible,
.ai-project-filter button[aria-current='page'] {
  color: var(--color-white);
  opacity: 1;
}

.ai-project-filter button[aria-current='page'] {
  text-decoration: underline;
  text-underline-offset: .5rem;
}

.ai-project-filter span { color: var(--color-muted); }

.ai-more-projects {
  position: absolute;
  z-index: 3;
  right: max(2rem, 4vw);
  bottom: max(2.8rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--color-white);
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .16em;
}

.ai-more-projects svg {
  width: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  animation: ai-more-cue 1.8s ease-in-out infinite;
}

@keyframes ai-more-cue {
  0%, 100% { transform: translateY(-.15rem); }
  50% { transform: translateY(.35rem); }
}

.ai-archive {
  min-height: 100vh;
  padding: clamp(8rem, 12vw, 15rem) max(2rem, 4vw);
  color: var(--color-light);
  background: var(--color-black);
  scroll-margin-top: 0;
}

.ai-archive__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(30rem, .65fr);
  gap: clamp(4rem, 10vw, 14rem);
  align-items: start;
  padding-bottom: 4rem;
  border-bottom: 1px solid #ffffff24;
}

.ai-archive__header > div:first-child > p {
  margin: 0 0 1.2rem;
  color: var(--color-muted);
  font-size: .8rem;
  letter-spacing: .22em;
}

.ai-archive__header h2 {
  margin: 0;
  color: var(--color-white);
  font-size: clamp(4rem, 8vw, 11rem);
  font-weight: 400;
  line-height: .88;
  letter-spacing: -.075em;
}

.ai-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #ffffff35;
  border-left: 1px solid #ffffff35;
}

.ai-filter-grid button {
  min-height: 5.5rem;
  padding: 1.4rem;
  border-right: 1px solid #ffffff35;
  border-bottom: 1px solid #ffffff35;
  background: transparent;
  color: var(--color-muted);
  font-size: 1rem;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .12em;
  transition: color .2s ease, background .2s ease;
}

.ai-filter-grid button:hover,
.ai-filter-grid button:focus-visible,
.ai-filter-grid button[aria-current] {
  background: var(--color-white);
  color: var(--color-black);
}

.ai-filter-options {
  min-height: 5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  align-items: flex-start;
  padding-top: 1.4rem;
}

.ai-filter-options button {
  padding: .65rem 1rem;
  border: 1px solid #ffffff38;
  border-radius: 999px;
  background: transparent;
  color: var(--color-muted);
}

.ai-filter-options button:hover,
.ai-filter-options button[aria-current='page'] {
  border-color: var(--color-white);
  color: var(--color-white);
}

.ai-filter-options p {
  margin: .5rem 0;
  color: var(--color-muted);
}

.ai-filter-columns {
  display: grid;
  grid-template-columns: .7fr 1.3fr 1.1fr .8fr;
  gap: clamp(1rem, 2.5vw, 3.5rem);
}

.ai-filter-columns h3,
.ai-filter-columns > div > button {
  margin: 0 0 2rem;
  padding: 0;
  color: var(--color-white);
  background: transparent;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
}

.ai-filter-columns [data-filter-list] {
  display: grid;
  justify-items: start;
  gap: .7rem;
}

.ai-filter-columns [data-filter-list] button {
  padding: 0;
  background: transparent;
  color: var(--color-muted);
  font-size: .95rem;
  text-align: left;
  transition: color .2s ease;
}

.ai-filter-columns button:hover,
.ai-filter-columns button:focus-visible,
.ai-filter-columns button[aria-current] {
  color: var(--color-white);
}

.ai-filter-columns button[aria-current] {
  text-decoration: underline;
  text-underline-offset: .35rem;
}

.ai-archive__count {
  margin: 2rem 0;
  color: var(--color-muted);
  font-size: .85rem;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: .16em;
}

.ai-archive-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(.6rem, .8vw, 1.2rem);
}

.ai-archive-card[hidden] { display: none; }

.ai-archive-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.ai-archive-card {
  flex: 0 0 auto;
}

.ai-archive-card__image {
  position: relative;
  height: clamp(22rem, 22vw, 34rem);
  aspect-ratio: var(--project-aspect);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--color-ink);
}

.ai-archive-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter .4s ease, transform .7s ease;
}

.ai-archive-card__image b {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: .4rem .55rem;
  background: #000000b8;
  color: var(--color-white);
  font-size: .7rem;
}

.ai-archive-card__copy {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.2rem 0 3rem;
  border-bottom: 1px solid #ffffff20;
}

.ai-archive-card__copy p,
.ai-archive-card__copy > span {
  margin: 0;
  color: var(--color-muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.ai-archive-card__copy h3 {
  margin: .5rem 0 0;
  color: var(--color-white);
  font-size: clamp(1.5rem, 2.2vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -.045em;
}

.ai-archive-card a:hover img,
.ai-archive-card a:focus-visible img {
  filter: brightness(.8);
  transform: scale(1.025);
}

.ai-archive__empty {
  padding: 8rem 2rem;
  color: var(--color-muted);
  text-align: center;
  border: 1px dashed #ffffff2e;
}

@media (max-width: 560px) {
  .ai-video-hero__copy {
    top: 10rem;
    right: 2rem;
    left: 2rem;
  }

  .ai-video-hero__copy h1 { font-size: clamp(7rem, 28vw, 12rem); }
  .ai-video-hero__copy p { margin-top: 2rem; font-size: .95rem; }

  .ai-project-dock {
    bottom: 9vh;
    height: 32vh;
    min-height: 20rem;
    grid-template-columns: 3.6rem minmax(0, 1fr) 3.6rem;
    padding-block: .8rem;
  }

  .ai-project-dock__track { gap: .8rem; }
  .ai-project-dock__control { font-size: 2.4rem; }
  .ai-project-dock__viewport { cursor: auto; }
  .ai-project-dock__label { left: 3.6rem; padding-inline: 1.2rem; }

  .ai-project-filter {
    right: 2rem;
    bottom: max(2rem, env(safe-area-inset-bottom));
    left: 2rem;
    justify-content: space-between;
    gap: .5rem;
    font-size: 1rem;
    letter-spacing: .08em;
  }

  .ai-more-projects {
    right: 2rem;
    bottom: max(2rem, env(safe-area-inset-bottom));
    font-size: .9rem;
  }
}

@media (max-width: 900px) {
  .ai-archive__header { grid-template-columns: 1fr; gap: 4rem; }
  .ai-filter-columns { max-width: 60rem; }
  .ai-archive-card__image { height: clamp(20rem, 36vw, 30rem); }
}

@media (max-width: 560px) {
  .ai-archive { padding-inline: 1.2rem; }
  .ai-filter-columns { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; }
  .ai-archive-card { max-width: 100%; }
  .ai-archive-card__image { height: 24rem; max-width: calc(100vw - 2.4rem); }
  .ai-filter-grid button { min-height: 4.5rem; padding: 1rem; font-size: .85rem; }
}

@media (prefers-reduced-motion: reduce) {
  html.ai-video-page { scroll-behavior: auto; }
  .ai-project-filter button,
  .ai-project-card img,
  .ai-project-card span { transition: none; }
  .ai-more-projects svg { animation: none; }
}
