/* ============ The arrival: an editorial title page ============
   Shown once per visit (a tiny script in <head> adds html.is-intro before first paint).
   A paper sheet: masthead rule, three numbered lines set large between hairlines, a load counter,
   then the sheet lifts away like a turned page. No script: the layer hides itself after 4.5s. */
.ld { display: none; }
.is-intro .ld { position: fixed; inset: 0; z-index: 9999; display: block; pointer-events: none; animation: ld-failsafe 0s 4.5s forwards; }
.is-intro body { overflow: hidden; }
.is-intro.is-leaving body { overflow: auto; }

.ld__sheet { position: absolute; inset: 0; display: flex; flex-direction: column; padding: clamp(20px, 3.2vw, 44px) clamp(20px, 4.5vw, 64px); background: #F6F5F1; color: #111216; transition: transform 1.1s cubic-bezier(.76, 0, .24, 1); will-change: transform; }
.ld.is-out .ld__sheet { transform: translateY(-100%); }
.ld__inner { display: flex; flex: 1; flex-direction: column; transition: transform 1.1s cubic-bezier(.76, 0, .24, 1), opacity .6s ease; }
.ld.is-out .ld__inner { transform: translateY(18vh); opacity: 0; }

/* masthead */
.ld__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 14px; border-bottom: 1px solid #111216; font: 600 11px/1 var(--display, 'Montserrat', sans-serif); letter-spacing: .16em; text-transform: uppercase; opacity: 0; transition: opacity .6s ease; }
.ld__top img { display: block; width: auto; height: 22px; }
.ld.is-on .ld__top { opacity: 1; }

/* the three lines */
.ld__lines { display: grid; margin: auto 0; padding: 0; list-style: none; }
.ld__lines li { position: relative; display: grid; grid-template-columns: clamp(2.5rem, 6vw, 6rem) 1fr; align-items: start; padding: clamp(6px, 1vw, 12px) 0; }
.ld__lines li::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: rgba(17, 18, 22, .18); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1s cubic-bezier(.65, 0, .35, 1); }
.ld__lines li:last-child::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: rgba(17, 18, 22, .18); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1s cubic-bezier(.65, 0, .35, 1) .3s; }
.ld.is-on .ld__lines li::before, .ld.is-on .ld__lines li:last-child::after { transform: none; }
.ld__n { padding-top: clamp(.6rem, 1.4vw, 1.4rem); font: 500 12px/1 var(--display, 'Montserrat', sans-serif); letter-spacing: .1em; color: rgba(17, 18, 22, .5); font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .6s ease; }
.ld__w { display: block; overflow: hidden; padding-bottom: .06em; }
.ld__w span { display: block; font: 500 clamp(3.2rem, 11vw, 10.5rem)/.92 var(--display, 'Montserrat', sans-serif); letter-spacing: -.065em; transform: translateY(105%); transition: transform 1.05s cubic-bezier(.22, 1, .36, 1); }
.ld__lines li:last-child .ld__w span { font-weight: 300; color: #2D5BFF; }
.ld.is-on .ld__w span { transform: none; }
.ld.is-on .ld__n { opacity: 1; }
.ld__lines li:nth-child(1)::before, .ld__lines li:nth-child(1) .ld__w span, .ld__lines li:nth-child(1) .ld__n { transition-delay: .1s; }
.ld__lines li:nth-child(2)::before, .ld__lines li:nth-child(2) .ld__w span, .ld__lines li:nth-child(2) .ld__n { transition-delay: .28s; }
.ld__lines li:nth-child(3)::before, .ld__lines li:nth-child(3) .ld__w span, .ld__lines li:nth-child(3) .ld__n { transition-delay: .46s; }

/* foot: a line of description and the load counter */
.ld__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; opacity: 0; transition: opacity .6s ease .5s; }
.ld.is-on .ld__foot { opacity: 1; }
.ld__cap { max-width: 26ch; font: 500 clamp(13px, 1.05vw, 15px)/1.45 var(--display, 'Montserrat', sans-serif); color: rgba(17, 18, 22, .62); }
.ld__count { font: 300 clamp(2.4rem, 5vw, 4.5rem)/.85 var(--display, 'Montserrat', sans-serif); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.ld__bar { position: relative; display: block; height: 1px; margin-top: 14px; background: rgba(17, 18, 22, .14); overflow: hidden; }
.ld__bar i { position: absolute; inset: 0; background: #111216; transform: scaleX(var(--p, 0)); transform-origin: 0 50%; transition: transform .45s cubic-bezier(.22, 1, .36, 1); }

@keyframes ld-failsafe { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .is-intro .ld { display: none; } .is-intro body { overflow: auto; } }
@media (max-width: 599px) { .ld__lines li { grid-template-columns: 2.25rem 1fr; } .ld__cap { max-width: 20ch; } }
