/* The members' coming-soon page (TW #3231): the Great River Bridges closed for construction until
   November, as Steve picked it (option A, "Night closure", with his changes 1 to 8). Scoped under
   .cs because every stylesheet loads on every page. Motion is transform/opacity on small HTML
   pieces only (the compositor's job, nothing repaints at rest); prefers-reduced-motion gets the
   still picture: lamps lit, the beam hanging just above its gap, the stars still.

   The world is the 1600 x 1050 scene drawn at --cs-u px per scene unit, its foot on the screen's
   foot: at least the screen's width, at least its height. The deck is scene y 660, so 390 units
   above the foot; the river's surface is y 714, the mirror line for every reflection. Pieces that
   move (stars, the beam, its cable, the crane's light) are HTML laid over the drawing at scene
   positions (x / 16 %, y / 10.5 %). */

.cs {
  --cs-orange: #ff8a1f;
  --cs-amber: #ffb43b;
  --cs-gold: #f6b62b;
  --cs-gold-hi: #ffd36b;
  --cs-ink: #121726;
  --cs-display: "Anton", Impact, "Arial Narrow Bold", sans-serif;
  --cs-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --cs-spring: cubic-bezier(.34, 1.56, .64, 1);
  --cs-u: max(calc(100vw / 1600), calc(100vh / 1050));
  --cs-shift: 0px;
  --cs-deck: calc(390 * var(--cs-u));
  --cs-posts: clamp(96px, 18vh, 170px);
  --cs-travel: 230; /* how far the beam comes down, scene units */
}
/* Phones: the world at 2.5 screen widths, slid so the crane's tip, the gap and the beam show on the
   right; the beam comes down from just under the sign. */
