/* Site-stage visibility framework.
 *
 * The single switch is the data-stage attribute on <body>, changed only by
 * a stage-flip PR (see docs/site-stages.md for the checklist). Content
 * blocks declare the stages they belong to via a space-separated
 * data-stages list; CSS word-matching does the rest. Pure CSS on a static
 * attribute: no JS dependency, no flash of wrong-stage content, and
 * crawlers see exactly what visitors see.
 *
 * Stages (ratified 2026-09-13): pre-festival, festival-week,
 * post-festival, off-season, marketing-ramp, preorder.
 */

/* body-prefixed for specificity: page styles set display with
 * !important at equal class-level specificity and later cascade order
 * (the countdown's inline style block) -- this must outrank them. */
body [data-stages] { display: none !important; }

body[data-stage="pre-festival"] [data-stages~="pre-festival"],
body[data-stage="festival-week"] [data-stages~="festival-week"],
body[data-stage="post-festival"] [data-stages~="post-festival"],
body[data-stage="off-season"] [data-stages~="off-season"],
body[data-stage="marketing-ramp"] [data-stages~="marketing-ramp"],
body[data-stage="preorder"] [data-stages~="preorder"] {
  display: revert !important;
}

/* Elements whose display is set by an ID-selector !important rule in
 * main.css cannot be hidden by the attribute-level rules above -- they
 * need an explicit ID-level override per element. The countdown is the
 * known case; add others here if found (and note them in
 * docs/site-stages.md). */
body:not([data-stage="pre-festival"]):not([data-stage="festival-week"]) #countdown {
  display: none !important;
}
