/*
  Neelam Gupta Loonker: portfolio and workshops site.

  The site is a single-screen cinema. Two surfaces carry it:
    the hall  - a mulberry wall lit from above, where posters hang behind glass
                and stills are pinned up as lobby cards;
    the paper - warm programme paper, for reading and for the workshop pages.
  Light comes from the top left everywhere. Depth is layered, plum-tinted
  shadow; gloss is a faint sheen on glass and a bright top edge, never glare.
*/

:root {
  /* the hall */
  --plum-950: #1f0916;
  --plum-900: #2a0c1e;
  --plum-800: #37112a;
  --plum-700: #431531;
  --plum-600: #57203f;
  --plum-500: #713055;
  --screen: #f6efe2;      /* text in the hall */
  --rose: #ddbfcb;        /* quieter text in the hall */
  --marigold: #f5d24b;    /* names, buttons, the current page */

  /* the paper */
  --paper: #f8f2e7;
  --paper-2: #efe5d4;
  --ink: #2d0f22;         /* text on paper */
  --ink-2: #6b4a5d;       /* quieter text on paper */
  --line: #d6c7b2;        /* hairlines on paper */
  --gold: #9a6a10;        /* marigold's darker sibling, for marks on paper */
  --field: #fffdf8;       /* form fields */
  --field-line: #9d8a79;

  --vermilion: #b93226;
  --review: #46cfe0;      /* review marks only: deliberately not a brand colour */

  /* "Talkies", chosen by L on 30 November 2026: Indian-designed faces that
     also cover Hindi. Eczar for names and headings, Mukta for text, Teko for
     the small capitals on posters. Loaded from Google Fonts on each page. */
  --display: Eczar, Georgia, serif;
  --text: Mukta, system-ui, sans-serif;
  --tall: Teko, "Arial Narrow", sans-serif;
  --display-weight: 600;
  --display-axes: normal;
  --tall-regular: 500;
  --tall-strong: 600;
  --tall-scale: 0.92;      /* Teko runs wide for a condensed face; this keeps long poster titles in their box */

  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --band: clamp(4rem, 9vw, 7rem);

  /* Three heights above the wall, and one above paper. Each is a stack, so the
     shadow is crisp near the object and soft far from it. */
  --lift-1: 0 1px 1px rgb(20 4 14 / 0.3), 0 2px 5px rgb(20 4 14 / 0.26);
  --lift-2: 0 1px 2px rgb(20 4 14 / 0.34), 0 5px 10px rgb(20 4 14 / 0.28), 0 14px 28px rgb(20 4 14 / 0.3);
  --lift-3: 0 2px 3px rgb(20 4 14 / 0.4), 0 9px 18px rgb(20 4 14 / 0.32), 0 28px 56px rgb(20 4 14 / 0.4);
  --lift-paper: 0 1px 1px rgb(45 15 34 / 0.07), 0 4px 10px rgb(45 15 34 / 0.07), 0 16px 34px rgb(45 15 34 / 0.1);

  /* Fine static grain: light specks for the hall, dark specks for paper. */
  --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .18 0 0 0 0 .06 0 0 0 0 .13 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--plum-700);
  color: var(--screen);
  font: 400 1.125rem/1.6 var(--text);
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
}

cite {
  font-style: normal;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--marigold);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 3px;
}

:focus-visible {
  outline: 3px solid var(--marigold);
  outline-offset: 3px;
}

::selection {
  background: var(--marigold);
  color: var(--plum-900);
}

.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--marigold);
  color: var(--plum-900);
  text-decoration-line: none;
  transform: translate(-50%, -120%);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* ---------- Type ---------- */

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.08;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.2;
}

.lede {
  max-width: 38rem;
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  line-height: 1.5;
}

.quiet {
  color: var(--rose);
}

.small {
  font-size: 0.95rem;
}

/* ---------- Surfaces and page frame ---------- */

.wrap {
  width: min(100% - 2 * var(--gutter), 72rem);
  margin-inline: auto;
}

.band {
  padding-block: var(--band);
}

/* The hall: the wall colour, a pool of house light from above, and grain. */
.band--hall {
  background:
    var(--grain-light),
    radial-gradient(85% 60% at 50% 0%, rgb(126 52 96 / 0.55), transparent 72%),
    var(--plum-700);
}

.band--deep {
  background: var(--grain-light), var(--plum-900);
}

.band--paper,
.band--paper-2 {
  color: var(--ink);
  box-shadow: inset 0 14px 22px -18px rgb(20 4 14 / 0.5);
}

.band--paper {
  background: var(--grain-dark), var(--paper);
}

.band--paper-2 {
  background: var(--grain-dark), var(--paper-2);
}

