/* Peach live board: pre-opening countdown (2026-11-26, v3 "ribbon and dots", after Max's review). Scoped under
   .cd-root. Navy with the board's paper grain, no text while it counts: the board's infinity ribbon is the largest thing
   in the middle (.cd-orb, window.PeachOrb) and the time left sits under it as small dot-matrix figures (.cd-timer).
   Two sizes drive it, so it fits a 360 px phone and a 4K TV without scrolling:
     --cd-rw  the ribbon's width   min(82vw, 80vh) (the orb draws the ribbon about 1.03 times this wide)
     --cd-tw  the timer's width    min(60vw, 40vh), never wider than the ribbon
   The timer is a canvas with a fixed aspect ratio (set from its dot columns), so its box never changes size while it
   counts. At midnight (data-state="zero") the ribbon and timer fade out and one welcome line fades in; a cover that
   starts at zero shows the welcome line at once. A gated page ships this markup in its HTML (wordpress/gate.html). */
.cd-root{
  --cd-night:#0b0c2a;
  --cd-rw:min(82vw, 80vh); --cd-rw:min(82vw, 80dvh);
  --cd-tw:min(60vw, 40vh, var(--cd-rw)); --cd-tw:min(60vw, 40dvh, var(--cd-rw));
  position:fixed;inset:0;z-index:65;overflow:hidden;
  background:var(--cd-night);color:#FCF8F8;color-scheme:dark;
  contain:strict;
}
/* the board's paper grain, very faint */
.cd-root::before{content:"";position:absolute;inset:0;pointer-events:none;background:url(assets/paper-noise.png);background-size:240px;opacity:.05;mix-blend-mode:overlay}
.cd-root.cd-ghost{z-index:66;pointer-events:none}
/* the ribbon and the timer as one centred column, a touch above the middle */
.cd-stage{position:absolute;left:50%;top:47%;transform:translate(-50%,-50%);
  display:flex;flex-direction:column;align-items:center;gap:calc(var(--cd-rw) * .07);pointer-events:none;
  transition:opacity 1.1s cubic-bezier(.33,1,.68,1) .7s}
.cd-ribbon{position:relative;width:var(--cd-rw);height:calc(var(--cd-rw) * .34)}
/* the orb draws the ribbon at about .81 of its canvas height, so its canvas is bigger than the ribbon's slot */
.cd-orb{position:absolute;left:50%;top:50%;width:calc(var(--cd-rw) * 1.6);height:calc(var(--cd-rw) * 1.27);
  transform:translate(-50%,-50%);opacity:0;transition:opacity 1.4s cubic-bezier(.33,1,.68,1)}
.cd-orb-on .cd-orb{opacity:1}
/* no WebGL: PeachOrb's static ring (40% of its box wide) sits inside the ribbon's slot */
.cd-orb-flat .cd-orb{width:calc(var(--cd-rw) * .8);height:calc(var(--cd-rw) * .34)}
.cd-timer{display:block;width:var(--cd-tw);aspect-ratio:114 / 19;height:auto}
/* midnight: one line, large and light, in the board's display face */
.cd-welcome{position:absolute;left:50%;top:50%;transform:translate(-50%,calc(-50% + 8px));width:min(88vw, 30em);
  display:flex;flex-direction:column;align-items:center;gap:max(16px, 1.1em);text-align:center;pointer-events:none;
  font-family:"Sora",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;font-weight:200;
  font-size:clamp(24px, 3.3vw, 7.5vh);line-height:1.18;letter-spacing:-.02em;color:#FCF8F8;
  opacity:0;visibility:hidden;transition:opacity 1.2s cubic-bezier(.33,1,.68,1), transform 1.4s cubic-bezier(.16,1,.3,1), visibility 0s 1.4s}
.cd-welcome p{margin:0;text-wrap:balance}
.cd-welcome-dot{width:max(7px, .2em);height:max(7px, .2em);border-radius:50%;background:#EC5228;box-shadow:0 0 0 max(4px, .1em) rgba(236,82,40,.18)}
.cd-root[data-state="zero"] .cd-stage{opacity:0}
.cd-root[data-state="zero"] .cd-welcome{opacity:1;visibility:visible;transform:translate(-50%,-50%);
  transition:opacity 1.2s cubic-bezier(.33,1,.68,1) 1.5s, transform 1.6s cubic-bezier(.16,1,.3,1) 1.5s, visibility 0s 1.5s}
.cd-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
/* phones in landscape and other short screens: the column tightens */
@media (max-height:480px){ .cd-stage{gap:calc(var(--cd-rw) * .045)} }
@media (prefers-reduced-motion: reduce){
  .cd-orb{transition:opacity .3s linear}
  .cd-stage{transition:opacity .3s linear .2s}
  .cd-welcome,.cd-root[data-state="zero"] .cd-welcome{transform:translate(-50%,-50%);transition:opacity .4s linear .4s, visibility 0s .4s}
}
