/* The headline that opens the photo: the opening of a magazine feature. The photo shows only through the letters
   of a huge serif headline; scrolling makes the headline grow into one letter until the photo fills the screen,
   then the photo settles into a frame and the story begins. */
:root {
  --paper: #f3efe7;         /* the page */
  --ink: #17191d;           /* titles and text */
  --muted: #6d675e;         /* bylines, captions, small print */
  --rule: #d5cec1;          /* the hairlines */
  --accent: #9b4b2e;        /* the section label and the drop cap */
  --gutter: clamp(16px, 3.5vw, 56px);
  --alto-grande: 100vh;
}
@supports (height: 100lvh) {
  :root { --alto-grande: 100lvh; }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Newsreader Variable', Georgia, serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ the opening */
.opener {
  position: relative;
  height: calc((1 + var(--length, 2.6)) * var(--alto-grande));
}

.stage {
  position: sticky;
  top: 0;
  height: var(--alto-grande);
  overflow: hidden;
}

/* every block that comes in has an inner .in, so the entrance and the scroll never move the same element */
.in {
  display: inline-block;
}

.mast {
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  z-index: 1;
}

.mast__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 22px 0 14px;
  font-family: 'Schibsted Grotesk Variable', system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.mast__name {
  font-family: 'Bodoni Moda Variable', 'Bodoni 72', Didot, serif;
  font-size: 24px;
  font-weight: 600;
  font-style: normal;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.mast__tag {
  flex: 1;
  text-align: center;
}

.mast__rule {
  display: block;
  height: 1px;
  background: var(--rule);
  transform-origin: 0 50%;
}

.cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.6vh, 30px);
  padding: 72px var(--gutter) 64px;
  text-align: center;
}

.kicker,
.byline,
.hint,
.caption {
  margin: 0;
  font-family: 'Schibsted Grotesk Variable', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kicker .in {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.kicker__section {
  color: var(--accent);
  font-weight: 650;
}

.kicker__sep {
  width: 1px;
  height: 13px;
  background: var(--rule);
}

.kicker__place {
  color: var(--muted);
}

/* the real headline, for screen readers and search engines; the letters you see are drawn in the SVG */
.cover__title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  margin: 0;
}

.cover__slot {
  width: 100%;
  height: 34vh;
  flex: none;
}

.standfirst {
  max-width: 44ch;
  margin: 0;
  font-size: clamp(18px, 1.6vw, 23px);
  font-style: italic;
  font-weight: 380;
  line-height: 1.32;
  font-variation-settings: 'opsz' 36;
  text-wrap: balance;
}

.byline {
  color: var(--muted);
  letter-spacing: 0.12em;
}

.byline .in {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
}

.byline b {
  font-weight: 650;
  color: var(--ink);
}

.hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  z-index: 1;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
}

.hint .in {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hint__arrow {
  width: 10px;
  height: 15px;
}

/* the photo layer sits over the words: once it fills the screen, it covers them */
.art {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.art__word {
  font-family: 'Bodoni Moda Variable', 'Bodoni 72', Didot, serif;
  font-weight: 900;
}

.caption {
  position: absolute;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 8px 24px;
  font-family: 'Newsreader Variable', Georgia, serif;
  font-size: 14px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.4;
  color: var(--muted);
  visibility: hidden;
}

.caption__credit {
  flex: none;
  font-family: 'Schibsted Grotesk Variable', system-ui, sans-serif;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-top: 3px;
}

/* ------------------------------------------------------------------ the story */
.story {
  width: min(100% - 2 * var(--gutter), 640px);
  margin: 0 auto;
  padding: clamp(24px, 6vh, 64px) 0 clamp(96px, 18vh, 200px);
  font-size: clamp(18px, 1.3vw, 20px);
  line-height: 1.62;
  font-variation-settings: 'opsz' 16;
}

.story p {
  margin: 0 0 1.25em;
  text-wrap: pretty;
}

/* the drop cap: four lines tall, its letter rises out of a box that hides what sticks out */
.drop {
  float: left;
  height: 4.15em;
  margin: 0.22em 0.12em 0 -0.04em;
  overflow: hidden;
  font-family: 'Bodoni Moda Variable', 'Bodoni 72', Didot, serif;
  font-size: 1em;
  line-height: 1;
  color: var(--accent);
}

.drop > span {
  display: block;
  font-size: 5.1em;
  font-weight: 800;
  line-height: 0.8;
}

.quote {
  margin: 2.2em 0;
  padding: 0;
  text-align: center;
}

.quote p {
  margin: 1.1em auto;
  max-width: 22ch;
  font-family: 'Bodoni Moda Variable', 'Bodoni 72', Didot, serif;
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.quote__rule {
  display: block;
  height: 1px;
  background: var(--ink);
  opacity: 0.6;
}

@media (max-width: 700px) {
  .mast__tag {
    display: none;
  }

  .mast__name {
    font-size: 21px;
  }

  .cover {
    gap: 22px;
  }

  .caption {
    flex-direction: column;
    font-size: 13px;
  }
}
