/* ===========================================================
   רעות גרנות — the palette is lifted off the show flyer:
   a pale sky wash, the deep navy of its heading, the steel blue
   of its lettering, and a brass borrowed from what she wears.
   =========================================================== */

:root {
  /* ---- the knobs the theme panel turns ---- */
  --paper:  #eaf2fa;   /* the sky wash */
  --ink:    #16232f;   /* the navy of the flyer's heading */
  --accent: #4f7b96;   /* the steel blue of its script */
  --gold:   #bf9d63;   /* the brass in the turban, for the fine details */

  --font-size: 17px;
  --radius: 18px;
  --serif: 'Frank Ruhl Libre', 'David Libre', Georgia, serif;
  --sans:  'IBM Plex Sans Hebrew', 'Segoe UI', system-ui, sans-serif;
  /* Reserved for words somebody wrote by hand — never for the interface. */
  --hand:  'Playpen Sans Hebrew', 'Gveret Levin', cursive;

  --texture: url('../img/tex-cloud.png');
  --texture-size: 340px;

  /* ---- everything else is mixed from those, so any palette stays coherent ----
     The tints come off the accent rather than the gold: this page is a blue
     one, and warming its panels would fight the sky it is built on. The gold
     is kept for the hairlines and the small marks. */
  --wash:       color-mix(in srgb, var(--paper) 88%, var(--accent));
  --wash-deep:  color-mix(in srgb, var(--paper) 80%, var(--accent));
  --card:       color-mix(in srgb, var(--paper) 34%, #fff);
  --ink-soft:   color-mix(in srgb, var(--ink) 72%, var(--paper));
  --ink-faint:  color-mix(in srgb, var(--ink) 48%, var(--paper));
  --line:       color-mix(in srgb, var(--paper) 78%, var(--accent));
  --edge:       color-mix(in srgb, var(--paper) 60%, var(--accent));
  --gold-soft:  color-mix(in srgb, var(--gold) 48%, var(--paper));
  --blue-deep:  var(--accent);
  --blue:       color-mix(in srgb, var(--accent) 64%, var(--paper));

  --shell: min(1180px, 100% - 2.5rem);
  --shadow-sm: 0 2px 10px color-mix(in srgb, var(--ink) 7%, transparent);
  --shadow-md: 0 14px 40px -20px color-mix(in srgb, var(--ink) 34%, transparent);
  --shadow-lg: 0 30px 70px -34px color-mix(in srgb, var(--ink) 44%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-padding-top: 92px; }
@media (max-width: 620px) { html { scroll-padding-top: 70px; } }

body {
  margin: 0;
  background-color: var(--paper);
  background-image: var(--texture);
  background-repeat: repeat;
  background-size: var(--texture-size);
  color: var(--ink);
  font: 400 var(--font-size)/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/*
 * The text-size control, and why it is on the root rather than on body.
 *
 * Almost every size in this file is in rem, and rem is measured from the ROOT
 * font size — never from body's. Setting body alone moves the handful of
 * elements that inherit it and leaves every other rule untouched, which makes
 * the slider look broken: it is working, on almost nothing.
 *
 * The design was drawn with a 16px root and 17px body text, so the root is
 * scaled by the same ratio the slider moves body by. At the default of 17 that
 * is exactly 16px and the page is pixel-for-pixel what it was; anywhere else,
 * the whole page grows or shrinks together instead of the text tearing away
 * from the space around it.
 */
html { font-size: calc(var(--font-size) * 16 / 17); }

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.25; margin: 0; }

.shell { width: var(--shell); margin-inline: auto; }
main { position: relative; }

/* ------------------------------ nav ------------------------------ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.nav.is-stuck { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

.nav__inner {
  width: var(--shell);
  max-width: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 72px;
}

/* Her name is the mark. There is no logo to draw, and a wordmark that is real
   text stays sharp, translates and can be renamed from the panel. */
.nav__brand {
  flex: none;
  font: 700 1.16rem/1 var(--serif);
  text-decoration: none;
  color: var(--ink);
  letter-spacing: .01em;
  white-space: nowrap;
}

.tabs {
  display: flex;
  gap: .2rem;
  min-width: 0;              /* let the strip scroll instead of widening the header */
  margin-inline-start: auto;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-block: .5rem;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: none;
  border: 0;
  background: none;
  font: 600 .9375rem/1 var(--sans);
  color: var(--ink-soft);
  padding: .62rem .8rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.tab:hover { color: var(--ink); background: var(--wash); }
.tab[aria-current='true'] { color: #fff; background: var(--blue-deep); }

/* ------------------------------ buttons ------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .82rem 1.6rem;
  font: 600 1rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, background .18s, color .18s;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.btn--solid  { background: var(--ink); color: var(--paper); box-shadow: var(--shadow-md); }
.btn--solid:hover { background: color-mix(in srgb, var(--ink) 84%, var(--accent)); }
.btn--ghost  { background: transparent; color: var(--ink); border-color: var(--edge); }
.btn--ghost:hover { border-color: var(--ink-soft); background: color-mix(in srgb, var(--card) 66%, transparent); }
.btn--wa     { background: #1fa855; color: #fff; }
.btn--wa:hover { background: #17904a; }
.btn--sm { padding: .55rem 1.05rem; font-size: .906rem; }

/* ------------------------------ section frame ------------------------------ */

.section { padding-block: clamp(4rem, 8vw, 6.5rem); position: relative; }
.section--wash {
  background: linear-gradient(180deg,
    transparent 0%,
    color-mix(in srgb, var(--wash-deep) 72%, transparent) 20% 80%,
    transparent 100%);
}

.section__head { text-align: center; margin-bottom: 3rem; }
.section__kicker {
  font: 600 .8125rem/1 var(--sans);
  letter-spacing: .22em;
  color: var(--blue-deep);
  display: block;
  margin-bottom: .9rem;
}
.section__title { font-size: clamp(2rem, 4.4vw, 2.9rem); }
.section__lead {
  max-width: 58ch;
  margin: 1rem auto 0;
  color: var(--ink-soft);
  font-size: 1.06rem;
}

/* a small note between two hairlines — this page's divider */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  margin: 1.4rem auto 0;
  max-width: 260px;
  color: var(--blue);
}
.ornament::before, .ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), transparent);
}
.ornament svg { width: 16px; height: 16px; fill: currentColor; flex: none; }

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

