/* Madeline Roberts — editorial portfolio
   Desktop (≥768px): a fixed hero centred in the viewport, a tall proportional
   canvas of absolutely-placed artwork that scrolls over it, and a fixed
   footer. All canvas geometry is % of the 1440 × 7043 design frame, so the
   editorial grid scales uniformly with viewport width.
   Mobile (<768px): everything in normal flow — hero first, then the work as
   a simple stacked list, footer at the end. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  overscroll-behavior: none;
}

body {
  background: #fff;
  color: #000;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-size: 12px;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Hero ---------- */

.hero {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
}

.hero-lockup {
  width: min(384px, 92vw);
}

/* Script logo — pre-composited from the Figma blend stack; the image is the
   full rotated-artwork frame (384.2 × 275.5) whose centre sits on the centre
   of the 384 × 121 mark box. Sized in % so it scales with the lockup. */
.hero-mark {
  position: relative;
  aspect-ratio: 384 / 121;
}

.hero-mark img {
  position: absolute;
  left: 0;
  top: -63.86%;
  width: 100.05%;
  height: 227.71%;
  max-width: none;
  pointer-events: none;
}

.hero-bio {
  position: relative;
  width: min(326px, 100%);
  margin: 0 auto;
  text-align: center;
  line-height: normal;
}

.hero-bio:first-of-type {
  margin-top: 23px;
}

.hero-bio + .hero-bio {
  margin-top: 14px;
}

/* ---------- Editorial canvas ---------- */

.canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1440 / 7043;
  pointer-events: none;
}

.piece {
  position: absolute;
  margin: 0;
}

.piece > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.piece.flip-x > img { transform: scaleX(-1); }

/* Die-cut images (alpha) — shadows follow their shape */
.cast { filter: drop-shadow(0 2px 13px rgba(0, 0, 0, 0.09)); }

.cast-lg {
  filter: drop-shadow(3.65px 4.56px 12.93px rgba(0, 0, 0, 0.1))
          drop-shadow(14.75px 18.25px 23.58px rgba(0, 0, 0, 0.09))
          drop-shadow(33.31px 41.22px 31.79px rgba(0, 0, 0, 0.05));
}

.piece .stack {
  position: absolute;
  inset: 0;
}

/* Placement — left / top / width as % of the 1440 × 7043 frame */
.p-01 { left: 5.6944%;  top: 2.4705%;  width: 28.2639%; aspect-ratio: 407 / 586; }
.p-02 { left: 67.2222%; top: 1.1359%;  width: 27.2222%; aspect-ratio: 392 / 564; }
.p-03 { left: 50%;      top: 8.8173%;  width: 9.5139%;  aspect-ratio: 137 / 198; transform: translateX(-50%); }
.p-04 { left: 14.375%;  top: 13.9146%; width: 28.75%;   aspect-ratio: 414 / 596; }
.p-05 { left: 67.7778%; top: 16.9246%; width: 18.0556%; aspect-ratio: 260 / 374; }
.p-06 { left: 17.9861%; top: 24.7196%; width: 27.3611%; aspect-ratio: 394 / 567; }
.p-07 { left: 58.75%;   top: 24.819%;  width: 31.9444%; aspect-ratio: 1; }
.p-08 { left: 13.75%;   top: 35.7518%; width: 28.75%;   aspect-ratio: 414 / 596; }
.p-09 { left: 67.1528%; top: 34.6727%; width: 18.0556%; aspect-ratio: 260 / 374; }
.p-10 { left: 16.4583%; top: 47.7212%; width: 21.875%;  aspect-ratio: 315 / 454; }
.p-11 { left: 63.0556%; top: 46.1025%; width: 27.4306%; aspect-ratio: 395 / 568; }
.p-12 { left: 18.125%;  top: 59.6905%; width: 26.1806%; aspect-ratio: 377 / 488; }
.p-13 { left: 70.5929%; top: 62.303%;  width: 17.7269%; aspect-ratio: 255.269 / 367.338; }
.p-14 { left: 9.5833%;  top: 71.887%;  width: 23.2639%; aspect-ratio: 335 / 482; }
.p-15 { left: 75.3472%; top: 70.1832%; width: 15.0694%; aspect-ratio: 217 / 312; }
.p-19 { left: 48.8889%; top: 76.6719%; width: 43.2639%; aspect-ratio: 1; }
.p-16 { left: 5.625%;   top: 84.5946%; width: 28.2639%; aspect-ratio: 407 / 586; }
.p-17 { left: 67.1528%; top: 88.911%;  width: 27.2222%; aspect-ratio: 392 / 564; }
.p-18 { left: 45.4587%; top: 95.5986%; width: 8.9684%;  aspect-ratio: 129.145 / 185.682; }

/* ---------- Footer ---------- */

.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px 0;
  line-height: normal;
}

/* Desktop: footer only appears once the user reaches the bottom */
@media (min-width: 768px) {
  .footer {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }

  .footer.visible {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ---------- Mobile: single viewport — text on top, carousel below ---------- */

@media (max-width: 767px) {
  body {
    height: 100svh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .hero {
    position: static;
    flex: 1 1 auto;
    min-height: 0;
    padding: 20px 24px 8px;
  }

  .hero-lockup {
    width: min(320px, 80vw);
  }

  /* Horizontal carousel — no dots, no arrows; items bleed off the right
     edge and the scrollbar is hidden, so the peeking image is the affordance */
  .canvas {
    aspect-ratio: auto;
    flex: none;
    height: 55svh;
    display: flex;
    align-items: center;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 20px;
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .canvas::-webkit-scrollbar { display: none; }

  .canvas {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
  }

  .canvas:active { cursor: grabbing; }

  .piece > img { -webkit-user-drag: none; }

  .piece {
    position: static;
    transform: none;
    flex: none;
    width: auto;
  }

  /* Varied heights (% of carousel height) — deliberately non-uniform */
  .p-01 { height: 88%; }
  .p-02 { height: 96%; }
  .p-03 { height: 44%; }
  .p-04 { height: 96%; }
  .p-05 { height: 62%; }
  .p-06 { height: 86%; }
  .p-07 { height: 68%; }
  .p-08 { height: 96%; }
  .p-09 { height: 58%; }
  .p-10 { height: 76%; }
  .p-11 { height: 92%; }
  .p-12 { height: 80%; }
  .p-13 { height: 62%; }
  .p-14 { height: 84%; }
  .p-15 { height: 52%; }
  .p-19 { height: 74%; }
  .p-16 { height: 96%; }
  .p-17 { height: 88%; }
  .p-18 { height: 38%; }

  /* Shoes: two stacked layers need a positioned parent */
  .p-03 {
    position: relative;
    left: auto;
    aspect-ratio: 137 / 198;
  }

  .footer {
    position: static;
    flex: none;
    padding: 10px 0 max(14px, env(safe-area-inset-bottom));
  }
}
