/* The Pointe School of Dance: the shared system. Order: layout, type, colour, motion. Desk first. */

/* ================= LAYOUT ================= */

/* Tokens: straw ground, bark ink, blue accent; --tda-lintel is the live header height (set by site.js). */
:root {
  --tda-straw: #F8EAA8;
  --tda-bark: #332707;
  --tda-blue: #003DFF;
  --tda-voice: 'Fredoka', 'Trebuchet MS', 'Arial Rounded MT Bold', sans-serif;
  --tda-counting: 'Martian Mono', ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace;
  --tda-edge: clamp(1rem, 2.6vw, 2.25rem);
  --tda-beat: 1.25rem;
  --tda-tread: 0.125rem;
  --tda-lintel: 4rem;
  --tda-quick: 190ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--tda-lintel) + 1rem); }
body { margin: 0; min-height: 100vh; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { margin: 0; }
[hidden] { display: none !important; }

/* Screen-reader-only text: .offstage */
.offstage { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Skip link: .entrance (first thing in body) */
.entrance { position: absolute; left: var(--tda-edge); top: -6rem; z-index: 60; padding: 0.75rem 1rem; }
.entrance:focus { top: 0.5rem; }

/* Header: .lintel holds .lintel-beam (the .path, the .slash menu tile, the .ring call tile, the .roster list). */
.lintel { position: sticky; top: 0; z-index: 40; }
.lintel-beam {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1rem;
  min-height: 3.25rem;
  padding: 0.75rem var(--tda-edge) 0.5rem;
}
.path { flex: 0 1 auto; min-width: 0; }
.path-line { display: flex; flex-wrap: wrap; align-items: center; column-gap: 0.6em; }
.path-line li { display: flex; align-items: center; gap: 0.6em; }
.path-part { display: inline-flex; align-items: center; gap: 0.6em; min-height: 2.75rem; }
.doorsign { flex: none; width: 2rem; height: 1.125rem; }
.slash { flex: none; }
.ring { display: none; flex: none; }

/* Section list under the path: .roster (state: .roster-shown, set by the .slash tile). */
.roster { flex: 0 0 100%; padding-bottom: 0.5rem; }
.js .roster {
  position: absolute;
  top: 100%;
  left: 0;
  width: min(24rem, 100%);
  padding: 0.5rem var(--tda-edge) 1rem;
  visibility: hidden;
  clip-path: inset(0 0 100% 0);
}
.js .roster.roster-shown { visibility: visible; clip-path: inset(0); }
.roster a { display: flex; align-items: center; gap: 0.75em; min-height: 2.75rem; }
.roster a::before { content: ""; flex: none; width: 1.6em; aspect-ratio: 16 / 9; }

/* Cookie band, in flow under the path: #cookie-bar.permission with .permission-choices holding two .tile buttons. */
.permission {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 0.4rem var(--tda-edge);
}
.permission-choices { display: flex; flex: none; gap: 0.5rem; }

/* Offer bar: #now.offer, a band pinned to the bottom edge; rests below the edge, .is-in brings it up. */
.offer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.5rem var(--tda-edge);
  transform: translateY(100%);
  opacity: 0;
}
.offer.is-in { transform: none; opacity: 1; }
.offer button {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: var(--tda-tread) solid;
  cursor: pointer;
}

/* In-flow offer band that closes a first screen: a.trial-band (add .arrival for the one wipe). */
.trial-band { display: block; padding: 0.9rem var(--tda-edge); }

/* THE DEVICE, the door seam: .doorway > .hall (left, add .hall-held to pin it) + .studio (right, scrolls); .doorway-seam draws the line. */
.doorway { --tda-walked: 0; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
.hall, .studio { min-width: 0; }
.hall-held { position: sticky; top: var(--tda-lintel); }

/* One picture across the seam: .jamb in each pane, same img in both; .jamb-studio shows the right half. */
.jamb { aspect-ratio: 8 / 9; overflow: hidden; }
.jamb img, .jamb video { width: 200%; max-width: none; height: 100%; object-fit: cover; }
.jamb-studio img, .jamb-studio video { transform: translateX(-50%); }

/* A chapter block inside a pane: .scene (children are spaced one beat apart). */
.scene { padding: clamp(2.5rem, 9vh, 6.5rem) var(--tda-edge); }
.scene + .scene { padding-top: 0; }
.scene > * + * { margin-top: var(--tda-beat); }

/* Page opening: .threshold > h1.trade, then .threshold-line holding p.first-line and one .tile action. */
.threshold { display: grid; gap: 0.75rem; padding: 1.25rem var(--tda-edge) 1.5rem; }
.threshold-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; }
.first-line { max-width: 36rem; }

/* Picture: figure > .mirror (16:9 frame around img, cover) + figcaption.mirror-words; .mirror-whole fits the whole frame uncropped. */
.mirror { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.mirror img, .mirror video { width: 100%; height: 100%; object-fit: cover; }
.mirror-whole img, .mirror-whole video { object-fit: contain; }
.mirror-words { padding-top: 0.6rem; max-width: 38rem; }

/* Buttons and action links: .tile (outline), .tile-blue (solid offer); aria-pressed="true" turns a toggle tile blue. */
.tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.1rem;
  border: var(--tda-tread) solid;
  cursor: pointer;
}
/* The header's tiles are cut to their short labels. */
.lintel-beam .tile { min-height: 2.25rem; padding: 0.3rem 0.7rem; }

/* Running text: .count (paragraphs, links underlined in blue). */
.count { max-width: 38rem; }
.count > * + * { margin-top: 1.1em; }

/* List with 16:9 tile bullets: ul.tape (add .tape-blue for blue bullets). */
.tape li { display: grid; grid-template-columns: 1.6em 1fr; gap: 0.75em; align-items: baseline; }
.tape li + li { margin-top: 0.6rem; }
.tape li::before { content: ""; width: 1.6em; aspect-ratio: 16 / 9; }

/* Facts as label and value: dl.callsheet with dt / dd pairs. */
.callsheet { display: grid; grid-template-columns: minmax(8rem, 13rem) 1fr; gap: 0.6rem 1.5rem; }

/* Rule, a thick floor-tape line: hr.barre */
.barre { height: 0.25rem; margin: var(--tda-beat) 0; border: 0; }

/* Closing hand-off across the seam: .bow > a .chapter on the hall side + .bow-ways holding a.bow-way link tiles. */
.bow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  padding: clamp(2.5rem, 9vh, 6.5rem) 0;
}
.bow > * { min-width: 0; padding-inline: var(--tda-edge); }
.bow-ways { display: grid; gap: 0.75rem; }
.bow-way {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
  padding: 0.9rem 1.25rem;
  border: var(--tda-tread) solid;
}