.hero {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 4.5rem) 0;
  text-align: center;
  overflow: hidden;
}
/* The flyer's own botanical branch, lifted off the artwork. */
.hero__branch {
  position: absolute;
  top: -20px;
  inset-inline-start: -30px;
  width: min(220px, 24vw);
  opacity: .5;
  transform: scaleX(-1);
  pointer-events: none;
  z-index: 0;
}
.hero > .shell { position: relative; z-index: 1; }
.hero__bsd {
  font: 400 .75rem/1 var(--sans);
  color: var(--ink-faint);
  letter-spacing: .1em;
  margin: 0 0 1.4rem;
}
.hero__name {
  font-size: clamp(2.7rem, 8vw, 4.6rem);
  font-weight: 900;
  letter-spacing: -.01em;
  line-height: 1.05;
}
/* The flyer says the important second line in a script hand; so does this. */
.hero__tagline {
  font-family: var(--hand);
  font-size: clamp(1.15rem, 3.2vw, 1.7rem);
  color: var(--blue-deep);
  margin: .9rem 0 0;
}
.hero__lines {
  margin: 2rem auto 0;
  max-width: 48ch;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2.3vw, 1.3rem);
  line-height: 1.85;
  color: var(--ink);
}
.hero__lines span { display: block; }
.hero__lines strong {
  display: block;
  margin-top: .8rem;
  font-weight: 700;
  font-size: .92em;
  letter-spacing: .04em;
  color: var(--blue-deep);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; margin-top: 2.2rem; }

.hero__photo { margin-top: clamp(2.5rem, 6vw, 4rem); position: relative; }
.hero__photo img {
  width: 100%;
  height: clamp(320px, 50vw, 600px);
  object-fit: cover;
  object-position: 50% 34%;
}
/* fade the photograph into the paper on all four edges */
.hero__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--paper) 0%, transparent 22%, transparent 74%, var(--paper) 100%),
    linear-gradient(90deg, var(--paper) 0%, transparent 14%, transparent 86%, var(--paper) 100%);
  pointer-events: none;
}

