/* HAJAJ עיצוב שיער · "תערוכה". A light slatted gallery wall, black frames with museum labels,
   a green cloth that falls off the portrait on opening night, and an entry ticket for booking.
   Only transform + opacity move. Reduced motion: no cloth at all, everything in place. */

:root {
  --bg: #EDEDEB;
  --surface: #F7F7F5;
  --ink: #0E1010;
  --muted: #54564F;
  --primary: #4B593D;
  --primary-ink: #FFFFFF;
  --soft: #DEE0E1;
  --accent: #C18969;
  --line: #A6A7A3;
  --focus: #303B23;
  --frame: #0E1010;
  --radius: 0px;
  --radius-pill: 0px;
  --k-outline-fill: var(--soft);
  --font-head: "Bona Nova", "Alef", serif;
  --font-body: "Alef", system-ui, sans-serif;
  --h1: clamp(2.5rem, 1.8rem + 3.4vw, 5rem);
  --h2: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg) repeating-linear-gradient(90deg, var(--bg) 0 22px, #E3E4E1 22px 23px);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p, figure, blockquote, h1, h2, h3, ul { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50; padding: .6rem 1rem; background: var(--ink); color: var(--bg); font-weight: 700; }
.skip-link:focus { top: 12px; }
.wrap { max-width: 1232px; margin-inline: auto; padding-inline: 16px; }

/* The primary button's rim is leaf green (6.4:1 against the wall), its face is the label paper. */
body .k-btn--border { background: var(--primary); }

/* ---------- Frames and museum labels ---------- */
.frame {
  display: block;
  border: 10px solid var(--frame);
  padding: 12px;
  background: var(--surface);
  box-shadow: 0 18px 30px -18px rgb(14 16 16 / .45);
}
.frame--thin { border-width: 4px; padding: 0; }
.label {
  display: grid;
  width: max-content;
  min-width: 120px;
  max-width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: .8125rem;
  line-height: 1.45;
}
.label b { font-weight: 700; }
.label > span { color: var(--muted); }

/* ---------- Banner + header ---------- */
.demo-banner { padding: .5rem 16px; background: var(--ink); color: var(--bg); font-size: .875rem; line-height: 1.5; }
.site-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid transparent; transition: background-color 300ms ease, border-color 300ms ease; }
.site-header.is-scrolled { background: var(--bg); border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 20px; max-width: 1232px; height: 60px; margin-inline: auto; padding-inline: 16px; }
.brand { margin-inline-end: auto; font-family: var(--font-head); font-size: 22px; font-weight: 700; letter-spacing: .18em; line-height: 1; text-decoration: none; }
.site-nav { display: none; }

/* ---------- Hero: opening night ---------- */
.hero {
  display: grid;
  align-content: center;
  gap: 32px;
  max-width: 1232px;
  min-height: 92svh;
  margin-inline: auto;
  padding: 28px 16px 56px;
}
.hero__art { display: flex; flex-direction: row-reverse; justify-content: flex-start; align-items: flex-end; gap: 12px; }
.hang {
  --fw: 220px;
  --drop: 48px;
  --wl: 120px;
  --wa: 23.57deg;
  position: relative;
  flex: none;
  width: var(--fw);
  padding-top: var(--drop);
}
.hang__nail { position: absolute; top: -3px; left: calc(50% - 3px); z-index: 1; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.hang__wire { position: absolute; top: 0; left: 50%; width: var(--wl); height: 1px; background: var(--ink); transform-origin: 0 50%; }
.hang__wire--r { transform: rotate(var(--wa)); }
.hang__wire--l { transform: rotate(calc(180deg - var(--wa))); }
.hang__clip { position: relative; overflow: clip; }
.hero__frame img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 55% 30%; }
.veil { display: none; }
.hero__label { margin-bottom: 18px; min-width: 0; width: 108px; }
.latin { color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .32em; line-height: 1.5; }
.hero__title { margin-top: 10px; font-family: var(--font-head); font-size: var(--h1); font-weight: 400; line-height: 1.1; }
.hero__lead { max-width: 36ch; margin-top: 14px; }
.rating { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: .9375rem; font-weight: 700; }
.rating__stars { display: inline-flex; gap: 2px; color: var(--ink); }
.rating__stars svg { width: 15px; height: 15px; }
.hero__actions { display: grid; gap: 12px; margin-top: 26px; }

