/* Chulya. A cyanotype world: cobalt ink on cool chalk paper, one deep cobalt plate for the
   reformer, and one pen: the display type is drawn in a hairline weight.
   Shape rule: one-line buttons are pills, multi-line tap targets (app tiles, a chosen
   timetable row) are 18px, surfaces are square. */

@font-face { font-family: 'Plex Hebrew'; src: url('assets/IBMPlexSansHebrew-ExtraLight.ttf') format('truetype'); font-weight: 200; font-display: swap; }
@font-face { font-family: 'Plex Hebrew'; src: url('assets/IBMPlexSansHebrew-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Hebrew'; src: url('assets/IBMPlexSansHebrew-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }

:root {
  --paper: #f3f5f8;
  --paper-2: #e8ecf3;
  --ink: #1c2b80;
  --ink-2: #44508f;
  --rule: rgba(28, 43, 128, 0.16);
  --rule-strong: rgba(28, 43, 128, 0.42);
  --stage: #1c2b80;
  --stage-ink: #eef1fb;
  --stage-ink-2: rgba(238, 241, 251, 0.74);
  --stage-rule: rgba(238, 241, 251, 0.28);
  --whatsapp: #12833f;
  --whatsapp-press: #0e6a33;
  --instagram: #e1306c;
  --facebook: #1877f2;
  --head-h: 60px;
  --pin: 45svh;
  --gutter: 16px;
  --max: 1240px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1430;
    --paper-2: #151c40;
    --ink: #e6eaf7;
    --ink-2: #a9b2d8;
    --rule: rgba(230, 234, 247, 0.16);
    --rule-strong: rgba(230, 234, 247, 0.4);
    --stage: #1c2b80;
    --instagram: #ffffff;
    --facebook: #ffffff;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 'Plex Hebrew', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, ol, ul, figure, fieldset { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }
section[id] { scroll-margin-top: var(--head-h); }

/* A transform, not an offset: an offset skip link widens a right-to-left page. */
.skip {
  position: fixed; inset-block-start: 8px; inset-inline-start: 8px; z-index: 40;
  padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--paper);
  text-decoration: none; transform: translateY(-160%);
}
.skip:focus-visible { transform: none; }

/* Masthead */
.masthead {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-block-end: 1px solid var(--rule);
}
.masthead-row {
  max-width: var(--max); margin: 0 auto; height: var(--head-h);
  padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; min-height: 44px; padding-block: 6px; }
.brand-word { font-weight: 200; font-size: 1.875rem; line-height: 1; letter-spacing: -0.01em; }
.brand-sub { font-size: 1rem; color: var(--ink-2); }
.masthead-tools { display: flex; align-items: center; gap: 4px; }
.lang, .menu {
  min-width: 44px; height: 44px; padding: 0 12px;
  border: 0; border-radius: 999px; background: transparent;
  font-weight: 500; font-size: 1rem;
}
.menu { position: relative; width: 44px; padding: 0; }
.menu-lines, .menu-lines::before {
  position: absolute; inset-inline: 12px; height: 1.5px; background: currentColor; border-radius: 2px;
}
.menu-lines { top: 17px; }
.menu-lines::before { content: ''; inset-inline: 0; top: 8px; }
.menu[aria-expanded="true"] .menu-lines { transform: translateY(4px) rotate(45deg); }
.menu[aria-expanded="true"] .menu-lines::before { transform: translateY(-8px) rotate(-90deg); }

/* Phone navigation: an opaque panel that shows every destination at once. */
.nav {
  position: fixed; inset-inline: 0; top: var(--head-h); z-index: 19;
  background: var(--paper); border-block-end: 1px solid var(--rule);
  padding: 8px var(--gutter) 20px;
  display: none;
}
.nav[data-open="true"] { display: block; }
.nav a {
  display: flex; align-items: center; min-height: 56px;
  font-size: 1.5rem; font-weight: 200; text-decoration: none;
  border-block-end: 1px solid var(--rule);
}
.nav li:last-child a { border-block-end: 0; }

/* Hero */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: 28px var(--gutter) 36px;
  display: grid; gap: 22px;
}
.hero-title {
  font-weight: 200; font-size: clamp(3.4rem, 17vw, 9.75rem); line-height: 0.96;
  letter-spacing: -0.02em; white-space: pre-line;
}
[lang="en"] .hero-title { font-size: clamp(3.2rem, 15.5vw, 9.25rem); letter-spacing: -0.03em; }
.hero-side { display: grid; gap: 22px; align-content: end; }
.hero-lead { font-size: 1.1875rem; line-height: 1.5; max-width: 30ch; }
.hero-actions { display: grid; gap: 10px; }

/* Controls: pills, each in its own brand where it has one. */
.ctl {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 500; font-size: 1.0625rem; line-height: 1.2; text-decoration: none; text-align: center;
  background: transparent; color: inherit;
}
.ctl .mark { flex: none; }
.ctl-wa { background: var(--whatsapp); color: #ffffff; }
.ctl-wa:active { background: var(--whatsapp-press); }
.ctl-wa:focus-visible { outline-color: var(--whatsapp); }
.ctl-line { border-color: var(--rule-strong); }
.ctl-small { min-height: 44px; font-size: 1rem; }
.ctl-ig .mark { color: var(--instagram); }
.ctl-fb .mark { color: var(--facebook); }
.getthere { display: grid; gap: 10px; }
.getthere-label { font-weight: 500; }
.getthere-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ctl-app {
  flex-direction: column; gap: 6px; min-height: 72px; padding: 8px 6px;
  border-radius: 18px; border-color: var(--rule-strong); font-size: 1rem; font-weight: 400;
}

/* The inline note a control opens when the studio's detail is not set. */
.note {
  border-inline-start: 2px solid var(--ink);
  padding: 4px 14px; font-size: 1rem; line-height: 1.55; color: var(--ink);
}
.note-message {
  display: block; margin-block-start: 8px; padding: 10px 14px;
  background: var(--paper-2); border-radius: 14px 14px 14px 4px;
}
[dir="rtl"] .note-message { border-radius: 14px 14px 4px 14px; }

/* The reformer: a cobalt plate with the machine on it. */
.move { background: var(--stage); color: var(--stage-ink); overflow-x: clip; }
.move ::selection { background: var(--stage-ink); color: var(--stage); }
.move :focus-visible { outline-color: var(--stage-ink); }
.move-stage {
  max-width: var(--max); margin: 0 auto;
  padding: 28px var(--gutter) 44px;
  display: grid; gap: 20px; align-content: start;
}
.move-label { color: var(--stage-ink-2); }
.move-title {
  font-weight: 200; font-size: clamp(2.125rem, 9.5vw, 4.25rem); line-height: 1.04;
  letter-spacing: -0.015em; white-space: pre-line;
}

/* The machine. The first frame is a real image; with motion allowed a canvas in the same cell
   draws the frame for the scroll over it. Both size by the same rules, so they always coincide.
   The frames' backdrop is the plate's colour; the edges fade into the plate, so a level lost to
   compression never shows as a seam. Full bleed on the phone: the machine is the section. */
.machine { display: grid; justify-items: center; align-items: center; min-height: 0; margin-inline: calc(-1 * var(--gutter)); }
.machine picture { display: contents; }
.machine-still, .machine-live {
  grid-area: 1 / 1; width: auto; height: auto; max-width: 100%; max-height: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent), linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent), linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
  mask-composite: intersect;
}
.machine-live { display: none; }

/* The still: the machine at rest, and the breath in words. It is the base state. */
.move-word, .move-cue { display: none; }
.move-phases { display: grid; gap: 14px; }
.move-phases li { display: grid; gap: 2px; }
.phase-word { font-weight: 200; font-size: 2.125rem; line-height: 1.1; letter-spacing: -0.01em; }
.phase-cue { max-width: 36ch; }
.move-springs { color: var(--stage-ink-2); max-width: 38ch; }

/* With motion allowed, the live stage takes over: pinned, short, native scroll. */
html[data-motion=on] .machine-live { display: block; }
html[data-motion=on] .move-word, html[data-motion=on] .move-cue { display: block; }
html[data-motion=on] .move-phases { position: absolute; grid-area: auto; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html[data-motion=on] .move-track { height: calc(100svh - var(--head-h) + var(--pin)); }
html[data-motion=on] .move-stage {
  position: sticky; top: var(--head-h);
  height: calc(100svh - var(--head-h));
  padding-block: 20px 22px; gap: 8px;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
}
.move-word {
  font-weight: 200; font-size: clamp(3.5rem, 17vw, 6rem); line-height: 0.95; letter-spacing: -0.02em;
}
.move-word span { display: inline-block; }
.move-cue { min-height: 3.1em; max-width: 34ch; line-height: 1.55; }
.move-cue span { display: block; }

/* Sections on paper */
.tt, .first, .faq, .visit { max-width: var(--max); margin: 0 auto; padding: 64px var(--gutter); }
.section-title { font-weight: 200; font-size: clamp(2.375rem, 11vw, 4.75rem); line-height: 1; letter-spacing: -0.015em; }
.section-lead { margin-block-start: 14px; max-width: 46ch; color: var(--ink-2); }
.tt-note { color: var(--ink); }

/* Timetable */
.tt { padding-block-end: 0; }
.tt-filters { display: grid; gap: 16px; margin-block: 28px 8px; }
.chips { border: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; min-inline-size: 0; }
.chips legend { grid-column: 1 / -1; }
.chips legend { width: 100%; padding: 0; margin-block-end: 8px; font-weight: 500; }
.chip { position: relative; display: grid; }
.chip input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--rule-strong); border-radius: 999px;
}
.chip:has(input:checked) span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip:has(input:focus-visible) span { outline: 2px solid var(--ink); outline-offset: 3px; }
.tt-count { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tt-empty { display: grid; gap: 14px; justify-items: start; padding: 28px 0; }
.tt-week { display: grid; }
.day { padding-block: 18px 6px; }
.day[data-empty="true"] { display: none; }
.day h3 { font-weight: 500; font-size: 1.0625rem; padding-block-end: 6px; }
.slot {
  width: 100%; display: grid; grid-template-columns: 4.25rem 1fr auto; align-items: center; gap: 12px;
  min-height: 60px; padding: 8px 12px; margin-inline: -12px; width: calc(100% + 24px);
  border: 0; border-block-start: 1px solid var(--rule); border-radius: 0; background: transparent;
  text-align: start;
}
.slots li:first-child .slot { border-block-start-color: var(--rule-strong); }
.slot-time { font-size: 1.25rem; font-variant-numeric: tabular-nums; text-align: start; }
[dir="rtl"] .slot-time { text-align: right; }
.slot-what { display: grid; line-height: 1.3; }
.slot-type { font-weight: 500; }
.slot-level, .slot-len { color: var(--ink-2); font-size: 1rem; }
.slot[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-radius: 18px; border-block-start-color: transparent; }
.slot[aria-pressed="true"]:focus-visible { outline-color: var(--ink); }
.slot[aria-pressed="true"] .slot-level, .slot[aria-pressed="true"] .slot-len { color: inherit; opacity: 0.8; }
.slots li:has(.slot[aria-pressed="true"]) + li .slot { border-block-start-color: transparent; }

/* The booking bar: hidden until a class is chosen, then it rides the bottom of the screen
   while the timetable is in view. Opaque on every size. */
.tt-bar {
  position: sticky; bottom: 0; z-index: 10;
  margin-inline: calc(-1 * var(--gutter)); margin-block-start: 28px;
  background: var(--paper); border-block-start: 1px solid var(--rule-strong);
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
}
.tt-bar[data-open="false"] { visibility: hidden; }
.tt-bar-inner { max-width: var(--max); margin: 0 auto; display: grid; gap: 10px; }
.tt-bar-text { line-height: 1.4; }
.tt-bar-label { color: var(--ink-2); }
.tt-bar-summary { display: block; font-weight: 500; }
.tt-bar .ctl-wa { width: 100%; }

/* First class: four stops on one line. */
.first-line { position: relative; display: grid; gap: 28px; margin-block-start: 36px; padding-inline-start: 34px; }
.first-line::before {
  content: ''; position: absolute; inset-block: 8px 8px; inset-inline-start: 8px;
  border-inline-start: 1.5px solid var(--ink);
}
.first-line li { position: relative; display: grid; gap: 6px; }
.first-line li::before {
  content: ''; position: absolute; inset-inline-start: -32px; top: 7px;
  width: 13px; height: 13px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--ink);
}
.first-line h3, .bring h3 { font-weight: 500; font-size: 1.1875rem; line-height: 1.35; }
.first-line p, .bring p { color: var(--ink-2); max-width: 42ch; }
.bring { margin-block-start: 40px; padding: 22px 0 0; border-block-start: 1px solid var(--rule-strong); display: grid; gap: 6px; }

