/* The manifesto page: the paper of the old film at the top, then the manifesto of frei-mkt
   "pages / Manifesto" (desktop 4073:192, phone 4073:353). The shared style sheet of the new pages
   comes first: it has the font, the nav bar and the footer. */
:root {
  /* The plain colour beside the open menu (css/shared.css): the off-white of the film, where the
     menu button is. */
  --menu-backdrop: #faf9f8;
  /* One design pixel of the film: 1 px at 1440 wide, 0.652 px on a 390 wide phone. */
  --u: calc(clamp(30px, 3.2vw, 46px) / 46);
}
/* The page has the off-white of the film from the top to the footer: no seam between the film
   and the manifesto. */
.manifesto-page {
  background: #faf9f8;
  color: #111214;
}
/* The nav bar lies on the film, so the sheet is in the centre of the screen. */
.manifesto-page .page-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
}

/* The film: the off-white page of the film frames. The section gives the scroll length (the script
   sets its exact height), and its stage stays on the screen with CSS sticky while the scroll drives
   the paper. Then the stage goes up with the page. */
.film {
  position: relative;
  height: 575vh;
  background: #faf9f8;
}
.film-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.paper {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.paper-still {
  display: none;
}
/* "Not in the mood to sign?": the type of the h1 "Your intelligence is yours." (weight, tracking and
   line height) at the size of the film, 46 px at 1440 wide. The centre of the line stays where the
   film had it. The script brings it in with a short vertical blur and a rise of 12 px, in time. */
.mood {
  position: absolute;
  left: 50%;
  top: calc(50% + var(--u) * -35);
  width: max-content;
  max-width: calc(100vw - 40px);
  transform: translateX(-50%);
  font-size: calc(var(--u) * 46);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.05em;
  color: #000000;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  will-change: opacity, translate;
}
.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* A browser with no script, or with no WebGL: the sheet as a picture, with its tilt and its flag,
   and the line under it. No pin. */
.film.no-webgl {
  height: auto;
}
.film.no-webgl .film-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 72px;
  height: auto;
  padding: 160px 24px 120px;
}
.film.no-webgl .paper {
  display: none;
}
.film.no-webgl .paper-still {
  display: block;
  position: relative;
  width: min(540px, 100%);
  rotate: -3.33deg;
}
.film.no-webgl .mood {
  position: static;
  width: auto;
  transform: none;
  opacity: 1;
  visibility: visible;
}
@media (scripting: none) {
  .film {
    height: auto;
  }
  .film-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 72px;
    height: auto;
    padding: 160px 24px 120px;
  }
  .paper {
    display: none;
  }
  .paper-still {
    display: block;
    position: relative;
    width: min(540px, 100%);
    rotate: -3.33deg;
  }
  .mood {
    position: static;
    width: auto;
    transform: none;
    opacity: 1;
    visibility: visible;
  }
}
.still-sheet {
  width: 100%;
  height: auto;
}
/* The flag of the sheet, on the place of the model: x 1002.8 to 1236.3 and y 1437.2 of 1240 x 1754. */
.still-flag {
  position: absolute;
  left: 80.871%;
  top: 81.938%;
  width: 18.831%;
  height: auto;
}

/* The manifesto: frei-mkt "Manifesto r2" (desktop 4407:926, phone 4407:964), with the reading
   round of 2026-12-03. A text column of 660 px at x 96 of 1440, and the card of the pictures,
   600 x 852, at x 816. The columns keep the ratio 11 : 10 on a smaller screen.
   With no script and with Reduce Motion the reading is one column in the normal flow: all text
   black, and each picture above the text of its part. */
.manifesto {
  --text: #111214;
  --dim: 0.3; /* the opacity of the text away from the reading line: #111214 at 30 % */
  padding: 240px 0 160px;
  color: var(--text);
}
.stage {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 10fr);
  column-gap: 60px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 0 96px;
}
.column {
  grid-column: 1;
}
/* "MANIFESTO": the one small line above the title (Guilherme, 2026-12-03), in near-black on a
   band of lemon yellow like a highlighter stroke: the ends of the band are a little uneven and
   skewed. */
.manifesto-kicker {
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #111214;
}
.manifesto-kicker span {
  display: inline-block;
  padding: 2px 5px 2px 7px;
  background: #ffe45c;
  clip-path: polygon(2% 14%, 34% 4%, 72% 8%, 99% 0, 100% 84%, 66% 94%, 30% 90%, 0 100%);
  transform: rotate(-1deg);
}
/* The title on one line (Guilherme, 2026-12-03: "One line for the title, must fit", "The title is
   way too large"). At most 44 px; smaller when the column is narrower, so it fits: the width it
   has, divided by the width of its text at 1 px (--title-ratio: 10.52 in English, 11.33 in
   German, with a small margin). */