/* ---------- Rooms ---------- */
.room { padding-block: 80px; }
.h2 { font-family: var(--font-head); font-size: var(--h2); font-weight: 400; line-height: 1.15; }
.sub { margin-top: 8px; color: var(--muted); }
.cite, blockquote footer { margin-top: 8px; color: var(--muted); font-size: .8125rem; font-weight: 700; line-height: 1.45; }

/* האמן */
.artist__grid { display: grid; gap: 36px; }
.artist__media { position: relative; isolation: isolate; }
.ring { display: none; }
.artist__photo { --k-reveal-cover: #DEE0E1; }
.artist__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 40% 35%; }
.artist__label { margin-top: 12px; }
.artist__words { margin-top: 18px; font-size: 1.1875rem; }
.artist__team { margin-top: 18px; font-weight: 700; }
.mini-q { margin-top: 22px; padding-inline-start: 14px; border-inline-start: 3px solid var(--primary); }
.mini-q p { font-family: var(--font-head); font-size: 1.5rem; line-height: 1.3; }

/* התערוכה: a scrolling corridor on the phone, a salon hang on desktop */
.works {
  display: flex;
  gap: 20px;
  margin-top: 28px;
  padding: 12px 16px 28px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px;
  list-style: none;
}
.works:focus-visible { outline-offset: -3px; }
.work { flex: 0 0 78vw; max-width: 340px; scroll-snap-align: start; }
.work__frame { position: relative; text-decoration: none; }
.work__frame img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.work--a img { object-position: 50% 45%; }
.work--b img { object-position: 55% 40%; }
.work--c img { aspect-ratio: 4 / 5; object-position: 50% 55%; }
.work--d img { aspect-ratio: 4 / 5; object-position: 45% 50%; }
.work .label { margin-top: 12px; }

/* בתוכנית */
.program__grid { display: grid; gap: 24px; }
.program__list { padding: 0; list-style: none; border-top: 1px solid var(--line); }
.program__list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-head);
  font-size: 26px;
  line-height: 1.3;
}
.program__list li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.program__end { margin-top: 18px; color: var(--muted); }

/* ספר האורחים */
.artisan { margin-top: 28px; }
.artisan__q { font-family: var(--font-head); font-size: 72px; line-height: 1; }
.cards { display: grid; gap: 22px; margin-top: 44px; padding: 0; list-style: none; }
.card { position: relative; padding: 24px 18px 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 10px 20px -16px rgb(14 16 16 / .5); }
.card::before { content: ""; position: absolute; top: 9px; left: calc(50% - 4px); width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.card:nth-child(1) { rotate: -1deg; }
.card:nth-child(2) { rotate: .6deg; }
.card:nth-child(3) { rotate: -.4deg; }
.card:nth-child(4) { rotate: 1deg; }
.card:nth-child(5) { rotate: -.8deg; }
.guestbook__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 32px; font-size: .9375rem; font-weight: 700; }
.guestbook__foot .k-link { display: inline-flex; align-items: center; min-height: 44px; }

