@import url("https://fonts.googleapis.com/css2?family=Archivo+Black&family=Outfit:wght@300;400;500;600&display=swap");

/* ========================================
   SKRIFTTYPER
======================================== */

@font-face {
  font-family: "Candu";
  src:
    url("fonts/Candu.woff2") format("woff2"),
    url("fonts/Candu.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* @font-face {
  font-family: "Olive Display";
  src: url("OliveDisplay-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
} */

/* ========================================
   GRUNDINDSTILLINGER
======================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;

  background: #cfe1fa;
  color: #111118;
  font-family: "Outfit", sans-serif;
}

body.lightbox-open {
  overflow: hidden;
}

button {
  font: inherit;
}

main h1,
main h1 span,
main h1 strong {
  font-family: "Candu", sans-serif !important;
  font-weight: 400 !important;
}

/* ========================================
   NAVIGATION
======================================== */

/* Standardnavigationen har fire punkter */

.main-nav {
  width: min(650px, 100%);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Kun navigationen på fuldkollektion-siden har fem punkter */

.main-nav.collection-nav {
  width: min(820px, 100%);
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* ========================================
   SEKTION
======================================== */

.collection-section {
  width: min(1050px, calc(100% - 48px));
  margin: 0 auto;
  padding: 55px 0 120px;
}

/* ========================================
   OVERSKRIFT
======================================== */

.collection-header {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 50px;

  opacity: 0;
  transform: translateY(28px);

  animation: collection-header-enter 800ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.collection-header h1 {
  margin: 0 0 20px;

  display: flex;
  align-items: center;
  gap: 16px;

  font-family: "Candu", sans-serif;
  font-size: 64px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}

.collection-header h1 span {
  color: #050505;
}

.collection-header h1 strong {
  color: #eb36ef;
  font: inherit;
}

/* Samme skrift som teksten på Udvalgte projekter */

.collection-header p {
  max-width: 680px;
  margin: 0;

  color: #4b4e58;
  font-family: "Olive Display", sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 300;
  line-height: 1.45;
}

/* ========================================
   GALLERI
======================================== */

.collection-gallery {
  position: relative;
  overflow: hidden;

  width: 100%;
  padding: 80px 105px;

  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 22px;
  row-gap: 26px;
  align-items: start;

  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 20px;

  background: linear-gradient(155deg, #f4aef8 0%, #c78ef5 45%, #625cff 100%);

  box-shadow:
    0 22px 60px rgb(70 65 180 / 10%),
    inset 0 1px 0 rgb(255 255 255 / 20%);

  opacity: 0;
  transform: translateY(45px) scale(0.98);

  animation: collection-gallery-enter 900ms 250ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Diskret lys, der bevæger sig over boksen */

.collection-gallery::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;

  background: linear-gradient(115deg, transparent 25%, rgb(255 255 255 / 18%) 48%, transparent 70%);

  pointer-events: none;
  transform: translateX(-120%);

  animation: collection-shine 1100ms 500ms ease forwards;
}

/* ALLE BILLEDBOKSE */

.collection-item {
  position: relative;
  z-index: 1;

  width: 100%;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 0;

  display: block;
  overflow: visible;

  border: 0;
  outline: 0;
  background: transparent;
  appearance: none;

  cursor: pointer;

  /*
    "backwards": billedet er usynligt, mens det venter på sin tur,
    men slipper animationen, når den er færdig, så hover stadig virker.
  */
  animation: collection-item-enter 550ms cubic-bezier(0.22, 1, 0.36, 1) backwards;

  transition:
    transform 350ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 350ms ease;
}

/* Billederne kommer ind ét efter ét */

.collection-item:nth-child(1) {
  animation-delay: 450ms;
}

.collection-item:nth-child(2) {
  animation-delay: 540ms;
}

.collection-item:nth-child(3) {
  animation-delay: 630ms;
}

.collection-item:nth-child(4) {
  animation-delay: 720ms;
}

.collection-item:nth-child(5) {
  animation-delay: 810ms;
}

.collection-item:nth-child(6) {
  animation-delay: 900ms;
}

/* ALLE BILLEDER */

.collection-item img {
  display: block;
  width: 100%;
  height: 100%;

  object-fit: fill;
  background: transparent;

  transform-origin: center;
  transition: transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* DE FIRE ØVERSTE PLAKATER */

.collection-item-portrait {
  grid-column: span 1;
  aspect-ratio: 5 / 7;
}

/* DE TO NEDERSTE PLAKATER */

.collection-item-landscape {
  grid-column: span 2;
  width: 100%;
  aspect-ratio: 1.45 / 1;

  display: flex;
  align-items: stretch;
}

.collection-item-landscape img {
  width: auto;
  max-width: none;
  height: 100%;
  object-fit: contain;
}

/* Sinner og Alcaraz flugter med venstre yderkant */

.collection-item-landscape:nth-child(5) {
  justify-content: flex-start;
}

/* Martin Garrix flugter med højre yderkant */

.collection-item-landscape:nth-child(6) {
  justify-content: flex-end;
}

/* HOVER */

.collection-item:hover {
  z-index: 10;
  transform: translateY(-7px);
}

.collection-item:hover img {
  transform: scale(1.03);
}

/* TASTATURFOKUS */

.collection-item:focus-visible {
  outline: 4px solid #eb36ef;
  outline-offset: 5px;
}

/* ========================================
   "KLIK FOR AT FORSTØRRE"
======================================== */

.zoom-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 4;

  display: flex;
  align-items: center;
  gap: 8px;

  padding: 9px 14px;

  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 999px;

  background: rgb(15 10 35 / 70%);
  color: #fff;

  font-size: 0.9rem;
  font-weight: 400;
  white-space: nowrap;

  opacity: 0;
  pointer-events: none;

  transform: translate(-50%, 10px);

  backdrop-filter: blur(8px);

  transition:
    opacity 250ms ease,
    transform 250ms ease;
}

.zoom-hint svg {
  width: 18px;
  height: 18px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.collection-item:hover .zoom-hint,
.collection-item:focus-visible .zoom-hint {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ========================================
   LIGHTBOX
======================================== */

.collection-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;

  display: grid;
  place-items: center;

  padding: 40px 100px;

  background: rgb(9 7 24 / 92%);
  backdrop-filter: blur(14px);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 300ms ease,
    visibility 300ms ease;
}

.collection-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.collection-lightbox-image {
  display: block;

  width: auto;
  height: auto;
  max-width: calc(100vw - 200px);
  max-height: calc(100vh - 80px);

  object-fit: contain;

  opacity: 0;
  transform: scale(0.92);

  box-shadow: 0 30px 90px rgb(0 0 0 / 45%);

  transition:
    opacity 350ms ease,
    transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.collection-lightbox.is-open .collection-lightbox-image {
  opacity: 1;
  transform: scale(1);
}

/* LUK-KNAP – samme stil som på Projekter-siden */

.collection-lightbox-close {
  position: absolute;
  top: 24px;
  right: 30px;
  z-index: 3;

  width: 56px;
  height: 56px;
  padding: 0;

  display: grid;
  place-items: center;

  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 50%;

  background-color: rgb(255 255 255 / 9%);
  color: #fff;

  font-size: 2.5rem;
  line-height: 1;

  cursor: pointer;

  transition:
    background-color 200ms ease,
    transform 200ms ease;
}

.collection-lightbox-close:hover {
  background-color: rgb(255 255 255 / 18%);
  transform: scale(1.07);
}

/* PILE – samme stil som Red Bull-pilene */

.collection-lightbox-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;

  width: 58px;
  height: 58px;
  padding: 0;

  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 50%;

  background-color: rgb(255 255 255 / 9%);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 26px 26px;

  cursor: pointer;
  transform: translateY(-50%);

  transition:
    background-color 200ms ease,
    transform 200ms ease;
}

/* De gamle hvide SVG-pile skjules */

.collection-lightbox-arrow svg {
  display: none;
}

.collection-lightbox-previous {
  left: 25px;
  background-image: url("arrowleft.png");
}

.collection-lightbox-next {
  right: 25px;
  background-image: url("arrowright.png");
}

.collection-lightbox-arrow:hover {
  background-color: rgb(255 255 255 / 18%);
  transform: translateY(-50%) scale(1.07);
}

.collection-lightbox-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

/* TÆLLER (fx 2 / 6) */

.collection-counter {
  position: absolute;
  bottom: 22px;
  left: 50%;

  color: rgb(255 255 255 / 75%);
  font-size: 1rem;

  transform: translateX(-50%);
}

/* ========================================
   TABLET
======================================== */

@media (max-width: 950px) {
  .collection-header h1 {
    font-size: clamp(48px, 8vw, 64px);
  }
}

@media (max-width: 700px) {
  .collection-lightbox-arrow {
    width: 42px;
    height: 42px;
  }
}

/* ========================================
   MOBIL
======================================== */

@media (max-width: 650px) {
  /* ---------- Sektion ---------- */

  .collection-section {
    width: calc(100% - 28px);
    padding: 35px 0 70px;
  }

  /* ---------- Overskrift ---------- */

  .collection-header {
    margin: 0 auto 32px;
  }

  /* "Kollektion" på linje to, venstrejusteret */
  .collection-header h1 {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;

    font-size: clamp(34px, 11vw, 46px);
    white-space: normal;
  }

  .collection-header p {
    max-width: 20em;
    font-size: 1rem;
    line-height: 1.5;
  }

  /* ---------- Galleri ---------- */

  .collection-gallery {
    padding: 24px 16px;

    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 14px;
    row-gap: 16px;

    border-radius: 16px;
  }

  .collection-item-landscape {
    grid-column: span 2;
    aspect-ratio: auto;
    height: auto;

    justify-content: center !important;
    align-items: center !important;
  }

  .collection-item-landscape img {
    width: 100%;
    height: auto;

    object-fit: contain;
  }

  /* Ingen zoom af billederne på mobil */
  .collection-item img,
  .collection-item:hover img,
  .collection-item:focus img,
  .collection-item:active img {
    transform: none !important;
  }

  .zoom-hint {
    bottom: 10px;
    padding: 7px 12px;
    font-size: 0.8rem;
  }

  .zoom-hint svg {
    width: 15px;
    height: 15px;
  }

  /* ---------- Lightbox ---------- */

  /* Plads i siderne, så pilene ikke dækker billedet */
  .collection-lightbox {
    padding: 70px 56px 30px;
  }

  .collection-lightbox-image {
    max-width: 100%;
    max-height: calc(100vh - 100px);
  }

  .collection-lightbox-previous {
    left: 8px;
  }

  .collection-lightbox-next {
    right: 8px;
  }

  .collection-lightbox-close {
    top: 12px;
    right: 14px;
    width: 48px;
    height: 48px;
  }
}

/* ========================================
   ANIMATIONER
======================================== */

@keyframes collection-header-enter {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes collection-gallery-enter {
  from {
    opacity: 0;
    transform: translateY(45px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes collection-item-enter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes collection-shine {
  from {
    transform: translateX(-120%);
  }

  to {
    transform: translateX(120%);
  }
}

/* ========================================
   REDUCERET BEVÆGELSE
======================================== */

@media (prefers-reduced-motion: reduce) {
  .collection-header,
  .collection-gallery,
  .collection-item,
  .collection-gallery::before {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
  }

  .collection-lightbox,
  .collection-lightbox-image {
    transition: none;
  }
}
/* ========================================
   GALLERI – BILLEDERNE FYLDER MERE
======================================== */

@media (min-width: 651px) {
  .collection-gallery {
    padding: 48px 56px;

    column-gap: 24px;
    row-gap: 28px;
  }
}
