/* IAMT design system. Two colours only: oxblood ground, pale blush ink. The site is still: no entrance effects. */

/* Tokens: colours (--ground, --ink; --fg/--bg flip inside pale panels), type sizes, radius, gutter */
:root {
  --ground: #6b1316;
  --ink: #f6cfcb;
  --fg: var(--ink);
  --bg: var(--ground);
  --display: 'Bodoni Moda', 'Bodoni 72', Didot, 'Times New Roman', serif;
  --text: 'Zilla Slab', Rockwell, 'Roboto Slab', Georgia, serif;
  --t-poster: clamp(2.75rem, 13vw, 3.625rem);
  --t-screen: clamp(2.25rem, 5.2vw, 4.75rem);
  --t-name: clamp(1.5rem, 2.4vw, 2.125rem);
  --t-lead: clamp(1.1875rem, 1.6vw, 1.5rem);
  --t-small: 0.95rem;
  --r: clamp(1.5rem, 4.2vw, 4rem);
  --gutter: clamp(1rem, 3.5vw, 3rem);
  --gap: clamp(0.75rem, 1.6vw, 1.5rem);
  --line: 0.125rem;
  --top-h: 3.75rem;
  --sheet: 0rem;
  --side: 0rem;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding-right: var(--side);
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.5;
}
img, video { display: block; max-width: 100%; height: auto; }
p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
strong, b { font-weight: 400; font-style: italic; }
::selection { background: var(--ink); color: var(--ground); }

/* Headlines: h1/.poster-title (add .poster-title--long for titles over four words), h2/.screen-title, h3/.name-title */
h1, h2, h3, .poster-title, .screen-title, .name-title {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: normal;
  text-wrap: balance;
}
h1, .poster-title { font-size: var(--t-poster); line-height: 1.02; }
h2, .screen-title { font-size: var(--t-screen); line-height: 1.06; }
h3, .name-title { font-size: var(--t-name); line-height: 1.18; }

/* Running copy: .lead (opening sentence), .prose (paragraph stack), .note (small print at reading size), .price (figures) */
.lead { font-size: var(--t-lead); line-height: 1.4; max-width: 34em; }
.prose { max-width: 40em; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: var(--t-name); margin-top: 1.6em; }
.prose ul { list-style: disc; padding-left: 1.2em; }
.note { font-size: var(--t-small); }
.price { font-size: clamp(1.5rem, 2.6vw, 2.25rem); line-height: 1.2; }

/* Links: underlined text; hover thickens the line, focus draws an outline. Nothing else moves. */
a { color: inherit; text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 0.16em; }
:focus-visible { outline: 0.1875rem solid currentColor; outline-offset: 0.1875rem; }
button { font: inherit; color: inherit; cursor: pointer; }

/* Skip link: .skip */
.skip {
  position: absolute;
  left: -100rem;
  top: 0.5rem;
  z-index: 60;
  padding: 0.6rem 1.2rem;
  border-radius: 62rem;
  background: var(--ink);
  color: var(--ground);
}
.skip:focus { left: 0.5rem; }

/* Visually hidden text: .vh */
.vh { position: absolute; width: 0.0625rem; height: 0.0625rem; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Contents line (header): .top > .contents > .contents__home + .contents__list; dotted leaders between links; on phones the name takes the first row and the links wrap onto rows under it, each with its leader, nothing scrolling sideways */
.top { position: relative; z-index: 5; }
.contents {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--top-h);
  padding: 0.375rem var(--gutter);
  white-space: nowrap;
}
.contents a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  text-decoration: none;
}
.contents a:hover, .contents a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 0.12em; }
.contents__home { flex: none; }
.contents__list { display: flex; flex: 1 0 auto; align-items: center; }
.contents__list li { display: flex; flex: 0 0 auto; align-items: center; }
.contents__list li::before {
  content: "";
  flex: 1 0 1.25rem;
  margin-inline: 0.6rem;
  border-bottom: var(--line) dotted var(--ink);
}

/* Phones: the name on its own row, then the links wrapped onto as many rows as they need; leaders stretch so every row runs the full width */
@media (max-width: 47.9375rem) {
  .contents { flex-wrap: wrap; }
  .contents__list { flex: 1 1 100%; min-width: 0; flex-wrap: wrap; }
  .contents__list li { flex: 1 1 auto; }
  .contents__list li::before { flex: 1 0 1.25rem; margin-inline: 0.5rem; }
  .contents__list li:first-child::before { margin-left: 0; }
}

/* Logo mark: svg.mark with .mark__room (three rooms) and .mark__dot (the performer) */
.mark { flex: none; width: 2.75rem; height: 1rem; }
.mark__room { fill: var(--fg); }
.mark__dot { fill: var(--bg); }

/* Poster and band: section.poster (full-window chapter, 12 columns) or section.band (ordinary section); children .cell with style="--at:1;--span:7" */
.poster, .band {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: clamp(1.25rem, 3vh, 2.25rem);
  align-content: center;
  padding: clamp(1.5rem, 5vh, 3.25rem) var(--gutter);
}
.cell { grid-column: 1 / -1; min-width: 0; }

