/* Inside the magazine: after the cover the camera pulls back on the dark, then the page warms to
   paper and the four cover lines settle beside the picture. Loaded last. --warm runs 0 to 1. */
.sticky { display:block; background:color-mix(in srgb, var(--bg) calc(var(--warm, 0) * 100%), #1b1411); }
.view { position:absolute; inset:0; z-index:1; }
#frames { transform:none; }                       /* the picture is mirrored as it is drawn */
.side { position:absolute; z-index:2; top:0; bottom:0; left:50%; right:0; display:flex; align-items:center; max-width:none; width:auto; padding:48px clamp(24px,4vw,64px) 0; pointer-events:none; }
.live, .at-hero .live { width:100%; max-width:520px; opacity:var(--words, 0); visibility:visible; transition:none; }

.caption { display:none; }
.steps { display:block; list-style:none; margin-bottom:clamp(20px,5vh,48px); }
.steps li { position:relative; padding:clamp(7px,1.3vh,14px) 0; border-top:2px solid var(--line); font-family:var(--display); font-size:clamp(28px,min(3.7vw,6.2vh),56px); line-height:1.02; letter-spacing:.02em; color:var(--text); opacity:.22; transition:opacity .35s ease, color .35s ease, border-color .35s ease; }
.steps li::before { display:none; }
.steps li.on { opacity:1; color:var(--accent); border-top-color:var(--accent); }

/* the numbers and plot, printed straight on the page */
.panel { background:none; border:0; box-shadow:none; backdrop-filter:none; padding:0; border-radius:0; }
.stats { display:flex; align-items:flex-end; gap:clamp(22px,3vw,44px); text-align:left; margin-bottom:6px; }
.stats small { font-size:10px; letter-spacing:.16em; }
.stats strong { font-family:var(--display); font-weight:400; font-size:clamp(44px,min(5vw,9vh),76px); line-height:1; gap:8px; }
.stats div:last-child { margin-left:auto; text-align:right; }
.stats div:last-child strong { font-size:clamp(28px,min(2.8vw,5vh),42px); color:var(--muted); }
canvas.plot { height:min(220px,26vh); }
.sets { display:none; }

.pull, .reset { left:25%; }
.pull, .reset { bottom:20px; }

/* the bar sits on the dark pages and on the paper ones */
nav { background:rgba(247,244,239,.94); }
.dark nav { background:transparent; backdrop-filter:none; color:#fff; }
.dark nav .join { background:var(--bg); color:var(--text); }
.dark nav .join:hover { background:var(--accent); color:#fff; }

/* back cover */
.back { position:relative; height:100vh; height:100dvh; min-height:620px; overflow:hidden; background:#1b1411; color:#fff; }
.back .shot { position:absolute; left:0; top:0; width:100%; height:100%; object-fit:cover; pointer-events:none; user-select:none; }
.back .led { animation:pair 1.4s ease-in-out infinite; }
.back::after { content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(rgba(14,9,7,.5), transparent 20%, transparent 48%, rgba(14,9,7,.88)); }
.back .front h2 { font-family:var(--display); font-weight:400; font-size:clamp(38px, min(5vw, 10vh), 82px); line-height:.94; letter-spacing:.02em; text-shadow:0 2px 18px rgba(0,0,0,.6); }
.back .front h2 em { font-style:normal; color:#ff7a52; }
.back .act p { font-size:15px; color:rgba(255,255,255,.82); text-align:right; }
.back .act .joined { color:#fff; }
.back .act .stores { justify-content:flex-end; }
/* the footer sits on the foot of the back cover, so the whole cover shows at the end of the page */
.back .front { bottom:92px; }
footer { position:relative; z-index:3; height:72px; margin:-72px 0 0; max-width:none; padding:0 28px; background:#1b1411; color:#fff; border-top:1px solid rgba(255,255,255,.14); }
footer small, footer .tbc { color:rgba(255,255,255,.62); }
footer em { font-style:normal; color:var(--accent); }
footer a { color:inherit; text-underline-offset:3px; }
footer a:hover { color:var(--accent); }
@media (prefers-reduced-motion:reduce) { .back .led { animation:none; opacity:.55; } }
/* both covers face the same way as the mirrored scroll pictures (the masthead is not flipped) */
.cover .shot, .back .shot { transform:scaleX(-1); }

@media (max-width:820px) {
  .side { left:0; display:block; padding:0; }
  .live, .at-hero .live { max-width:none; position:absolute; inset:0; display:flex; flex-direction:column; justify-content:flex-start; gap:6px; padding:52px 18px 0; }
  .steps { margin:0; padding:0; }
  .steps li { padding:3px 0; border-top:0; font-size:clamp(22px,min(7.4vw,4.2vh),34px); }
  .steps li.on { border-top:0; }
  /* the numbers and plot: a small card in the picture's top right corner */
  .panel { position:absolute; top:var(--card-top, 40%); right:8px; width:min(164px,43vw); margin:0; padding:6px 6px 3px; border:1px solid var(--line); border-radius:12px; background:rgba(253,250,246,.84); backdrop-filter:blur(10px); }
  .stats { display:grid; grid-template-columns:repeat(3,1fr); gap:2px; margin:0; text-align:center; align-items:end; }
  .stats small { font-size:7px; letter-spacing:.06em; }
  .stats strong, .stats div:last-child strong { font-family:inherit; font-weight:700; font-size:14px; gap:2px; color:var(--text); }
  .stats div:last-child { margin:0; text-align:center; }
  canvas.plot { height:58px; }
  .pull, .reset { left:50%; bottom:calc(14px + env(safe-area-inset-bottom)); }
  .back .act p { text-align:center; }
  .back .act .stores { justify-content:center; }
  .back .shot { height:66%; }
  .back::after { background:linear-gradient(rgba(14,9,7,.45), transparent 16%, transparent 42%, #1b1411 66%); }
  .back .front { bottom:84px; }
  footer { height:70px; margin-top:-70px; padding:0 14px; justify-content:center; align-content:center; gap:6px; text-align:center; font-size:12px; }
  footer b { display:none; }
  footer ul { width:100%; justify-content:center; font-size:12px; }
}
