/* Sizes use cqmin, the shorter side of the poster, so type and decoration keep
   their proportions on any screen. Each template has a wide layout from 4:5 up. */

/* 1 — blaze: blurred figure in orange heat, black grotesque caps. */
.t-blaze { --bg: #f1440d; --ink: #0d0605; --sig: #ffd2a6; --sig-size: 2.9cqmin; --grain: 0.5; --fit-top: 18cqh; --fit-bottom: 20cqh; --fit-x: 19cqw; }
.t-blaze .bg {
  background:
    radial-gradient(70cqw 46cqh at 4% 64%, #ff9c1c, transparent 72%),
    radial-gradient(60cqw 40cqh at 100% 34%, #ff6a14, transparent 70%),
    linear-gradient(180deg, #ee2c0b, #f35710 52%, #ea3a0c);
}
.t-blaze .bg > * { border-radius: 50%; filter: blur(6cqmin); }
.t-blaze .head { left: 50cqw; top: 13cqh; width: 26cqmin; height: 28cqmin; background: #c41a08; }
.t-blaze .body { left: 28cqw; top: 31cqh; width: 50cqmin; height: 52cqh; border-radius: 44% 44% 20% 20%; background: #b01207; }
.t-blaze .arm { left: -4cqw; top: 64cqh; width: 44cqmin; height: 17cqmin; rotate: -24deg; background: #bd1608; }
.t-blaze .legs { left: 32cqw; top: 76cqh; width: 46cqmin; height: 34cqh; border-radius: 30%; background: #4d0a05; }
.t-blaze .quote { font-family: "Archivo", sans-serif; font-weight: 900; line-height: 0.92; letter-spacing: -0.035em; word-spacing: 0.1em; text-transform: uppercase; }
.t-blaze .author { font-family: "Archivo", sans-serif; font-weight: 900; text-transform: uppercase; letter-spacing: 0.02em; }
.t-blaze .sig { font-family: "Archivo", sans-serif; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; }
@container (min-aspect-ratio: 4/5) {
  .t-blaze .fit { --fit-top: 12cqh; --fit-bottom: 20cqh; --fit-x: 9cqw; }
  .t-blaze .copy { max-width: 74cqmin; }
  .t-blaze .head { left: calc(68cqw - 13cqmin); top: 9cqh; }
  .t-blaze .body { left: calc(68cqw - 27cqmin); top: 31cqh; width: 54cqmin; height: 90cqh; }
  .t-blaze .arm { left: calc(68cqw - 62cqmin); top: 66cqh; }
  .t-blaze .legs { display: none; }
  .t-blaze .sig { color: var(--ink); }
}

/* 2 — motion: runner in motion blur, white display serif with one italic word. */
.t-motion { --bg: #2c3037; --ink: #fff; --grain: 0.35; --fit-top: 30cqh; --fit-bottom: 30cqh; --fit-x: 9cqw; }
.t-motion .bg { background: linear-gradient(rgb(14 17 24 / 0.42), rgb(14 17 24 / 0.58)), var(--photo-tall) center / cover; }
.t-motion .quote { font-family: "Playfair Display", serif; line-height: 1.12; letter-spacing: -0.012em; text-transform: uppercase; text-align: center; }
.t-motion .quote em { font-style: italic; }
.t-motion .author { font-family: "Playfair Display", serif; font-style: italic; text-align: center; }
.t-motion .sig { font-family: "Playfair Display", serif; }
@container (min-aspect-ratio: 4/5) {
  .t-motion .bg { background: linear-gradient(rgb(14 17 24 / 0.42), rgb(14 17 24 / 0.58)), var(--photo-wide) center / cover; }
  .t-motion .fit { --fit-top: 22cqh; --fit-bottom: 24cqh; --fit-x: max(8cqmin, 50cqw - 55cqmin); }
}

/* 3 — void: white on black, the last thought underlined. */
.t-void { --bg: #000; --ink: #fff; --sig: #a3a3a3; --fit-top: 44cqh; --fit-bottom: 22cqh; --fit-x: 17cqw; --fit-align: flex-start; }
.t-void .quote { font-family: "Unbounded", sans-serif; font-weight: 600; line-height: 1.14; letter-spacing: -0.03em; text-wrap: pretty; }
.t-void .quote em { text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.2em; }
.t-void .author { font-family: "Unbounded", sans-serif; font-weight: 600; letter-spacing: 0.02em; color: #a3a3a3; }
.t-void .sig { font-family: "Unbounded", sans-serif; font-weight: 600; letter-spacing: 0.04em; }
@container (min-aspect-ratio: 4/5) {
  .t-void .fit { --fit-top: 16cqh; --fit-bottom: 22cqh; --fit-x: 12cqw; --fit-align: center; }
  .t-void .copy { max-width: 88cqmin; }
}

/* 4 — night: light streaks in the dark, a quiet book serif. */
.t-night { --bg: #0c0d09; --ink: #f4f1e6; --sig-size: 3cqmin; --author-size: 3.3cqmin; --grain: 0.55; --fit-top: 24cqh; --fit-bottom: 22cqh; --fit-x: 11cqw; }
.t-night .bg { background: linear-gradient(rgb(6 7 4 / 0.32), rgb(6 7 4 / 0.5)), var(--photo-tall) center / cover; }
.t-night .quote { font-family: "Libre Baskerville", serif; line-height: 1.75; text-align: center; }
.t-night .quote .s { display: block; }
.t-night .author { font-family: "Libre Baskerville", serif; text-align: center; letter-spacing: 0.04em; }
.t-night .sig { font-family: "Libre Baskerville", serif; }
@container (min-aspect-ratio: 4/5) {
  .t-night .bg { background: linear-gradient(rgb(6 7 4 / 0.38), rgb(6 7 4 / 0.55)), var(--photo-wide) center / cover; }
  .t-night .fit { --fit-top: 16cqh; --fit-bottom: 22cqh; --fit-x: max(8cqmin, 50cqw - 58cqmin); }
}

/* 5 — scribble: heavy black type on paper, marked up in red pen. */
.t-scribble { --bg: #f3f0ea; --ink: #0c0c0c; --pen: #c5221f; --sig-size: 3.9cqmin; --author-size: 4.4cqmin; --fit-top: 20cqh; --fit-bottom: 24cqh; --fit-x: 11cqw; }
.t-scribble .quote { font-family: "League Spartan", sans-serif; font-weight: 800; line-height: 1.08; letter-spacing: -0.035em; }
.t-scribble .quote em, .t-scribble .quote .u { position: relative; white-space: nowrap; }
.t-scribble .quote em::after, .t-scribble .quote .u::after { content: ""; position: absolute; pointer-events: none; background: center / 100% 100% no-repeat; }
.t-scribble .quote em::after {
  inset: -0.24em -0.3em -0.04em -0.26em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100' preserveAspectRatio='none'%3E%3Cpath d='M70 10C120 2 192 12 194 46 196 84 118 96 62 91 20 87 4 68 7 46 10 20 66 5 156 15' fill='none' stroke='%23c5221f' stroke-width='4.5' stroke-linecap='round'/%3E%3C/svg%3E");
}
.t-scribble .quote .u::after {
  inset: auto -0.04em -0.2em -0.06em;
  height: 0.24em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M4 13C40 7 130 4 196 9' fill='none' stroke='%23c5221f' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.t-scribble .author { font-family: "Instrument Serif", serif; }
.t-scribble .sig { font-family: "Instrument Serif", serif; letter-spacing: 0; }
@container (min-aspect-ratio: 4/5) {
  .t-scribble .fit { --fit-top: 12cqh; --fit-bottom: 22cqh; --fit-x: 12cqw; }
  .t-scribble .copy { max-width: 100cqmin; }
}

/* 6 — street: a city street at night, the quote set small and low like a film subtitle. */
.t-street { --bg: #0a0d12; --ink: #f2f0ea; --sig: rgb(242 240 234 / 0.75); --grain: 0.5; --fit-top: 56cqh; --fit-bottom: 17cqh; --fit-x: 9cqw; --fit-right: 16cqw; --fit-align: flex-end; }
.t-street .bg { background: linear-gradient(180deg, rgb(6 8 12 / 0.15), transparent 35%, rgb(6 8 12 / 0.55) 62%, rgb(6 8 12 / 0.8)), var(--photo-tall) center / cover; }
.t-street .quote { font-family: "Hanken Grotesk", sans-serif; font-weight: 500; line-height: 1.32; letter-spacing: 0.005em; text-wrap: pretty; text-shadow: 0 0.05em 0.5em rgb(0 0 0 / 0.5); }
.t-street .quote em { font-style: normal; border-bottom: 0.06em solid currentColor; }
.t-street .author { font-family: "Hanken Grotesk", sans-serif; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: rgb(242 240 234 / 0.75); }
.t-street .sig { font-family: "Hanken Grotesk", sans-serif; font-weight: 500; letter-spacing: 0.08em; }
@container (min-aspect-ratio: 4/5) {
  .t-street .bg { background: linear-gradient(90deg, rgb(6 8 12 / 0.7), rgb(6 8 12 / 0.15) 55%), linear-gradient(180deg, transparent 50%, rgb(6 8 12 / 0.6)), var(--photo-wide) center / cover; }
  .t-street .fit { --fit-top: 40cqh; --fit-bottom: 18cqh; --fit-x: 7cqw; --fit-right: max(7cqw, 93cqw - 80cqmin); }
  .t-street .sig { left: 7cqw; align-items: flex-start; }
}

/* 7 — stairs: concrete in black and white, condensed caps up top. */
.t-stairs { --bg: #111; --ink: #fff; --sig-size: 3cqmin; --grain: 0.45; --fit-top: 8cqh; --fit-bottom: 62cqh; --fit-x: 8cqw; }
.t-stairs .bg { background: linear-gradient(180deg, rgb(0 0 0 / 0.82), rgb(0 0 0 / 0.5) 34%, rgb(0 0 0 / 0.1) 60%, rgb(0 0 0 / 0.55)), var(--photo-tall) center / cover; }
.t-stairs .quote { font-family: "Anton", sans-serif; line-height: 1.04; letter-spacing: 0.005em; text-transform: uppercase; text-align: center; }
.t-stairs .author { font-family: "Anton", sans-serif; text-transform: uppercase; letter-spacing: 0.08em; text-align: center; margin-top: 1.4em; }
.t-stairs .sig { font-family: "Anton", sans-serif; text-transform: uppercase; letter-spacing: 0.14em; }
@container (min-aspect-ratio: 4/5) {
  .t-stairs .bg { background: linear-gradient(90deg, rgb(0 0 0 / 0.1) 30%, rgb(0 0 0 / 0.72) 62%), linear-gradient(180deg, transparent 60%, rgb(0 0 0 / 0.6)), var(--photo-wide) center / cover; }
  .t-stairs .fit { --fit-top: 10cqh; --fit-bottom: 38cqh; --fit-x: max(8cqw, 94cqw - 70cqmin); --fit-right: 6cqw; }
}

/* 8 — echo: one line repeated until it fades. */
.t-echo { --bg: #000; --ink: #fff; --sig: #a3a3a3; --author-size: 3.2cqmin; --fit-top: 14cqh; --fit-bottom: 18cqh; --fit-x: 6cqw; }
.t-echo .quote { font-family: "Playfair Display", serif; line-height: 1.24; letter-spacing: 0.01em; text-transform: uppercase; text-align: center; white-space: nowrap; }
.t-echo .ghost { display: block; }
.t-echo .ghost:nth-of-type(2) { opacity: 0.86; }
.t-echo .ghost:nth-of-type(3) { opacity: 0.72; }
.t-echo .ghost:nth-of-type(4) { opacity: 0.58; }
.t-echo .ghost:nth-of-type(5) { opacity: 0.45; }
.t-echo .ghost:nth-of-type(6) { opacity: 0.33; }
.t-echo .ghost:nth-of-type(7) { opacity: 0.22; }
.t-echo .ghost:nth-of-type(8) { opacity: 0.13; }
.t-echo .ghost:nth-of-type(9) { opacity: 0.06; }
.t-echo .author { font-family: "Playfair Display", serif; text-align: center; letter-spacing: 0.14em; text-transform: uppercase; color: #a3a3a3; margin-top: 2em; }
.t-echo .sig { font-family: "Playfair Display", serif; }
@container (min-aspect-ratio: 4/5) {
  .t-echo .fit { --fit-top: 7cqh; --fit-bottom: 18cqh; }
}

/* 9 — highlight: a line in a book, run over with a yellow marker. */
.t-highlight { --bg: #e7e4df; --ink: #151413; --sig: #55524d; --sig-size: 3.3cqmin; --author-size: 3.6cqmin; --grain: 0.55; --grain-blend: multiply; --fit-top: 18cqh; --fit-bottom: 20cqh; --fit-x: 7cqw; }
.t-highlight .bg { background: radial-gradient(90cqw 60cqh at 50% 45%, transparent 40%, rgb(120 112 100 / 0.16)), var(--bg); }
.t-highlight .bg::before {
  content: "";
  position: absolute;
  inset: 6cqh 9cqw;
  background: repeating-linear-gradient(180deg, transparent 0 2.6cqmin, rgb(70 70 82 / 0.045) 2.6cqmin 4.1cqmin, transparent 4.1cqmin 5.4cqmin);
  filter: blur(0.7cqmin);
  mask-image: linear-gradient(180deg, #000 0 34%, transparent 40% 62%, #000 68%);
}
.t-highlight .quote { font-family: "Tinos", "Times New Roman", serif; line-height: 1.66; text-align: center; padding: 0 0.4em; }
.t-highlight .quote .ink { padding: 0.12em 0.3em 0.1em; background: #dde53a; mix-blend-mode: multiply; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.t-highlight .author { font-family: "Tinos", serif; font-style: italic; text-align: center; }
.t-highlight .sig { font-family: "Tinos", serif; letter-spacing: 0.02em; }
@container (min-aspect-ratio: 4/5) {
  .t-highlight .bg::before { inset: 7cqh max(9cqmin, 50cqw - 62cqmin); mask-image: linear-gradient(180deg, #000 0 24%, transparent 32% 66%, #000 74%); }
  .t-highlight .fit { --fit-top: 16cqh; --fit-bottom: 20cqh; --fit-x: max(7cqmin, 50cqw - 60cqmin); }
}

/* 10 — sky: a signal against grainy blue sky, bold white caps with one word in script. */
.t-sky { --bg: #5b88b5; --ink: #fff; --sig: rgb(255 255 255 / 0.9); --grain: 0.55; --fit-top: 9cqh; --fit-bottom: 50cqh; --fit-x: 10cqw; }
.t-sky .bg { background: linear-gradient(180deg, rgb(20 45 80 / 0.22), transparent 50%), var(--photo-tall) center / cover; }
/* Each photo has its own clear patch of sky; the text goes there. */
.t-sky[data-photo="3"] { --fit-top: 52cqh; --fit-bottom: 16cqh; }
.t-sky[data-photo="5"] { --fit-top: 50cqh; --fit-bottom: 16cqh; --fit-right: 30cqw; }
.t-sky .quote { font-family: "Schibsted Grotesk", sans-serif; font-weight: 700; line-height: 1; letter-spacing: -0.015em; text-transform: uppercase; text-shadow: 0 0.03em 0.4em rgb(15 35 65 / 0.3); }
.t-sky .quote em { font-family: "Playfair Display", serif; font-style: italic; font-weight: 400; text-transform: lowercase; letter-spacing: 0; font-size: 1.12em; line-height: 0.9; }
.t-sky .author { font-family: "Schibsted Grotesk", sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.t-sky .sig { font-family: "Schibsted Grotesk", sans-serif; font-weight: 700; letter-spacing: 0.06em; }
@container (min-aspect-ratio: 4/5) {
  .t-sky .bg { background: linear-gradient(90deg, transparent 40%, rgb(20 45 80 / 0.25)), var(--photo-wide) center / cover; }
  .t-sky .fit { --fit-top: 14cqh; --fit-bottom: 20cqh; --fit-x: max(8cqw, 94cqw - 72cqmin); --fit-right: 7cqw; }
  .t-sky[data-photo="2"] .fit { --fit-x: 7cqw; --fit-right: max(8cqw, 94cqw - 72cqmin); }
  .t-sky[data-photo="3"] .fit, .t-sky[data-photo="5"] .fit { --fit-top: 14cqh; --fit-bottom: 20cqh; --fit-right: 7cqw; }
  .t-sky[data-photo="6"] .bg { background: linear-gradient(180deg, rgb(20 45 80 / 0.22), transparent 50%), var(--photo-wide) center / cover; }
  .t-sky[data-photo="6"] .fit { --fit-top: 7cqh; --fit-bottom: 58cqh; --fit-x: 8cqw; --fit-right: 8cqw; }
  .t-sky[data-photo="6"] .quote { text-align: center; }
}

/* 11 — window: late light on a dark wall, the quote set large above it. */
.t-window { --bg: #0d0807; --ink: #f4ead8; --sig: #c9bda8; --sig-size: 3.8cqmin; --author-size: 4.2cqmin; --grain: 0.4; --fit-top: 8cqh; --fit-bottom: 55cqh; --fit-x: 9cqw; --fit-right: 12cqw; --fit-align: flex-start; }
.t-window .bg { background: linear-gradient(180deg, rgb(13 8 7 / 0.6), rgb(13 8 7 / 0.2) 50%, rgb(13 8 7 / 0.5)), var(--photo-tall) center / cover; }
.t-window .quote { font-family: "Instrument Serif", serif; line-height: 1.02; letter-spacing: -0.012em; }
.t-window .quote em { font-style: italic; }
.t-window .author { font-family: "Instrument Serif", serif; font-style: italic; margin-top: 0.9em; }
.t-window .sig { font-family: "Instrument Serif", serif; letter-spacing: 0.01em; }
/* Wide: the photo sits bottom right, faded into the wall, and the quote keeps clear of the light. */
@container (min-aspect-ratio: 4/5) {
  .t-window .bg { background: var(--bg); }
  .t-window .bg::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: min(85cqw, 115cqh);
    aspect-ratio: 3 / 2;
    background: var(--photo-wide) center / cover;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 30%), linear-gradient(to bottom, transparent, #000 22%);
    mask-image: linear-gradient(to right, transparent, #000 30%), linear-gradient(to bottom, transparent, #000 22%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
  }
  .t-window .fit { --fit-top: 8cqh; --fit-bottom: calc(0.54 * min(85cqw, 115cqh) + 2cqmin); --fit-x: 8cqw; --fit-right: 8cqw; --fit-align: center; }
  .t-window .sig { left: 8cqw; align-items: flex-start; }
}
@container (min-aspect-ratio: 5/4) {
  .t-window .fit { --fit-top: 10cqh; --fit-bottom: 20cqh; --fit-right: calc(0.57 * min(85cqw, 115cqh) + 3cqmin); }
}