.band--paper a,
.band--paper-2 a,
.callsheet a {
  text-decoration-color: var(--gold);
}

.band--paper :focus-visible,
.band--paper-2 :focus-visible,
.callsheet :focus-visible {
  outline-color: var(--plum-700);
}

.band--paper .quiet,
.band--paper-2 .quiet {
  color: var(--ink-2);
}

.band__head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.band__head > * + * {
  margin-top: 1rem;
}

.more {
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 3px;
  font: 500 1.0625rem/1.2 var(--text);
  text-decoration-line: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

/* A lacquered marigold key: lit along its top edge. */
.btn--primary {
  background: linear-gradient(180deg, #f9de72 0%, var(--marigold) 50%, #e8be30 100%);
  color: var(--plum-900);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.6), var(--lift-1);
}

.btn--primary:hover {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.6), var(--lift-2);
  transform: translateY(-1px);
}

.btn--quiet {
  border-color: currentColor;
  background: transparent;
  color: inherit;
}

.btn--quiet:hover {
  background: rgb(255 255 255 / 0.08);
}

.band--paper .btn--quiet:hover,
.band--paper-2 .btn--quiet:hover,
.callsheet .btn--quiet:hover {
  background: rgb(45 15 34 / 0.06);
}

/* On paper the main action is plum, so it reads against the pale ground. */
.band--paper .btn--primary,
.band--paper-2 .btn--primary {
  background: linear-gradient(180deg, #5d2244 0%, var(--plum-700) 55%, var(--plum-800) 100%);
  color: var(--screen);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), var(--lift-paper);
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

/* ---------- Header ---------- */

.masthead {
  background:
    var(--grain-light),
    linear-gradient(180deg, var(--plum-900), var(--plum-800));
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.06), 0 10px 24px -14px rgb(20 4 14 / 0.9);
  position: relative;
  z-index: 2;
}

.masthead__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 2rem;
  padding-block: 0.9rem;
}

.masthead__name {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--marigold);
  font: 400 1.4rem/1.15 var(--display);
  text-decoration-line: none;
}

/* The Sapphire mark (images/logo/), beside the name. */
.masthead__mark {
  flex: none;
  width: 2rem;
  height: 2rem;
}

/* Narrow phones: a smaller mark keeps the name on one line at 320px. */
@media (max-width: 22rem) {
  .masthead__name {
    gap: 0.45rem;
  }

  .masthead__mark {
    width: 1.6rem;
    height: 1.6rem;
  }
}

.masthead nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem clamp(0.85rem, 2.4vw, 2rem);
}

.masthead nav a {
  display: inline-block;
  padding: 0.5rem 0.05rem 0.4rem;
  border-bottom: 2px solid transparent;
  font-size: 1rem;
  font-weight: 500;
  text-decoration-line: none;
  transition: border-color 160ms ease;
}

.masthead nav a:hover {
  border-bottom-color: rgb(245 210 75 / 0.55);
}

.masthead nav a[aria-current="page"] {
  border-bottom-color: var(--marigold);
}

/* Narrow phones: at full size the four links need about 320px on one line,
   and a 320px phone has 280px, so "Contact" dropped to a third row. */
@media (max-width: 23rem) {
  .masthead nav ul {
    column-gap: 0.6rem;
  }
}

@media (max-width: 22rem) {
  .masthead nav a {
    font-size: 0.875rem;
  }
}

/* ---------- Home hero ---------- */

.hero {
  padding-block: clamp(1.75rem, 4.5vw, 4rem) var(--band);
  /* The light behind the frame must not widen the page. "hidden" first, for
     browsers without "clip" (Safari and iOS before 16), where the page would
     otherwise scroll sideways by up to 40px on a phone. */
  overflow: hidden;
  overflow: clip;
}

/* Words in the left column, the photograph in the right. The two 1fr rows
   take up the slack, so the words stay together and centre against the frame. */
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  grid-template-rows: 1fr repeat(5, auto) 1fr;
  column-gap: clamp(2rem, 5vw, 4.5rem);
}

.hero__name {
  grid-area: 2 / 1;
  color: var(--marigold);
  font-size: clamp(3rem, 8.2vw, 6.6rem);
  line-height: 0.95;
}

.hero__line {
  grid-area: 3 / 1;
}

.hero__credits {
  grid-area: 4 / 1;
}

.hero__actions {
  grid-area: 5 / 1;
}

.hero__also {
  grid-area: 6 / 1;
}

.hero__name span {
  display: block;
}

.hero__line {
  margin-top: 1.4rem;
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  line-height: 1.4;
}

/* The secondary roles: a quieter second line under the main one. */
.hero__roles {
  display: block;
  margin-top: 0.3rem;
  color: var(--rose);
  font-size: 0.82em;
}

