/* ==========================================================================
   Kloena Digital — Interactive Multimedia work index
   Builds on the tokens and header/footer styles in styles.css
   ========================================================================== */

/* 1. Page shell
   ========================================================================== */
.page-multimedia main.multimedia {
  display: block;
  /* main is a flex item in the page column: allow it to shrink below the
     min-content width of its children instead of overflowing the viewport. */
  min-width: 0;
  width: min(1400px, 100%);
  margin-inline: auto;
  padding: clamp(6px, 1.4vw, 18px) clamp(20px, 3vw, 44px) 0;
}

.page-multimedia main.multimedia > section {
  width: 100%;
  margin-inline: auto;
}

html.is-lightbox-open {
  overflow: hidden;
}

/* 2. Shared primitives (eyebrow, buttons)
   ========================================================================== */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.eyebrow__rule {
  display: block;
  flex: none;
  width: 36px;
  height: 1px;
  background: currentColor;
  opacity: 0.8;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.35s var(--ease), background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--accent);
  color: #0b0c0e;
}

.btn--primary:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  border-color: rgba(255, 203, 0, 0.5);
  color: var(--accent-2);
  transform: translateY(-1px);
}

.btn span[aria-hidden="true"] {
  font-size: 12px;
  line-height: 1;
}

/* 3. Hero
   ========================================================================== */
.mm-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(430px, 47vw, 580px);
  padding: clamp(24px, 4vw, 56px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--surface);
  animation: mm-in 0.9s var(--ease-soft) both;
}

.mm-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-image: linear-gradient(150deg, var(--accent) 0%, var(--accent-2) 55%, #14161c 100%);
}

.mm-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(0.55) brightness(0.4) saturate(1);
  transform: scale(1.04);
}

.mm-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(95deg, rgba(7, 8, 10, 0.94) 0%, rgba(7, 8, 10, 0.7) 48%, rgba(7, 8, 10, 0.18) 84%),
    linear-gradient(180deg, rgba(7, 8, 10, 0.38) 0%, transparent 34%, rgba(7, 8, 10, 0.8) 82%, rgba(7, 8, 10, 0.96) 100%),
    radial-gradient(60% 90% at 4% 100%, rgba(255, 203, 0, 0.16), transparent 70%);
}

.mm-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(12px, 1.4vw, 18px);
  max-width: 820px;
}

.mm-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 78px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: var(--ink);
  text-wrap: balance;
}

.mm-hero__title em {
  font-style: normal;
  font-weight: 300;
  color: var(--accent-2);
}

.mm-hero__lead {
  max-width: 60ch;
  margin: 0;
  font-size: clamp(14px, 1.1vw, 17px);
  font-weight: 300;
  line-height: 1.72;
  color: var(--ink-dim);
  text-wrap: pretty;
}

/* category quick-jump pills */
.mm-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(6px, 1vw, 12px);
}

.mm-jump__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(7, 8, 10, 0.42);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(244, 246, 248, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.35s var(--ease);
}

.mm-jump__num {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--accent-2);
}

.mm-jump__link:hover,
.mm-jump__link:focus-visible {
  border-color: rgba(255, 203, 0, 0.55);
  background: rgba(255, 203, 0, 0.08);
  color: var(--ink);
  transform: translateY(-1px);
}

.mm-jump__link:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

/* 4. Category sections
   ========================================================================== */
.mm-category {
  margin-top: clamp(58px, 8vw, 112px);
  scroll-margin-top: 24px;
}

.mm-category__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 40px);
  padding-bottom: clamp(16px, 2.2vw, 26px);
  margin-bottom: clamp(22px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
}

.mm-category__intro {
  max-width: 780px;
}

.mm-category__intro .eyebrow {
  margin-bottom: 12px;
}

.mm-category__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.6vw, 58px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--ink);
  text-wrap: balance;
}

.mm-category__title em {
  font-style: normal;
  font-weight: 300;
  color: var(--accent-2);
}

.mm-category__lead {
  max-width: 62ch;
  margin: 14px 0 0;
  font-size: clamp(14px, 1.05vw, 16px);
  font-weight: 300;
  line-height: 1.72;
  color: var(--ink-dim);
  text-wrap: pretty;
}

