.projects-page {
  max-width: 1200px;
  padding-bottom: 40px;

  /* --- ARROWS --- */
  --a1-x: -30px;
  --a1-y: 0px;
  --a1-rot: 30deg;

  --a2-x: -70px;
  --a2-y: 0px;
  --a2-rot: -10deg;

  --a3-x: -50px;
  --a3-y: 0px;
  --a3-rot: -40deg;

  /* --- IMAGES --- */
  --poza1-x: 0px;
  --poza1-y: 0px;

  --poza2-x: 0px;
  --poza2-y: 0px;

  --poza3-x: 0px;
  --poza3-y: 0px;

  /* --- TEXT --- */
  --text1-x: 0px;
  --text1-y: 0px;

  --text2-x: 0px;
  --text2-y: 0px;

  --text3-x: 0px;
  --text3-y: 0px;
}

/* ===== TOP ===== */
.proj-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
}

.proj-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
  font-size: clamp(4rem, 10vw, 7.5rem);
  line-height: 1;
  color: var(--maroon);
}

.back-btn {
  background: var(--maroon);
  color: #fff;
  padding: 8px 22px;
  border-radius: 4px;
  font-size: 1.1rem;
  transition: background 0.2s;
  text-decoration: none;
}

.back-btn:hover {
  background: #6f2323;
}

.proj-script {
  font-family: "Great Vibes", cursive;
  font-size: 2.6rem;
  margin: 10px 0 40px;
}

/* ===== IMAGES AND TEXT ===== */
.shot {
  width: 880px;
  max-width: 100%; /* Allows images to expand generously */
  height: auto; /* Height adjusts automatically */
  display: block;
  justify-self: center;
  border-radius: 12px;
  object-fit: contain;
}

/* Reduce excessive column spacing to give images more room */
@media (min-width: 801px) {
  .projects-page {
    display: grid;
    grid-template-columns: 1.2fr 1fr; /* Gives more space to the image column */
    column-gap: 40px;
    align-items: center;
  }

  /* Increase image sizes on desktop */
  .shot-1,
  .shot-2,
  .shot-3 {
    width: 750px; /* Allows images to extend beyond the narrow column */
    max-width: none;
    height: auto;
  }

  .shot-1 {
    justify-self: end;
  }

  .shot-2,
  .shot-3 {
    justify-self: start;
  }
}

.proj-text {
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.65;
  max-width: 580px;
}

/* ===== ARROWS (images) ===== */
.arrow {
  --arrow-h: 200px;
  display: block;
  height: var(--arrow-h);
  width: auto;
  max-width: 100%;
  justify-self: center;
  margin: 10px auto;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: clip-path 1.2s ease-in-out;
}

.js .arrow {
  clip-path: inset(0 100% 0 0);
}

.js .arrow[data-reveal="top"] {
  clip-path: inset(0 0 100% 0);
}

.js .arrow.is-drawn {
  clip-path: inset(0 0 0 0);
}

.arrow.flip-x {
  transform: scaleX(-1);
}

.arrow.flip-y {
  transform: scaleY(-1);
}

.arrow.flip-xy {
  transform: scale(-1, -1);
}

@media (prefers-reduced-motion: reduce) {
  .arrow {
    transition: none;
  }
}

/* ===== VIDEO ===== */
.video-block {
  --video-w: 1550px;
  --video-h: 850px;
  --box-pad: 50px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  margin: 40px auto 0;
  padding: var(--box-pad);
  background: #a31f26;
  border-radius: 22px;
}

.video-frame {
  --ar: 0.5625;
  position: relative;
  box-sizing: border-box;
  width: min(var(--video-w), calc(var(--video-h) * var(--ar)));
  max-width: 100%;
  aspect-ratio: var(--ar);
  overflow: hidden;
  border-radius: 10px;
  background: #000;
  container-type: size;
}

.video-frame video {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg))
    scaleX(var(--flip, 1));
}

.video-frame.is-sideways video {
  width: 100cqh;
  height: 100cqw;
}

.video-controls {
  display: flex;
  justify-content: center;
}

.video-btn {
  position: relative;
  width: 65px;
  height: 65px;
  border: none;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: transform 0.2s;
}

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

