/* Sparkles Bollywood School of Dance: shared design system. Page-specific rules go in each page's own stylesheet. */

/* TOKENS: use these custom properties; never raw hex, never px. --line is the 3px ink border. */
:root {
  --ground: #F54BA2;
  --ink: #260E23;
  --accent: #253CFF;
  --on-accent: #FFFFFF;
  --display: 'Zilla Slab', Rockwell, 'Roboto Slab', Georgia, serif;
  --text: 'Barlow Semi Condensed', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --line: .1875rem;
  --gutter: clamp(.625rem, 1.4vw, 1.125rem);
  --pad: clamp(1rem, 2.2vw, 1.75rem);
  --edge: clamp(.75rem, 3vw, 2.5rem);
  --max: 90rem;
  --fs-body: 1.1875rem;
  --fs-small: 1.0625rem;
  --fs-lead: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
  --fs-h1: clamp(2.125rem, 1.3rem + 3.6vw, 3.5rem);
  --fs-h2: clamp(1.625rem, 1.3rem + 1.6vw, 2.5rem);
  --fs-h3: clamp(1.375rem, 1.2rem + .7vw, 1.75rem);
  --fs-row: clamp(1.5rem, 1.1rem + 2vw, 2.75rem);
  --fs-num: clamp(2.75rem, 1.6rem + 5vw, 5.5rem);
  --ease: cubic-bezier(.16, .6, .2, 1);
  --slow: .8s;
  --quick: .28s;
}

/* BASE: pink ground everywhere, ink text, Barlow at reading size. Only weight 400 exists. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--fs-body)/1.5 var(--text);
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
p + p { margin-top: .9em; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 1rem; }
::selection { background: var(--accent); color: var(--on-accent); }
b, strong { font-weight: 400; background: var(--ink); color: var(--ground); padding: 0 .25em; }

/* HEADLINES: Zilla Slab italic 400, sentence case. Plain h1/h2/h3, or .h1 .h2 .h3 on any element. */
h1, h2, h3, h4, .h1, .h2, .h3 {
  margin: 0;
  font: italic 400 var(--fs-h2)/1.14 var(--display);
  letter-spacing: 0;
  text-wrap: balance;
}
h1, .h1 { font-size: var(--fs-h1); line-height: 1.1; }
h3, .h3 { font-size: var(--fs-h3); line-height: 1.2; }
h4 { font-size: 1.25rem; line-height: 1.25; }

/* LINKS: underlined in running text; .link-quiet underlines only on hover and focus (menu rows). */
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .16em; }
.link-quiet { text-decoration: none; }
.link-quiet:hover, .link-quiet:focus-visible { text-decoration: underline; }
:focus-visible { outline: .25rem solid var(--accent); outline-offset: .1875rem; }

/* TEXT LINK BUTTON: a <button> that reads as an underlined link, 44px tall. Class .textlink */
.textlink {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
  cursor: pointer;
}
.textlink:hover { text-decoration-thickness: .16em; }

/* BUTTON: the square-cornered rectangle. .btn is solid ink, .btn--line is outlined; both turn blue on hover/focus. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.875rem;
  padding: .5rem 1.125rem;
  border: var(--line) solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--ground);
  font: inherit;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--quick) var(--ease), border-color var(--quick) var(--ease), color var(--quick) var(--ease);
}
.btn--line { background: var(--ground); color: var(--ink); }
.btn:hover, .btn:focus-visible { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* UTILITIES: .wrap is the page column; .section is vertical rhythm; .visually-hidden; .rule is a 3px ink line. */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--edge); }
.section { padding-block: clamp(1.75rem, 4.5vw, 4rem); }
.section > h2 { margin-bottom: clamp(1rem, 2vw, 1.5rem); }
.rule { margin: 0; border: 0; border-top: var(--line) solid var(--ink); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* SKIP LINK: .skip, first element in body. */
.skip {
  position: absolute; left: var(--edge); top: .5rem; z-index: 60;
  padding: .625rem 1rem;
  background: var(--accent); color: var(--on-accent);
  transform: translateY(-300%);
}
.skip:focus { transform: none; outline-color: var(--ink); }

/* MASTHEAD: mark and full school name at the upper left, no bar. .masthead carries id="board". .brand .brand__mark .brand__name */
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem var(--gutter);
  padding-block: clamp(.75rem, 2vw, 1.25rem);
}
.brand {
  display: inline-flex;
  flex: 1 1 12rem;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  min-height: 2.75rem;
  line-height: 1.15;
  text-decoration: none;
}
.brand__mark { flex: none; width: 3.25rem; height: auto; }
.brand__name { min-width: 0; }
.brand:hover .brand__name, .brand:focus-visible .brand__name { text-decoration: underline; }