.mm-category__count {
  flex: none;
  padding: 8px 14px;
  border: 1px solid rgba(255, 203, 0, 0.32);
  border-radius: 999px;
  background: rgba(255, 203, 0, 0.06);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--accent-2);
}

/* 5. Project entries
   ========================================================================== */
.mm-projects {
  display: grid;
  gap: clamp(38px, 5.6vw, 76px);
}

.mm-project {
  animation: mm-in 0.85s var(--ease-soft) both;
}

.mm-project + .mm-project {
  padding-top: clamp(34px, 5vw, 64px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mm-project:nth-child(2) { animation-delay: 0.08s; }
.mm-project:nth-child(3) { animation-delay: 0.16s; }
.mm-project:nth-child(4) { animation-delay: 0.24s; }
.mm-project:nth-child(5) { animation-delay: 0.32s; }

.mm-project__head {
  display: flex;
  align-items: flex-start;
  gap: clamp(14px, 2vw, 26px);
  margin-bottom: clamp(18px, 2.4vw, 30px);
}

.mm-project__number {
  flex: none;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 46px);
  font-weight: 300;
  line-height: 0.88;
  letter-spacing: -0.05em;
  color: rgba(255, 203, 0, 0.32);
}

.mm-project__kicker {
  margin: 0 0 7px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.mm-project__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.9vw, 40px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}

/* copy + cover split */
.mm-project__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(20px, 3.6vw, 56px);
  align-items: start;
}

.mm-project:nth-child(even) .mm-project__copy {
  order: 2;
}

.mm-project__copy p {
  max-width: 68ch;
  margin: 0;
  font-size: clamp(14px, 1.05vw, 16px);
  font-weight: 300;
  line-height: 1.78;
  color: var(--ink-dim);
  text-wrap: pretty;
}

.mm-project__copy p + p {
  margin-top: 1.05em;
}

.mm-project__copy p:first-child {
  font-size: clamp(15px, 1.12vw, 17px);
  color: rgba(244, 246, 248, 0.84);
}

.mm-project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: clamp(16px, 2vw, 22px) 0 0;
  padding: 0;
  list-style: none;
}

.mm-project__tags li {
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 246, 248, 0.76);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.mm-project__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(18px, 2.2vw, 26px);
}

/* 6. Cover + gallery images
   ========================================================================== */
.mm-project__cover {
  margin: 0;
  min-width: 0;
}

.mm-shot {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}

.mm-shot img {
  display: block;
  width: 100%;
  filter: grayscale(0.25) brightness(0.9) saturate(0.98);
  transition: filter 0.8s var(--ease), transform 1.1s var(--ease);
}

/* Covers keep their source proportions — portrait and square artwork must
   not be force-cropped into a landscape frame. */
.mm-project__cover .mm-shot img {
  height: auto;
}

.mm-shot::after {
  content: "View";
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(7, 8, 10, 0.68);
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0;
  transform: translateY(4px);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: opacity 0.3s ease, transform 0.4s var(--ease);
}

.mm-shot:hover img,
.mm-shot:focus-visible img {
  filter: grayscale(0) brightness(1) saturate(1.03);
  transform: scale(1.025);
}

.mm-shot:hover::after,
.mm-shot:focus-visible::after {
  opacity: 1;
  transform: none;
}

.mm-shot:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.mm-project__cover figcaption {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 300;
  line-height: 1.55;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

/* gallery uses CSS columns so mixed landscape / portrait shots keep their
   natural proportions instead of being force-cropped */
.mm-gallery {
  columns: 3;
  column-gap: clamp(8px, 1vw, 14px);
  margin-top: clamp(12px, 1.8vw, 20px);
}

.mm-gallery__item {
  break-inside: avoid;
  margin: 0 0 clamp(8px, 1vw, 14px);
}

.mm-gallery .mm-shot {
  border-radius: 14px;
}

.mm-gallery .mm-shot img {
  height: auto;
  object-fit: cover;
}

/* 7. Closing call to action
   ========================================================================== */
.mm-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 36px);
  margin-top: clamp(52px, 7vw, 96px);
  margin-bottom: clamp(24px, 4vw, 48px);
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 190% at 0% 0%, rgba(255, 203, 0, 0.13), transparent 56%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  box-shadow: 0 40px 90px -62px rgba(255, 203, 0, 0.55);
}