/* Questions */
.faq-list { margin-block-start: 28px; border-block-start: 1px solid var(--rule-strong); }
.faq details { border-block-end: 1px solid var(--rule); }
.faq summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding-block: 14px; font-size: 1.1875rem; cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 16px; height: 16px;
  background: linear-gradient(currentColor, currentColor) center / 16px 1.5px no-repeat,
              linear-gradient(currentColor, currentColor) center / 1.5px 16px no-repeat;
}
.faq details[open] summary::after { background-size: 16px 1.5px, 1.5px 0; }
.answer { padding-block-end: 20px; color: var(--ink-2); max-width: 62ch; }

/* Visit */
.visit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-block: 28px 18px; }
.visit-grid .ctl-wa { grid-column: 1 / -1; }
.visit-grid .ctl { padding-inline: 14px; }

.footer {
  max-width: var(--max); margin: 0 auto; padding: 36px var(--gutter) calc(36px + env(safe-area-inset-bottom));
  border-block-start: 1px solid var(--rule); display: grid; gap: 14px; color: var(--ink-2);
}
.footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); }

/* Tablet */
@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .hero-actions { grid-template-columns: auto auto; justify-content: start; }
  .getthere-apps { grid-template-columns: repeat(3, 8.5rem); }
  .machine { margin-inline: 0; }
  .visit-grid { display: flex; flex-wrap: wrap; }
  .visit-grid .ctl-wa { grid-column: auto; }
  .tt-bar-inner { grid-template-columns: 1fr auto; align-items: center; }
  .tt-bar .ctl-wa { width: auto; }
  .tt-bar .note { grid-column: 1 / -1; }
}