.video-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22px;
  height: 22px;
  background: #a31f26;
  clip-path: polygon(20% 0, 100% 50%, 20% 100%);
  transform: translateX(2px);
}

.video-btn.is-playing::before {
  width: 18px;
  height: 18px;
  clip-path: none;
  border-radius: 3px;
  transform: none;
}

/* ===== FOOTER ===== */
.proj-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 50px;
  font-size: 1.2rem;
}

.next-link:hover {
  text-decoration: underline;
}

/* ===== MOBILE: SINGLE-COLUMN LAYOUT ===== */
.proj-grid,
.proj-bottom {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 24px;
}

@media (max-width: 800px) {
  .arrow {
    --arrow-h: 130px;
  }
}

/* ===== IMAGES AND TEXT: LARGE, CLEAR AND SPACED OUT ===== */
.shot {
  width: 100%;
  max-width: 720px; /* Set the maximum image size here: 750px or 800px also works */
  height: auto;
  display: block;
  justify-self: center;
  border-radius: 12px;
  object-fit: contain;
}

/* ===== DESKTOP: ZIGZAG LAYOUT ===== */
@media (min-width: 801px) {
  .projects-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 80px;
    align-items: center;
  }

  .proj-grid {
    display: contents;
  }

  .proj-top {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .proj-script {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  /* Make images larger and wider on desktop */
  .shot-1,
  .shot-2,
  .shot-3 {
    width: 130% !important;
    max-width: 820px !important; /* Large image size */
    height: auto !important;
  }

  .shot-1 {
    grid-column: 1;
    grid-row: 3;
    justify-self: end;
    translate: var(--poza1-x) var(--poza1-y);
  }

  .text-1 {
    grid-column: 2;
    grid-row: 3;
    align-self: center;
    translate: var(--text1-x) var(--text1-y);
  }

  .arrow-1 {
    grid-column: 1 / -1;
    grid-row: 4;
    margin: 20px auto;
    translate: var(--a1-x) var(--a1-y);
    rotate: var(--a1-rot);
  }

  .text-middle {
    grid-column: 1;
    grid-row: 5;
    align-self: center;
    translate: var(--text2-x) var(--text2-y);
  }

  .shot-2 {
    grid-column: 2;
    grid-row: 5;
    justify-self: start;
    translate: var(--poza2-x) var(--poza2-y);
  }

  .arrow-2 {
    grid-column: 1 / -1;
    grid-row: 6;
    margin: 20px auto;
    translate: var(--a2-x) var(--a2-y);
    rotate: var(--a2-rot);
  }

  .text-2 {
    grid-column: 1;
    grid-row: 7;
    align-self: center;
    translate: var(--text3-x) var(--text3-y);
  }

  .shot-3 {
    grid-column: 2;
    grid-row: 7;
    justify-self: start;
    translate: var(--poza3-x) var(--poza3-y);
  }

  .proj-bottom {
    grid-column: 1 / -1;
    grid-row: 8;
    display: flex;
    justify-content: center;
  }

  .arrow-3 {
    margin: 20px auto;
    translate: var(--a3-x) var(--a3-y);
    rotate: var(--a3-rot);
  }

  .video-block {
    grid-column: 1 / -1;
    grid-row: 9;
    justify-self: center;
  }

  .proj-footer {
    grid-column: 1 / -1;
    grid-row: 10;
  }
}

/* ===== SMALL MOBILE SCREENS ===== */
@media (max-width: 600px) {
  .projects-page {
    padding-bottom: 24px;
  }

  .proj-top {
    gap: 16px;
    align-items: flex-start;
  }

  .proj-title {
    font-size: clamp(3rem, 14vw, 4.5rem);
  }

  .back-btn {
    padding: 7px 14px;
    font-size: 1rem;
  }

  .proj-script {
    font-size: 2rem;
    margin-bottom: 28px;
  }

  .shot {
    width: 100%;
    height: auto;
    max-width: 100%;
    justify-self: center;
  }

  .proj-text {
    font-size: 1.05rem;
  }

  .video-block {
    --box-pad: 22px;
    border-radius: 16px;
  }

  .proj-footer {
    gap: 16px;
    font-size: 1rem;
  }
}

.shot {
  --shot-w: 630px;
  width: min(100%, var(--shot-w));
}