.mm-cta .eyebrow {
  margin-bottom: 8px;
}

.mm-cta__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: var(--ink);
}

/* 8. Lightbox
   ========================================================================== */
.mm-lightbox {
  width: min(1180px, 92vw);
  max-width: 1180px;
  max-height: 92vh;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}

.mm-lightbox::backdrop {
  background: rgba(3, 4, 6, 0.9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.mm-lightbox__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.5vw, 18px);
}

.mm-lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0;
  min-width: 0;
}

.mm-lightbox__image {
  display: block;
  flex: none;
  align-self: center;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 78vh;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: var(--surface);
  object-fit: contain;
}

.mm-lightbox__figure figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink-dim);
}

.mm-lightbox__count {
  flex: none;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
}

.mm-lightbox__close,
.mm-lightbox__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(13, 16, 20, 0.72);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.3s var(--ease);
}

.mm-lightbox__close:hover,
.mm-lightbox__nav:hover {
  border-color: rgba(255, 203, 0, 0.55);
  background: rgba(255, 203, 0, 0.12);
  color: var(--accent-2);
}

.mm-lightbox__close:focus-visible,
.mm-lightbox__nav:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.mm-lightbox__close {
  position: absolute;
  top: -54px;
  right: 0;
  z-index: 2;
}

.mm-lightbox__nav--prev {
  transform: translateX(0);
}

.mm-lightbox__nav--next {
  transform: translateX(0);
}

.mm-lightbox__nav[disabled] {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* 9. Motion
   ========================================================================== */
@keyframes mm-in {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mm-hero,
  .mm-project {
    animation: none;
  }

  .mm-shot img,
  .mm-shot::after,
  .mm-jump__link,
  .btn {
    transition: none;
  }
}

/* 10. Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .mm-project__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  /* keep copy first on stacked layouts */
  .mm-project:nth-child(even) .mm-project__copy {
    order: 0;
  }

  .mm-gallery {
    columns: 2;
  }

  .mm-category__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 720px) {
  .mm-hero {
    min-height: 430px;
    padding: 24px 20px;
    border-radius: 18px;
  }

  .mm-hero::after {
    background-image:
      linear-gradient(180deg, rgba(7, 8, 10, 0.42) 0%, rgba(7, 8, 10, 0.18) 24%, rgba(7, 8, 10, 0.84) 68%, rgba(7, 8, 10, 0.97) 100%),
      radial-gradient(80% 70% at 0% 100%, rgba(255, 203, 0, 0.16), transparent 70%);
  }

  .mm-jump {
    width: 100%;
  }

  .mm-jump__link {
    flex: 1 1 auto;
    justify-content: center;
  }

  .mm-project__actions {
    width: 100%;
  }

  .mm-project__actions .btn {
    flex: 1 1 auto;
  }

  .mm-cta {
    align-items: flex-start;
    border-radius: 18px;
  }

  .mm-cta .btn {
    width: 100%;
  }

  .mm-lightbox__inner {
    gap: 6px;
  }

  .mm-lightbox__close,
  .mm-lightbox__nav {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .mm-lightbox__close {
    top: -44px;
  }

  .mm-lightbox__image {
    max-height: 72vh;
  }
}

@media (max-width: 560px) {
  /* The five nav items no longer fit beside the logo: give the nav its own
     row and drop the pipe separators so no stray glyph wraps on its own. */
  .page-multimedia .site-header {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .page-multimedia .site-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .page-multimedia .site-nav__list {
    gap: 4px 14px;
  }

  .page-multimedia .site-nav__list > li + li::before {
    display: none;
  }

  .page-multimedia .site-nav__link {
    padding: 4px 0;
    font-size: 9px;
    letter-spacing: 0.14em;
  }

  .mm-project__actions .btn {
    flex: 1 1 100%;
  }

  .mm-jump__link {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .mm-gallery {
    columns: 1;
  }

  .mm-lightbox {
    width: 96vw;
  }
}