/* Reveal on scroll, a wipe from the left: .arrival (site.js adds .arrival-landed). Never on a first screen. */
.js .arrival { clip-path: inset(0 100% 0 0); }
.js .arrival.arrival-landed { clip-path: inset(0); }

/* Footer: .floor > ul.floor-stack (eight big links) + one p.floor-line (.floor-reach keeps address, phone and email together on the first line; then the quiet legal links: a.floor-quiet). */
.floor { padding: clamp(2.5rem, 9vh, 6.5rem) var(--tda-edge) clamp(2rem, 6vh, 4rem); }
.floor-stack a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.floor-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.5rem; margin-top: 1.5rem; }
.floor-reach { flex: 0 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.5rem; }
.floor-line a, .floor-line button { display: inline-flex; align-items: center; min-height: 2.75rem; }
.floor-line button { padding: 0; border: 0; cursor: pointer; }

@media (max-width: 48rem) {
  /* Phone header in two rows: the name; then the rest of the path with the Menu and Call tiles on its line. */
  .lintel-beam { gap: 0 0.5rem; padding-block: 0.25rem 0.4rem; }
  .path, .path-line { display: contents; }
  .path-line li { flex: 0 1 auto; min-width: 0; }
  .path-line li:last-child { flex: 1 1 0; min-width: 5rem; }
  .path-line li:first-child { flex: 0 0 100%; }
  .path-part { min-height: 2.25rem; }
  .lintel-beam .tile { min-height: 2.75rem; padding-inline: 0.5rem; }
  .ring { display: inline-flex; }
  .js .roster { width: 100%; }
  .permission { flex-wrap: wrap; gap: 0.5rem 1rem; padding-block: 0.75rem; }
  .permission .tile { padding-inline: 0.8rem; }
  .doorway, .bow { grid-template-columns: 1fr; }
  .hall-held { position: static; }
  .bow { gap: var(--tda-beat); }
  .threshold { padding-top: 0.75rem; }
  .callsheet { grid-template-columns: 1fr; gap: 0; }
  .callsheet dd { margin-bottom: 0.9rem; }
}

