/* Kav: black-and-white photographs, warm white tile, near-black, one brass signal.
   Phone (390px) is the primary frame; wider screens add columns, never content.
   Motion lives only under prefers-reduced-motion: no-preference. */

@font-face {
  font-family: 'Karantina';
  src: url('assets/fonts/karantina-bold.woff') format('woff');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans Hebrew';
  src: url('assets/fonts/noto-sans-hebrew.woff') format('woff');
  font-weight: 100 900;
  font-stretch: 62.5% 100%;
  font-display: swap;
}

:root {
  --ink: #121110;
  --ink-2: #1b1a18;
  --ink-3: #2a2825;
  --tile: #f2efe8;
  --tile-2: #e6e1d6;
  --rule: #d6cfc1;
  --mute: #5c574f;
  --mute-dark: #aaa397;
  --signal: #f0b23a;
  --flap: #201f1c;
  --flap-hi: #2a2926;
  --flap-ink: #f4efe4;
  --wa: #12833f;
  --wa-press: #0e6b33;

  --display: 'Karantina', 'Noto Sans Hebrew', system-ui, sans-serif;
  --text: 'Noto Sans Hebrew', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: 16px;
  --max: 1200px;
  --radius: 14px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  /* One flap module. */
  --cw: clamp(19px, 5.15vw, 34px);
  --ch: calc(var(--cw) * 1.42);
  --cgap: 2px;
  --ggap: calc(var(--cw) * 0.55);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--tile);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
button, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 6px; }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 22px; height: 22px; flex: none; }

/* Skip link: moved with a transform, so an RTL document is never widened. */
.skip {
  position: fixed; top: 8px; inset-inline-start: 8px; z-index: 50;
  padding: 10px 16px; background: var(--signal); color: var(--ink); font-weight: 700; text-decoration: none; border-radius: 8px;
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

/* ---------- header: opaque, always ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  min-height: 56px; padding: 0 var(--gutter);
  background: var(--ink); color: var(--tile);
}
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; margin-inline-end: auto; }
.brand-name { font: 700 2rem/1 var(--display); letter-spacing: 0.01em; padding-top: 4px; }
.brand-line { display: block; width: 22px; height: 3px; background: var(--signal); }
.brand-tag { font-size: 0.8125rem; color: var(--mute-dark); letter-spacing: 0.04em; }
.nav { display: contents; }
.menu-toggle, .lang-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 10px;
  background: transparent; border: 1px solid var(--ink-3); border-radius: 10px; cursor: pointer;
}
.lang-toggle { font-weight: 600; font-size: 0.9375rem; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-list {
  display: none;
  position: absolute; top: 100%; inset-inline: 0;
  padding: 8px var(--gutter) 20px; background: var(--ink); border-top: 1px solid var(--ink-3);
}
.nav-list.open { display: grid; }
.nav-list a {
  display: flex; align-items: center; min-height: 52px; padding: 0 4px;
  font: 700 1.75rem/1 var(--display); text-decoration: none; border-bottom: 1px solid var(--ink-3);
}

/* ---------- shared type ---------- */
.kicker {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute);
}
.kicker::before { content: ''; width: 22px; height: 3px; background: currentColor; }
.section-title {
  margin-top: 10px;
  font: 700 clamp(3rem, 13vw, 5.75rem)/0.92 var(--display);
  letter-spacing: 0.005em;
  text-wrap: balance;
}
.section-lede { margin-top: 14px; max-width: 34em; color: var(--mute); text-wrap: pretty; }
.fine { font-size: 0.875rem; color: var(--mute); }

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 20px;
  border: 0; border-radius: 12px; cursor: pointer; text-decoration: none;
  font-weight: 650; font-size: 1.0625rem; white-space: nowrap;
}
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa .icon { color: #fff; }
.btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-mark { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); min-height: 48px; padding: 0 16px; font-weight: 600; font-size: 1rem; }
.btn-mark img { width: 22px; height: 22px; border-radius: 6px; }
.btn-wide { width: 100%; }

.kit-note {
  margin-top: 12px; padding: 14px 16px; border-radius: 12px;
  background: var(--tile); color: var(--ink); font-size: 0.9375rem; box-shadow: 0 0 0 1px var(--rule);
}
.kit-note q { display: block; margin-top: 8px; font-weight: 600; quotes: none; }
.note-close {
  margin-top: 10px; min-height: 44px; padding: 0 16px; border-radius: 10px; cursor: pointer;
  background: var(--ink); color: var(--tile); border: 0; font-weight: 600;
}