/* PAGE INDEX: a small rectangle ("All pages") that opens five numbered rows in flow. .pages-toggle, .pages, .pages__n */
.pages-toggle {
  display: none;
  align-items: center;
  min-height: 2.75rem;
  padding: .375rem .875rem;
  border: var(--line) solid var(--ink);
  border-radius: 0;
  background: var(--ground);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-small);
  cursor: pointer;
}
.js .pages-toggle { display: inline-flex; }
.pages-toggle[aria-expanded="true"] { background: var(--ink); color: var(--ground); }
.pages { flex: 1 1 100%; border: var(--line) solid var(--ink); }
.js .pages { display: none; }
.js .pages.is-open { display: block; }
.pages ol { display: grid; margin: 0; padding: 0; list-style: none; }
.pages li + li { border-top: var(--line) solid var(--ink); }
.pages a {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  min-height: 3rem;
  padding: .625rem var(--pad);
  text-decoration: none;
}
.pages a:hover span:last-child, .pages a:focus-visible span:last-child { text-decoration: underline; }
.pages a[aria-current] { background: var(--ink); color: var(--ground); }
.pages a:focus-visible { outline-offset: calc(var(--line) * -2); }
.pages__n { font-size: 1.75rem; line-height: 1; font-variant-numeric: tabular-nums; }
@media (min-width: 48rem) {
  .pages ol { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pages li + li { border-top: 0; border-left: var(--line) solid var(--ink); }
  .pages a { flex-direction: column; gap: .25rem; height: 100%; }
}

/* BOARD: the unequal 12-column tile grid with pink gutters. .board > .tile; widths .span-3 to .span-9; .rows-2 doubles height. */
.board { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
.board > * { grid-column: 1 / -1; min-width: 0; }
@media (min-width: 48rem) {
  .span-3 { grid-column: span 3; }
  .span-4 { grid-column: span 4; }
  .span-5 { grid-column: span 5; }
  .span-6 { grid-column: span 6; }
  .span-7 { grid-column: span 7; }
  .span-8 { grid-column: span 8; }
  .span-9 { grid-column: span 9; }
  .rows-2 { grid-row: span 2; }
}

/* TILE: a square-cornered card with a 3px ink border. .tile; .tile--ink is aubergine; .tile--flush drops padding; .is-on gives the blue edge. */
.tile {
  padding: var(--pad);
  border: var(--line) solid var(--ink);
  background: var(--ground);
  transition: border-color var(--slow) var(--ease);
}
.tile--ink { background: var(--ink); color: var(--ground); }
.tile--flush { padding: 0; }
.tile > h2 + *, .tile > h3 + * { margin-top: .625rem; }
a.tile { display: block; text-decoration: none; }
a.tile:hover, a.tile:focus-visible, .tile.is-on { border-color: var(--accent); }

/* COUNT CARD (the device): oversized number beside its content. .count > .count__num + .count__body; .count__name is the big Barlow line; .count--stack puts the number on top. */
.count {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: var(--pad);
  row-gap: .25rem;
}
.count--stack { grid-template-columns: minmax(0, 1fr); }
.count__num, .num {
  font: 400 var(--fs-num)/1 var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
}
.count__body { min-width: 0; }
.count__name { font-size: var(--fs-row); line-height: 1.12; }
.count__name + * { margin-top: .5rem; }

/* COUNT ROWS: a ruled list of numbered links, like the home menu. ul.count-rows > li > a.count-row > .count-row__num + .count-row__label */
.count-rows { margin: 0; padding: 0; list-style: none; border-top: var(--line) solid var(--ink); }
.count-rows > li { border-bottom: var(--line) solid var(--ink); }
.count-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: var(--pad);
  min-height: 4.5rem;
  padding-block: .75rem;
  text-decoration: none;
}
.count-row__num { font: 400 var(--fs-num)/1 var(--text); font-variant-numeric: tabular-nums; min-width: 2ch; }
.count-row__label { font-size: var(--fs-row); line-height: 1.12; min-width: 0; }
a.count-row:hover .count-row__label, a.count-row:focus-visible .count-row__label {
  text-decoration: underline;
  text-decoration-thickness: .06em;
  text-underline-offset: .14em;
}

/* COUNT MARKING: a [data-count="k"] trigger gives .is-on to every [data-frame~="k"] inside the nearest [data-count-group]; data-rest keeps a frame on at rest; data-count-sticky on the group keeps the last one. */
.frame {
  display: block;
  border: var(--line) solid var(--ink);
  background: var(--ink);
  transition: border-color var(--slow) var(--ease);
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame.is-on { border-color: var(--accent); }

/* COUNT RULER: a row of small rectangles, one per count. ol.ruler > li.ruler__c; .is-ink fills ink, .is-on fills electric blue. */
.ruler { display: flex; gap: calc(var(--gutter) / 2); margin: 0; padding: 0; list-style: none; }
.ruler__c {
  display: grid;
  place-items: center;
  flex: 1 1 0;
  min-width: 0;
  min-height: 1.875rem;
  border: var(--line) solid var(--ink);
  font-size: 1rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: background-color var(--quick) var(--ease), border-color var(--quick) var(--ease), color var(--quick) var(--ease);
}
.ruler__c.is-ink { background: var(--ink); color: var(--ground); }
.ruler__c.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* PAGE OPENING: h1, one sentence and the page's picture or device, complete at rest. .opening > .opening__text + .opening__media; .lead is the sentence. */
.opening {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
  align-items: start;
  padding-block: clamp(.5rem, 1.5vw, 1rem) clamp(1.5rem, 4vw, 3rem);
}
.opening__text, .opening__media { grid-column: 1 / -1; min-width: 0; }
.opening__text > * + * { margin-top: clamp(.75rem, 1.6vw, 1.25rem); }
.lead { font-size: var(--fs-lead); line-height: 1.4; max-width: 34em; }
@media (max-width: 47.99rem) {
  .opening__media .photo img { aspect-ratio: 16 / 9; }
}
@media (min-width: 48rem) {
  .opening__text { grid-column: span 7; }
  .opening__media { grid-column: span 5; }
}

/* FIGURE AND CAPTION: a bordered photo card. figure.photo > img + figcaption; crops .photo--wide (16:9) .photo--card (4:3) .photo--tall (2:3); .photo--fill fills its tile; .is-on is the blue edge. */
.photo {
  display: flex;
  flex-direction: column;
  border: var(--line) solid var(--ink);
  background: var(--ink);
  transition: border-color var(--slow) var(--ease);
}
.photo img { width: 100%; object-fit: cover; }
.photo--wide img { aspect-ratio: 16 / 9; }
.photo--card img { aspect-ratio: 4 / 3; }
.photo--tall img { aspect-ratio: 2 / 3; }
.photo--fill { height: 100%; }
.photo--fill img { flex: 1 1 0; height: 0; min-height: 14rem; }
.photo figcaption {
  padding: .5rem .75rem;
  border-top: var(--line) solid var(--ink);
  background: var(--ground);
  color: var(--ink);
  font-size: var(--fs-small);
  line-height: 1.4;
}
.photo.is-on, .photo.is-on figcaption { border-color: var(--accent); }

/* TIMETABLE: label left, value right, 3px ink rules; used by the footer and for class facts. dl.timetable > div > dt + dd */
.timetable { border-top: var(--line) solid var(--ink); }
.timetable > div {
  display: grid;
  grid-template-columns: minmax(5.5rem, 1fr) minmax(0, 3fr);
  gap: var(--gutter);
  padding-block: .875rem;
  border-bottom: var(--line) solid var(--ink);
}
.timetable dt, .timetable dd { min-width: 0; }

/* DASH LIST: a list whose marker is a short solid ink rectangle. ul.dashes */
.dashes { padding: 0; list-style: none; }
.dashes li { position: relative; padding-left: 1.875rem; }
.dashes li + li { margin-top: .5rem; }
.dashes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 1.125rem;
  height: .3125rem;
  background: currentColor;
}

/* PROSE: long-form reading column for policy and story text. .prose */
.prose { max-width: 40em; }
.prose > * + * { margin-top: 1em; }
.prose > h2 { margin-top: 1.6em; }
.prose > h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.25em; }