.manifesto h1 {
  --title-ratio: 10.8;
  width: calc(100% + 36px);
  margin-bottom: 72px;
  font-size: min(44px, calc(((min(100vw, 1440px) - 180px) * 11 / 21 + 36px) / var(--title-ratio)));
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.05em;
  white-space: nowrap;
}
.manifesto h1:lang(de) {
  --title-ratio: 11.6;
}
.row + .row {
  margin-top: 96px;
}
.row h2 {
  margin-bottom: 16px;
  font-size: 32px;
  font-weight: 400;
  line-height: 36px;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.row p {
  font-size: 21px;
  line-height: 32px;
  text-wrap: pretty;
}
/* A paragraph after a paragraph of its row. A hidden picture between the two does not change it. */
.row > p ~ p {
  margin-top: 28px;
}
.row .signature {
  margin-top: 48px;
  color: #8a8b8f;
}

/* The founders under the signature line: two small photos that overlap like a deck of cards, each
   turned a little, with a thick white border and a soft shadow (on the photos only), and the
   signatures of the first names in one row under them. The signatures keep the scale of their
   ink. */
.founders {
  margin-top: 48px;
}
.founder-photos {
  display: flex;
  padding: 8px 0 0 4px;
}
.founder-photo {
  display: block;
  width: 104px;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 6px solid white;
  border-radius: 14px;
  background: #ececea;
  box-shadow: 0 6px 16px rgb(0 0 0 / 0.14);
}
.founder-photo.founder-jakob {
  transform: rotate(-4deg);
}
.founder-photo.founder-guilherme {
  margin-left: -14px;
  margin-top: 10px;
  transform: rotate(3deg);
}
.founder-signatures {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-top: 20px;
}
.founder-signature {
  display: block;
  height: auto;
}
.founder-signature.founder-jakob {
  width: 120px;
}
.founder-signature.founder-guilherme {
  width: 139px;
}

/* The pictures in the text: each picture is above the text of its part, at the width of the
   column, in the frame of the phone card (366 x 300). */
.art-slot {
  margin-bottom: 28px;
  aspect-ratio: 366 / 300;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #ececea;
}
.manifesto:not(.is-scrolly) .row > .art-slot + p {
  margin-top: 0;
}
p + .art-slot {
  margin-top: 28px;
}
.art,
.art img {
  display: block;
  width: 100%;
  height: 100%;
}
.art img {
  object-fit: cover;
}
.manifesto-art {
  display: none;
}

/* The reading with the motion on: the script sets .is-scrolly. The text column stays in the normal
   flow, so the page scrolls it natively, and the card of the pictures sticks at the right with CSS
   sticky (on a phone: a band at the top). The script sets the top padding of the column, so the
   label "MANIFESTO" is at the height of the top of the card when the card comes to its place. */
/* The script pulls the manifesto up over the end of the film (a negative margin of one stage of
   the film), so it starts at the moment the film lets go. It covers the film with the same
   off-white. The card lets go a quarter of the screen under the founders; the padding adds 112 px
   before the footer. */
.manifesto.is-scrolly {
  position: relative;
  z-index: 1;
  padding: 0 0 112px;
  background: #faf9f8;
}
/* The copy of the line of the film: the same place and type as .mood, fixed on the screen while it
   fades out. */
.mood-copy {
  display: none;
}
.manifesto.is-scrolly .mood-copy {
  display: block;
  position: fixed;
  z-index: 1;
  left: 50%;
  top: calc(50% + var(--u) * -35);
  width: max-content;
  max-width: calc(100vw - 40px);
  transform: translateX(-50%);
  font-size: calc(var(--u) * 46);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.05em;
  color: #000000;
  text-align: center;
  pointer-events: none;
}
/* A quarter of the screen under the founders: the card sticks in the area of the column, so the
   founders go up a little before the card lets go. */
.manifesto.is-scrolly .column {
  grid-row: 1;
  padding-bottom: 25vh;
}
.manifesto.is-scrolly .art-slot {
  display: none;
}
/* A principle is one short paragraph. With its gap, its row takes at least 45 % of the screen, so
   the drum turns over the last 0.3 screen before the next part comes to the reading line, and each
   picture rests for 0.15 screen between two turns. Only with the motion on. */
.manifesto.is-scrolly .row:not(.row-opening):not(.row-close) {
  min-height: calc(45vh - 96px);
}
/* The card sticks in the vertical centre of the screen, in the area of the column. */
.manifesto.is-scrolly .manifesto-art {
  display: block;
  position: sticky;
  z-index: 2;
  top: calc((100vh - min(852px, 100vh - 48px)) / 2);
  grid-column: 2;
  grid-row: 1;
  align-self: start;
}
/* The card: the place of the drum. It has no background and no clip: each face has its own
   radius, and the drum stays in the right column (Guilherme, 2026-12-03: "look at the corners
   during transition"). The script moves the card (to the centre at the start) and turns the drum. */
.art-card {
  position: relative;
  height: min(852px, 100vh - 48px);
  perspective: 4000px;
  will-change: transform, opacity;
}
/* The drum: a prism of three faces that turns around its horizontal axis, with the picture of a
   part on each face that shows (Guilherme, 2026-12-03: "an actual tumble synchronized with the
   text"). At half a turn its two faces fill the height of the card. */
.drum {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}
.face {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #ececea;
  backface-visibility: hidden;
  visibility: hidden;
}
/* A face that turns away gets a little darker. */
.shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgb(0 0 0 / 0.2), rgb(0 0 0 / 0.45));
  opacity: 0;
  pointer-events: none;
}
/* The text of the other parts is light. The title is always black, and the signature
   line and the founders keep their colours. */
