/* The wall of windows. Without its script (or with reduced motion) it is a plain section: the
   statements stacked, and the wall standing with every window answered. */
.wallstory { position: relative; border-bottom: 1px solid var(--edge); }
.wallstory .beat { text-align: center; padding: 26px 24px; }
.wallstory .beat h2 { font-size: clamp(32px, 4vw, 56px); letter-spacing: -.04em; line-height: 1.04; }
.wallstory .beat h2 em { font-style: normal; color: var(--ember); }
.wallstory .beat p { color: #9aa6b2; font-size: clamp(15px, 1.3vw, 18px); margin-top: 12px; }
.wallstory .beat .cta { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.wallstory .story-meta, .wallstory .wkey, .wallstory .wring { display: none; }
.wallstory .stagebox { position: relative; width: min(1180px, 94vw); margin: 20px auto 80px; }

.wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; will-change: transform; }
.win { border: 1px solid var(--edge); border-radius: 10px; background: #080c10; overflow: hidden; transition: border-color .5s, box-shadow .5s; }
.win-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--edge); font-size: 12.5px; color: #8b96a1; }
.win-bar .who { position: relative; height: 1.4em; flex: 1; }
.win-bar .who span { position: absolute; left: 0; top: 0; white-space: nowrap; transition: opacity .4s; }
.win-bar .who .ours { opacity: 0; color: var(--ink); font-weight: 600; }
.win .chip { font: 500 11.5px var(--sans); padding: 2px 8px; border-radius: 5px; opacity: 0; transition: opacity .3s, color .4s, background .4s; color: #ff9d92; background: rgba(255, 110, 96, .12); }
.win.refused .chip { opacity: 1; }
.win-body { padding: 14px; display: grid; gap: 10px; min-height: 118px; align-content: start; font-size: 13.5px; }
.win .ask { justify-self: end; max-width: 88%; background: #141a20; border-radius: 9px 9px 2px 9px; padding: 8px 12px; color: var(--ink); min-height: 1.5em; }
.win .reply { position: relative; min-height: 2.9em; line-height: 1.45; }
.win .reply span { position: absolute; left: 0; top: 0; right: 0; transition: opacity .45s, transform .45s; }
.win .no { color: #8b96a1; }
.win .yes-text { color: #dfe6ee; opacity: 0; transform: translateY(6px); }
/* answered */
.win.yes { border-color: rgba(255, 110, 50, .55); box-shadow: 0 0 40px -18px rgba(255, 100, 40, .55); }
.win.yes .who .theirs { opacity: 0; }
.win.yes .who .ours { opacity: 1; }
.win.yes .chip { color: #8fdcae; background: rgba(111, 214, 160, .1); opacity: 1; }
.win.yes .chip .a { display: none; }
.win:not(.yes) .chip .b { display: none; }
.win.yes .no { opacity: 0; transform: translateY(-6px); text-decoration: line-through; }
.win.yes .yes-text { opacity: 1; transform: none; }

/* pinned */
/* on a tall window the heading and the wall stay together as one block in the middle, with no gap opening between them */
.wallstory.on { height: 420vh; --lift: max(0px, calc((100vh - 900px) / 2)); }
.wallstory.on .pin { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.wallstory.on .beat { position: absolute; left: 0; right: 0; top: var(--lift); padding: clamp(70px, 9vh, 104px) 24px 0; z-index: 5; opacity: 0; will-change: opacity, transform; }
.wallstory.on .pin::before { content: ""; position: absolute; inset: 0 0 auto 0; height: calc(var(--lift) + 250px); z-index: 4; pointer-events: none; background: linear-gradient(180deg, var(--bg) 55%, rgba(5, 8, 11, 0)); }
.wallstory.on .stagebox { position: absolute; left: 50%; top: calc(var(--lift) + min(58vh, 522px)); transform: translate(-50%, -50%); margin: 0; }
.wallstory.on .win { opacity: 0; will-change: opacity, transform; }
.wallstory.on .wkey { display: flex; position: absolute; left: 50%; top: calc(100% + 26px); z-index: 3; align-items: center; gap: 10px; padding: 9px 14px 9px 10px; border-radius: 8px; background: #0b1015; border: 1px solid rgba(255, 110, 50, .5); font: 400 12.5px var(--mono); color: #dfe6ee; opacity: 0; box-shadow: 0 0 40px -10px rgba(255, 100, 40, .6); white-space: nowrap; }
.wallstory.on .wkey .orb { width: 16px; height: 16px; }
.wallstory.on .wring { display: block; position: absolute; left: 50%; top: calc(100% + 44px); width: 0; height: 0; transform: translate(-50%, -50%); border-radius: 50%; border: 1.5px solid rgba(255, 140, 70, .9); box-shadow: 0 0 60px 6px rgba(255, 100, 40, .25), inset 0 0 60px 6px rgba(255, 100, 40, .12); opacity: 0; pointer-events: none; z-index: 2; }
.wallstory.on .story-meta { display: flex; position: absolute; left: 28px; bottom: 24px; z-index: 6; align-items: center; gap: 16px; font: 400 12.5px var(--mono); color: var(--mute); }
.wallstory.on .story-meta .track { width: 160px; height: 2px; background: rgba(255, 255, 255, .12); border-radius: 2px; overflow: hidden; }
.wallstory.on .story-meta .track i { display: block; height: 100%; background: var(--ember); transform-origin: 0 50%; transform: scaleX(0); }
@media (max-height: 760px) { .wallstory.on .win-body { min-height: 96px; padding: 11px 12px; font-size: 12.5px; } .wallstory.on .stagebox { top: 60vh; } }
@media (max-width: 860px) { .wall { grid-template-columns: repeat(2, 1fr); gap: 10px; } .win:nth-child(n+7) { display: none; } .win-body { font-size: 12px; min-height: 104px; } }

/* The break, made loud (28 Nov 2026): the wave is a thick lit shock front with a second one behind it, the
   stage fills with ember light from the key, each window jumps and flares as the front reaches it, the
   refusal is struck out in ember before the answer comes up, and the "no" in the heading is struck through. */
.wallstory.on .wring { border: 2px solid rgba(255, 170, 110, .95); background: radial-gradient(closest-side, rgba(255, 110, 40, 0) 70%, rgba(255, 110, 40, .1) 88%, rgba(255, 160, 90, .3) 100%); box-shadow: 0 0 0 10px rgba(255, 110, 50, .07), 0 0 110px 22px rgba(255, 100, 40, .5), inset 0 0 110px 22px rgba(255, 100, 40, .24); }
.wallstory .wring2, .wallstory .wglow { display: none; }
.wallstory.on .wring2 { display: block; position: absolute; left: 50%; top: calc(100% + 44px); width: 0; height: 0; transform: translate(-50%, -50%); border-radius: 50%; border: 1px solid rgba(255, 140, 70, .55); box-shadow: 0 0 50px 4px rgba(255, 100, 40, .22); opacity: 0; pointer-events: none; z-index: 2; }
.wallstory.on .wglow { display: block; position: absolute; left: 50%; top: calc(100% + 44px); width: 190%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 110, 40, .34), rgba(255, 90, 30, .13) 42%, rgba(255, 90, 30, 0) 72%); opacity: 0; pointer-events: none; z-index: 0; }
.wallstory.on .wall { position: relative; z-index: 1; }
.wallstory.on .wkey { transition: box-shadow .5s, border-color .5s; }
.wallstory.on.broke .wkey { border-color: rgba(255, 170, 110, .95); box-shadow: 0 0 70px -4px rgba(255, 110, 40, .95), 0 0 0 1px rgba(255, 150, 90, .35); }

.win { position: relative; }
.win::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(120% 90% at 50% 110%, rgba(255, 150, 80, .5), rgba(255, 100, 40, .16) 55%, rgba(255, 100, 40, 0) 80%); opacity: 0; pointer-events: none; }
.wallstory.on .win.yes { background: #0c1116; border-color: rgba(255, 130, 70, .7); box-shadow: 0 0 54px -14px rgba(255, 100, 40, .75), inset 0 0 0 1px rgba(255, 140, 80, .1); animation: winhit .85s cubic-bezier(.2, .7, .2, 1); }
.wallstory.on .win.yes::after { animation: winflare 1s ease-out; }
.wallstory.on .win.yes .win-bar { border-bottom-color: rgba(255, 130, 70, .28); }
.wallstory.on .win.yes .who .ours { color: #fff; }
.wallstory.on .win.yes .no { text-decoration-color: var(--ember); text-decoration-thickness: 2px; color: #ffb48a; transition: opacity .35s .3s, transform .35s .3s, color .2s; }
.wallstory.on .win.yes .yes-text { color: #fff; transition: opacity .45s .4s, transform .45s .4s; }
.wallstory.on .win.yes .chip { animation: chippop .5s .15s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes winhit { 0% { transform: scale(.975); border-color: #ffd0a8; box-shadow: 0 0 90px 0 rgba(255, 130, 60, .95); } 40% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes winflare { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes chippop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }

.wallstory .beat h2 em { position: relative; display: inline-block; }
.wallstory .beat h2 em::after { content: ""; position: absolute; left: -6%; right: -6%; top: 56%; height: .1em; border-radius: 2px; background: #fff; box-shadow: 0 0 22px 2px rgba(255, 110, 40, .9); transform: scaleX(var(--broke, 0)) rotate(-4deg); transform-origin: 0 50%; }
.wallstory:not(.on) .beat h2 em::after { transform: scaleX(1) rotate(-4deg); }

/* Fire at the foot of the stage, and the refusal burning red (28 Nov 2026): a refused window is lit red from below,
   with a red edge and a red chip, until the key turns it. */
.wallstory .wfire { display: none; }
.wallstory.on .wfire { display: block; position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 78vh; z-index: 0; pointer-events: none; -webkit-mask-image: linear-gradient(0deg, #000 35%, rgba(0, 0, 0, 0) 100%); mask-image: linear-gradient(0deg, #000 35%, rgba(0, 0, 0, 0) 100%); }
.wallstory.on .wfire.flat { background: radial-gradient(80% 70% at 50% 110%, rgba(230, 40, 20, .5), rgba(200, 30, 10, .16) 50%, rgba(200, 30, 10, 0) 78%); }
.wallstory.on .stagebox { z-index: 1; }
.wallstory.on .win.refused:not(.yes) { border-color: rgba(255, 70, 45, .6); background: linear-gradient(0deg, rgba(120, 14, 6, .5), rgba(60, 8, 4, .12) 60%, rgba(8, 12, 16, 0)) #080c10; box-shadow: 0 0 60px -14px rgba(255, 50, 25, .7), 0 30px 80px -30px rgba(255, 60, 20, .5); }
.wallstory.on .win.refused:not(.yes) .win-bar { border-bottom-color: rgba(255, 70, 45, .3); }
.wallstory.on .win.refused:not(.yes) .chip { color: #fff; background: #d92a17; box-shadow: 0 0 18px rgba(255, 60, 30, .7); }
.wallstory.on .win.refused:not(.yes) .no { color: #ff9a86; }

/* Phones (28 Nov 2026, Hunter: "mobile looks shit"): four windows, not six, the close-up one among them; the heading in
   its own space above them; labels that clip instead of running under the chip; type sized for a phone. */
@media (max-width: 640px) {
  .wall { gap: 8px; }
  .win:nth-child(-n+2), .win:nth-child(n+7) { display: none; }
  .win-bar { padding: 7px 9px; font-size: 11px; gap: 6px; }
  .win-bar .who { min-width: 0; overflow: hidden; }
  .win-bar .who span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .win .chip { font-size: 10.5px; padding: 2px 6px; flex: none; }
  .win-body { padding: 10px; gap: 8px; min-height: 0; font-size: 12.5px; line-height: 1.4; }
  .win .ask { max-width: 100%; padding: 7px 9px; }
  .win .reply { min-height: 3.6em; }
  .wallstory .beat { padding-left: 18px; padding-right: 18px; }
  .wallstory .beat h2 { font-size: clamp(26px, 7.4vw, 34px); }
  .wallstory .beat p { font-size: 14.5px; }
  .wallstory.on .beat { padding-top: 64px; }
  .wallstory.on .pin::before { height: calc(var(--lift) + 300px); }
  .wallstory.on .stagebox { top: calc(var(--lift) + 64vh); width: calc(100vw - 24px); }
  .wallstory.on .wkey { top: calc(100% + 18px); }
}
@media (max-width: 640px) and (max-height: 760px) { .wallstory.on .stagebox { top: calc(var(--lift) + 66vh); } .win-body { font-size: 12px; } }