/* Page opening: section.poster.poster--first > h1.poster-title.cell + p.lead.cell + figure.shot.cell (fits one window under the contents line) */
.poster--first { padding-top: clamp(0.5rem, 2vh, 1.5rem); }

/* Pale panel: .panel (blush ground, oxblood type, large corners); everything inside flips colour by itself */
.panel, .door__board, #consent {
  --fg: var(--ground);
  --bg: var(--ink);
  background: var(--bg);
  color: var(--fg);
}
.panel { border-radius: var(--r); padding: clamp(1.5rem, 3vw, 3rem); }
.panel > * + * { margin-top: 1rem; }

/* Pills: a.pill / button.pill (outlined), .pill--fill (solid), [aria-pressed="true"] reads as solid; .pill-row lays them out at equal size */
.pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.5rem 1.4rem;
  border: var(--line) solid var(--fg);
  border-radius: 62rem;
  background: transparent;
  color: var(--fg);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}
.pill:hover { text-decoration: underline; text-decoration-thickness: 0.1em; }
.pill--fill, .pill[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.pill-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.pill-row > * { flex: 1 1 13rem; }

/* Caption pill: .cap (also the default figcaption inside .shot and .triptych) */
.cap, .shot figcaption, .triptych figcaption {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.25rem 1rem;
  border: 0.09rem solid var(--fg);
  border-radius: 62rem;
  font-size: var(--t-small);
  line-height: 1.25;
}

/* Photograph: figure.shot > img + figcaption; ratios .shot--low (long and low) and .shot--tall, or set --frame yourself */
.shot { display: grid; gap: 0.75rem; justify-items: start; }
.shot img, .shot video {
  width: 100%;
  aspect-ratio: var(--frame, 16 / 9);
  object-fit: cover;
  border-radius: var(--r);
}
.shot--low { --frame: 21 / 9; }
.shot--tall { --frame: 4 / 5; }

/* The device, pictures: .triptych > three figure (img + figcaption), one fixed room three times, always Speak it / Sing it / Put it on its feet */
.triptych { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.triptych figure { display: grid; gap: 0.6rem; justify-items: start; align-content: start; }
.triptych img, .triptych video {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--r);
}

/* The device, markers: ul.passes > three li (add .is-off when a pass is not trained); give matching things data-pass="speak|sing|move" */
.passes { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.passes li {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.15rem 0.85rem;
  border: 0.09rem solid var(--fg);
  border-radius: 62rem;
  font-size: var(--t-small);
}
.passes .is-off { border-style: dotted; }
.is-pass { outline: var(--line) solid currentColor; outline-offset: 0.2rem; }

/* The device, three equal slots: .three-up (three pills or three columns in one row; stacks on phones) */
.three-up { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }

/* Fact list with dotted leaders: dl.facts > div > dt + dd */
.facts > div { display: flex; align-items: baseline; gap: 0.75rem; padding-block: 0.45rem; }
.facts dt { display: flex; flex: 1 1 auto; align-items: baseline; white-space: nowrap; }
.facts dt::after {
  content: "";
  flex: 1 1 1.5rem;
  min-width: 1.5rem;
  margin-left: 0.75rem;
  border-bottom: var(--line) dotted var(--fg);
}
.facts dd { flex: 0 1 auto; max-width: 62%; text-align: right; }

/* Dotted rule: hr.dots */
.dots { height: 0; margin: 0; border: 0; border-top: var(--line) dotted var(--fg); }

/* Round stamp: a.stamp (oxblood circle, pale lettering, turned eight degrees); inside .panel it floats to the upper outside corner and text wraps round it */
.stamp {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 8.75rem;
  height: 8.75rem;
  padding: 1rem;
  border: var(--line) solid var(--ink);
  border-radius: 50%;
  background: var(--ground);
  color: var(--ink);
  font-size: var(--t-small);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transform: rotate(8deg);
}
.stamp:hover { text-decoration: underline; }
.panel .stamp { float: right; margin: 0 0 0.75rem 1rem; shape-outside: circle(50%); }

/* Reveal utility: .reveal is always visible (the site is still); the script adds .is-seen once it has been on screen, for state only */
.reveal { opacity: 1; }

/* Footer door board: footer.door > .door__board > .door__hours (.door__big lines) + address.door__where (.door__name, .door__line) + ul.door__links. The page ends one gutter after the board; --sheet keeps the last links clear of the cookie sheet while it shows. */
.door { padding: clamp(1.5rem, 5vh, 3.25rem) var(--gutter) calc(var(--gutter) + var(--sheet)); }
.door__board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem) var(--gap);
  padding: clamp(1.5rem, 4vw, 4rem);
  border-radius: var(--r);
}
.door__big {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(2.5rem, 6.4vw, 6rem);
  line-height: 1.06;
}
.door__times { margin-top: 0.75rem; font-size: var(--t-lead); }
.door__note { margin-top: 1rem; max-width: 30em; }
.door__where { display: grid; gap: 0.2rem; align-content: end; font-style: normal; }
.door__name {
  margin-bottom: 0.35rem;
  font-family: var(--display);
  font-style: italic;
  font-size: var(--t-name);
  line-height: 1.18;
}
.door__line { display: block; text-transform: none; }
.door__line + a { margin-top: 0.35rem; }
.door__where a { display: inline-flex; align-items: center; min-height: 2.75rem; justify-self: start; }
.door__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  padding-top: 1rem;
  border-top: var(--line) dotted var(--fg);
  font-size: var(--t-small);
}
.door__links a, .door__links button, .door__year { display: inline-flex; align-items: center; min-height: 2.75rem; }
.door__links button {
  padding: 0;
  border: 0;
  background: none;
  text-decoration: underline;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.2em;
}
.door__links button:hover { text-decoration-thickness: 0.16em; }

