/* The statement as a scroll typography track (Round 69).
   The section pins; one long line slides along the reading direction; letters fall into place as each word enters;
   two words arrive as stickers; glass objects pop beside their words; the glass ball hops along the words and ends as the period. */
.tt { position: relative; height: 340vh; }
.tt-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; align-items: center; }
.tt-line { position: absolute; top: 50%; inset-inline-start: 0; margin: 0; translate: 0 -50%; white-space: nowrap; font: 700 clamp(4rem, 7.4vw, 8.25rem) / 1.08 var(--font); letter-spacing: -.035em; color: var(--ink); will-change: transform; }
.tt-in { display: inline-flex; align-items: baseline; gap: .26em; }
.tt-w { position: relative; display: inline-flex; align-items: baseline; }
.tt-c { display: inline-block; will-change: transform, opacity; }
.tt-p { margin-inline-start: -.24em; }
.tt-end { display: inline-block; width: .34em; height: .34em; margin-inline-start: -.18em; }

/* stickers: the brand's pink and a cream card, tilted, popping in */
.tt-st { padding: .06em .26em .12em; border-radius: .16em; will-change: transform, opacity; transform-origin: 50% 60%; }
.tt-st--pink { color: #fff; background: linear-gradient(180deg, #ff2f8c 0%, #e5116f 55%, #c20c5e 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 .1em .3em -.08em rgba(244, 20, 121, .55); rotate: -4deg; }
.tt-st--cream { color: #161616; background: #f5f3ef; box-shadow: 0 .1em .3em -.1em rgba(0, 0, 0, .6); rotate: 3deg; translate: 0 .14em; }

/* glass objects beside their words */
.tt-o { position: absolute; width: 1.25em; height: auto; inset-inline-start: 50%; margin-inline-start: -.62em; pointer-events: none; filter: drop-shadow(0 .2em .3em rgba(244, 20, 121, .3)); will-change: transform, opacity; }
.tt-o--up { bottom: 92%; }
.tt-o--down { top: 96%; width: 1.05em; }
[dir="ltr"] .tt-o[data-img="hi-arrow"], [dir="ltr"] .tt-o[data-img="hi-plane"] { scale: -1 1; }

/* the big faint word behind, moving slower */
.tt-ghost { position: absolute; top: 50%; inset-inline-start: 0; margin: 0; translate: 0 -58%; white-space: nowrap; font: 700 clamp(14rem, 30vw, 30rem) / 1 var(--font); letter-spacing: -.05em; color: rgba(245, 243, 239, .035); pointer-events: none; will-change: transform; }

.tt-ball { position: absolute; left: 0; top: 0; width: 100px; height: 100px; pointer-events: none; will-change: transform; filter: drop-shadow(0 18px 26px rgba(244, 20, 121, .4)); }
html.tt-gone .tt-ball { opacity: 0; }

@media (max-width: 900px) {
  .tt { height: 300vh; }
  .tt-line { font-size: clamp(3.25rem, 15vw, 4.5rem); }
  .tt-ghost { font-size: 52vw; }
}

/* without the script, or with reduced motion: a calm wrapped statement */
html:not(.tt-on) .tt { height: auto; padding-block: 18vh; }
html:not(.tt-on) .tt-pin { position: relative; height: auto; overflow: visible; }
html:not(.tt-on) .tt-line { position: relative; top: auto; translate: none; inset: auto; white-space: normal; padding-inline: var(--m); font-size: clamp(2.5rem, 5.4vw, 5rem); }
html:not(.tt-on) .tt-in { display: inline; }
html:not(.tt-on) .tt-in > .tt-w { margin-inline-end: .24em; }
html:not(.tt-on) .tt-o, html:not(.tt-on) .tt-ghost, html:not(.tt-on) .tt-ball { display: none; }

/* Round 75: more beats along the line (critics R73) */
.tt-st--glass { color: var(--ink); background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 .035em rgba(255, 255, 255, .42), inset 0 .04em 0 rgba(255, 255, 255, .3); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); rotate: 2.5deg; }
.tt-st--line { color: #ff4fa0; background: rgba(244, 20, 121, .06); box-shadow: inset 0 0 0 .04em #ff3f97; rotate: -2.5deg; }
.tt-d { position: absolute; pointer-events: none; overflow: visible; fill: none; }
.tt-d path { stroke: #ff3f97; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 6px rgba(244, 20, 121, .45)); }
.tt-d--under { inset-inline-start: -4%; width: 108%; bottom: -.16em; height: .3em; }
.tt-d--ring { inset-inline-start: -13%; width: 126%; top: -.06em; height: 1.22em; }
.tt-o--drop, .tt-o--fly { bottom: 92%; }
.tt-o--push { top: 98%; width: 1.05em; }
.tt-ghost span { position: absolute; top: 0; inset-inline-start: 0; opacity: 0; transition: opacity .9s ease, translate 1.2s cubic-bezier(.16, 1, .3, 1); translate: 0 .08em; }
.tt-ghost span.is-on { opacity: 1; translate: 0 0; }
.tt-ghost { color: rgba(245, 243, 239, .055); }
html:not(.tt-on) .tt-d { display: none; }

/* Round 76 (critics R75): a readable ghost layer with a clean swap, bigger objects, no dead air at the exit */
.tt-ghost { color: rgba(245, 243, 239, .09); }
.tt-ghost span { transition: opacity .35s ease, translate .9s cubic-bezier(.16, 1, .3, 1); }
.tt-ghost span.is-on { transition: opacity .7s ease .3s, translate 1.1s cubic-bezier(.16, 1, .3, 1) .3s; }
.tt-o { width: 1.55em; margin-inline-start: -.78em; }
.tt-o--push { width: 1.3em; }
.tt { margin-bottom: -34vh; }
.tt + * { position: relative; z-index: 1; }
@media (max-width: 900px) { .tt { margin-bottom: -26vh; } }
html:not(.tt-on) .tt { margin-bottom: 0; }

/* Round 80: pen-style marks tied to their words (critics R79) */
.tt-d--star { width: .5em; height: .5em; top: -.34em; inset-inline-end: -.3em; transform-origin: 50% 50%; }
.tt-d--star path { stroke-width: 3.4; }
.tt-d--spark { width: .62em; height: .62em; top: -.42em; inset-inline-end: -.42em; }
.tt-st { overflow: visible; }
.tt-o--push { top: 104%; }
/* the pin's top half is empty while it enters, so it starts a little under the carousel (critics R79: dead band) */
.tt { margin-top: -20vh; }
@media (max-width: 900px) { .tt { margin-top: -12vh; } }
html:not(.tt-on) .tt { margin-top: 0; }

/* Round 82 (critics R81): the ghost is an outline that carries the motion without muddying the line */
.tt-ghost { color: transparent !important; -webkit-text-stroke: 1.5px rgba(245, 243, 239, .16); }
@media (max-width: 600px) { .tt-ghost { -webkit-text-stroke-width: 1px; -webkit-text-stroke-color: rgba(245, 243, 239, .1); top: 62%; } }
/* Round 83: the outline ghost reads as a layer, centred behind the line */
.tt-ghost { -webkit-text-stroke-color: rgba(245, 243, 239, .22); translate: none !important; }
@media (max-width: 600px) { .tt-ghost { -webkit-text-stroke-color: rgba(245, 243, 239, .14); top: 50%; } }
.tt-ghost span { top: -.56em !important; }
/* Round 84: on phone more of the sentence shows at once */
@media (max-width: 900px) { .tt-line { font-size: clamp(2.5rem, 11.5vw, 3.5rem); } }
/* Round 85: on phone the objects stay apart (no clump): smaller, and the chat bubble rests */
@media (max-width: 900px) { .tt-o { width: 1.15em; margin-inline-start: -.58em; } .tt-o[data-img="hi-chat"] { display: none; } }
/* Round 86: on phone only the arrow and the plane stay with their words; the cube no longer piles up with the ball */
@media (max-width: 900px) { .tt-o[data-img="hi-shape-7"] { display: none; } }
/* Round 90: a phone screen draws itself around "המסך" / "screen" */
.tt-d--screen { inset-inline-start: -8%; width: 116%; top: -.02em; height: 1.18em; }
.tt-d--screen path { stroke-width: 2.6; }
/* Round 92: the phone statement reads bigger (both critics) */
@media (max-width: 900px) { .tt-line { font-size: clamp(2.75rem, 13vw, 3.5rem); } }
/* Round 94: the phone statement fills more of the screen (both critics) */
@media (max-width: 600px) { .tt-line { font-size: clamp(3rem, 15vw, 4rem); } }
/* Round 97: the ghost word read as stray lines in every critic round; the line and its stickers carry the section on their own */
.tt-ghost { display: none !important; }
/* Round 105: on phone the chat bubble and the cube come back, smaller, so the pinned screen isn't a lone line */
@media (max-width: 900px) { .tt-o[data-img="hi-chat"], .tt-o[data-img="hi-shape-7"] { display: block; width: .95em; margin-inline-start: -.48em; } }
@media (max-width: 900px) { .tt-o--up, .tt-o--drop { bottom: auto; top: 104%; } }

/* Round 153 (owner: the statement on phone needs another solution): on phone the sentence wraps on a pinned screen,
   centred, and lights up word by word; stickers and pen marks pop on their words; the ball hops along and lands as the period */
.tt.tt-m .tt-line { white-space: normal !important; inset-inline: var(--m) !important; translate: none !important; width: auto; font-size: clamp(2.5rem, 11.5vw, 3.25rem) !important; line-height: 1.16 !important; letter-spacing: -.03em; }
.tt.tt-m .tt-in { display: flex; flex-wrap: wrap; align-items: baseline; gap: .12em .24em; }
.tt.tt-m .tt-o { display: none !important; }
.tt.tt-m .tt-st { padding: .02em .22em .08em; }
.tt.tt-m { margin-top: 0 !important; margin-bottom: 0 !important; }
/* Round 154: the statement line a step smaller on desktop */
@media (min-width: 721px) { .tt-line { font-size: clamp(3.25rem, 5.8vw, 6.5rem) !important; } }