/* Desktop */
@media (min-width: 960px) {
  :root { --head-h: 72px; --pin: 100svh; --gutter: 48px; }
  .menu { display: none; }
  .nav { position: static; display: block; padding: 0; border: 0; background: none; margin-inline-start: auto; }
  .nav ul { display: flex; gap: 4px; }
  .nav a { min-height: 44px; padding: 0 14px; font-size: 1rem; font-weight: 400; border: 0; border-radius: 999px; }
  .hero { grid-template-columns: 7fr 5fr; align-items: end; gap: 48px; padding-block: 72px 64px; }
  .hero-title, [lang="en"] .hero-title { font-size: clamp(5rem, 8.6vw, 8.75rem); }
  .hero-side { padding-block-end: 12px; }
  .tt, .first, .faq, .visit { padding-block: 112px; }
  .tt { padding-block-end: 0; }
  .tt-filters { grid-template-columns: auto auto 1fr; align-items: end; gap: 32px; }
  .chips { display: flex; flex-wrap: wrap; }
  .tt-count { justify-self: end; padding-block-end: 10px; }
  .tt-week { grid-template-columns: repeat(6, 1fr); border-block-start: 1px solid var(--rule-strong); margin-block-start: 20px; }
  .day, .day[data-empty="true"] { display: block; padding: 18px 10px 0; border-inline-start: 1px solid var(--rule); }
  .day:first-child { border-inline-start: 0; padding-inline-start: 0; }
  .day-empty { color: var(--ink-2); font-size: 1rem; padding-block: 12px; }
  /* The text lines up with the day; the chosen row's colour reaches 10px past it as a halo. */
  .slot { grid-template-columns: 1fr; gap: 2px; margin-inline: 0; width: 100%; min-height: 0; padding: 12px 0; border-radius: 0; }
  .slot[aria-pressed="true"] { border-radius: 6px; box-shadow: 0 0 0 10px var(--ink); }
  .slot:focus-visible { outline-offset: 13px; }
  @media (hover: hover) and (pointer: fine) {
    .slot:hover:not([aria-pressed="true"]) { border-radius: 6px; box-shadow: 0 0 0 10px var(--paper-2); }
  }
  .slot-time { font-size: 1.375rem; }
  .first-line { grid-template-columns: repeat(4, 1fr); gap: 32px; padding-inline-start: 0; padding-block-start: 34px; }
  .first-line::before { inset-inline: 6px 0; inset-block: 6px auto; border-inline-start: 0; border-block-start: 1.5px solid var(--ink); }
  .first-line li::before { inset-inline-start: 0; top: -34px; }
  .faq { display: grid; grid-template-columns: 4fr 8fr; gap: 48px; align-items: start; }
  .faq-list { margin-block-start: 0; }

  .move-stage {
    grid-template-columns: 1fr 1fr; column-gap: 48px; row-gap: 40px; padding-block: 96px;
    grid-template-areas: "head head" "machine machine" "phases springs";
  }
  .move-head { grid-area: head; }
  .machine { grid-area: machine; }
  .move-phases { grid-area: phases; }
  .move-springs { grid-area: springs; align-self: end; justify-self: end; }
  html[data-motion=on] .move-stage {
    grid-template-rows: auto minmax(0, 1fr) auto; row-gap: 12px; padding-block: 36px 32px;
    grid-template-areas: "head word" "machine machine" "cue springs";
  }
  html[data-motion=on] .move-title { font-size: clamp(2.5rem, min(5vw, 8svh), 4.25rem); }
  .move-word { grid-area: word; justify-self: end; align-self: start; font-size: clamp(5rem, 9vw, 8.5rem); }
  .move-cue { grid-area: cue; font-size: 1.25rem; max-width: 38ch; min-height: 0; align-self: end; }
}