.hero__credits {
  max-width: 31rem;
  margin-top: 0.75rem;
  color: var(--rose);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.hero__aside {
  margin-top: 1.5rem;
  color: var(--rose);
  font-size: 0.95rem;
}

/* The IMDb button sits on its own line under "Also credited as". */
.hero__also .btn {
  display: flex;
  width: fit-content;
  margin-top: 0.75rem;
  color: var(--screen);
}

.hero__figure {
  position: relative;
  /* Its own stacking layer, so the light behind the frame (z-index -1) paints
     above the hall's background instead of beneath it. */
  isolation: isolate;
  grid-area: 1 / 2 / -1 / 3;
  align-self: center;
  justify-self: end;
  width: min(100%, 27rem);
}

/* Warm light falling on the wall behind the frame. */
.hero__figure::before {
  content: "";
  position: absolute;
  inset: -14% -18%;
  z-index: -1;
  background: radial-gradient(closest-side, rgb(245 210 75 / 0.2), transparent);
}

/* Phone: one column, with the buttons straight after the name so they are on the first screen. */
@media (max-width: 52rem) {
  .hero__grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .hero__grid > * {
    grid-area: auto;
  }

  .hero__actions {
    order: 1;
  }

  .hero__figure {
    order: 2;
    justify-self: start;
    width: min(100%, 21rem);
    margin-top: 2.25rem;
  }

  .hero__credits {
    order: 3;
    margin-top: 1.75rem;
  }

  .hero__also {
    order: 4;
  }
}

/* A framed photograph behind glass. */
.frame {
  --edge: clamp(0.45rem, 1vw, 0.7rem);
  position: relative;
  padding: var(--edge);
  border-radius: 2px;
  background: linear-gradient(145deg, #4d4248 0%, #1a1416 38%, #0f0b0d 62%, #372d32 100%);
  box-shadow: var(--lift-3);
}

.frame img {
  display: block;
  width: 100%;
  height: auto;
}

.frame::after {
  content: "";
  position: absolute;
  inset: var(--edge);
  background: linear-gradient(118deg, rgb(255 255 255 / 0.14) 0%, rgb(255 255 255 / 0.03) 20%, transparent 36%, transparent 74%, rgb(255 255 255 / 0.05) 100%);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.5), inset 0 10px 14px -10px rgb(0 0 0 / 0.6);
  pointer-events: none;
}

.frame--portrait img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* ---------- Inner page heads ---------- */

/* The first band on a page sits closer to the header than later bands sit to each other. */
.band--first {
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
}

.page-head {
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.page-head:last-child {
  margin-bottom: 0;
}

.page-head__title {
  color: var(--marigold);
  font-size: clamp(2.6rem, 6.2vw, 4.6rem);
  line-height: 1;
}

.page-head .lede {
  margin-top: 1.25rem;
}

.page-head__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

/* ---------- The poster wall ---------- */

.wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.5rem, 3.2vw, 2.5rem) clamp(1rem, 2.6vw, 2rem);
  align-items: start;
}