/* שעות ביקור: a museum entrance sign */
.visit__grid { display: grid; gap: 36px; }
.hours { width: 100%; margin-top: 20px; border-collapse: collapse; border-top: 1px solid var(--ink); font-size: 1.0625rem; }
.hours tr { border-bottom: 1px solid var(--line); }
.hours th, .hours td { padding: 10px 0; font-weight: 400; text-align: start; }
.hours td { text-align: end; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 700; }
.hours tr.is-today th::after { content: " · היום"; color: var(--primary); }
.visit__address { font-family: var(--font-head); font-size: 1.75rem; line-height: 1.25; }
.live { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .9375rem; font-weight: 700; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.live.is-open::before { background: var(--primary); }
.visit__nav { display: grid; gap: 12px; margin-top: 22px; }

/* כרטיס כניסה: two parts, each with half-moon notches where they meet */
.ticket { display: flex; max-width: 343px; }
.ticket__main {
  flex: 1;
  padding: 22px 20px 22px 22px;
  border: 1px solid var(--ink);
  border-left: 0;
  border-radius: 0 10px 10px 0;
  background: var(--surface);
  -webkit-mask: radial-gradient(circle 10px at 0 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 10px at 0 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 10px at 0 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 10px at 0 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
}
.ticket__stub {
  display: flex;
  flex: 0 0 64px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--ink);
  border-right: 2px dashed var(--ink);
  border-radius: 10px 0 0 10px;
  background: var(--surface);
  transform-origin: right center;
  -webkit-mask: radial-gradient(circle 10px at 100% 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 10px at 100% 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 10px at 100% 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 10px at 100% 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
}
.ticket__brand { font-family: var(--font-head); font-size: 18px; font-weight: 700; letter-spacing: .18em; writing-mode: vertical-rl; }
.ticket__town { font-size: .75rem; font-weight: 700; }
.ticket__kicker { color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .2em; }
.ticket__title { margin-top: 6px; font-family: var(--font-head); font-size: 2rem; font-weight: 400; line-height: 1.15; }
.ticket__where { margin-top: 6px; font-size: .9375rem; }
.ticket__actions { display: grid; gap: 10px; margin-top: 18px; }

/* ---------- Footer + dock ---------- */
.site-footer { padding: 32px 0 40px; border-top: 1px solid var(--ink); background: var(--surface); color: var(--muted); font-size: .9375rem; }
.site-footer p + p { margin-top: 8px; }
.site-footer a { color: var(--ink); }
.site-footer a { display: inline-block; min-height: 24px; }

.dock {
  position: fixed;
  inset-inline: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 35;
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--ink);
  background: var(--surface);
  box-shadow: 0 18px 30px -18px rgb(14 16 16 / .6);
}
.dock > * { flex: 1 1 0; }
.dock.is-hidden { visibility: hidden; opacity: 0; transform: translateY(calc(100% + 24px)); pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .dock { transition: transform 420ms cubic-bezier(.16, 1, .3, 1), opacity 300ms ease, visibility 0s; }
  .dock.is-hidden { transition: transform 420ms cubic-bezier(.16, 1, .3, 1), opacity 300ms ease, visibility 0s 420ms; }
}
@media (prefers-reduced-motion: reduce) { .dock.is-hidden { transform: none; } }
@media (max-width: 899px) { body { padding-bottom: 88px; } }
@media (min-width: 900px) { .dock { display: none; } }

/* ---------- Tablet ---------- */
@media (min-width: 768px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visit__nav, .ticket__actions { display: flex; flex-wrap: wrap; }
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  body { font-size: 1.1875rem; }
  .site-nav { display: flex; gap: 28px; }
  .site-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; font-weight: 700; letter-spacing: .04em; text-decoration: none; }
  .site-nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
  .brand { font-size: 24px; }

  .hero { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 28px; min-height: auto; padding-block: 40px 96px; }
  .hero__art { grid-column: 7 / 13; grid-row: 1; }
  .hero__text { grid-column: 1 / 7; grid-row: 1; align-self: center; }
  .hang { --fw: 400px; --drop: 64px; --wl: 209.98px; --wa: 17.74deg; }
  .hero__label { width: 140px; margin-bottom: 28px; }
  .hero__actions { display: flex; }
  .hero__actions .k-btn--block { width: auto; }

  .room { padding-block: 120px; }
  .artist__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 28px; align-items: start; }
  .artist__text { grid-column: 1 / 7; grid-row: 1; padding-top: 24px; }
  .artist__media { grid-column: 8 / 13; grid-row: 1; margin-top: -48px; }
  .ring { display: block; position: absolute; top: -56px; left: -24px; z-index: -1; width: 140px; height: 140px; border: 1.5px solid var(--line); border-radius: 50%; }

  .works {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 28px;
    row-gap: 48px;
    max-width: 1232px;
    margin-inline: auto;
    overflow: visible;
    scroll-snap-type: none;
  }
  .work { max-width: none; }
  .work--a { grid-column: 1 / 6; grid-row: 1; }
  .work--b { grid-column: 6 / 10; grid-row: 1; margin-top: 64px; }
  .work--c { grid-column: 10 / 13; grid-row: 1; margin-top: 24px; }
  .work--d { grid-column: 5 / 9; grid-row: 2; margin-top: -40px; }
  .work .label { position: relative; margin: -26px auto 0 -18px; }

  .program__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 28px; align-items: start; }
  .program__grid > div { grid-column: 1 / 9; grid-row: 1; }
  .program__grid > .h2 { grid-column: 9 / 13; grid-row: 1; }
  .program__list li { font-size: 32px; }

  .artisan { max-width: 58%; }
  .artisan__q { font-size: 140px; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }

  .visit__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 28px; align-items: end; }
  .visit__hours { grid-column: 1 / 7; }
  .visit__where { grid-column: 8 / 13; }

  .ticket { max-width: 720px; margin-inline: auto 8.33%; }
  .ticket__main { padding: 32px 36px 32px 32px; }
  .ticket__stub { flex-basis: 96px; }
  .ticket__title { font-size: 2.75rem; }
}