/* ---------- hero: the photograph, the name, the two controls ---------- */
.hero {
  position: relative; isolation: isolate;
  display: flex; align-items: flex-end;
  min-height: calc(100svh - 56px); max-height: 980px;
  padding: 0 var(--gutter) 28px;
  background: var(--ink); color: var(--tile);
}
.hero-photo, .hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-photo { z-index: -2; }
.hero-photo img { object-fit: cover; object-position: 50% 30%; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgb(18 17 16 / 0.25) 0%, rgb(18 17 16 / 0.2) 22%, rgb(18 17 16 / 0.78) 48%, rgb(18 17 16 / 0.96) 66%, var(--ink) 100%);
}
.hero-copy { width: 100%; max-width: 40rem; }
.eyebrow { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.06em; color: var(--signal); }
.hero-title { margin-top: 6px; font-family: var(--display); font-weight: 700; }
.hero-mark { display: block; font-size: clamp(8.5rem, 44vw, 15rem); line-height: 0.78; letter-spacing: -0.01em; }
.hero-mark::after { content: ''; display: block; width: 0.62em; height: 0.035em; min-height: 4px; margin-top: 0.1em; background: var(--signal); }
.hero-line { display: block; margin-top: 14px; font-size: clamp(2.6rem, 12vw, 4.25rem); line-height: 0.95; }
.hero-lede { margin-top: 14px; max-width: 28em; color: #d9d4ca; }
.hero .actions { margin-top: 20px; }
.hero .actions .btn-wa { flex: 1 1 auto; }
.hero .actions .btn-ghost { flex: 0 1 auto; padding: 0 18px; }
.hero .kit-note { background: var(--ink-2); color: var(--tile); box-shadow: 0 0 0 1px var(--ink-3); }
.hero .note-close { background: var(--tile); color: var(--ink); }
.status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 16px; font-size: 0.9375rem; color: #d9d4ca; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.status[data-open="false"] .status-dot { background: var(--mute-dark); }
.status-note { color: var(--mute-dark); }

/* ---------- the board ---------- */
.board-sec { padding: 48px var(--gutter) 56px; background: var(--ink); color: var(--tile); color-scheme: dark; }
.board-sec .kicker, .contact .kicker { color: var(--signal); }
.board-sec .section-lede, .contact .section-lede { color: var(--mute-dark); }
.board-grid { display: grid; gap: 28px; margin-top: 28px; }

.board {
  padding: 12px 10px 14px; border-radius: 16px;
  background: #0a0a09;
  box-shadow: inset 0 0 0 1px #24221f, 0 30px 60px -30px rgb(0 0 0 / 0.8);
}
.board-cols, .slot { display: flex; align-items: center; gap: var(--ggap); }
.board-cols {
  padding: 0 8px 10px; border-bottom: 1px solid #24221f; margin-bottom: 8px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--signal);
}
.c-time { width: calc(var(--cw) * 4 + var(--cgap) * 3 + var(--cw) * 0.4); }
.c-chair, .g-chair { width: max(calc(var(--cw) * 1.4), 3.2rem); }
.board-rows { display: grid; gap: 4px; }
.slot {
  width: 100%; min-height: 46px; padding: 7px 8px;
  background: transparent; border: 0; border-radius: 10px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.slot[aria-pressed="true"] { background: #1d1b17; --flap-ink: var(--signal); box-shadow: inset 3px 0 0 var(--signal); }
[dir="rtl"] .slot[aria-pressed="true"] { box-shadow: inset -3px 0 0 var(--signal); }
.g { display: flex; gap: var(--cgap); }
.colon { width: calc(var(--cw) * 0.4); text-align: center; font: 700 calc(var(--ch) * 0.62)/1 var(--text); color: var(--flap-ink); }
.board-note { margin-top: 12px; padding: 0 8px; font-size: 0.8125rem; color: var(--mute-dark); }

.cell {
  position: relative; flex: none;
  width: var(--cw); height: var(--ch);
  perspective: calc(var(--ch) * 5);
  color: var(--flap-ink);
  font: 700 calc(var(--ch) * 0.7) / var(--ch) var(--text);
  font-stretch: 75%;
  text-align: center;
}
.cell > span {
  position: absolute; inset-inline: 0; height: 50%; overflow: hidden;
  background: var(--flap);
  backface-visibility: hidden;
}
.cell .u, .cell .ft { top: 0; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--flap-hi), var(--flap)); }
.cell .l, .cell .fb { bottom: 0; border-radius: 0 0 3px 3px; }
.cell .ft { transform-origin: 50% 100%; }
.cell .fb { transform-origin: 50% 0; }
.cell b { display: block; height: var(--ch); font-weight: inherit; }
.cell .l b, .cell .fb b { transform: translateY(-50%); }
.cell i { position: absolute; inset: 0; background: #000; opacity: 0; }
.cell::after { content: ''; position: absolute; inset-inline: 0; top: calc(50% - 0.5px); height: 1px; background: #050505; z-index: 2; }
/* The still: only the two static halves show. */
.cell .ft, .cell .fb { opacity: 0; }

/* Composer */
.composer fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 14px; }
.composer legend { padding: 0; margin-bottom: 4px; font: 700 2rem/1 var(--display); }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.875rem; color: var(--mute-dark); }
.field select {
  width: 100%; min-height: 52px; padding: 0 14px;
  background: var(--ink-2); color: var(--tile); border: 1px solid var(--ink-3); border-radius: 12px;
  font-size: 1.0625rem;
}
.preview-label { margin-top: 22px; font-size: 0.875rem; color: var(--mute-dark); }
.preview {
  margin-top: 8px; padding: 14px 16px;
  background: var(--tile); color: var(--ink); border-radius: 16px 16px 16px 4px;
  font-size: 1.0625rem; line-height: 1.5;
}
[dir="rtl"] .preview { border-radius: 16px 16px 4px 16px; }
.composer .actions { margin-top: 14px; }

/* ---------- services ---------- */
.services { padding: 56px var(--gutter) 60px; }
.svc-list { margin-top: 28px; border-top: 2px solid var(--ink); }
.svc-list li {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 16px;
  padding: 16px 0 18px; border-bottom: 1px solid var(--rule);
}
.svc-list h3 { font: 700 2.125rem/1 var(--display); }
.svc-list p { grid-column: 1 / -1; margin-top: 6px; color: var(--mute); }
.svc-min { grid-row: 1; grid-column: 2; font: 700 1.75rem/1 var(--display); white-space: nowrap; }
.svc-note { margin-top: 14px; font-size: 0.875rem; color: var(--mute); }
.diptych { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 36px; }
.diptych figure:first-child img { aspect-ratio: 4 / 5; }
.diptych figure:last-child { margin-top: 40px; }
.diptych img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; background: var(--tile-2); }
.diptych figcaption { margin-top: 8px; font-size: 0.875rem; color: var(--mute); }
.kids {
  margin-top: 36px; padding: 24px 20px 26px; border-radius: var(--radius);
  background: var(--signal); color: var(--ink);
}
.kids h3 { font: 700 clamp(2.25rem, 10vw, 3.25rem)/0.95 var(--display); }
.kids p { margin-top: 10px; max-width: 30em; }