@media (max-width: 62rem) {
  .wall {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 44rem) {
  .wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Two posters beside a paragraph (behind-the-camera credits). */
.wall--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* One credit: the poster in its case, and under it a caption plate when the
   poster is the production's own (a drawn poster carries its own credit). */
.wall__item {
  display: grid;
  gap: 0.8rem;
}

/* The case: a thin dark-metal frame. Its ::after is the glass. --i shifts the
   sheen so that no two cases catch the light at the same spot. */
.wall__case {
  --edge: 0.5rem;
  container-type: inline-size;
  position: relative;
  padding: var(--edge);
  border-radius: 2px;
  background: linear-gradient(145deg, #4d4248 0%, #1a1416 38%, #0f0b0d 62%, #372d32 100%);
  box-shadow: var(--lift-2);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.wall__case:hover,
.wall__case:focus-within {
  box-shadow: var(--lift-3);
  transform: translateY(-4px);
}

.wall__case::after {
  content: "";
  position: absolute;
  inset: var(--edge);
  background: linear-gradient(115deg, rgb(255 255 255 / 0.13) 0%, rgb(255 255 255 / 0.03) 16%, transparent 30%, transparent 58%, rgb(255 255 255 / 0.07) 72%, transparent 86%);
  background-size: 230% 100%;
  background-position: calc(18% + var(--i, 0) * 7%) 0;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.55), inset 0 10px 14px -10px rgb(0 0 0 / 0.7);
  pointer-events: none;
  transition: background-position 700ms ease;
}

.wall__case:hover::after,
.wall__case:focus-within::after {
  background-position: calc(62% + var(--i, 0) * 7%) 0;
}

/*
  The sheet. Every poster is drawn for this site: --ground is the film's own
  colour, --ink the type on it. All text is live and sits on the solid ground;
  sizes follow the poster's width (cqi) with rem floors so they still zoom.
*/
.poster {
  --ground: var(--plum-900);
  --ink: var(--screen);
  position: relative;
  isolation: isolate;
  overflow: hidden; /* keeps the big letter inside the sheet */
  display: flex;
  flex-direction: column;
  aspect-ratio: 27 / 40;
  padding: 1rem;
  padding: 7cqi 7cqi 6.5cqi;
  /* The key light is kept faint and the top is shaded, so the small top line
     stays above 4.5:1 even on the lightest ground (#a03a1c). */
  background:
    var(--grain-light),
    radial-gradient(90% 55% at 26% 14%, rgb(255 255 255 / 0.12), transparent 70%),
    linear-gradient(180deg, rgb(0 0 0 / 0.22), transparent 24%),
    linear-gradient(180deg, transparent 40%, rgb(0 0 0 / 0.34)),
    var(--ground);
  color: var(--ink);
  text-decoration-line: none;
}

.poster__meta {
  margin-bottom: auto;
  font: 500 0.8rem/1.25 var(--text);
  font-size: clamp(0.75rem, 0.55rem + 2.3cqi, 0.95rem);
}

/* Typographic posters: one huge letter or number from the title, tone on tone. */
.poster__glyph {
  position: absolute;
  top: -6cqi;
  right: -8cqi;
  z-index: -1;
  color: rgb(255 255 255 / 0.1);
  color: color-mix(in oklab, var(--ground) 80%, white);
  font: 400 9rem/0.8 var(--display);
  font-size: 118cqi;
  pointer-events: none;
}

/* Photo posters: her own photograph, fading into the ground where the type sits. */
.poster__art {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--ground);
}

.poster__art img {
  display: block;
  width: 100%;
  height: 62%;
  object-fit: cover;
}

/* Two scrims: a dark one under the top line, and the ground rising from below
   so the title and credits always sit on solid colour, never on the photograph. */
.poster__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(12 4 9 / 0.74) 0%, rgb(12 4 9 / 0.22) 14%, transparent 24%),
    linear-gradient(180deg, transparent 30%, var(--ground) 55%);
}

.poster__title {
  font: 400 1.6rem/1.02 var(--display);
  font-size: clamp(1.35rem, 14.5cqi, 2.9rem);
  overflow-wrap: break-word;
  text-wrap: balance;
}