/* Cookie notice: #consent, a slim bottom sheet on phones (one row of copy, two equal buttons under it) and a narrow pale panel down the right edge on desk screens (the page makes room). .consent__more is the longer wording, desk only. */
#consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  gap: 0.4rem;
  padding: 0.5rem 1rem 0.6rem;
  border: var(--line) solid var(--ground);
  border-bottom: 0;
  border-radius: 1.25rem 1.25rem 0 0;
  font-size: 1rem;
  line-height: 1.35;
}
#consent[hidden], #promo[hidden] { display: none; }
.consent__choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
#consent .pill { min-height: 2.75rem; padding: 0.3rem 0.6rem; font-size: 1rem; }

/* Offer: #promo, a round turned stamp pinned at bottom left on desk screens. On phones nothing is pinned for it: the stamp in the tuition panel carries the studio visit. */
#promo {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 30;
  padding: 0.55rem 3.25rem 0.6rem 1rem;
  border: 0.1875rem solid var(--ink);
  border-radius: 1.5rem;
  outline: 0.3rem solid var(--ground);
  background: var(--ground);
  color: var(--ink);
  font-size: var(--t-small);
  line-height: 1.3;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.75rem);
  transition: opacity 0.18s linear, transform 0.18s linear, visibility 0s linear 0.18s;
}
#promo.is-in { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
#promo a { white-space: nowrap; }
#promo button {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--ground);
  font-size: 1.4rem;
  line-height: 1;
}

/* Phones: no pinned offer; the cookie sheet keeps its short wording */
@media (max-width: 47.9375rem) {
  #promo, #promo.is-in { display: none; }
  .consent__more { display: none; }
}

/* Desk screens: leaders stretch, posters fill the window, cells take their columns, the device sits in one row */
@media (min-width: 48rem) {
  :root { --t-poster: min(8vw, 8.5rem); }
  body { font-size: 1.125rem; }
  .poster-title--long { font-size: clamp(3rem, 5.4vw, 5.25rem); }
  .contents { overflow-x: visible; }
  .contents__list, .contents__list li { flex: 1 1 auto; }
  .poster { min-height: 100vh; min-height: 100svh; }
  .poster--first { min-height: calc(100vh - var(--top-h)); min-height: calc(100svh - var(--top-h)); }
  .cell { grid-column: var(--at, 1) / span var(--span, 12); }
  .triptych { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
  .triptych img, .triptych video { aspect-ratio: var(--frame, 3 / 4); border-radius: 0; }
  .triptych figure:first-child img, .triptych figure:first-child video { border-radius: var(--r) 0 0 var(--r); }
  .triptych figure:last-child img, .triptych figure:last-child video { border-radius: 0 var(--r) var(--r) 0; }
  .three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stamp { width: 10rem; height: 10rem; }
  .door__board { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .door__hours { grid-column: 1 / span 8; }
  .door__where { grid-column: 9 / -1; }
  .door__links { grid-column: 1 / -1; }
  #consent {
    top: 0;
    left: auto;
    width: 16rem;
    align-content: space-between;
    padding: 2.5rem 1.25rem 1.5rem 1.5rem;
    border: 0;
    border-left: var(--line) solid var(--ground);
    border-radius: 3rem 0 0 3rem;
    font-size: var(--t-small);
  }
  .consent__choices { grid-template-columns: 1fr; }
  #consent .pill { font-size: var(--t-small); }
  #promo {
    left: 1.5rem;
    right: auto;
    bottom: 1.5rem;
    display: flex;
    align-items: center;
    width: 16rem;
    height: 16rem;
    padding: 2.9rem 2.1rem 2.3rem;
    border-radius: 50%;
    text-align: center;
    transform: translateY(0.75rem) rotate(-8deg);
  }
  #promo.is-in { transform: rotate(-8deg); }
  #promo button { top: 0; right: 0.5rem; border: var(--line) solid var(--ground); }
}

/* Reduced motion: the offer simply appears */
@media (prefers-reduced-motion: reduce) {
  #promo, #promo.is-in { transition: none; }
}

/* Print: the page without its pinned pieces */
@media print {
  .contents__list, #consent, #promo, .skip { display: none; }
  .poster, .poster--first { min-height: 0; }
}

/* 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; }
}