/* ---------- hours ---------- */
.hours { background: var(--tile-2); }
.hours-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 30% 50%; }
.hours-copy { padding: 40px var(--gutter) 52px; }
.hours-table { width: 100%; margin-top: 24px; border-collapse: collapse; }
.hours-table th, .hours-table td { padding: 14px 0; border-bottom: 1px solid var(--rule); text-align: start; font-weight: 400; }
.hours-table td { text-align: end; font: 700 1.25rem/1 var(--text); font-stretch: 75%; white-space: nowrap; }
.hours-table .to { font-weight: 400; font-stretch: 100%; font-size: 0.875rem; color: var(--mute); margin-inline: 4px; }
.hours-table tr[aria-current="date"] th { font-weight: 700; }
.hours-table tr[aria-current="date"] th::after {
  content: attr(data-today); margin-inline-start: 10px; padding: 2px 8px; border-radius: 6px;
  background: var(--ink); color: var(--signal); font-size: 0.75rem; font-weight: 600; vertical-align: 2px;
}
.hours .fine { margin-top: 14px; }

/* ---------- contact ---------- */
.contact { padding: 56px var(--gutter) 60px; background: var(--ink); color: var(--tile); }
.contact-grid { display: grid; gap: 22px; margin-top: 28px; }
.contact-main { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.contact-label { font-size: 0.875rem; color: var(--mute-dark); margin-bottom: 8px; }
.contact-row { display: flex; flex-wrap: wrap; gap: 8px; }
.contact .kit-note { background: var(--ink-2); color: var(--tile); box-shadow: 0 0 0 1px var(--ink-3); }
.contact .note-close { background: var(--tile); color: var(--ink); }

/* ---------- footer ---------- */
.foot { padding: 36px var(--gutter) 44px; background: var(--ink-2); color: var(--mute-dark); display: grid; gap: 12px; font-size: 0.9375rem; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--tile); font: 700 2.5rem/1 var(--display); }
.foot .fine { color: var(--mute-dark); }
.foot-top { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; color: var(--tile); font-weight: 600; }