/* ------------------------------ about ------------------------------ */

.about {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.about__text p { margin: 0 0 1.1rem; font-size: 1.08rem; }
.about__text p:last-child { margin-bottom: 0; }

/* a soft dome — the flyer's arch, but forgiving enough never to crop a face */
.arch {
  position: relative;
  overflow: hidden;
  background: var(--wash-deep);
  border-radius: 50% 50% var(--radius) var(--radius) / 34% 34% 4% 4%;
  aspect-ratio: 1 / 1.3;
}
.arch img { width: 100%; height: 100%; object-fit: cover; }

.about__frame { position: relative; padding: 14px; }
.about__frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--gold-soft);
  border-radius: 50% 50% var(--radius) var(--radius) / 32% 32% 3% 3%;
  pointer-events: none;
}

.pull {
  margin: clamp(2.6rem, 5vw, 3.8rem) auto 0;
  max-width: 46ch;
  text-align: center;
  font-family: var(--hand);
  font-size: clamp(1.1rem, 2.6vw, 1.42rem);
  line-height: 1.75;
  color: var(--blue-deep);
  padding-top: 2rem;
  position: relative;
}
.pull::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: 50%;
  translate: 50% 0;
  width: 62px;
  height: 1px;
  background: var(--gold-soft);
}

/* ------------------------------ services ------------------------------ */

.services {
  display: grid;
  gap: 1.3rem;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}
.scard {
  background: color-mix(in srgb, var(--card) 82%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.scard:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--edge);
}
.scard__icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-bottom: 1.1rem;
  color: var(--blue-deep);
  background: color-mix(in srgb, var(--accent) 11%, transparent);
}
.scard__title { font-size: 1.22rem; }
/* The booking condition. It has to be readable before the paragraph is. */
.scard__note {
  display: inline-block;
  margin-top: .55rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  font: 600 .78rem/1.4 var(--sans);
  color: color-mix(in srgb, var(--gold) 62%, var(--ink));
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  border: 1px solid var(--gold-soft);
}
.scard__body { margin: .8rem 0 0; color: var(--ink-soft); font-size: .99rem; }

/* ------------------------------ the course ------------------------------ */

.course {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.course__lead {
  font-family: var(--hand);
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  color: var(--blue-deep);
  margin: .8rem 0 1.4rem;
}
.course__body p { margin: 0 0 1rem; color: var(--ink-soft); font-size: 1.04rem; }

.course__points { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .7rem; }
.course__points li {
  position: relative;
  padding-inline-start: 1.9rem;
  font-size: 1rem;
}
.course__points li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: .62em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--blue-deep);
}
.course__note {
  margin: 1.6rem 0 1.5rem;
  font-size: .95rem;
  color: var(--ink-faint);
  border-inline-start: 2px solid var(--gold-soft);
  padding-inline-start: .9rem;
}

.course__photo {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
/* `height: auto` is load-bearing. The shipped <img> carries width and height
   attributes, which make both dimensions definite and leave aspect-ratio with
   nothing to do — so the photo took the flyer-crop's own 1100x760 shape. That
   would have been merely wrong-looking, except that applySettings strips those
   attributes the moment she uploads her own picture: the section changed shape
   depending on whether the photo had ever been replaced. */
.course__photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }

/* ------------------------------ gallery ------------------------------ */

/* Columns rather than a grid: the photographs are a mix of upright and wide,
   and a masonry flow lets each keep its own shape without a row of gaps. */
.shots {
  columns: 3;
  column-gap: 1.1rem;
}
@media (max-width: 900px) { .shots { columns: 2; } }
@media (max-width: 560px) { .shots { columns: 1; } }

.shot {
  break-inside: avoid;
  margin: 0 0 1.1rem;
}
.shot__open {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--wash-deep);
  cursor: zoom-in;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
}
.shot__open:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.shot__open:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
/* The box is reserved from the row's own `portrait` flag, so nothing shifts
   when the picture lands. */
.shot img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.shot--tall img { aspect-ratio: 2 / 3; }
.shot figcaption {
  margin-top: .5rem;
  font-size: .88rem;
  color: var(--ink-faint);
  text-align: center;
}

