/* p-forfattaren.css: "Hennes egna ord". Classes prefixed fo-. Motion in js/p-forfattaren.js (pure functions of scrollY). */

/* hero: her real portrait as a print lying on the dark cloth, tucked under a thread ------------------ */
.fo-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s8);
  align-items: center; padding: var(--s7) var(--gut) var(--s8); min-height: calc(100vh - var(--banner) - var(--bar));
  max-width: 1440px; margin: 0 auto; overflow: clip;
}
.fo-hw { top: -10%; height: 120%; opacity: .55; pointer-events: none; }
.fo-hw1 { left: calc(var(--gut) + 6%); }
.fo-hw2 { left: calc(var(--gut) + 30%); opacity: .45; }
.fo-hw3 { right: calc(var(--gut) * .5); opacity: .25; }

.fo-print { position: relative; justify-self: center; width: min(420px, 100%); z-index: 2; }
.fo-print-sheet {
  position: relative; background: var(--paper-hi); padding: 14px 14px 0; transform: rotate(-2.2deg);
  box-shadow: 0 1px 0 rgba(0,0,0,.3), 0 26px 40px -18px rgba(0,0,0,.75), 0 4px 10px rgba(0,0,0,.25);
}
.fo-print-sheet img { width: 100%; height: auto; }
.fo-print-sheet figcaption { font: 500 13px/19px var(--f-chrome); letter-spacing: .02em; color: var(--ink-soft); padding: 12px 4px 14px; }
/* the thread the print is tucked under: crosses the paper margin at the top-left corner, never the photo */
.fo-tuck { left: -26px; top: -4px; width: 120px; height: var(--tw); transform: rotate(-38deg); transform-origin: 0 50%; z-index: 3; }

.fo-hero-copy { position: relative; z-index: 2; max-width: 640px; }
.fo-hero-copy .t-h1 { margin-bottom: var(--s6); }
.fo-lead { font-size: 21px; line-height: 32px; max-width: 34em; color: var(--text); margin-bottom: var(--s7); }
.fo-hq { border-left: var(--tw) solid transparent; border-image: var(--yarn-rust) 1; padding-left: var(--s5); }
.fo-hq .t-quote { quotes: "”" "”"; }
.fo-hq .t-quote::before { content: open-quote; } .fo-hq .t-quote::after { content: close-quote; }
.fo-hq .t-src { margin-top: var(--s3); }

/* elements: her sentence over five weft rows ---------------------------------------------------------- */
.fo-el { position: relative; padding: var(--s9) var(--gut) var(--s9); max-width: 1440px; margin: 0 auto; }
.fo-el-line { max-width: 980px; margin: 0 0 var(--s8); }
.fo-line { font: italic 500 clamp(30px, 3.4vw, 50px)/1.2 var(--f-display); color: var(--text); quotes: "”" "”"; }
.fo-line::before { content: open-quote; } .fo-line::after { content: close-quote; }
.fo-el-line .t-src { margin-top: var(--s4); }
/* each element word in the sentence gets a thread that draws as its strip lands (js wraps the words) */
.fo-w { position: relative; color: var(--lamp); white-space: nowrap; }
.fo-w::after { content: ""; position: absolute; left: 0; right: 0; bottom: .04em; height: 3px; border-radius: 2px; background: var(--lamp); transform-origin: 0 50%; transform: scaleX(var(--k, 1)); }

.fo-cloth { --word: 168px; --rowh: 104px; position: relative; display: grid; gap: 18px; padding: 28px 0; }
.fo-warp { position: absolute; top: 0; bottom: 0; left: var(--word); right: 0; pointer-events: none; z-index: 1; }
.fo-warp .yarn, .fo-over { position: absolute; width: var(--tw); margin-left: calc(var(--tw) / -2); }
.fo-warp .yarn { top: 0; bottom: 0; }
.fo-row { position: relative; display: grid; grid-template-columns: var(--word) 1fr; align-items: center; height: var(--rowh); }
.fo-word { font: italic 500 clamp(34px, 3vw, 46px)/1 var(--f-display); color: var(--lamp); padding-right: var(--s5); text-align: right; }
.fo-weft { position: relative; height: 100%; overflow: hidden; z-index: 2; }
.fo-strip { position: absolute; inset: 0; will-change: transform; box-shadow: 0 6px 10px -4px rgba(0,0,0,.6); }
.fo-strip picture, .fo-strip img { display: block; width: 104%; max-width: none; height: 100%; object-fit: cover; }
.fo-strip img { will-change: transform; }
/* the strip's darker edge where it dips under a thread */
.fo-over { top: -3px; bottom: -3px; z-index: 3; box-shadow: 0 0 0 1px rgba(0,0,0,.18), 2px 0 5px rgba(0,0,0,.55), -2px 0 5px rgba(0,0,0,.55); }