/* ---------- tablet and up ---------- */
@media (min-width: 700px) {
  :root { --gutter: 32px; }
  body { font-size: 1.125rem; }
  .hero { min-height: min(calc(100svh - 64px), 860px); padding-bottom: 48px; }
  .hero::before { background: linear-gradient(90deg, rgb(18 17 16 / 0.15) 0%, rgb(18 17 16 / 0.1) 40%, rgb(18 17 16 / 0.85) 100%), linear-gradient(180deg, transparent 40%, rgb(18 17 16 / 0.9) 100%); }
  [dir="ltr"] .hero::before { background: linear-gradient(270deg, rgb(18 17 16 / 0.15) 0%, rgb(18 17 16 / 0.1) 40%, rgb(18 17 16 / 0.85) 100%), linear-gradient(180deg, transparent 40%, rgb(18 17 16 / 0.9) 100%); }
  .hero-photo img { object-position: 50% 50%; }
  .hero .actions .btn { flex: 0 0 auto; }
  .diptych { gap: 16px; }
  .contact-main { display: flex; }
}

@media (min-width: 960px) {
  .bar { min-height: 64px; }
  .menu-toggle { display: none; }
  .nav { display: block; }
  .nav-list { display: flex; position: static; gap: 4px; padding: 0; background: none; border: 0; margin-inline-end: 12px; }
  .nav-list a { min-height: 44px; padding: 0 14px; font: 600 1rem/1 var(--text); border: 0; border-radius: 10px; }
  .board-sec, .services, .contact { padding-top: 96px; padding-bottom: 104px; }
  .board-sec > *, .services > *, .contact > * { max-width: var(--max); margin-inline: auto; }
  .board-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: start; margin-top: 40px; }
  .board { padding: 18px 18px 20px; }
  .services { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 64px; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
  .services-head, .svc-list, .svc-note { grid-column: 1; }
  .services > * { max-width: none; margin-inline: 0; }
  .diptych { grid-column: 2; grid-row: 1 / span 4; align-self: start; margin-top: 0; }
  .kids { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: end; padding: 36px 40px; }
  .kids p { margin-top: 0; }
  .svc-list li { grid-template-columns: minmax(0, 13rem) minmax(0, 1fr) auto; }
  .svc-list p { grid-column: 2; grid-row: 1; margin-top: 0; }
  .svc-min { grid-column: 3; }
  .hours { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
  .hours-photo { align-self: stretch; }
  .hours-photo img { height: 100%; aspect-ratio: auto; min-height: 560px; }
  .hours-copy { padding: 80px 64px; max-width: 40rem; }
  .contact-grid { grid-template-columns: auto auto auto; justify-content: start; gap: 40px; align-items: end; }
  .foot { grid-template-columns: auto 1fr; column-gap: 48px; padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2)); }
  .foot-brand { grid-row: span 4; align-self: start; }
}

/* ---------- motion: press feedback and the board's flip, only when wanted ---------- */
@media (prefers-reduced-motion: no-preference) {
  .btn, .slot, .menu-toggle, .lang-toggle, .note-close { transition: transform 140ms var(--ease-out), background-color 160ms ease; }
  .btn:active, .note-close:active { transform: scale(0.97); }
  .slot:active { transform: scale(0.985); }
  html[data-motion="on"] .cell .ft, html[data-motion="on"] .cell .fb { will-change: transform; }
}
@media (hover: hover) and (pointer: fine) {
  .slot:hover { background: #17160f; }
  .btn-wa:hover { background: var(--wa-press); }
  .nav-list a:hover { background: var(--ink-2); }
}