/* ------------------------------ lightbox ------------------------------ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(6px);
}
.lightbox__stage { margin: 0; max-width: 100%; max-height: 100%; }
.lightbox__stage img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  margin-inline: auto;
  border-radius: calc(var(--radius) * .55);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.lightbox__stage figcaption {
  margin-top: .9rem;
  text-align: center;
  color: #dfe9f2;
  font-size: .95rem;
}
.lightbox button {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .1);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background .2s, transform .2s;
}
.lightbox button:hover { background: rgba(255, 255, 255, .22); transform: scale(1.06); }
.lightbox button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lightbox__close {
  top: 1rem;
  inset-inline-end: 1rem;
  width: 46px;
  height: 46px;
  font-size: 26px;
  line-height: 1;
}
.lightbox__nav {
  top: 50%;
  translate: 0 -50%;
  width: 52px;
  height: 52px;
  font-size: 34px;
  line-height: 1;
}
.lightbox__nav--prev { inset-inline-end: 1rem; }
.lightbox__nav--next { inset-inline-start: 1rem; }
@media (max-width: 560px) {
  .lightbox__nav { width: 44px; height: 44px; font-size: 28px; }
  .lightbox__stage img { max-height: 72vh; }
}

/* ------------------------------ video ------------------------------ */

/*
 * A mosaic, not rows.
 *
 * The clips are honestly different shapes, and a wrapping row gave every card
 * shorter than the tallest one beside it a band of empty page underneath —
 * the taller the upright clips, the wider the bands. So: a grid with a very
 * fine row unit, and each card told how many units it stands in once it has
 * been measured. layoutMosaic() in site.js does the measuring and adds
 * .is-mosaic; until it runs this is an ordinary even-rowed grid.
 *
 * auto-fit rather than auto-fill so that two clips still sit in the middle of
 * the page instead of hugging one edge: the empty tracks collapse, the rest
 * share the width, and each card is centred inside the track it got.
 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr));
  align-items: start;
  gap: 1.6rem;
}
.video-grid.is-mosaic {
  /* dense, or a tall clip leaves a hole no later card is allowed to fill. */
  grid-auto-flow: row dense;
  grid-auto-rows: var(--mosaic-unit, .25rem);
  row-gap: 0;                /* the gutter is span maths now — see the card */
}
.video-grid.is-mosaic .vcard { margin-bottom: 1.6rem; }
.vcard {
  width: 100%;
  max-width: 24rem;
  margin-inline: auto;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s, box-shadow .22s;
}
.vcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.vcard__frame {
  position: relative;
  background: var(--wash-deep);
  /* 16/9 until the clip says otherwise; setRatio() writes the real one. */
  aspect-ratio: var(--ar, 16 / 9);
}
.vcard--portrait { --ar: 9 / 16; }
/*
 * An upright clip filling a whole column would stand nearly three times the
 * height of the wide one next to it, so its card is narrower and sits in the
 * middle of the column it was given. Narrowing the frame instead left the
 * picture in a white surround, which reads as a broken tile rather than a
 * tall one.
 */
.vcard--portrait { max-width: 17rem; }
/* Her own choice, from the panel: this one gets two columns of the mosaic. */
.vcard--wide { max-width: calc(48rem + 1.6rem); }
.vcard__frame img, .vcard__frame iframe, .vcard__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
/* contain, not cover: the frame is already the clip's own shape, and in the
   moment before the metadata arrives this shows the whole picture rather than
   a magnified middle. */
.vcard__frame video { object-fit: contain; background: #000; }
.vcard__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  width: 100%;
  background: linear-gradient(180deg, rgba(22, 35, 47, .06), rgba(22, 35, 47, .38));
  cursor: pointer;
}
.vcard__play span {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .28);
  transition: transform .2s;
}
.vcard__play:hover span { transform: scale(1.08); }
.vcard__play svg { width: 24px; height: 24px; fill: var(--ink); margin-inline-start: 4px; }
.vcard__body { padding: 1.1rem 1.25rem 1.35rem; }
.vcard__body h3 { font-size: 1.16rem; }
.vcard__body p { margin: .3rem 0 0; color: var(--ink-soft); font-size: .96rem; }

