/* ============================================================
   Made Out of Love — base.
   The artboard and the structure. Themes change only the look.

   STRUCTURE THAT NEVER MOVES
   - Cover    : series label, hook, stat top left. The object fills
                the space below. Footer, if any, at the foot.
   - Origin   : the story, nothing added. Optional kicker.
   - Evolution: the story, nothing added. Optional kicker.
   ============================================================ */

:root {
  --grain-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { margin: 0; padding: 0; box-sizing: border-box; }

.slide {
  --pad-x: 88px;
  position: relative;
  width: 1080px;
  height: 1350px;
  overflow: hidden;
  background: #F3E6DA;
  color: #2A122A;
  font-family: 'Lexend', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}
.slide b { font-weight: 700; }

/* ──────────────────────────── cover ──────────────────────────── */

.cover {
  display: flex;
  flex-direction: column;
  padding: var(--pad-t, 82px) var(--pad-x) var(--pad-b, 72px);
}

.cover-text {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  max-width: var(--measure, 900px);
}

.series {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: var(--series-gap, 42px);
}

.hook { text-wrap: balance; }
.stat { text-wrap: pretty; }

/* The object gets whatever height the words leave. */
.stage {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  margin: var(--stage-mt, 44px) var(--stage-mx, 0px) var(--stage-mb, 0px);
}
.plate {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  container-type: size;
}
/* An app icon: square, iOS corner, sized off the shorter side of the stage. */
.obj.icon {
  display: block;
  object-fit: cover;
  border-radius: 22.4%;
}
.plate .obj.icon {
  position: relative; z-index: 1;
  width: calc(var(--icon-s, .74) * 100cqmin);
  height: calc(var(--icon-s, .74) * 100cqmin);
}

/* A photograph: kept at its own proportion, as large as the stage allows. */
.obj.photo {
  display: block;
  overflow: hidden;
  aspect-ratio: var(--ar, 1);
}
.obj.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.plate .obj.photo {
  position: relative; z-index: 1;
  width: min(calc(var(--photo-s, .96) * 100cqw), calc(var(--photo-s, .96) * 100cqh * var(--ar, 1)));
}

.foot {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  margin-top: var(--foot-mt, 30px);
  max-width: 904px;
  font-size: 30px;
  line-height: 1.36;
  font-weight: 400;
  text-wrap: pretty;
}

/* ──────────────────────────── story ──────────────────────────── */

/* 150px top clears Instagram's slide counter. */
.story {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--st-pt, 150px) var(--pad-x) var(--st-pb, 112px);
}

.story-art { display: none; }

.story-body {
  position: relative;
  z-index: 2;
  flex: 0 1 auto;
  min-height: 0;
  overflow: hidden;
  max-width: var(--st-measure, 904px);
}

.kicker {
  font-family: 'Lexend', sans-serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: var(--kicker-gap, 46px);
}

.story-copy {
  font-size: var(--copy-size, 42px);
  line-height: var(--copy-lh, 1.42);
  font-weight: var(--copy-weight, 400);
  letter-spacing: var(--copy-track, -.2px);
  text-wrap: pretty;
}
.story-copy p + p { margin-top: var(--copy-gap, 30px); }

/* the swipe cue: only themes that name one render it */
.cover-cue { display: block; }