.manifesto.is-scrolly .row h2,
.manifesto.is-scrolly .row p:not(.signature) {
  opacity: var(--dim);
  transition: opacity 200ms ease;
}
.manifesto.is-scrolly .row.has-active h2,
.manifesto.is-scrolly .row p.is-active {
  opacity: 1;
}

/* A small desktop or a tablet: the left margin and the title scale down, so the title keeps its
   two lines in the narrower column. */
@media (min-width: 761px) and (max-width: 1199px) {
  .stage {
    padding-left: clamp(24px, 6.667vw, 96px);
  }
  .manifesto h1 {
    font-size: min(44px, calc(((93.333vw - 84px) * 11 / 21 + 36px) / var(--title-ratio)));
  }
}

/* A phone (frei-mkt 4407:964): one column. With the motion on, the card is 366 x 300 on a band of
   336 px that sticks at the top of the screen, and the text scrolls under the band. */
@media (max-width: 760px) {
  .mood,
  .mood-copy {
    text-wrap: balance;
  }
  .manifesto {
    padding: 144px 0 96px;
  }
  .stage {
    display: block;
    padding: 0 24px;
  }
  .manifesto h1 {
    width: auto;
    margin-bottom: 40px;
    font-size: 32px;
    line-height: 36px;
    white-space: normal;
    text-wrap: balance;
  }
  .row + .row {
    margin-top: 72px;
  }
  .manifesto.is-scrolly .row:not(.row-opening):not(.row-close) {
    min-height: calc(45vh - 72px);
  }
  .row h2 {
    margin-bottom: 12px;
    font-size: 26px;
    line-height: 30px;
  }
  .row p {
    font-size: 18px;
    line-height: 28px;
  }
  .row > p ~ p,
  p + .art-slot {
    margin-top: 24px;
  }
  .art-slot {
    margin-bottom: 24px;
    border-radius: var(--radius-card-phone);
  }
  .row .signature {
    margin-top: 40px;
  }
  .founders {
    margin-top: 32px;
  }
  .founder-photo {
    width: 80px;
    border-width: 5px;
    border-radius: 12px;
  }
  .founder-photo.founder-guilherme {
    margin-left: -11px;
    margin-top: 8px;
  }
  .founder-signatures {
    gap: 20px;
    margin-top: 16px;
  }
  .founder-signature.founder-jakob {
    width: 96px;
  }
  .founder-signature.founder-guilherme {
    width: 111px;
  }
  .manifesto.is-scrolly {
    padding: 0 0 72px;
  }
  /* The band sticks at the top of the screen, over the full width, and the text scrolls under it. */
  .manifesto.is-scrolly .manifesto-art {
    top: 0;
    margin: 0 -24px;
    /* 24 px under the card: the turning drum stays in the band. */
    padding: 12px 12px 24px;
    background: #faf9f8;
  }
  .art-card {
    height: 300px;
    perspective: 2000px;
  }
  .face {
    border-radius: var(--radius-card-phone);
  }
}