.vfilter { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 0 0 1.8rem; }
.vfilter__btn {
  font: 600 .906rem/1 var(--sans);
  cursor: pointer;
  padding: .5rem 1.05rem;
  border-radius: 999px;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--card) 70%, transparent);
  border: 1px solid var(--line);
  transition: background .18s, color .18s, border-color .18s;
}
.vfilter__btn:hover { border-color: var(--edge); color: var(--ink); }
.vfilter__btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.vfilter__btn.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/*
 * «this is an excerpt». Quieter than the category chip, because it is a fact
 * about the clip rather than a way of finding it — but present, because the
 * player is about to open somewhere other than 00:00.
 */
.vcard__clip {
  display: block;
  margin-top: .5rem;
  font: 600 .8rem/1.5 var(--sans);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
/* The range itself, isolated. «1:20–2:05» is two left-to-right numbers with a
   dash between them; dropped straight into a right-to-left line, the dash
   resolves to the paragraph's direction and the two times swap places. */
.vcard__clip bdi { unicode-bidi: isolate; }
.vcard__tag {
  display: inline-block;
  margin-top: .55rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  font: 600 .78rem/1.5 var(--sans);
  color: var(--blue-deep);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* ------------------------------ music ------------------------------ */

/*
 * align-items: start, because these cards are not the same height. A Spotify
 * artist embed is 380px and an uploaded song needs about 150; without this the
 * short one is stretched to match the tall one and sits in a card that is
 * mostly empty.
 */
.music-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr));
  align-items: start;
}
.tcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.tcard h3 { font-size: 1.1rem; }
.tcard p { margin: .2rem 0 1rem; color: var(--ink-soft); font-size: .95rem; }
.tcard iframe { width: 100%; border: 0; border-radius: calc(var(--radius) * .6); display: block; }

/*
 * The player for a song she uploaded. Runs left-to-right inside a
 * right-to-left page: a timeline follows the clock everywhere, and mirroring
 * one reads as a bug rather than as translation.
 */
.aplayer {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .2rem 0;
}
.aplayer__play {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.aplayer__play:hover { transform: scale(1.06); }
.aplayer__play:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.aplayer.is-playing .aplayer__play {
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* One track, painted up to --played, with a matching thumb in both engines. */
.aplayer__bar {
  --played: 0%;
  flex: 1 1 auto;
  min-width: 0;
  height: 22px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}
.aplayer__bar::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(to right,
    var(--accent) var(--played), var(--line) var(--played));
}
.aplayer__bar::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(to right,
    var(--accent) var(--played), var(--line) var(--played));
}
.aplayer__bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.aplayer__bar::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid var(--card);
  border-radius: 50%;
  background: var(--accent);
}
.aplayer__bar:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 999px; }

.aplayer__time {
  flex: none;
  font-size: .8rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  min-width: 5.9ch;
  text-align: right;
}
.aplayer__error { color: var(--ink-soft); font-size: .9rem; margin: 0; }

@media (max-width: 420px) {
  .aplayer { gap: .6rem; }
  .aplayer__play { width: 40px; height: 40px; }
}

/* ------------------------------ calendar ------------------------------ */

.shows { display: grid; gap: 1.15rem; }
.showcard {
  display: grid;
  grid-template-columns: 108px 1fr auto;
  gap: 1.6rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .22s, transform .22s;
}
.showcard:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.showcard--past { opacity: .62; }

.showcard__date { text-align: center; border-inline-end: 1px solid var(--line); padding-inline-end: 1.4rem; }
.showcard__day   { font: 700 2.5rem/1 var(--serif); color: var(--blue-deep); display: block; }
.showcard__month { font: 600 .875rem/1.5 var(--sans); color: var(--ink-soft); display: block; margin-top: .35rem; }
.showcard__heb   { font: 400 .8125rem/1.4 var(--sans); color: var(--ink-faint); display: block; }
/* The server-rendered card has one date line instead of the calendar block. */
.showcard__when  { margin: 0 0 .4rem; font-weight: 600; color: var(--blue-deep); }