/* ================= TYPE ================= */

body {
  font-family: var(--tda-counting);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
}
button { font: inherit; }
a { text-decoration: underline; text-decoration-thickness: 0.125rem; text-underline-offset: 0.22em; }

.entrance, .path, .slash, .ring, .tile { font-size: 0.9375rem; line-height: 1.2; }
.path { font-size: 0.9rem; }
.path-part { text-decoration: none; }
.path-part[aria-current="page"], .path-part:hover { text-decoration: underline; }
.tile { font-family: var(--tda-counting); text-decoration: none; white-space: nowrap; }
.roster a { font-size: 1.0625rem; line-height: 1.3; text-decoration: none; }
.roster a:hover, .roster a[aria-current="page"] { text-decoration: underline; }
.permission p { font-size: 0.9rem; line-height: 1.45; }
.offer { font-size: 0.9375rem; line-height: 1.4; }

/* Headlines: h1.trade is the small trade stack; .chapter is the big Fredoka stack (break it by hand, one or two words a line); .chapter-small for h3. */
.trade { font-family: var(--tda-voice); font-weight: 650; font-size: 1.4375rem; line-height: 1.08; }
.chapter {
  font-family: var(--tda-voice);
  font-weight: 650;
  font-size: clamp(3rem, 4.4vw, 4rem);
  line-height: 1.02;
}
.chapter-small { font-size: clamp(1.75rem, 2.6vw, 2.25rem); line-height: 1.1; }

/* The owner speaking in the first person: p.said (Fredoka 400, large). */
.said { font-family: var(--tda-voice); font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 2.125rem); line-height: 1.22; }

.trial-band {
  font-family: var(--tda-voice);
  font-weight: 650;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  line-height: 1.2;
  text-decoration: none;
}
.mirror-words { font-size: 0.9rem; line-height: 1.55; }
.callsheet { font-size: 0.9375rem; line-height: 1.55; }
.callsheet dt { font-family: var(--tda-voice); font-weight: 650; font-size: 1.0625rem; }
.bow-way { font-family: var(--tda-voice); font-weight: 650; font-size: clamp(1.25rem, 2vw, 1.625rem); line-height: 1.15; text-decoration: none; }
.floor-stack a { font-size: clamp(1.35rem, 3.4vw, 2.75rem); line-height: 1.25; text-decoration: none; }
.floor-stack a:hover { text-decoration: underline; }
.floor-line { font-size: 0.9rem; line-height: 1.5; text-transform: none; }
.floor-line button, .floor-quiet { text-decoration: underline; text-decoration-thickness: 0.0625rem; text-underline-offset: 0.22em; }

@media (max-width: 48rem) {
  body { font-size: 1rem; }
  .trade { font-size: 1.25rem; }
  .chapter { font-size: clamp(2.125rem, 10vw, 2.625rem); }
  .chapter-small { font-size: 1.625rem; }
  .permission p { line-height: 1.5; }
}

