:root {
  /* Geist: a clean geometric grotesk, close in feel to Aeonik */
  --font: "Geist", "Helvetica Neue", Arial, sans-serif;
  --paper: #f7f6f3;
  --muted: rgba(247, 246, 243, .66);
  --rule: rgba(247, 246, 243, .3);
  --accent: #e8443a;            /* progress bar */
  --gutter: clamp(16px, 5.5vw, 96px);
  --small: clamp(.66rem, .72vw, .74rem); /* one size for all small text: masthead + byline */
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0c0c0c; color: var(--paper); font-family: var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

#stage { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(circle at 30% 30%, #262626, #0c0c0c); }

/* ---- Photo ----
   The photo starts at its natural scale (sharpest) and only creeps in by 5% over the minute. */
.img { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transform: scale(1);
  transition: opacity 1.6s ease, transform 60s linear; backface-visibility: hidden; }
.img.show { opacity: 1; transform: scale(1.05); }
.no-zoom .img, .no-zoom .img.show { transform: none; transition: opacity 1.6s ease; }

/* Darken only behind the type: a light band under the masthead, a deeper one at the bottom. */
.shade { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.5) 0%, rgba(0,0,0,0) 14%),
    linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.55) 32%, rgba(0,0,0,0) 62%); }

/* Small text (masthead and byline) shares one style so they read as a set. */
.masthead, .byline { font-size: var(--small); font-weight: 400; letter-spacing: .01em; line-height: 1.4;
  color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- Masthead: date on the left, "Updated" time on the right, over a thin rule ---- */
.masthead { position: absolute; top: 0; left: var(--gutter); right: var(--gutter); padding: clamp(14px, 2.6vh, 28px) 0 .7rem;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 1px solid var(--rule); }

/* ---- Story ---- */
.caption { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; padding-bottom: clamp(36px, 8vh, 96px); }

/* The negative left margin cancels the letter's built-in side space at this size,
   so the word's first stroke lines up with the headline and byline below it. */
#story { margin: 0 0 0 -.06em; font-weight: 500; font-size: clamp(4rem, 13vw, 12.5rem); line-height: .9; letter-spacing: -.055em;
  overflow-wrap: anywhere; text-wrap: balance; text-shadow: 0 2px 40px rgba(0,0,0,.3); }

/* The big word links to the article; a subtle fade shows it's clickable. */
.title-link { display: inline-block; max-width: 100%; vertical-align: top; color: inherit; text-decoration: none; }
.title-link[href] { cursor: pointer; }
.title-link[href] #story { transition: opacity .25s ease; }
.title-link[href]:hover #story { opacity: .82; }
.title-link:focus-visible { outline: 2px solid var(--paper); outline-offset: 6px; }

.dek { display: block; max-width: 46ch; margin-top: clamp(1rem, 2.4vh, 1.6rem); padding-top: clamp(.9rem, 2vh, 1.3rem);
  border-top: 1px solid var(--rule); color: var(--paper); text-decoration: none;
  font-weight: 400; font-size: clamp(1.05rem, 1.6vw, 1.5rem); line-height: 1.3; letter-spacing: -.015em; text-wrap: pretty; }
.dek:has(#headline:empty) { display: none; }
.dek:hover #headline { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }

.byline { margin: .8rem 0 0; white-space: pre-wrap; }

/* ---- Minute progress ---- */
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(247,246,243,.14); }
#bar { height: 100%; width: 0; background: var(--accent); }

@media (max-width: 720px) {
  #story { font-size: clamp(3.2rem, 16vw, 6rem); }
  .masthead { justify-content: center; }
  .edition { display: none; }
}