.showcard__body h3 { font-size: 1.28rem; }
.showcard__meta { margin: .45rem 0 0; color: var(--ink-soft); font-size: .99rem; }
.showcard__meta span + span::before { content: '·'; margin-inline: .5rem; color: var(--edge); }
.showcard__note { margin: .5rem 0 0; font-size: .93rem; color: var(--ink-faint); }
.showcard__tag {
  display: inline-block;
  margin-top: .6rem;
  font: 600 .75rem/1 var(--sans);
  letter-spacing: .1em;
  color: var(--blue-deep);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  border-radius: 999px;
  padding: .38rem .8rem;
}
.showcard__poster { width: 92px; border-radius: calc(var(--radius) * .55); overflow: hidden; flex: none; }
.showcard__poster img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.showcard__actions { display: flex; flex-direction: column; gap: .5rem; align-items: stretch; }

.empty {
  text-align: center;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--card) 66%, transparent);
  border: 1px dashed var(--edge);
  border-radius: var(--radius);
  padding: 2.6rem 1.5rem;
}
.empty strong { display: block; font-family: var(--serif); font-size: 1.2rem; color: var(--ink); margin-bottom: .4rem; }

.past-toggle { display: block; margin: 1.6rem auto 0; }

/* ------------------------------ contact ------------------------------ */

.contact { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }

.contact__card {
  background: color-mix(in srgb, var(--card) 78%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.2rem);
  box-shadow: var(--shadow-sm);
}
.contact__row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.2rem; }
.contact__mail {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.4rem;
  font-weight: 600;
  color: var(--blue-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-soft);
  padding-bottom: 2px;
}
.contact__mail:hover { color: var(--ink); }

.socials { display: flex; gap: .6rem; margin-top: 1.8rem; flex-wrap: wrap; }
.socials a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  transition: color .2s, border-color .2s, transform .2s;
}
.socials a:hover { border-color: var(--blue); transform: translateY(-2px); }
.socials svg { width: 20px; height: 20px; }

.field { display: block; margin-bottom: 1rem; }
.field span { display: block; font: 600 .875rem/1 var(--sans); margin-bottom: .45rem; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  width: 100%;
  font: 400 1rem/1.6 var(--sans);
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * .6);
  padding: .72rem .9rem;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.field textarea { min-height: 130px; resize: vertical; }
/* Two fields that only mean anything together — a start with no end reads as
   an unfinished thought when they are stacked a row apart. */
.field-pair { display: flex; gap: 1rem; flex-wrap: wrap; }
.field-pair .field { flex: 1 1 9rem; }

.form__status { margin-top: 1rem; font-weight: 600; min-height: 1.5em; }
.form__status.is-ok  { color: #1c7c46; }
.form__status.is-err { color: #a8402c; }

/* Placeholder heights for the lists the script fills in. Without them the page
   is short until the fetch resolves, and an anchor tapped in that window aims
   at a position that no longer exists a moment later. */
#services-list:empty { min-height: 420px; }
#gallery-list:empty  { min-height: 620px; }
#shows-list:empty    { min-height: 220px; }

/* ------------------------------ the notes wall ------------------------------ */

/*
 * The writings and the testimonials share it.
 *
 * auto-fit, not auto-fill: an empty column is still a column, so two notes on
 * a wide screen were laid into the first two of four tracks and huddled
 * against one edge with half the section bare. auto-fit drops the empty ones
 * and the notes that exist share the width.
 *
 * That alone would stretch a lone note across the whole wall, so the wall is
 * narrowed to fit however many notes are on it. Three or more fill the shell
 * as before, and a phone is below every cap and unaffected.
 */
.notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  gap: 1.4rem;
  align-items: start;
  margin-inline: auto;
}
.notes:has(> :nth-child(1):last-child) { max-width: 34rem; }
.notes:has(> :nth-child(2):last-child) { max-width: 62rem; }

.note {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px 4px var(--radius) var(--radius);
  padding: 2rem 1.5rem 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, transform .25s;
}
.note:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.note:nth-child(3n+1) { rotate: -.35deg; }
.note:nth-child(3n)   { rotate: .3deg; }

/* the little pin at the head of each note */
.note::before {
  content: '';
  position: absolute;
  top: 12px;
  inset-inline-start: 50%;
  translate: 50% 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 20%, transparent);
}

.note__title { font-size: 1.12rem; color: var(--blue-deep); text-align: center; margin-bottom: .9rem; }

