/* Take 12 site v2, direction c: everything below the first screen (the first screen's CSS is inline in index.html) */

/* ---------- Frames 2-4: photos and the manifesto ---------- */
.reel { background: var(--black); }
.frame {
  padding: 16px var(--gut) 12px;
  display: flex; flex-direction: column-reverse; gap: 16px;
}
/* the belief, set by hand in four lines in the display face (expanded, weight 500, sentence case); fitType keeps the
   longest line inside its column */
.frame .line {
  font-family: var(--sans); font-weight: 500; font-variation-settings: "wdth" 125, "wght" 500; font-stretch: 125%;
  font-size: 27px; line-height: 1.12; letter-spacing: .005em; color: var(--cream);
}
.frame .line .ln { display: block; white-space: nowrap; width: max-content; }
.shot .photo { width: 100%; aspect-ratio: 3 / 4; background: #000; }
/* the proof line: full cream, big enough to read */
.credit { font-size: 15px; line-height: 1.5; color: var(--cream); margin-top: 12px; max-width: 42ch; }

@media (min-width: 600px) and (max-width: 959px) {
  .shot { width: min(100%, calc((100svh - var(--strip) - 140px) * .75)); }
  .frame { align-items: center; }
  .frame .line { font-size: 40px; text-align: center; }
  .frame .line .ln { margin: 0 auto; }
}
@media (min-width: 960px) {
  /* the words in the left half at the gutter, the photo centred in the right half (frame 1's grammar) */
  .frame {
    min-height: calc(100vh - var(--strip)); min-height: calc(100svh - var(--strip));
    padding: 0;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center;
  }
  .words { min-width: 0; padding: 0 var(--pad-r) 0 var(--gut); }
  .frame .line { font-size: min(96px, 5vw); line-height: 1.08; letter-spacing: .005em; }
  .shot { justify-self: center; transform-origin: 50% 50%; }
  .shot .photo { height: var(--shot-h); width: auto; }
  .credit { font-size: 16px; margin-top: 40px; }
  /* pinned: one frame at a time, fading through black, while the counter steps 2, 3, 4 */
  .js .reel { height: calc(3 * var(--rstep) + 100vh); height: calc(3 * var(--rstep) + 100svh); }
  .js .rstage { position: sticky; top: var(--strip); height: calc(100vh - var(--strip)); height: calc(100svh - var(--strip)); }
  .js .rstage .frame { position: absolute; inset: 0; min-height: 0; opacity: 0; }
  .js .rstage .frame:first-child { opacity: 1; }
  .still .rstage .frame { transition: none; }
}

/* ---------- Frames 5-8: the steps ---------- */
.steps { position: relative; background: var(--black); }
.js .steps { height: calc(4 * var(--step) + 100vh); height: calc(4 * var(--step) + 100svh); }
.stage { display: block; }
.js .stage {
  position: sticky; top: var(--strip);
  height: calc(100vh - var(--strip)); height: calc(100svh - var(--strip));
  display: flex; flex-direction: column;
}
.moment { display: none; }
.js .moment { display: block; position: relative; flex: 1 1 auto; min-height: 0; order: 1; }
.js .pic { position: absolute; inset: 0; background: var(--black); overflow: hidden; }
/* the layer fades by scroll (through the stage colour); the poster sits under the canvas until a frame is drawn */
.layer { position: absolute; inset: 0; }
.layer .still { position: absolute; left: 50%; top: 50%; width: 100%; height: 100%; max-width: none; object-fit: cover; transform: translate(-50%, -50%); }
.layer canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.captions li { padding: 32px var(--gut); }
.captions .edge { padding: 0 0 14px; }
.captions h3 { font-size: min(30px, 7.4vw); color: var(--cream); margin-bottom: 10px; }
.captions li > p:not(.edge) { font-size: 17px; line-height: 1.42; color: var(--cream); max-width: 34ch; }
.captions .poster { width: min(100%, 360px); margin-bottom: 16px; }
.captions .ui { display: none; }
.js .captions .poster { display: none; }
.js .captions { flex: none; height: 196px; position: relative; background: var(--black); order: 2; }
/* off steps fade by opacity only, so their words stay reachable for screen readers */
.js .captions li { position: absolute; inset: 0; padding: 18px var(--gut) 16px; opacity: 0; }
.still .layer { opacity: 1 !important; }

@media (min-width: 960px) {
  /* the words in the left half at the gutter; the white half is the stage, the frame drawn into it whole */
  .js .stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .js .moment { order: 2; height: 100%; background: var(--white); }
  .js .pic { background: var(--white); }
  .layer .still { object-fit: contain; }
  .js .captions { order: 1; height: 100%; background: none; }
  /* every step's words sit at the same place (room kept under them for the home screen in step 05), so a step change
     never moves the text */
  .js .captions li {
    inset: 0; padding: 0 var(--pad-r) calc(var(--ui-h) + var(--ui-gap)) var(--gut);
    display: flex; flex-direction: column; justify-content: center;
    --ui-h: clamp(180px, 30svh, 330px); --ui-gap: clamp(28px, 4svh, 48px);
  }
  .captions .edge { padding-bottom: clamp(20px, 3svh, 32px); }
  .captions h3 { font-size: clamp(40px, 3.6vw, 72px); margin-bottom: 24px; text-wrap: balance; max-width: 8.5em; }
  .captions li > p:not(.edge) { font-size: 22px; max-width: 26ch; }
  /* the real home screen under step 05, drawn as a phone's screen (a thin dark bezel, rounded); step 05 spends the room
     the others keep empty, so the words sit at the same height in all four */
  .js .captions li[data-n="5"] { padding-bottom: 0; }
  .js .captions .ui {
    display: block; flex: none; align-self: flex-start; margin-top: var(--ui-gap);
    height: var(--ui-h); width: auto; aspect-ratio: 400 / 870;
    border: 4px solid #2B2622; border-radius: clamp(18px, 2.6svh, 28px); background: var(--white);
  }
}

/* ---------- Frames 9 and 10: films and cameras (cream) ---------- */
.light { background: var(--cream); color: var(--ink); }
.light .wrap { padding: 32px var(--gut) 32px; }
.label { display: flex; align-items: center; gap: .9em; font-size: 12px; color: var(--ink); margin-bottom: 18px; }
.label .tri { color: var(--red); width: 20px; height: 8px; margin-right: -.4em; }
.h2 { font-size: min(34px, 8.4vw); color: var(--black); line-height: 1; text-wrap: balance; }
@media (min-width: 1200px) { .h2 .br { display: block; } }
.sub { font-size: 18px; line-height: 1.42; max-width: 34ch; }
.films .head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
/* two columns of four on a phone, the can 112px wide so its label reads as packaging */
.cans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; }
.cans li { display: flex; flex-direction: column; }
.cans img { width: 112px; height: auto; margin-bottom: 12px; }
.cans h3 { font-size: 18px; font-weight: 600; line-height: 1.2; color: var(--black); margin-bottom: 4px; }
.cans p { font-size: 17px; line-height: 1.36; }