/* FOOTER: the reading-size timetable that ends every page. .foot, .foot__line, .foot__link, .foot__pages */
.foot { margin-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: 5.5rem; }
body:has(#consent:not([hidden])) .foot { padding-bottom: 13rem; }
.foot__line { display: block; }
.foot__link { display: inline-flex; align-items: center; min-height: 2.75rem; }
.foot__pages {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* DOCK: the one fixed stack at the bottom edge: back link, then offer ribbon, then cookie band. .dock */
.dock {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}
.dock > * { pointer-events: auto; }

/* BACK LINK: small rectangle at the lower left, shown once #board (or a page's [data-board]) leaves view. .backlink */
.backlink {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 2.75rem;
  margin: 0 0 .75rem var(--edge);
  padding: .375rem .875rem;
  border: var(--line) solid var(--ink);
  background: var(--ground);
  font-size: var(--fs-small);
  line-height: 1.2;
  text-decoration: none;
  transition: opacity var(--quick) var(--ease), visibility var(--quick);
}
.backlink:hover, .backlink:focus-visible { text-decoration: underline; border-color: var(--accent); }
.js .backlink:not(.is-on) { opacity: 0; visibility: hidden; }

/* OFFER RIBBON: full-width electric blue, rolls in from the left once. #promo is out, #promo.is-in has arrived. */
#promo {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.5rem;
  max-height: 50vh;
  overflow: auto;
  padding: .375rem var(--edge);
  background: var(--accent);
  color: var(--on-accent);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-100%);
}
#promo.is-in {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: transform .9s var(--ease), opacity .9s var(--ease);
}
#promo .promo__link { display: inline-flex; align-items: center; min-height: 2.75rem; }
#promo :focus-visible { outline-color: var(--on-accent); }

