@charset "utf-8";
/* CSS Document */
* { box-sizing: border-box; }
  body { margin: 0; font-family: 'Montserrat', sans-serif; }

  /* Demo filler so you can scroll - delete these two blocks on your real page */
  .demo-space { height: 80vh; display: grid; place-items: center; background: #f2f2f2; font-size: 1.2rem; }

  /* ---------- FLIP SECTION ---------- */

  /* Scroll runway: the taller this is, the slower the spin.
     Total scroll distance for the flip = runway height - 700px. */
  .flip-runway {
    position: relative;
    width: 100%;
    height: 1500px;            /* adjust for faster/slower flip */
  }

  /* Stays pinned in view while the flip happens */
  .flip-sticky {
    position: sticky;
    top: 0;
    width: 100%;
    height: 900px;
    perspective: 1800px;
    overflow: hidden;          /* stops horizontal scrollbar during rotation */
  }

  .flip-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    will-change: transform;
  }

  .flip-face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
  }

  /* FRONT: video background */
  .flip-front { background: #000; }
  .flip-front video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* BACK: text + image */
  .flip-back {
    transform: rotateY(180deg);
    background: #FFFFFF;       /* change to your colour */
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    padding: 0 8%;
  }
  .flip-back .text { flex: 1; max-width: 520px; }
  .flip-back h2 { font-size: 30px; font-weight: 700; margin: 0 0 16px; line-height: 1.15; }
  .flip-back p  { font-size: 20px; font-weight: 400; line-height: 1.7; margin: 0; }
  .flip-back .image { flex: 1; max-width: 520px; }
  .flip-back img { width: 100%; height: auto; max-height: 520px; object-fit: cover; border-radius: 12px; display: block; }

@media (max-width: 800px) {
  .flip-back {
    flex-direction: column;
    justify-content: flex-start;   /* start from the top instead of centring */
    gap: 16px;
    padding: 150px 6% 30px;        /* top padding clears the nav bar */
    text-align: center;
  }
  .flip-back h2 { font-size: 25px; }
  .flip-back p  { font-size: 20px; line-height: 1.6; }
  .flip-back img { max-height: 200px; }
}