@media (max-aspect-ratio: 4/5) {
  .cs { --cs-u: calc(250vw / 1600); --cs-shift: calc(-196 * var(--cs-u)); --cs-travel: 70; }
}
body.cs-body { margin: 0; background: #050d24; }
main.cs {
  position: relative; isolation: isolate; overflow: hidden; min-height: 100vh; min-height: 100svh; max-width: none; margin: 0;
  padding: 0; font-family: var(--cs-sans); color: #fff; -webkit-font-smoothing: antialiased;
}
.cs h1 { margin: 0; padding: 0; border: 0; }

/* ---------- the picture ---------- */
.cs-scene { position: absolute; inset: 0; z-index: 0; background: #050d24; }
.cs-world { position: absolute; left: 50%; bottom: 0; width: calc(1600 * var(--cs-u)); height: calc(1050 * var(--cs-u)); transform: translateX(calc(-50% + var(--cs-shift))); }
.cs-world > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cs-truss path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cs-truss--front path { stroke: #5cc29a; stroke-width: 5; }
.cs-truss--front .chord { stroke-width: 8; }
.cs-truss--back { opacity: .5; }
.cs-truss--back path { stroke: #3c9a7c; stroke-width: 3.5; }
.cs-truss--back .chord { stroke-width: 5.5; }
.cs-truss path.cs-stone { fill: #3b4660; stroke: none; }
/* the night crane, drawn once; only its light blinks */
.cs-crane-night path, .cs-crane-night rect { vector-effect: non-scaling-stroke; }
.cs-crane-night__chord { stroke: #d8a62a; stroke-width: 5; stroke-linecap: round; }
.cs-crane-night__lace { stroke: #c8971f; stroke-width: 2.5; fill: none; }
.cs-crane-night__pendant { stroke: #8d95a5; stroke-width: 1.5; fill: none; }
.cs-crane-night__cab { fill: #d8a62a; }
.cs-crane-night__weight { fill: #4b5368; }
.cs-crane-night__head { fill: #4b5368; }

/* ---------- the stage: the sign and roadblock stand on the deck, the words sit on the river ---------- */
.cs-stage {
  position: relative; z-index: 1; min-height: 100vh; min-height: 100svh; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: max(20px, env(safe-area-inset-top)) 16px 0;
}
.cs-kicker {
  position: absolute; top: max(20px, env(safe-area-inset-top)); margin: 0; display: flex; align-items: center; gap: 10px;
  font: 800 .8rem/1 var(--cs-sans); letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .85);
}
.cs-kicker__logo { height: 30px; width: auto; background: #fff; border-radius: 7px; padding: 2px; }
.cs-closure { position: relative; display: flex; flex-direction: column; align-items: center; }
.cs-below {
  position: relative; z-index: 1; box-sizing: border-box; height: var(--cs-deck); min-height: 150px;
  display: flex; align-items: center; justify-content: center; padding-block: 12px;
}
@media (max-aspect-ratio: 4/5) {
  .cs-below { align-items: flex-end; padding-bottom: max(28px, env(safe-area-inset-bottom)); }
}

/* the moon off the deck's cover (its face, the seal over it, the photo in soft-light, the glow), big in the
   upper left, clear of the sign: the room beside the sign on a desktop, above it on a phone */
.cs-moon { position: absolute; z-index: 0; left: max(16px, 3vw); top: calc(max(20px, env(safe-area-inset-top)) + 46px); width: clamp(150px, min(calc((100vw - 640px) / 2 - 60px), 46vh), 430px); aspect-ratio: 1; }
@media (max-aspect-ratio: 4/5) { .cs-moon { width: min(52vw, 22vh); } }
.cs-moon svg { position: absolute; left: 50%; top: 50%; width: calc(100% * 460 / 256); height: auto; transform: translate(-50%, -50%); overflow: visible; }
.cs-moon__seal { filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .25)); }
.cs-moon__photo { mix-blend-mode: soft-light; opacity: .95; }

/* ---------- the sign ---------- */
.cs-sign {
  display: flex; flex-direction: column; align-items: center; gap: .12em; box-sizing: border-box;
  width: min(92vw, 640px); padding: .55em .7em .6em; border-radius: 14px;
  background: var(--cs-orange); color: #111; border: 4px solid #111; outline: 6px solid var(--cs-orange); outline-offset: 0;
  box-shadow: 0 0 0 10px #111, 0 24px 50px rgba(0, 0, 0, .55);
  font: 400 clamp(1.7rem, 7.4vw, 3.6rem)/1 var(--cs-display); text-transform: uppercase; letter-spacing: .03em; text-align: center;
}
.cs-sign__line { display: block; }
.cs-sign__line--1 { font-size: 1.32em; }
.cs-sign__line--2 { font-size: .86em; letter-spacing: .06em; }
.cs-sign__line--3 { font-size: .74em; padding-top: .2em; border-top: 3px solid #111; margin-top: .12em; }
@media (max-aspect-ratio: 4/5) { .cs-sign { width: 86vw; } }

/* the sign on two posts, swinging in once */
.cs-signpost { position: relative; padding-bottom: var(--cs-posts); transform-origin: 50% 0; animation: cs-swing-in 1.6s .2s var(--cs-spring) both; }
.cs-signpost .cs-sign { position: relative; z-index: 1; }
.cs-signpost__leg { position: absolute; bottom: 0; width: 12px; height: calc(var(--cs-posts) + 34px); background: linear-gradient(90deg, #6b7280, #c4c9d2 45%, #6b7280); }
.cs-signpost__leg--left { left: 22%; }
.cs-signpost__leg--right { right: 22%; }
@keyframes cs-swing-in {
  0% { transform: translateY(-40px) rotate(-5deg); opacity: 0; }
  35% { opacity: 1; }
  60% { transform: rotate(2deg); }
  80% { transform: rotate(-1deg); }
  100% { transform: none; }
}

/* ---------- barricade, lamps, cones, detour ---------- */
.cs-barricade { position: relative; width: clamp(180px, 46vw, 340px); height: clamp(84px, 18vw, 128px); flex: none; }
.cs-barricade__rail {
  position: absolute; left: 0; right: 0; z-index: 1; height: 18%; border-radius: 3px; box-shadow: 0 3px 0 rgba(0, 0, 0, .3);
  background: repeating-linear-gradient(-45deg, var(--cs-orange) 0 16px, #fff 16px 32px);
}
.cs-barricade__rail:nth-of-type(3) { top: 14%; }
.cs-barricade__rail:nth-of-type(4) { top: 40%; }
.cs-barricade__rail:nth-of-type(5) { top: 66%; }
.cs-barricade__leg { position: absolute; top: 4%; bottom: 0; width: 7%; background: #d7dbe2; border-radius: 2px; }
.cs-barricade__leg--left { left: 12%; }
.cs-barricade__leg--right { right: 12%; }
/* each lamp: a housing, and its light (the <i>) that blinks with opacity only */
.cs-lamp { position: absolute; z-index: 2; top: calc(14% - 20px); width: 22px; height: 22px; border-radius: 50%; background: #5a3a08; border: 3px solid #222; }
.cs-lamp--left { left: 4%; }
.cs-lamp--right { right: 4%; }
.cs-lamp i {
  position: absolute; inset: -18px; border-radius: 50%; will-change: opacity;
  background: radial-gradient(circle, #fff3c4 0 18%, var(--cs-amber) 26%, rgba(255, 180, 59, .35) 42%, rgba(255, 180, 59, 0) 70%);
  animation: cs-blink 1.1s steps(1, end) infinite;
}
.cs-lamp--right i { animation-delay: .55s; }
@keyframes cs-blink { 0% { opacity: 1; } 50% { opacity: .08; } }

.cs-cone { width: clamp(34px, 8vw, 54px); height: auto; flex: none; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .35)); }
.cs-roadblock { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: clamp(8px, 2vw, 20px); margin-top: -78px; }
.cs-detour {
  display: inline-flex; align-items: center; gap: 6px; align-self: center; padding: 8px 12px; border-radius: 6px; flex: none;
  background: var(--cs-orange); color: #111; border: 3px solid #111; text-decoration: none;
  font: 400 clamp(1rem, 3vw, 1.3rem)/1 var(--cs-display); text-transform: uppercase; letter-spacing: .06em;
  transform: rotate(-4deg); transition: transform .25s var(--cs-spring);
}
.cs-detour svg { width: 30px; height: 15px; }
.cs-detour:hover { transform: rotate(0) translateX(4px); }
@media (max-width: 520px) {
  .cs-detour { display: none; } /* the gold button says it on a phone */
}

/* the reflection of the closure: the same pieces, mirrored about the river's surface, fading down */
/* (the fade is on the unflipped wrapper, so "top" is the water line: strongest at the feet) */
.cs-closure__reflection {
  position: absolute; left: 0; right: 0; top: calc(100% + 108 * var(--cs-u)); height: 100%; opacity: .4; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, .3) 35%, transparent 62%); mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, .3) 35%, transparent 62%);
}
.cs-closure__mirror { height: 100%; display: flex; flex-direction: column; align-items: center; transform: scaleY(-1); }
.cs-closure__reflection .cs-sign { box-shadow: 0 0 0 10px #111; }

/* ---------- the greeting and buttons, on a dark pane over the river so the reflections never run through the words ---------- */
.cs-copy {
  display: flex; flex-direction: column; align-items: center; gap: 18px; max-width: 34rem; text-align: center;
  padding: 14px 22px 18px; border-radius: 20px; background: rgba(4, 11, 31, .78); backdrop-filter: blur(6px); box-shadow: 0 0 36px 18px rgba(4, 11, 31, .45);
}
.cs-line { margin: 0; font-size: clamp(1.02rem, 2.4vw, 1.2rem); line-height: 1.5; color: rgba(255, 255, 255, .92); text-wrap: balance; }
.cs-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.cs-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .75em 1.4em; box-sizing: border-box;
  border: 2px solid transparent; border-radius: 999px; font: 700 1rem/1 var(--cs-sans); text-decoration: none; cursor: pointer;
  transition: transform .25s var(--cs-spring), background .25s;
}
.cs-btn:hover { transform: translateY(-3px) rotate(-1deg); }
.cs-btn:focus-visible, .cs-detour:focus-visible { outline: 3px solid var(--cs-gold-hi); outline-offset: 3px; }
.cs-btn--gold { background: var(--cs-gold); color: var(--cs-ink); box-shadow: 0 8px 24px rgba(246, 182, 43, .35); }
.cs-btn--gold:hover { background: var(--cs-gold-hi); }
.cs-btn--ghost { border-color: rgba(255, 255, 255, .6); color: #fff; background: rgba(255, 255, 255, .08); backdrop-filter: blur(4px); }
.cs-btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .16); }
.cs-btn--small { min-height: 44px; padding: .6em 1.15em; font-size: .92rem; }
/* the way into Steve's Auction Presentation (TW #4605, Steve's pick A): one big gold button, its name under it */
.cs-btn--watch { gap: .55em; min-height: 60px; padding: .9em 1.8em; font-size: 1.2rem; font-weight: 800; }
.cs-btn--watch svg { width: 1.05em; height: 1.05em; }
.cs-watch-note { margin: -8px 0 0; font-size: .9rem; color: rgba(255, 255, 255, .78); }
.cs-watch-note__about::before { content: " · "; }
@media (max-aspect-ratio: 4/5) {
  .cs-copy { padding: 12px 10px 14px; gap: 14px; }
  .cs-actions { flex-wrap: nowrap; gap: 10px; }
  .cs-btn { padding-inline: 1.05em; }
  .cs-btn--watch { width: 100%; }
  .cs-watch-note__about { display: block; }
  .cs-watch-note__about::before { content: none; }
  /* the pane is taller with the button, so on a phone the whole picture rises with the deck, and the barricade
     still stands on it above the pane */
  .cs:has(.cs-btn--watch) { --cs-lift: 78px; }
  .cs:has(.cs-btn--watch) .cs-world { bottom: var(--cs-lift); }
  .cs:has(.cs-btn--watch) .cs-below { height: calc(var(--cs-deck) + var(--cs-lift)); }
}

/* the crane at work: a beam comes down on a cable that pays out, seats in the gap (x 1208 to 1276),
   holds, and (faded out while seated) starts again. The cable runs from the boom tip (y 90) to the
   slings' top, y 468 when seated; --cs-travel is how far the beam comes down (scene units): a long way
   on a desktop, on a phone just from under the sign. Transform and opacity only. */
.cs-rig { position: absolute; }
.cs-cable {
  left: calc(1242% / 16); top: calc(90% / 10.5); width: max(2px, calc(2.4 * var(--cs-u))); height: calc(378% / 10.5); margin-left: max(-1px, calc(-1.2 * var(--cs-u)));
  background: #c9cdd6; transform-origin: 50% 0; --cs-from: calc((378 - var(--cs-travel)) / 378); animation: cs-pay-out 16s 1s linear infinite both;
}
.cs-beam { left: calc(1208% / 16); top: calc(468% / 10.5); width: calc(68% / 16); height: calc(26% / 10.5); animation: cs-lower 16s 1s linear infinite both; }
.cs-beam svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cs-beam.cs-rig--mirror { top: calc(934% / 10.5); animation-name: cs-lower-mirror; } /* the beam's reflection, mirrored */
.cs-beam.cs-rig--mirror svg { transform: scaleY(-1); opacity: .3; }
.cs-crane-light { left: calc(1243% / 16); top: calc(78% / 10.5); width: max(6px, calc(9 * var(--cs-u))); aspect-ratio: 1; border-radius: 50%; translate: -50% -50%; background: radial-gradient(circle, #fff 0 25%, #ff3b3b 40%, rgba(255, 59, 59, 0) 72%); box-shadow: 0 0 calc(18 * var(--cs-u)) calc(6 * var(--cs-u)) rgba(255, 50, 50, .45); will-change: opacity; animation: cs-blink 1.6s steps(1, end) infinite; }
@keyframes cs-pay-out {
  0% { transform: scaleY(var(--cs-from)); opacity: 0; }
  5% { opacity: 1; }
  10% { transform: scaleY(var(--cs-from)); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  66% { transform: scaleY(1); }
  86% { transform: scaleY(1); opacity: 1; }
  93%, 100% { transform: scaleY(1); opacity: 0; }
}
@keyframes cs-lower {
  0% { transform: translateY(calc(-1 * var(--cs-travel) * var(--cs-u))); opacity: 0; }
  5% { opacity: 1; }
  10% { transform: translateY(calc(-1 * var(--cs-travel) * var(--cs-u))); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  66% { transform: none; }
  86% { transform: none; opacity: 1; }
  93%, 100% { transform: none; opacity: 0; }
}
@keyframes cs-lower-mirror {
  0% { transform: translateY(calc(var(--cs-travel) * var(--cs-u))); opacity: 0; }
  5% { opacity: 1; }
  10% { transform: translateY(calc(var(--cs-travel) * var(--cs-u))); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  66% { transform: none; }
  86% { transform: none; opacity: 1; }
  93%, 100% { transform: none; opacity: 0; }
}

/* twinkling stars (Steve's item 8): gentle, staggered, opacity and a touch of scale only */
.cs-twinkle {
  position: absolute; width: max(2px, calc(var(--cs-tw-s) * var(--cs-u))); aspect-ratio: 1; border-radius: 50%; translate: -50% -50%;
  background: #fff; box-shadow: 0 0 calc(var(--cs-tw-s) * 2 * var(--cs-u)) rgba(255, 255, 255, .7); will-change: opacity, transform;
  animation: cs-twinkle 4s ease-in-out infinite alternate;
}
@keyframes cs-twinkle { from { opacity: .95; transform: scale(1); } to { opacity: .2; transform: scale(.7); } }

@media (prefers-reduced-motion: reduce) {
  .cs *, .cs *::before, .cs *::after { animation: none !important; transition: none !important; }
  /* the still picture: the beam hanging just above its gap */
  .cs .cs-cable { transform: scaleY(calc(358 / 378)); opacity: 1; }
  .cs .cs-beam { transform: translateY(calc(-20 * var(--cs-u))); opacity: 1; }
  .cs .cs-beam.cs-rig--mirror { transform: translateY(calc(20 * var(--cs-u))); }
}
