:root {
  --bg: #f7f3ec;
  --ink: #5a3d22;
  --ink-soft: #6b4e33;
  --paper: #fffaf2;
  --word: #9db6ca; /* --bg minus --ink, so the difference blend shows brown on the background */
  --gutter: clamp(16px, 3vw, 48px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; }

/* One flat colour on the root so it fills the whole window, with no band below the page. */
html { background: var(--bg); }

body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

/* ---------- Stage (desktop: one full-viewport section) ---------- */

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

.topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--gutter);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.brand { font-weight: 600; }
.tagline { font-weight: 400; color: var(--ink-soft); }

.word {
  position: absolute;
  margin: 0;
  font-weight: 400;
  font-size: clamp(5rem, 14vw, 15rem);
  line-height: 0.82;
  letter-spacing: -0.055em;
  /* Pale blue + difference blend: reads as brown on the warm off-white background
     and inverts wherever it crosses a photo. */
  color: var(--word);
  mix-blend-mode: difference;
  pointer-events: none;
}

.word--top {
  top: clamp(96px, 13vh, 140px);
  left: calc(var(--gutter) - 0.04em);
  z-index: 3;
}

.word--bottom {
  right: var(--gutter);
  bottom: clamp(40px, 6vh, 72px);
  z-index: 3;
}

/* ---------- Photos: endless horizontal strip ---------- */

.collage {
  position: absolute;
  top: 7vh;
  left: 0;
  right: 0;
  z-index: 2;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.is-ready .collage { opacity: 1; }

/* The track holds the photos twice; sliding it by -50% loops seamlessly. */
.track {
  display: flex;
  align-items: flex-start;
  width: max-content;
  animation: drift 80s linear infinite;
}

@keyframes drift {
  to { transform: translate3d(-50%, 0, 0); }
}

.shot {
  --unit: 1vh;
  --drop: 1;
  position: relative;
  flex: none;
  margin: calc(var(--top) * var(--unit) * var(--drop)) var(--gap) 0 0;
  height: calc(var(--h) * var(--unit));
}

/* Photos keep their own proportions: height is set, width follows, nothing is cropped. */
.shot img {
  width: auto;
  height: 100%;
  max-width: none;
}

/* Big swings in height and drop, as in the mockup: some photos hang high,
   others sit low. Every photo stays fully on screen (strip offset 7vh +
   --top + --h stays under ~95vh). Negative gaps let neighbours overlap a
   little; spacing varies from tucked-in to wide open. */
.shot--1 { --h: 62; --top: 10; --gap: -4vw;   }
.shot--3 { --h: 44; --top: 40; --gap: 8vw;    }
.shot--4 { --h: 42; --top: 29; --gap: -2.5vw; z-index: 1; }
.shot--5 { --h: 60; --top: 17; --gap: 3vw;    }
.shot--6 { --h: 54; --top: 32; --gap: 9vw;    }
.shot--7 { --h: 50; --top: 8;  --gap: -3vw;   }
.shot--8 { --h: 40; --top: 36; --gap: 7vw;    }

/* ---------- Intro copy ---------- */

/* Body text with the button beside it, sitting low in the section. */
.intro {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(52px, 7.5vh, 88px);
  display: flex;
  align-items: flex-end;
  gap: clamp(20px, 2.5vw, 40px);
}

.intro p {
  margin: 0;
  max-width: 28rem;
  /* Same difference blend as the title, so it stays legible as photos pass behind.
     No z-index on .intro itself: a stacking context there would isolate the blend. */
  position: relative;
  z-index: 3;
  color: var(--word);
  mix-blend-mode: difference;
  font-size: clamp(0.95rem, 1.05vw, 1.15rem);
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.cta {
  position: relative;
  z-index: 3;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.7em 1.2em;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color .2s ease, transform .2s ease;
}

.cta:hover { background: #3f2914; transform: translateY(-1px); }
.cta:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- Tablet & mobile: flow layout ---------- */

@media (max-width: 899px) {
  .stage {
    display: flex;
    flex-direction: column;
    padding: 112px var(--gutter) 88px;
  }

  .topbar { padding: 18px var(--gutter); }
  .tagline { font-size: 0.85rem; }

  .word {
    position: static;
    font-size: clamp(4.5rem, 24vw, 10rem);
  }

  .word--bottom { align-self: flex-end; margin-top: -0.12em; }

  .collage {
    position: static;
    margin: 24px calc(var(--gutter) * -1) 4px;
  }

  .track { animation-duration: 60s; }

  .shot { --unit: 1.15vw; --drop: 0.5; }

  .intro {
    position: static;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 28px;
  }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  .collage { opacity: 1; transition: none; }
  .track { animation: none; }
  .cta { transition: none; }
}