/* =====================================================================
   Motion. Hero: pure CSS from the first paint, so the cloth never "appears"
   over a picture that was already showing. Below the fold: start states only
   under html.k-motion. Reduced motion: no cloth, everything in place.
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .veil {
    display: block;
    position: absolute;
    inset: 0;
    border-radius: 0 0 40% 40% / 0 0 18px 18px;
    background:
      repeating-linear-gradient(90deg, rgb(0 0 0 / .10) 0 2px, transparent 2px 26px, rgb(255 255 255 / .08) 26px 28px, transparent 28px 44px),
      var(--primary);
    animation: unveil 900ms 150ms both;
  }
  .hero__label { animation: label-in 400ms var(--k-ease-out) 950ms both; }
  .latin { animation: fade-in 500ms ease 1200ms both; }

  @media (hover: hover) {
    .ticket__stub { transition: transform 300ms var(--k-ease); }
    .ticket:hover .ticket__stub { transform: translateX(-4px) rotate(3deg); }
  }
}
@keyframes unveil {
  0% { transform: none; animation-timing-function: var(--k-ease); }
  22% { transform: translateY(6px); animation-timing-function: cubic-bezier(.55, 0, .75, .2); }
  100% { transform: translateY(112%) rotate(1.5deg); }
}
@keyframes label-in { from { opacity: 0; transform: translateX(12px); } }
@keyframes fade-in { from { opacity: 0; } }

@media (forced-colors: active) {
  .veil { display: none; }
  .frame, .label, .card { border-color: CanvasText; }
}

/* ---------- Accessibility statement + 404 ---------- */
.page { max-width: 720px; margin-inline: auto; padding: 56px 16px 72px; }
.page h1 { margin-bottom: 18px; font-family: var(--font-head); font-size: var(--h2); font-weight: 400; line-height: 1.15; }
.page h2 { margin: 32px 0 8px; font-family: var(--font-head); font-size: 1.5rem; font-weight: 400; }
.page ul { padding-inline-start: 1.2em; }
.page li + li { margin-top: 6px; }
.page p + p { margin-top: 12px; }
.page a { display: inline-block; min-height: 24px; font-weight: 700; }