/* her words: two paper slips, tucked under their own threads, taking turns down the page --------------- */
.fo-words { position: relative; padding: var(--s8) var(--gut) var(--s9); max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); row-gap: var(--s8); }
.fo-words-h { grid-column: 1 / span 8; }
.fo-slip { position: relative; background: var(--paper); color: var(--ink); padding: var(--s7) var(--s7) var(--s6) 76px; box-shadow: 0 1px 0 rgba(0,0,0,.3), 0 20px 34px -16px rgba(0,0,0,.7); will-change: transform; }
.fo-slip1 { grid-column: 1 / span 7; }
.fo-slip2 { grid-column: 5 / span 8; }
.fo-slip-yarn { left: 34px; top: -36px; bottom: -36px; z-index: 2; }
.fo-slip-q { font: italic 500 clamp(26px, 2.3vw, 34px)/1.3 var(--f-display); quotes: "”" "”"; }
.fo-slip-q::before { content: open-quote; } .fo-slip-q::after { content: close-quote; }
.fo-slip-src { margin-top: var(--s4); font: 500 13px/19px var(--f-chrome); letter-spacing: .02em; color: var(--ink-soft); }

/* her other novels: each title on its own weft thread -------------------------------------------------- */
.fo-books { padding: var(--s8) var(--gut) var(--s9); max-width: 1440px; margin: 0 auto; }
.fo-books .t-h2 { margin-bottom: var(--s6); }
.fo-shelf { list-style: none; margin: 0 0 var(--s6); padding: 0; max-width: 820px; }
.fo-shelf li { position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: var(--s5); padding: 14px 0 18px; }
.fo-shelf li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; border-radius: 3px; background: var(--yarn-wool); opacity: .5; transform-origin: 0 50%; transform: scaleX(var(--k, 1)); }
.fo-shelf li:nth-child(2n)::after { background: var(--yarn-rust); opacity: .8; }
.fo-bt { font: italic 500 clamp(26px, 2.4vw, 36px)/1.15 var(--f-display); }
.fo-by { font: 500 15px/1 var(--f-chrome); letter-spacing: .02em; color: var(--soft); }
.fo-deal { color: var(--soft); max-width: 40em; margin-bottom: var(--s7); }
.fo-next .stitch-link { padding: 14px 0 6px; }
.fo-next { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s6); }
.fo-price { font: 500 15px/1 var(--f-chrome); letter-spacing: .02em; color: var(--text); }

/* tablet */
@media (max-width: 1100px) and (min-width: 761px) {
  .fo-hero { gap: var(--s7); }
  .fo-cloth { --word: 132px; }
  .fo-slip1, .fo-slip2 { grid-column: 1 / -1; }
  .fo-slip2 { margin-left: 12%; }
}

/* phone: H1 first, the print right under it, the cloth with the word above each strip ------------------- */
@media (max-width: 760px) {
  .fo-hero { grid-template-columns: 1fr; gap: var(--s5); padding: var(--s5) var(--gut) var(--s7); min-height: 0; align-items: start; }
  .fo-hero-copy { display: contents; }
  .fo-hero-copy .t-h1 { order: -2; margin: 0; font-size: 50px; }
  .fo-hero-copy > * { position: relative; z-index: 2; }
  .fo-print { order: -1; width: 236px; justify-self: start; margin-left: 14px; }
  .fo-print-sheet { padding: 10px 10px 0; }
  .fo-print-sheet figcaption { font-size: 12px; line-height: 17px; padding: 8px 2px 10px; }
  .fo-tuck { width: 70px; left: -18px; top: 2px; transform: rotate(-18deg); }
  .fo-lead { font-size: 18px; line-height: 28px; margin: var(--s3) 0 var(--s4); }
  .fo-hw1 { left: 6px; } .fo-hw2 { left: auto; right: 6px; } .fo-hw3 { display: none; }
  .fo-el { padding: var(--s8) var(--gut); }
  .fo-el-line { margin-bottom: var(--s6); }
  .fo-line { font-size: 28px; }
  .fo-cloth { --word: 0px; --rowh: 104px; gap: 12px; padding: 16px 0; }
  .fo-row { grid-template-columns: 1fr; grid-template-rows: 36px 1fr; }
  .fo-word { justify-self: start; text-align: left; font-size: 30px; line-height: 36px; padding: 0 12px 0 0; position: relative; z-index: 2; background: var(--canvas); }
  .fo-words { grid-template-columns: 1fr; padding: var(--s7) var(--gut) var(--s8); row-gap: var(--s7); }
  .fo-words-h, .fo-slip1, .fo-slip2 { grid-column: 1; }
  .fo-slip { padding: var(--s6) var(--s5) var(--s5) 52px; }
  .fo-slip-yarn { left: 22px; }
  .fo-slip2 { margin-left: 18px; }
  .fo-slip1 { margin-right: 18px; }
  .fo-books { padding: var(--s7) var(--gut) var(--s8); }
}

@media (prefers-reduced-motion: reduce) {
  .fo-strip, .fo-strip img, .fo-slip { transform: none !important; }
  .fo-w::after, .fo-shelf li::after { transform: none; }
}