/* ================= COLOUR ================= */

body { background: var(--tda-straw); color: var(--tda-bark); }
::selection { background: var(--tda-blue); color: var(--tda-straw); }
a { color: inherit; text-decoration-color: var(--tda-blue); }
:focus-visible { outline: 0.1875rem solid var(--tda-blue); outline-offset: 0.1875rem; }

.entrance { background: var(--tda-blue); color: var(--tda-straw); }
.entrance:focus-visible { outline-color: var(--tda-bark); }
.lintel { background: var(--tda-straw); }
.js .roster { background: var(--tda-straw); box-shadow: inset 0 calc(var(--tda-tread) * -1) 0 var(--tda-bark), inset calc(var(--tda-tread) * -1) 0 0 var(--tda-bark); }
.roster a::before { background: var(--tda-bark); }
.roster a:hover::before, .roster a[aria-current="page"]::before { background: var(--tda-blue); }
.permission { background: var(--tda-straw); box-shadow: inset 0 var(--tda-tread) 0 var(--tda-bark), inset 0 calc(var(--tda-tread) * -1) 0 var(--tda-bark); }
.offer { background: var(--tda-blue); color: var(--tda-straw); }
.offer a { text-decoration-color: var(--tda-straw); }
.offer button { background: var(--tda-blue); color: var(--tda-straw); border-color: var(--tda-straw); }
.offer button:hover { background: var(--tda-bark); }
.offer :focus-visible { outline-color: var(--tda-straw); }

.tile { background: var(--tda-straw); color: var(--tda-bark); border-color: var(--tda-bark); }
.tile:hover { background: var(--tda-bark); color: var(--tda-straw); }
.tile-blue, .tile[aria-pressed="true"] { background: var(--tda-blue); color: var(--tda-straw); border-color: var(--tda-blue); }
.tile-blue:hover { background: var(--tda-bark); border-color: var(--tda-bark); }

.trial-band { background: var(--tda-blue); color: var(--tda-straw); }
.trial-band:focus-visible { outline-color: var(--tda-straw); outline-offset: -0.375rem; }
.trial-band:hover { background: var(--tda-bark); }

.doorway-seam > .studio { box-shadow: inset var(--tda-tread) 0 0 var(--tda-bark); }
.mirror, .jamb { background: var(--tda-bark); }
.mirror-whole { background: transparent; }
.tape li::before, .barre { background: var(--tda-bark); }
.tape-blue li::before { background: var(--tda-blue); }
.bow-way { background: var(--tda-straw); color: var(--tda-bark); border-color: var(--tda-bark); }
.bow-way:hover { background: var(--tda-blue); color: var(--tda-straw); border-color: var(--tda-blue); }
.floor-line button { background: none; color: inherit; text-decoration-color: var(--tda-bark); }
.floor-quiet { text-decoration-color: var(--tda-bark); }

@media (max-width: 48rem) {
  .doorway-seam > .studio { box-shadow: none; }
}

/* ================= MOTION ================= */

.entrance { transition: top var(--tda-quick) linear; }
.tile, .bow-way, .trial-band, .roster a::before {
  transition: background-color 150ms linear, color 150ms linear, border-color 150ms linear;
}
.js .roster { transition: clip-path 200ms ease-out, visibility 0s linear 200ms; }
.js .roster.roster-shown { transition: clip-path 200ms ease-out, visibility 0s; }
.js .arrival { transition: clip-path var(--tda-quick) ease-out; }
.offer { transition: transform var(--tda-quick) ease-out, opacity var(--tda-quick) linear; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .js .arrival { clip-path: none; }
}

@media screen and (min-width: 1921px) {
  html { font-size: calc(100vw / 120); }
}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
header a, header button, nav a, nav button { position: relative; z-index: 2; }
body, html {
  overflow-x: clip;
}