.note__body {
  white-space: pre-line;          /* the poet's own line breaks */
  font-family: var(--hand);
  font-size: .96rem;
  line-height: 1.9;
  color: var(--ink);
  max-height: none;
}
.note--folded .note__body { position: relative; max-height: 15.5em; overflow: hidden; }
.note--folded .note__body::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 4.2em;
  background: linear-gradient(180deg, transparent, var(--card) 88%);
  pointer-events: none;
}
.note--folded.note--open .note__body { max-height: none; }
.note--folded.note--open .note__body::after { content: none; }

.note__sign {
  margin: 1.1rem 0 0;
  text-align: end;
  font-family: var(--hand);
  font-size: .9rem;
  color: var(--ink-faint);
}
.note__sign::before { content: '— '; }

.note__more {
  display: block;
  margin: .9rem auto 0;
  border: 1px solid var(--edge);
  background: transparent;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: .42rem 1.1rem;
  font: 600 .8438rem/1 var(--sans);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.note__more:hover { border-color: var(--blue); color: var(--blue-deep); background: var(--card); }

/* A testimonial is a note wearing a quotation mark: same card, same folding. */
.note--praise { padding-top: 2.6rem; }
.note__quote {
  position: absolute;
  top: .45rem;
  inset-inline-start: 1.2rem;
  font-family: var(--serif);
  font-size: 3.4rem;
  line-height: 1;
  color: var(--gold-soft);
  pointer-events: none;
  user-select: none;
}
.note--praise .note__body {
  font-family: var(--sans);   /* their words, not her own handwriting */
  font-size: .97rem;
  line-height: 1.85;
}
.note--praise .note__sign {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  font-family: var(--sans);
  color: var(--ink-soft);
}
.note--praise .note__sign strong { font-weight: 700; color: var(--ink); }
.note__place { font-size: .86rem; color: var(--ink-faint); }

/* ------------------------------ footer ------------------------------ */

.footer {
  background: color-mix(in srgb, var(--wash-deep) 72%, transparent);
  border-top: 1px solid var(--line);
  padding-block: 3rem 2.2rem;
  text-align: center;
}
.footer__name { font: 700 1.5rem/1.2 var(--serif); color: var(--ink); margin: 0; }
.footer p { color: var(--ink-soft); font-size: .95rem; margin: .7rem 0 0; }
.footer a { color: var(--ink-soft); }

/* ------------------------------ reveal ------------------------------ */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ------------------------------ responsive ------------------------------ */

@media (max-width: 900px) {
  .about, .contact, .course { grid-template-columns: 1fr; }
  .about__frame { max-width: 400px; margin-inline: auto; order: -1; }
  .course__photo { order: -1; }
  .showcard { grid-template-columns: 84px 1fr; }
  .showcard__actions { grid-column: 1 / -1; flex-direction: row; }
  .showcard__poster { display: none; }
}

@media (max-width: 620px) {
  :root { --shell: calc(100% - 1.5rem); }
  /* No body override here. It used to pin phones to 16.5px whatever the
     size control said, which is where most of this site is read. */
  .nav { backdrop-filter: none; background: color-mix(in srgb, var(--paper) 97%, transparent); }
  .nav__inner { min-height: 58px; gap: .5rem; }
  .nav__brand { font-size: 1rem; }
  .tab { padding: .55rem .68rem; font-size: .906rem; }
  .hero { padding-block: 1.5rem 0; }
  .hero__branch { width: 30vw; top: -14px; inset-inline-start: -34px; opacity: .32; }
  .showcard__day { font-size: 2rem; }
  .showcard__date { padding-inline-end: 1rem; }
  #services-list:empty, #gallery-list:empty { min-height: 0; }
}

/* Honeypot: clipped to nothing rather than shoved off-canvas. Parking it at
   left:-9999px stretched the document to 11220px wide and, in RTL, left ten
   thousand pixels of empty page to scroll into. Still a rendered field with a
   real name, so a script that fills every input it finds still walks into it —
   which display:none would not achieve, since some bots skip hidden fields. */
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.counter { float: inline-end; font-weight: 400; color: var(--ink-faint); font-size: .82rem; }
.counter.is-near { color: #a8402c; font-weight: 600; }

.field input:user-invalid, .field textarea:user-invalid { border-color: #c07a6c; }
.field .field__error { display: block; margin-top: .35rem; font-size: .85rem; color: #a8402c; }