.cams { border-top: 2px solid var(--black); }
.cams .h2 { margin-bottom: 20px; }
.tiles { display: grid; grid-template-columns: 1fr; gap: 10px; }
/* flat white tiles, the camera as big as the tile allows, the name in expanded caps */
.tile { background: var(--white); border-radius: 6px; padding: 8px 16px 18px; display: flex; flex-direction: column; }
.tile .cam {
  display: flex; justify-content: center; align-items: center; aspect-ratio: 600 / 470;
  margin: 0 auto 6px; width: min(100%, 212px); will-change: transform;
  border-radius: 4px; background: var(--cream);
}
.tile .cam.ld { background: transparent; }
.tile .cam img { width: 100%; height: 100%; object-fit: contain; }
/* the name, then the lens on its own line under it, the same on every tile */
.tt { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.tile h3 {
  font-size: 21px; font-weight: 600; line-height: 1.1; color: var(--black); text-wrap: balance;
  font-variation-settings: "wdth" 125, "wght" 600; font-stretch: 125%; text-transform: uppercase; letter-spacing: .015em;
}
.lens {
  font-size: 12px; line-height: 1; padding: 7px 9px 6px; color: var(--ink);
  border: 2px solid var(--red); border-radius: 4px; white-space: nowrap;
}
.tile p { font-size: 17px; line-height: 1.38; }
.tile.more { display: grid; grid-template-columns: 96px 1fr; column-gap: 16px; align-items: center; padding: 14px 18px; }
/* the silhouette smaller than the cameras: a hint, not a fifth camera */
.tile.more .cam img { width: 80%; height: 80%; }
.tile.more .cam { width: 96px; margin: 0; grid-row: 1 / span 2; }
.tile.more .tt { margin-bottom: 4px; }

@media (min-width: 600px) {
  .cans { grid-template-columns: repeat(4, 1fr); gap: 32px 16px; }
  .cans img { width: 96px; margin-bottom: 14px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile.more { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  .light .wrap { padding: 104px var(--gut) 104px; }
  .label { font-size: 13px; margin-bottom: 24px; }
  .h2 { font-size: clamp(44px, 3.6vw, 68px); }
  .sub { font-size: 20px; }
  .films .head { gap: 24px; margin-bottom: 64px; }
  .cans { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 24px; }
  .cans img { width: min(100%, 176px); margin-bottom: 22px; }
  .cams .h2 { margin-bottom: 48px; }
  /* 2 + 2 with the silhouette as a strip sized to its content under them; five across from 1440, the silhouette the
     fifth tile */
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .tile { padding: 12px 24px 28px; }
  /* capped at 300px: the renders are 600px, so they stay sharp on a 2x screen */
  .tile .cam { width: 92%; max-width: 300px; margin-bottom: 18px; }
  .tile h3 { font-size: clamp(22px, 1.5vw, 28px); }
  .tt { gap: 12px; margin-bottom: 12px; }
  .tile.more {
    grid-column: 1 / -1; justify-self: start; display: grid; grid-template-columns: 200px auto; column-gap: 32px;
    align-items: center; justify-items: start; padding: 16px 40px 16px 24px;
  }
  .tile.more .cam { width: 200px; max-width: none; margin: 0; grid-row: 1 / span 2; align-self: center; }
  .tile.more .tt { align-self: end; margin-bottom: 8px; }
  .tile.more p { align-self: start; max-width: 30ch; }
}
@media (min-width: 1440px) {
  .tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tile.more { grid-column: auto; justify-self: stretch; display: flex; flex-direction: column; padding: 12px 24px 28px; }
  .tile.more .cam { width: 92%; max-width: 300px; margin: 0 auto 18px; }
  .tile.more .tt { margin-bottom: 12px; }
}

/* ---------- Frame 11: the sign-up ---------- */
.signup { background: var(--red); color: var(--black); }
.su-red { padding: 32px var(--gut) 32px; display: flex; flex-direction: column; align-items: flex-start; }
/* stretched so fitType measures the column, not the headline's own width */
.signup h2 { align-self: stretch; width: 100%; font-size: min(44px, 10.6vw); color: var(--black); margin-bottom: 18px; }
.signup .sub { color: var(--black); margin-bottom: 22px; }
.full { font-size: 17px; line-height: 1.42; color: var(--black); margin-top: 22px; max-width: 46ch; border-top: 2px solid var(--black); padding-top: 14px; }
.su-dark { display: none; }
@media (min-width: 960px) {
  .signup {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    height: calc(100vh - var(--strip) - var(--foot)); height: calc(100svh - var(--strip) - var(--foot));
    min-height: 540px;
  }
  /* centred, like frame 1 */
  .su-red { justify-content: center; padding: clamp(24px, 4svh, 56px) var(--pad-r) clamp(24px, 4svh, 56px) var(--gut); }
  .signup h2 { font-size: min(96px, 10svh, 5.2vw); margin-bottom: clamp(16px, 2.4svh, 24px); }
  .signup .sub { font-size: 21px; margin-bottom: clamp(18px, 2.8svh, 28px); }
  .full { margin-top: clamp(18px, 2.8svh, 28px); }
  .su-dark {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--black); padding: 0 32px;
  }
  .su-dark .photo {
    height: min(80vh, calc(100vh - var(--strip) - var(--foot) - 84px), calc((50vw - 64px) * 4 / 3));
    height: min(80svh, calc(100svh - var(--strip) - var(--foot) - 84px), calc((50vw - 64px) * 4 / 3));
    width: auto; aspect-ratio: 3 / 4;
  }
}

/* ---------- Frame 12: the footer ---------- */
.foot { background: var(--black); color: var(--cream); }
.foot .wrap {
  padding: 26px var(--gut) calc(22px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: 1fr; gap: 10px;
}
.fmark { height: 20px; width: auto; }
.links { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.links a { display: flex; align-items: center; min-height: 44px; font-size: 17px; text-decoration: none; }
.links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot .edge { padding: 0; }
.end { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.copy { font-size: 17px; opacity: .8; }
@media (min-width: 960px) {
  .foot .wrap { height: var(--foot); grid-template-columns: auto 1fr auto; align-items: center; gap: 48px; padding-top: 0; padding-bottom: 0; }
  .fmark { height: 18px; }
  .end { gap: 48px; }
  .links { display: flex; gap: 32px; justify-content: flex-end; }
}

/* ---------- Still (reduced motion or ?motion=0) ---------- */
.still .shot, .still .tile .cam { transform: none !important; opacity: 1 !important; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