/* Thrillers and procedurals: the title in tall condensed capitals. */
.poster--tall .poster__title {
  font-family: var(--tall);
  font-weight: var(--tall-strong);
  font-size: calc(clamp(1.75rem, 21cqi, 4.2rem) * var(--tall-scale));
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.poster:hover .poster__title,
.poster:focus-visible .poster__title {
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.12em;
}

.poster__credit {
  margin-top: 0.8rem;
  margin-top: 4.5cqi;
  padding-top: 0.7rem;
  padding-top: 4cqi;
  border-top: 1px solid rgb(255 255 255 / 0.4);
  border-top-color: color-mix(in srgb, currentColor 42%, transparent);
  font: 400 0.9rem/1.3 var(--text);
  font-size: clamp(0.875rem, 0.62rem + 2.7cqi, 1.08rem);
}

.poster__name {
  display: block;
  margin-bottom: 0.15em;
  font: var(--tall-regular) 0.85rem/1.2 var(--tall);
  font-size: clamp(0.82rem, 0.6rem + 2.4cqi, 1rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.poster__billing {
  margin-top: 0.5rem;
  margin-top: 3.2cqi;
  font: var(--tall-regular) 0.78rem/1.25 var(--tall);
  font-size: clamp(0.75rem, 0.58rem + 2cqi, 0.92rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.86;
}

/* A production's own poster covers the drawn one, which stays underneath as
   the link's text for screen readers. */
.poster__official {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: #0d0709;
}

/* The official poster covers the drawn one, so the drawn poster's photograph
   is never seen. Hidden, it is not downloaded either: its <img> is lazy, and a
   lazy image that is not displayed never loads. */
.poster__official ~ .poster__art {
  display: none;
}

.poster__official img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Square or wide key art is shown whole, over a blurred, darkened copy of itself. */
.poster__official--fit img:first-child {
  filter: blur(16px) saturate(1.25) brightness(0.5);
  transform: scale(1.25);
}

.poster__official--fit img + img {
  object-fit: contain;
}

.wall__caption {
  display: grid;
  gap: 0.1rem;
  padding-inline: 0.2rem;
  line-height: 1.35;
}

.wall__title {
  margin-bottom: 0.15rem;
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1.15;
  text-wrap: balance;
}

.wall__role {
  font-size: 1rem;
  font-weight: 500;
}

.wall__meta {
  color: var(--rose);
  font-size: 0.92rem;
}

/* The same credits as a plain table, for scanning and copying. */
.credits {
  width: 100%;
  max-width: 56rem;
  border-collapse: collapse;
}

.credits th,
.credits td {
  padding: 0.85rem 1.25rem 0.85rem 0;
  border-bottom: 1px solid rgb(255 255 255 / 0.14);
  text-align: left;
  vertical-align: baseline;
}

.credits thead th {
  color: var(--rose);
  font-size: 0.95rem;
  font-weight: 500;
}

.credits td:first-child {
  width: 4.5rem;
  color: var(--rose);
  font-variant-numeric: tabular-nums;
}

.credits cite {
  font-weight: 500;
}

.credits__format {
  display: block;
  color: var(--rose);
  font-size: 0.92rem;
}

/* Phones: the year needs about 3rem, so give the rest to the title and role. */
@media (max-width: 34rem) {
  .credits th,
  .credits td {
    padding-right: 0.75rem;
  }

  .credits td:first-child {
    width: 3rem;
  }
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.split > * > * + * {
  margin-top: 1.1rem;
}

@media (max-width: 52rem) {
  .split {
    grid-template-columns: 1fr;
  }
}

/* ---------- Lobby cards (gallery photographs) ---------- */

.stills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: clamp(0.9rem, 2.2vw, 1.6rem);
}

@media (max-width: 62rem) {
  .stills {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 44rem) {
  .stills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* A glossy print on card: pale border, picture, caption printed underneath. */
.still {
  display: flex;
  flex-direction: column;
  padding: 0.45rem 0.45rem 0;
  border-radius: 2px;
  background: linear-gradient(180deg, #fffaf0, var(--paper) 30%, var(--paper-2));
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.9), var(--lift-2);
}

.still--wide {
  grid-column: span 2;
}

.still__picture {
  position: relative;
  flex: 1 1 auto;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--plum-900);
}

.still--wide .still__picture {
  aspect-ratio: 7 / 4;
}

.still__picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The print's sheen: a soft highlight across the top-left corner only. */
.still__picture::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgb(255 255 255 / 0.16) 0%, rgb(255 255 255 / 0.03) 16%, transparent 30%);
  box-shadow: inset 0 0 0 1px rgb(45 15 34 / 0.18);
  pointer-events: none;
}

.still figcaption {
  padding: 0.55rem 0.2rem 0.65rem;
  line-height: 1.3;
}

.still__title {
  display: block;
  font-size: 1rem;
  font-weight: 500;
}

.still__where {
  display: block;
  margin-top: 0.1rem;
  color: var(--ink-2);
  font-size: 0.9rem;
}

/* On paper a card needs only a light shadow; in the deep hall a print needs a strong one. */
.band--paper .still,
.band--paper-2 .still {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.9), var(--lift-paper);
}

.band--deep .print,
.band--hall .print {
  box-shadow: var(--lift-3);
}

/* The photograph above the workshop list on the home page. */
.teaser-photo {
  max-width: 24rem;
  margin-bottom: 1.75rem;
}

.teaser-photo .still__picture {
  aspect-ratio: 4 / 3;
}

.stills-group + .stills-group {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

.stills-group h2 {
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

/* ---------- Media: videos as small screens that open on YouTube ---------- */

.media__group {
  margin: clamp(2.25rem, 4.5vw, 3rem) 0 clamp(1rem, 2vw, 1.4rem);
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  scroll-margin-top: 1.5rem; /* the home page links to #trailers */
}

.band__head + .media__group {
  margin-top: 0;
}

/* The poster wall's grid: four across a desktop, three on a tablet, two on a
   phone, with the same gaps, so the videos line up with the posters. Each
   item stretches to its row's height, so the videos in a row rise in line as
   the page scrolls (see the motion section). */
.media {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.5rem, 3.2vw, 2.5rem) clamp(1rem, 2.6vw, 2rem);
}

@media (max-width: 62rem) {
  .media {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 44rem) {
  .media {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* A video: its picture in the posters' dark-metal frame and glass, and a
   caption under it like the poster wall's. */
.media__card {
  display: grid;
  align-content: start;
  gap: 0.15rem;
  color: inherit;
  text-decoration-line: none;
}

.media__frame {
  --edge: 0.35rem;
  position: relative;
  display: block;
  margin-bottom: 0.55rem;
  padding: var(--edge);
  border-radius: 2px;
  background: linear-gradient(145deg, #4d4248 0%, #1a1416 38%, #0f0b0d 62%, #372d32 100%);
  box-shadow: var(--lift-2);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

/* YouTube's thumbnail is 4:3. For a 16:9 video it has black bars above and
   below, which the 16:9 crop removes. A thumbnail without them sets
   object-position on its <img> to choose what is kept. */
.media__frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.media__frame::after {
  content: "";
  position: absolute;
  inset: var(--edge);
  background: linear-gradient(115deg, rgb(255 255 255 / 0.13) 0%, rgb(255 255 255 / 0.03) 16%, transparent 30%, transparent 58%, rgb(255 255 255 / 0.07) 72%, transparent 86%);
  background-size: 230% 100%;
  background-position: 18% 0;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.55), inset 0 8px 12px -8px rgb(0 0 0 / 0.7);
  pointer-events: none;
  transition: background-position 700ms ease;
}

/* The play mark, so a picture reads as a video. */
.media__frame::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 2.1rem;
  height: 2.1rem;
  margin: -1.05rem 0 0 -1.05rem;
  border-radius: 50%;
  background: rgb(20 4 14 / 0.72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 7v10l8-5z' fill='%23f5d24b'/%3E%3C/svg%3E") 55% 50% / 62% no-repeat;
  box-shadow: 0 0 0 1.5px rgb(245 210 75 / 0.9), 0 3px 10px rgb(0 0 0 / 0.45);
}

.media__card:hover .media__frame,
.media__card:focus-visible .media__frame {
  box-shadow: var(--lift-3);
  transform: translateY(-3px);
}

.media__card:hover .media__frame::after,
.media__card:focus-visible .media__frame::after {
  background-position: 62% 0;
}

.media__title {
  padding-inline: 0.15rem;
  font-family: var(--display);
  font-size: 1.02rem;
  line-height: 1.25;
  text-wrap: balance;
}

.media__meta {
  padding-inline: 0.15rem;
  color: var(--rose);
  font-size: 0.88rem;
  line-height: 1.35;
}

.media__card:hover .media__title {
  text-decoration-line: underline;
  text-decoration-color: var(--marigold);
  text-underline-offset: 0.15em;
}

/* Trailers: a plain list, in two or three columns where there is room. */
.media__trailers {
  columns: 16rem;
  column-gap: clamp(1.5rem, 4vw, 3rem);
}

.media__trailers li {
  break-inside: avoid;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgb(255 255 255 / 0.12);
}

.media__trailers cite {
  font-weight: 500;
}

.media__note {
  margin-top: 1.25rem;
}

/* ---------- Paper blocks ---------- */

.prose > * + * {
  margin-top: 1.1em;
}

.prose {
  max-width: 38rem;
}

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: clamp(2.5rem, 6vw, 4.5rem) 0;
}

/* Credits that back the workshops. */
.proof {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
}

.proof__credit {
  display: block;
  font: 400 1.35rem/1.2 var(--display);
}

.proof__detail {
  display: block;
  margin-top: 0.35rem;
  color: var(--rose);
  font-size: 0.98rem;
  line-height: 1.45;
}

/* One workshop: who it is for and its name on the left, the case for it on the right. */
.offer {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1.5rem, 5vw, 4.5rem);
  scroll-margin-top: 1.5rem;
}

.offer + .offer {
  margin-top: clamp(3rem, 7vw, 5.5rem);
  padding-top: clamp(3rem, 7vw, 5.5rem);
  border-top: 1px solid var(--line);
}

.offer__side > * + * {
  margin-top: 1rem;
}

.offer__for {
  color: var(--ink-2);
}

.offer__photo {
  margin-top: 1.75rem;
  max-width: 19rem;
}

.offer__photo .still__picture {
  aspect-ratio: 4 / 3;
}

.offer__body > * + * {
  margin-top: 1.1rem;
}

.offer__headline {
  font: 400 clamp(1.45rem, 2.4vw, 1.9rem)/1.2 var(--display);
}

/* A lead-in, so the list reads as what the subject covers and not as a timetable. */
.points__lead {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font: 400 1.2rem/1.25 var(--display);
}

.points {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.points__lead + .points {
  margin-top: 0.9rem;
  padding-top: 0;
  border-top: 0;
}

.points dt {
  font-weight: 500;
}

.points dd {
  color: var(--ink-2);
}

.offer__not {
  color: var(--ink-2);
  font-size: 0.98rem;
}

.offer .btn {
  margin-top: 0.6rem;
}

@media (max-width: 52rem) {
  .offer {
    grid-template-columns: 1fr;
  }
}

/* How an enquiry becomes a session: three steps, in order. */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  counter-reset: step;
}

.steps li {
  padding-top: 1.1rem;
  border-top: 2px solid var(--ink);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 0.4rem;
  color: var(--gold);
  font: 400 2.25rem/1 var(--display);
}

.steps h3 {
  margin-bottom: 0.4rem;
}

@media (max-width: 52rem) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* Questions and answers. */
.faq {
  max-width: 46rem;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.05rem 0;
  font-size: 1.15rem;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--gold);
  font: 400 1.6rem/1 var(--display);
  transition: transform 180ms ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  max-width: 40rem;
  padding-bottom: 1.25rem;
  color: var(--ink-2);
}

/* A person: photograph beside words (about, facilitator, contact). */
.person {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.person__photo {
  width: min(100%, 21rem);
}

/* A plain photographic print lying on the paper. */
.print {
  overflow: hidden;
  border-radius: 2px;
  box-shadow: var(--lift-paper);
}

.print img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.person__words > * + * {
  margin-top: 1.1rem;
}

@media (max-width: 52rem) {
  .person {
    grid-template-columns: 1fr;
  }
}

/* Contact routes. */
.routes {
  display: grid;
  gap: 0;
  margin-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.routes > div {
  display: grid;
  grid-template-columns: minmax(8rem, 0.4fr) minmax(0, 1fr);
  gap: 0.25rem 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.routes dt {
  font-weight: 500;
}

.routes dd > * + * {
  margin-top: 0.6rem;
}

@media (max-width: 34rem) {
  .routes > div {
    grid-template-columns: 1fr;
  }
}

/* A missing fact hides its whole row. (The plain rule for missing items
   loses to ".routes > div", which sets display: grid.) */
.routes > [data-placeholder="missing"] {
  display: none;
}

/* ---------- The contact page ---------- */

/* The casting card beside a print of Neelam, both hung on the hall wall. */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.contact__photo {
  justify-self: end;
  width: min(100%, 21rem);
}

@media (max-width: 52rem) {
  .contact {
    grid-template-columns: 1fr;
  }

  .contact__photo {
    justify-self: start;
    width: min(70%, 17rem);
  }
}

/* Programme paper on the wall, with what a casting team needs first. */
.callsheet {
  padding: clamp(1.4rem, 3.6vw, 2.6rem);
  border-radius: 4px;
  background: var(--grain-dark), linear-gradient(180deg, #fffaf0, var(--paper) 35%, var(--paper-2));
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.9), var(--lift-3);
}

.callsheet h2 {
  font-size: clamp(1.7rem, 2.9vw, 2.4rem);
}

.callsheet__lines {
  margin-top: 1.4rem;
  border-top: 1px solid var(--line);
}

/* On the workshops page the heading sits outside the card, so the list opens
   it: no rule or gap above the first line. */
.callsheet > .callsheet__lines:first-child {
  margin-top: 0;
  border-top: 0;
}

.callsheet > .callsheet__lines:first-child > div:first-child {
  padding-top: 0;
}

.callsheet__lines > div {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.3rem 1.25rem;
  align-items: baseline;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.callsheet__lines dt {
  color: var(--ink-2);
  font-size: 0.98rem;
}

.callsheet__lines dd > * + * {
  margin-top: 0.8rem;
}

/* The number is the one thing on the page set large. */
.callsheet__number {
  font: 400 clamp(1.85rem, 1.1rem + 2.6vw, 2.75rem)/1.15 var(--display);
  font-variant-numeric: lining-nums;
}

.callsheet__address {
  font-size: 1.3rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.callsheet__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.callsheet__actions .btn {
  min-height: 2.75rem;
  padding: 0.5rem 1.1rem;
  font-size: 1rem;
}

/* Takes no room until a Copy button is first pressed, then keeps one line's
   height (contact.js adds is-used), so the message coming and going never
   moves the list below. */
.callsheet__status {
  color: var(--ink-2);
  font-size: 0.95rem;
}

.callsheet__status.is-used {
  min-height: 1.6em;
  margin-top: 0.9rem;
}

.callsheet__ask {
  margin-top: 1.6rem;
  font: 500 1.05rem/1.3 var(--text);
}

.callsheet__list {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.6rem;
}

/* A short gold rule marks each item, like a line on a call sheet. */
.callsheet__list li {
  position: relative;
  padding-left: 1.2rem;
}

.callsheet__list li::before {
  content: "";
  position: absolute;
  top: 0.8em;
  left: 0;
  width: 0.55rem;
  height: 2px;
  background: var(--gold);
}

@media (max-width: 34rem) {
  .callsheet__lines > div {
    grid-template-columns: 1fr;
  }
}

/* The paper band under it: workshops beside the facts casting asks for. */
.contact-more {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.contact-more > * > * + * {
  margin-top: 1rem;
}

.contact-more h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}

.contact-more .routes {
  margin-top: 1.25rem;
}

@media (max-width: 52rem) {
  .contact-more {
    grid-template-columns: 1fr;
  }
}

/* ---------- Workshop enquiries: the intro beside the contact card ---------- */

.enquiry {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  scroll-margin-top: 1.5rem;
}

.enquiry__intro > * + * {
  margin-top: 1rem;
}

@media (max-width: 52rem) {
  .enquiry {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  background: var(--grain-light), var(--plum-950);
  color: var(--rose);
  font-size: 0.98rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr) minmax(0, 1fr);
  gap: 2rem clamp(1.5rem, 4vw, 3rem);
}

.site-footer__name {
  color: var(--marigold);
  font: 400 1.5rem/1.15 var(--display);
}

.site-footer li + li,
.site-footer p + p {
  margin-top: 0.4rem;
}

/* Footer links get a 24px-tall tap area. */
.site-footer a {
  display: inline-block;
  padding-block: 0.15rem;
}

.site-footer__end {
  margin-top: 2.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgb(255 255 255 / 0.12);
  font-size: 0.9rem;
}

@media (max-width: 44rem) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Display type ---------- */

/* Every element set in the display face takes its weight and axes from the
   chosen pairing. This rule must stay after the rules above that set those
   elements' font shorthand, or it loses to them. */
h1,
h2,
h3,
.masthead__name,
.poster__glyph,
.poster__title,
.proof__credit,
.offer__headline,
.points__lead,
.steps li::before,
.faq summary::after,
.wall__title,
.media__title,
.callsheet__number,
.site-footer__name {
  font-weight: var(--display-weight);
  font-variation-settings: var(--display-axes);
}

/* ---------- Review marks ---------- */

/*
  Anything not final carries data-placeholder in the HTML. Visitors see a clean
  page. Open a page with #review on the end of its address (the footer has a
  link while any item is open) and each unconfirmed item is outlined, and
  missing details that are otherwise hidden appear.
*/
.review-note {
  display: none;
  padding: 0.55rem 1rem;
  background: var(--review);
  color: var(--plum-950);
  font-size: 0.95rem;
  text-align: center;
}

.review-note:target {
  display: block;
}

/* The footer's link to the review view shows only while the page has open
   items. These rules name the footer because ".site-footer a" sets display
   too, and would otherwise show the link on every page. */
.site-footer .review-link {
  display: none;
}

body:has([data-placeholder]) .site-footer .review-link {
  display: inline-block;
}

[data-placeholder="missing"] {
  display: none;
}

body:has(.review-note:target) [data-placeholder] {
  outline: 2px dashed var(--review);
  outline-offset: 0.3rem;
}

body:has(.review-note:target) [data-placeholder="missing"] {
  display: revert;
}

body:has(.review-note:target) .routes > [data-placeholder="missing"] {
  display: grid;
}

body:has(.review-note:target) .band--paper [data-placeholder],
body:has(.review-note:target) .band--paper-2 [data-placeholder],
body:has(.review-note:target) .callsheet [data-placeholder],
body:has(.review-note:target) .still [data-placeholder] {
  outline-color: #0b6f86;
}

body:has(.review-note:target) .poster [data-placeholder] {
  outline-color: currentColor;
  outline-offset: 0.15rem;
}

/* ---------- Motion and system preferences ---------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/*
  Scroll: as a poster or a photograph rises from the bottom of the screen, its
  light comes up with it, and a photograph straightens as if just pinned up.
  The motion follows the scroll position, not a clock, so nothing waits to
  appear and nothing starts hidden (the faintest it gets is 15%). Browsers
  without scroll-driven animations, and anyone who asks their device for less
  motion, see the wall as it is. The home photograph is left alone: it is the
  first thing a phone paints. A video moves by its list item, not its link:
  the items in a row are all as tall as the row, so they rise together.
*/
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .wall__item,
    .media > li,
    .still {
      animation: house-lights auto linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 90%;
    }

    .still {
      animation-name: pinned-up;
    }
  }
}

@keyframes house-lights {
  from {
    opacity: 0.15;
    transform: translateY(1.75rem);
  }
}

@keyframes pinned-up {
  from {
    opacity: 0.15;
    transform: translateY(1.25rem) rotate(-1.2deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .wall__case,
  .wall__case::after,
  .media__frame,
  .media__frame::after,
  .faq summary::after {
    transition: none;
  }

  .wall__case:hover,
  .wall__case:focus-within,
  .media__card:hover .media__frame,
  .media__card:focus-visible .media__frame,
  .btn--primary:hover {
    transform: none;
  }
}

/* Windows high-contrast and similar: drop the decorative layers. */
@media (forced-colors: active) {
  .wall__case::after,
  .media__frame::after,
  .media__frame::before,
  .frame::after,
  .still__picture::after,
  .poster__glyph,
  .hero__figure::before {
    display: none;
  }

  .btn {
    border-color: ButtonText;
  }
}