/* COOKIE BAND: solid pink, heavy ink top edge, two underlined text choices of equal weight. #consent, .consent__choices */
#consent {
  max-height: 60vh;
  overflow: auto;
  padding: .75rem var(--edge) .5rem;
  border-top: .375rem solid var(--ink);
  background: var(--ground);
  color: var(--ink);
}
#consent p { margin: 0; }
.consent__choices { display: flex; flex-wrap: wrap; gap: 0 2rem; }

/* REVEAL ON SCROLL: add .reveal to a photo tile; it fades up in place once, over 800ms. Tiles already in view never hide. */
.reveal { transition: opacity var(--slow) var(--ease); }
.reveal.is-armed { opacity: 0; }
.reveal.is-armed.is-in { opacity: 1; }

/* REDUCED MOTION AND PRINT: everything sits in its final state. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal.is-armed { opacity: 1; }
  #promo.is-in { transition: none; }
}
@media print {
  .dock, .pages-toggle, .skip { display: none; }
  .reveal.is-armed { opacity: 1; }
}

/* A page never scrolls sideways. */
html, body { overflow-x: clip; }
/* Past a full-HD window the whole page grows with the window - type, gaps and pictures
   together - so a very wide screen (or a page zoomed far out) shows the same composition,
   not a small column of text lost in an enormous picture. */
@media (min-width: 1921px) { html { font-size: calc(100vw / 120); } }
/* What can be pressed in the chrome lies above the page: a huge headline's line box reaching
   into the navigation must not swallow the clicks meant for the links. */
header a, header button, nav a, nav button { position: relative; z-index: 2; }
/* A visitor who asked the system for less motion gets none, whatever a page forgot. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
