/* The title screen (#94, draft 3 "While You Were Away"; welcome.js fills #introBody, app.js shows it once per session).
   It sits over the desk's own live scene (bg.js): no pictures of its own. Every colour is a desk token (--bone*, --red*
   via .btn-red, --t-titan, --line*), so skins (html[data-skin]) and future custom themes recolour it.
   Type: Bodoni on the wordmark only, Caslon for the greeting and the ledger, Inter for the small labels.
   Enter: the pieces leave their own ways (transitions.css), the ledger's lines fly to the desk (welcome.js). */
@property --wl-n { syntax: "<integer>"; inherits: false; initial-value: 0; }

.intro { gap: 0; padding: 0 max(24px, 7vw); --wl-gold: var(--t-titan); }
.intro-sub { margin: 14px 0 0; }
.intro-body { display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; }
.intro-line { margin: 30px 0 0; font-size: clamp(20px, 1.6vw, 24px); line-height: 1.35; color: var(--bone-2); }

/* the welcome action: the same engraved plate as every main action (.btn-red, skinned by pass.css), bigger, in Caslon */
.intro #enterBtn { margin-top: 36px; min-width: 214px; min-height: 58px; font-family: var(--serif); font-size: 18px; font-weight: 700; letter-spacing: .06em; }
@media (hover: hover) and (pointer: fine) { .intro #enterBtn:hover { transform: translateY(-2px); } }
.intro #enterBtn:active { transform: translateY(1px) scale(.98); }

/* ---------- returning: wordmark, greeting, "while you were away" ledger, Enter ---------- */
.intro.is-back .wordmark { font-size: clamp(64px, 7.4vw, 120px); animation-duration: 1.1s, 9s; animation-delay: .05s, 0s; }
.intro.is-back .intro-sub { margin-top: 12px; font-size: 14px; letter-spacing: .36em; animation-duration: 1s; animation-delay: .2s; }
.wl-hi { margin: clamp(30px, 5vh, 52px) 0 0; font: 400 clamp(34px, 3.3vw, 52px)/1.08 var(--serif); color: var(--bone); text-wrap: balance;
  animation: wl-in 800ms 300ms var(--ease) both; }
.wl-name { font-style: italic; color: var(--wl-gold);
  background: linear-gradient(100deg, var(--wl-gold) 0%, var(--wl-gold) 38%, color-mix(in oklab, var(--wl-gold) 35%, #fff) 50%, var(--wl-gold) 62%, var(--wl-gold) 100%) 100% 0 / 260% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px color-mix(in oklab, var(--wl-gold) 40%, transparent)); text-shadow: none;
  animation: wl-shine 1800ms 1100ms ease-in-out both; }
.wl-lede { margin: clamp(22px, 3.4vh, 32px) 0 0; font: 600 13px/1.2 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--bone-2);
  animation: wl-in 700ms 440ms var(--ease) both; }
.wl-ledger { list-style: none; margin: 10px 0 0; padding: 0; width: min(500px, 100%); }
.wl-row { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 18px; padding: 13px 0;
  animation: wl-row-in 640ms calc(560ms + var(--i) * 200ms) var(--ease) both; }
.wl-row::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--line-hi), transparent); animation: wl-rule 800ms calc(700ms + var(--i) * 200ms) var(--ease) both; }
.wl-row.is-gold::after { background: linear-gradient(90deg, color-mix(in oklab, var(--wl-gold) 55%, transparent), transparent); }
.wl-n { counter-reset: wl var(--wl-n); min-width: 1.15em; text-align: right; font: 400 44px/1 var(--serif); color: var(--bone); font-variant-numeric: lining-nums tabular-nums; }
.wl-n::after { content: counter(wl); }
.wl-row.is-gold .wl-n { color: var(--wl-gold); text-shadow: 0 0 18px color-mix(in oklab, var(--wl-gold) 40%, transparent); }
.wl-tx { min-width: 0; }
.wl-tx b { display: block; font: 400 19px/1.25 var(--serif); color: var(--bone); }
.wl-tx small { display: block; margin-top: 4px; font: italic 400 15.5px/1.35 var(--serif); color: var(--bone-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.intro.is-back #enterBtn { margin-top: clamp(26px, 4vh, 38px); animation-delay: calc(.8s + var(--wl-rows, 3) * .14s); }
.intro.is-back:not(:has(.wl-row)) #enterBtn { animation-delay: .7s; }

@keyframes wl-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes wl-row-in { from { opacity: 0; transform: translateX(-20px); } }
@keyframes wl-rule { from { transform: scaleX(0); } }
@keyframes wl-shine { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* the shade stays the desk's along the bottom; only the left side's reading shade changes on Enter (transitions.css) */
body[data-screen="intro"] .stage .stage-shade { --sh-v3: .42; --sh-v4: .84; }

/* shorter screens (1280x720, laptops): the ledger tightens so it all sits in the middle third */
@media (max-height: 780px) {
  .intro.is-back .wordmark { font-size: clamp(56px, 6vw, 92px); }
  .wl-hi { margin-top: 24px; font-size: clamp(30px, 3vw, 44px); }
  .wl-lede { margin-top: 18px; }
  .wl-row { padding: 9px 0; }
  .wl-n { font-size: 38px; }
  .intro.is-back #enterBtn { margin-top: 22px; min-height: 54px; }
}
/* big screens (1920x1080 and up): the whole block scales up so it still holds the left third */
@media (min-width: 1800px) and (min-height: 1000px) {
  .intro.is-back .wordmark { font-size: 138px; }
  .intro.is-back .intro-sub { font-size: 15px; }
  .wl-hi { font-size: 62px; margin-top: 56px; }
  .wl-lede { font-size: 14px; margin-top: 36px; }
  .wl-ledger { width: 600px; margin-top: 12px; }
  .wl-row { padding: 16px 0; column-gap: 22px; }
  .wl-tx b { font-size: 23px; } .wl-tx small { font-size: 16.5px; margin-top: 5px; }
  .wl-n { font-size: 54px; }
  .intro-line { font-size: 26px; }
  .intro #enterBtn { min-width: 240px; min-height: 64px; font-size: 20px; }
  .intro.is-back #enterBtn { margin-top: 44px; }
}
/* phones: the words run across the whole picture, so the reading shade does too (it eases back to the desk's on Enter) */
@media (max-width: 640px) { body[data-screen="intro"] .stage .stage-shade { --sh-l0: .9; --sh-l1: .72; --sh-l1p: 62%; --sh-l2p: 118%; } }
/* phones: the tracked-out "ARTIST ALIGNMENT" ran off a 390px screen; the button is a full-width thumb target */
@media (max-width: 480px) {
  .intro-line { text-wrap: balance; }
  .intro { padding: 0 24px; }
  .intro-sub { letter-spacing: .26em; font-size: 14px; }
  .intro-line { font-size: 19px; margin-top: 24px; }
  .intro.is-back .wordmark { font-size: 60px; }
  .intro.is-back .intro-sub { font-size: 12.5px; letter-spacing: .28em; }
  .wl-hi { margin-top: 28px; font-size: 32px; }
  .wl-row { column-gap: 14px; padding: 10px 0; }
  .wl-n { font-size: 34px; }
  .wl-tx b { font-size: 17px; } .wl-tx small { font-size: 14.5px; white-space: normal; }
  .intro #enterBtn { align-self: stretch; min-width: 0; }
}

/* reduced motion: no travel, quick fades; the numbers show their final value */
@media (prefers-reduced-motion: reduce) {
  .intro :is(.wordmark, .intro-sub, .intro-line, .wl-hi, .wl-lede, .wl-row, #enterBtn) { animation: wl-fade 220ms ease-out both !important; }
  .wl-row::after, .wl-name { animation: none !important; }
  .intro #enterBtn { transition: none; }
}
@keyframes wl-fade { from { opacity: 0; } }
