/* ---------- FONT ---------- */
@font-face {
  font-family: 'MetaOldFrench';
  src: url('FONTS/Meta-old-French.otf') format('opentype');
}

/* ---------- GLOBAL ---------- */

body {
  margin: 0;
  background: #fff;
  color: #111;
  font-family: 'Space Grotesk', sans-serif;
}

/* ---------- HEADER ---------- */

.project-header {
  display: flex;
  justify-content: space-between;
  padding: 24px 36px;
}

.project-header a {
  text-decoration: none;
  color: #111;
  font-size: 17px;
  letter-spacing: 1px;
}

.project-header .right {
  display: flex;
  gap: 30px;
}

/* ---------- HERO ---------- */

.project-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px 0px; /* tightened */
}

/* ---------- CAROUSEL ---------- */

.carousel-wrapper {
  position: relative;
  width: min(1000px, 92vw);
  height: clamp(420px, 65vh, 720px);
  margin: 0 auto;
  overflow: hidden;
}

.slide video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s ease;
}

/* each slide */
.slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* image behavior */
.slide img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

/* ---------- ARROWS ---------- */

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  opacity: 0.6;
  z-index: 50;
  transition: opacity 0.3s ease;
}

.arrow:hover {
  opacity: 1;
}

.arrow.left {
  left: 12px;
}

.arrow.right {
  right: 12px;
}

.arrow.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ONLY THIS PAGE */

.grotesque-page .arrow {
  color: #DE6464;
  font-size: 28px;
  z-index: 100;
}

.grotesque-page .arrow::before {
  background: rgba(0,0,0,0.4);
  padding: 6px 10px;
  border-radius: 50%;
}


/* ---------- CONTENT WIDTH ---------- */

.content-width {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- TITLE ---------- */

.project-title-block {
  text-align: center;
  margin-top: 40px; /* tightened */
}

.project-title-block h1 {
  font-family: 'MetaOldFrench', serif;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: 6px;
  margin: 0;
}

.project-meta {
  font-size: 12px;
  letter-spacing: 2px;
  margin-top: 12px;
  opacity: 0.6;
}

/* ---------- DESCRIPTION ---------- */

.project-description {
  font-family: 'MetaOldFrench', serif;
  font-size: 16px;
  line-height: 1.7;
  text-align: center;
  margin: 40px auto 60px;
}

/* ---------- INFO ---------- */

.project-info {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  text-align: center;
  margin-bottom: 80px;
}

.project-info h3 {
  font-size: 17px;
  margin-bottom: 10px;
  font-family: 'MetaOldFrench', serif;
}

.project-info p {
  font-family: 'MetaOldFrench', serif;
  font-size: 15px;
  line-height: 1.5;
}

/* ---------- MEDIA GRID ---------- */

.project-media {
  max-width: 720px;
  margin: 0 auto 100px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-media img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- MOBILE ---------- */

@media (max-width: 767px) {

  /* HEADER */
  .project-header {
    padding: 20px;
  }

  .project-header a {
    font-size: 14px;
  }

  /* HERO */
  .project-hero {
    padding: 40px 20px 0px;
  }

  .carousel-wrapper {
    height: clamp(300px, 55vh, 500px);
  }

  .arrow.left {
    left: 8px;
  }

  .arrow.right {
    right: 8px;
  }

  /* TITLE */
  .project-title-block {
    margin-top: 24px;
  }

  .project-title-block h1 {
    font-size: 24px;
    letter-spacing: 3px;
  }

  /* DESCRIPTION */
  .project-description {
    font-size: 15px;
    margin: 30px auto 50px;
  }

  /* INFO */
  .project-info {
    flex-direction: column;
    gap: 30px;
  }

  /* MEDIA GRID */
  .project-media {
    grid-template-columns: 1fr;
    max-width: 500px; 
    margin: 0 auto 80px;
    gap: 16px;
  }

  .media-item {
    position: relative;
    margin-bottom: 24px;
  }

  /* IMAGE */
  .media-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: filter 0.3s ease; /* 👈 slightly faster */
  }

  /* CAPTION */
  .media-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    font-family: 'MetaOldFrench', serif;
    font-size: 11.5px; /* 👈 slightly smaller */
    line-height: 1.4;
    text-align: center;

    color: white;
    width: 65%;

    opacity: 0;
    transition: opacity 0.2s ease; /* 👈 fast + clean */
  }

  /* ACTIVE STATE */
  .media-item.active img {
    filter: brightness(0.25);
  }

  .media-item.active .media-caption {
    opacity: 1;
  }

}


/* ---------- MEDIA ITEM ---------- */

.media-item {
  position: relative;
  overflow: hidden;
}

/* image */
.media-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: filter 0.4s ease;
}

/* caption (no background) */
.media-caption {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%);

  font-family: 'MetaOldFrench', serif;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;

  color: white;
  width: 80%;

  opacity: 0;
  transition: all 0.4s ease;
}

/* hover */
.media-item:hover img {
  filter: brightness(0.25);
}

.media-item:hover .media-caption {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* ---------- DEVTOOLS-STYLE SCALE ---------- */

.game-section {
  margin: 80px auto;
  width: min(1000px, 92vw); /* controls visible frame size */
  display: flex;
  justify-content: center;
}

/* fixed canvas */
.game-inner {
  width: 1820px;
  height: 1041px;
  transform-origin: top center;
}

/* scale to fit container */
.game-inner {
  transform: scale(calc(1000 / 1820));
}

/* iframe stays true size */
.game-inner iframe {
  width: 1820px;
  height: 1041px;
  border: none;
}

.mobile-only-note {
  display: none;
}

@media (max-width: 767px) {

  .game-section {
    display: none;
  }

  .mobile-only-note {
    display: block;
    position: relative;
    max-width: 500px;
    margin: 0 auto 80px;
  }

  .mobile-only-note img {
    width: 100%;
    display: block;
    filter: brightness(0.4);
  }

  .mobile-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    font-family: 'MetaOldFrench', serif;
    font-size: 14px;
    width: 70%;
  }
}

.game-inner {
  width: 1820px;
  height: 1041px;
  transform-origin: top center;

  /* 🔥 THIS FIXES THE GAP */
  margin-bottom: -520px; /* half-ish of height */
}