/* Hover answers only real pointers. */
@media (hover: hover) and (pointer: fine) {
  .nav a:hover, .lang:hover, .menu:hover { background: var(--paper-2); }
  .ctl-line:hover, .ctl-app:hover { background: var(--paper-2); }
  .ctl-wa:hover { background: var(--whatsapp-press); }
  .chip:hover span { border-color: var(--ink); }
  .slot:hover:not([aria-pressed="true"]) { background: var(--paper-2); }
  .faq summary:hover { color: var(--ink-2); }
}

/* Motion. Everything that moves lives here; the frame above is complete without it. */
@media (prefers-reduced-motion: no-preference) {
  .ctl, .lang, .menu, .chip span, .slot {
    transition: transform 140ms var(--ease-out), background-color 160ms var(--ease-out), color 160ms var(--ease-out), border-color 160ms var(--ease-out);
  }
  .ctl:active, .lang:active, .menu:active, .chip:active span { transform: scale(0.97); }
  .slot:active { transform: scale(0.985); }
  .menu-lines, .menu-lines::before { transition: transform 220ms var(--ease-out); }
  .nav[data-open="true"] li { animation: nav-in 260ms var(--ease-out) backwards; }
  .nav[data-open="true"] li:nth-child(2) { animation-delay: 30ms; }
  .nav[data-open="true"] li:nth-child(3) { animation-delay: 60ms; }
  .nav[data-open="true"] li:nth-child(4) { animation-delay: 90ms; }
  .nav[data-open="true"] li:nth-child(5) { animation-delay: 120ms; }
  .note { transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
  @starting-style { .note { opacity: 0; transform: translateY(-4px); } }
  .faq details[open] .answer { animation: note-in 240ms var(--ease-out); }
  .faq summary::after { transition: background-size 200ms var(--ease-out); }
  .tt-bar { transition: transform 360ms var(--ease-drawer), visibility 0s linear 0s; }
  .tt-bar[data-open="false"] { transform: translateY(105%); transition: transform 260ms var(--ease-out), visibility 0s linear 260ms; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 960px) {
  .nav[data-open="true"] li { animation: none; }
}

@keyframes nav-in { from { opacity: 0; transform: translateY(-6px); } }
@keyframes note-in { from { opacity: 0; transform: translateY(-4px); } }
