/* ==========================================================
   ישל"צ חטיבת ביניים · page styles (loaded after style.css)
   Idea: "אבני בניין". The logo is built from square block letters, so the page
   borrows them: notched-corner photo frames, little yellow blocks, notebook
   graph paper on the light sections, handwritten margin notes.
   Palette (from the brief): deep blue + sky dominate, cream for light grounds
   and text on dark, yellow for decoration, dark brown for running text.
   Motion: one orchestrated hero load, then a few purposeful moments
   (highlight draw, photo wipe, journey line, ticket deal, tab crossfade).
   Only transform / opacity / clip-path animate. Reduced motion = static.
   ========================================================== */

[data-page="hativa"] {
  --hv-navy: #24588C;
  --hv-navy-2: #2C66A0;
  --hv-deep: #163A61;
  --hv-ink: #173C63;
  --hv-sky: #7AC8E5;
  --hv-sky-2: #A6DCF0;
  --hv-sky-tint: #DCEFF7;
  --hv-cream: #F2EDE4;
  --hv-paper: #FBF8F2;
  --hv-yellow: #F1C375;
  --hv-yellow-2: #F6D69B;
  --hv-brown: #422F18;
  --hv-brown-soft: #5E4A2E;
  --hv-line: rgba(36, 88, 140, 0.16);
  --hv-n: 18px;                      /* notch size of the block frames */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: linear(0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017 19.4%, 1.067, 1.099 24.3%, 1.108 26%, 1.104, 1.09 30.6%, 1.033 37.1%, 1.008 41%, 0.993 45.4%, 0.989 50%, 1 63.4%, 1);

  /* re-point the shared site tokens, so header, footer, buttons and type follow this page's palette */
  --sand: var(--hv-cream);
  --paper: var(--hv-paper);
  --olive: var(--hv-ink);
  --olive-3: var(--hv-navy);
  --ink: var(--hv-brown);
  --ink-soft: var(--hv-brown-soft);
  --teal: var(--hv-navy);
  --aqua: var(--hv-sky);
  --aqua-ink: var(--hv-navy);
  --clay-ink: var(--hv-navy);
  --lemon: var(--hv-yellow);
  --sage: var(--hv-sky);
  --line: var(--hv-line);
  --on-dark: var(--hv-cream);
  --on-dark-soft: rgba(242, 237, 228, 0.95);
  --on-dark-line: rgba(242, 237, 228, 0.2);
  --shadow: 0 22px 44px -26px rgba(22, 58, 97, 0.55);
  --focus: var(--hv-deep);           /* keyboard focus ring (yellow on the dark blue grounds, set below) */
}
[data-page="hativa"] .hv-hero, [data-page="hativa"] .on-dark, [data-page="hativa"] .site-footer { --focus: var(--hv-yellow); }

/* buttons: yellow action, deep-blue secondary, press feedback */
[data-page="hativa"] .btn { transition: transform 0.18s var(--ease-out), background-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, border-color 0.18s ease; }
[data-page="hativa"] .btn:active { transform: scale(0.97); }
[data-page="hativa"] .btn-clay { background: var(--hv-yellow); color: var(--hv-deep); }
[data-page="hativa"] .btn-clay:hover { background: var(--hv-yellow-2); transform: translateY(-2px); box-shadow: 0 14px 26px -14px rgba(241, 195, 117, 0.95); }
[data-page="hativa"] .btn-clay:active, [data-page="hativa"] .btn-olive:active { transform: translateY(0) scale(0.97); }
[data-page="hativa"] .btn-olive { background: var(--hv-navy); color: var(--hv-cream); }
[data-page="hativa"] .btn-olive:hover { background: var(--hv-deep); }
[data-page="hativa"] .btn .ic.fwd { transition: transform 0.2s var(--ease-out); }
[data-page="hativa"] .icon-btn:hover { color: var(--hv-deep); }
[data-page="hativa"] .on-dark .script.sage, [data-page="hativa"] .script.sage { color: var(--hv-yellow); }
/* yellow script on the blue: at least 24px, so it counts as large text (3:1) on phones too */
[data-page="hativa"] .on-dark .script.sage { font-size: max(1.5rem, var(--t-script)); line-height: calc(var(--t-script) * 1.05); } /* same line height as before: nothing below moves */

/* shared surfaces */
/* paper grain (Magnific stock "white recycle paper texture", made seamless), soft-light so it never shifts the colour */
[data-page="hativa"] { --hv-tex: url("../assets/img/hativa/paper.webp"); }
.hv-paper { background: var(--hv-tex) 0 0 / 420px, var(--hv-cream); background-blend-mode: soft-light, normal; }
.hv-frame {
  display: block;
  overflow: hidden;
  clip-path: polygon(var(--hv-n) 0, calc(100% - var(--hv-n)) 0, calc(100% - var(--hv-n)) var(--hv-n), 100% var(--hv-n), 100% calc(100% - var(--hv-n)), calc(100% - var(--hv-n)) calc(100% - var(--hv-n)), calc(100% - var(--hv-n)) 100%, var(--hv-n) 100%, var(--hv-n) calc(100% - var(--hv-n)), 0 calc(100% - var(--hv-n)), 0 var(--hv-n), var(--hv-n) var(--hv-n));
}
.hv-frame img { width: 100%; height: 100%; object-fit: cover; }
[data-page="hativa"] .torn-edge { fill: var(--edge, var(--hv-sky)); }

/* =================== hero =================== */
.hv-hero {
  --hdr: 90px;
  position: relative;
  margin-top: calc(-1 * var(--hdr));
  padding-block: calc(var(--hdr) + clamp(30px, 5vw, 70px)) clamp(80px, 9vw, 130px);
  color: var(--hv-cream);
  background:
    var(--hv-tex) 0 0 / 420px,
    radial-gradient(70% 80% at 88% 8%, rgba(122, 200, 229, 0.28), transparent 62%),
    radial-gradient(60% 70% at 6% 96%, rgba(241, 195, 117, 0.14), transparent 60%),
    linear-gradient(160deg, var(--hv-navy-2) 0%, var(--hv-navy) 46%, var(--hv-deep) 100%);
  background-blend-mode: soft-light, normal, normal, normal;
  overflow: hidden;
  isolation: isolate;
}
.hv-hero-grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.hv-hero-copy { display: grid; gap: clamp(18px, 2.2vw, 26px); justify-items: start; min-width: 0; }
.hv-logo { position: relative; width: min(100%, 540px); aspect-ratio: 631 / 236; margin: 0; }
.hv-logo svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hv-logo-blocks { fill: var(--hv-cream); }
.hv-logo-blocks polygon { transform-box: fill-box; transform-origin: 50% 100%; }
.hv-logo-script { fill: var(--hv-sky); }
.hv-hero-lead { font-size: clamp(1.12rem, 1.5vw, 1.32rem); line-height: 1.65; color: var(--on-dark-soft); max-width: 44ch; }
.hv-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* mosaic of block-framed photos */
.hv-mosaic { position: relative; aspect-ratio: 1.06; width: 100%; max-width: 640px; justify-self: end; }
.hv-tile {
  position: absolute; margin: 0;
  background: var(--hv-paper);
  padding: 10px 10px 40px;
  border-radius: 4px;
  box-shadow: 0 26px 44px -22px rgba(4, 18, 36, 0.8), 0 2px 6px rgba(4, 18, 36, 0.22);
  rotate: var(--r, 0deg);
  transition: scale 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), rotate 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease;
}
.hv-pic { display: block; width: 100%; height: 100%; overflow: hidden; border-radius: 2px; }
.hv-pic img { width: 100%; height: 100%; object-fit: cover; }
/* hover: grow and tilt left, like the prints on the home page; stacking order stays */
@media (hover: hover) { .hv-tile:hover { scale: 1.1; rotate: -10deg; box-shadow: 0 34px 50px -24px rgba(4, 18, 36, 0.85), 0 2px 6px rgba(4, 18, 36, 0.22); } }
.t-wide { --r: -2.5deg; top: 4%; right: 1%; width: 64%; aspect-ratio: 1.2; }
.t-wide img { object-position: 46% 50%; }
.t-tall { --r: -5deg; top: 30%; left: 1%; width: 36%; aspect-ratio: 0.68; z-index: 2; }
.t-tall img { object-position: 50% 30%; }
.t-square { --r: 3deg; bottom: 1%; right: 13%; width: 44%; aspect-ratio: 1.05; z-index: 1; }
.t-square img { object-position: 40% 70%; }
/* the four letters of the ישל"צ logo, scattered around the prints */
.hv-letter { position: absolute; z-index: 3; height: auto; overflow: visible; pointer-events: none; filter: drop-shadow(0 8px 10px rgba(4, 18, 36, 0.35)); }
.hv-letter { fill: var(--hv-yellow); }
.lt-yod { top: 0; right: 64%; width: clamp(10px, 1.1vw, 14px); rotate: -8deg; }
.lt-shin { top: 23%; left: 5%; width: clamp(26px, 2.6vw, 36px); rotate: 6deg; }
.lt-lamed { bottom: 5%; left: 37%; width: clamp(18px, 1.8vw, 25px); rotate: -5deg; }
.lt-tsadi { bottom: 7%; right: 7%; width: clamp(20px, 2vw, 28px); rotate: 8deg; }

/* the hero load: blocks stack in right-to-left, the script writes itself, photos settle, blocks drop */
@keyframes hv-stack { from { opacity: 0; transform: translateY(42%); } }
@keyframes hv-write { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
@keyframes hv-up { from { opacity: 0; transform: translateY(14px); } }
@keyframes hv-settle { from { opacity: 0; transform: translateY(28px); } }
@keyframes hv-zoom { from { transform: scale(1.16); } }
@keyframes hv-drop { from { opacity: 0; transform: translateY(-46px) rotate(-30deg); } }
.reveal-on .hv-logo-blocks polygon { animation: hv-stack 0.75s var(--ease-out) both; animation-delay: calc(0.12s + var(--i) * 85ms); }
.reveal-on .hv-logo-script { animation: hv-write 1.05s var(--ease-io) 0.5s both; }
.reveal-on .hv-in { animation: hv-up 0.6s var(--ease-out) var(--d, 0s) both; }
.reveal-on .hv-tile { animation: hv-settle 0.9s var(--ease-out) var(--d, 0s) both; }
.reveal-on .hv-tile img { animation: hv-zoom 1.5s var(--ease-out) var(--d, 0s) both; }
.reveal-on .hv-letter { animation: hv-drop 0.9s var(--ease-spring) var(--d, 0s) both; }

/* =================== about =================== */
.hv-about { --edge: var(--hv-cream); z-index: 1; }
.hv-about-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(36px, 6vw, 96px); align-items: center; }
.hv-about-text .sec-head { margin-bottom: clamp(18px, 2.4vw, 28px); }
.hv-about-body { display: grid; gap: 0.9em; }
.hv-about-body .lead { color: var(--hv-brown); max-width: 56ch; font-size: clamp(1.1rem, 1.35vw, 1.22rem); line-height: 1.8; }
.hv-hl {
  color: inherit;
  background: linear-gradient(transparent 56%, var(--hv-yellow) 56%, var(--hv-yellow) 92%, transparent 92%) no-repeat right / 100% 100%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding-inline: 2px;
}
.reveal-on .hv-hl { background-size: 0% 100%; transition: background-size 0.9s var(--ease-io) calc(0.25s + var(--hd, 0s)); }
.reveal-on .is-in .hv-hl { background-size: 100% 100%; }

.hv-traits { list-style: none; margin: clamp(22px, 3vw, 34px) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.tr {
  --hv-n: 9px;
  font-family: var(--f-display); font-weight: 900; font-size: clamp(1rem, 1.25vw, 1.15rem);
  padding: 0.85em 1.25em;
  clip-path: polygon(var(--hv-n) 0, calc(100% - var(--hv-n)) 0, calc(100% - var(--hv-n)) var(--hv-n), 100% var(--hv-n), 100% calc(100% - var(--hv-n)), calc(100% - var(--hv-n)) calc(100% - var(--hv-n)), calc(100% - var(--hv-n)) 100%, var(--hv-n) 100%, var(--hv-n) calc(100% - var(--hv-n)), 0 calc(100% - var(--hv-n)), 0 var(--hv-n), var(--hv-n) var(--hv-n));
  transition: transform 0.45s var(--ease-spring);
}
.tr-navy { background: var(--hv-navy); color: var(--hv-cream); }
.tr-sky { background: var(--hv-sky); color: var(--hv-deep); }
.tr-yellow { background: var(--hv-yellow); color: var(--hv-deep); }
@media (hover: hover) {
  .tr:hover { transform: translateY(-5px) rotate(-2deg); }
  .tr-sky:hover { transform: translateY(-5px) rotate(2deg); }
}

.hv-about-media { position: relative; isolation: isolate; padding: 22px 3% 4%; }
.hv-about-media::before { /* a big sky block peeking out behind the print */
  content: ""; position: absolute; z-index: -1;
  right: -4%; top: -4%; width: 44%; aspect-ratio: 1;
  background: var(--hv-sky-tint);
}
.hv-about-print {
  position: relative; margin: 0;
  background: var(--hv-paper);
  padding: 12px 12px 56px;
  border-radius: 4px;
  box-shadow: 0 30px 50px -28px rgba(22, 58, 97, 0.62), 0 2px 6px rgba(22, 58, 97, 0.14);
  transform: rotate(-3deg);
}
.hv-about-print img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: 30% 50%; border-radius: 2px; }
.hv-about-print .tape {
  position: absolute; top: -16px; left: 50%; width: 128px; height: 34px;
  translate: -50% 0; rotate: -4deg;
  background: rgba(241, 195, 117, 0.82);
  box-shadow: 0 2px 4px rgba(66, 47, 24, 0.12);
  clip-path: polygon(0 6%, 3% 0, 6% 8%, 9% 0, 91% 0, 94% 8%, 97% 0, 100% 6%, 100% 94%, 97% 100%, 94% 92%, 91% 100%, 9% 100%, 6% 92%, 3% 100%, 0 94%);
}
/* scroll moment: the print is dropped onto the page */
.reveal-on [data-hv="snap"] { opacity: 0; transform: translateY(34px) rotate(-11deg); transition: opacity 0.45s ease 0.2s, transform 0.85s var(--ease-spring) 0.2s; }
.reveal-on [data-hv="snap"].is-in { opacity: 1; transform: rotate(-3deg); }

/* =================== pillars (tabs) =================== */
.hv-pillars { background: var(--hv-tex) 0 0 / 420px, var(--hv-sky); background-blend-mode: soft-light, normal; --edge: var(--hv-sky); z-index: 2; }
.hv-pillars .h2 { color: var(--hv-deep); }
.hv-pillars .script { color: var(--hv-deep); }
.hv-tabs { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(22px, 4vw, 56px); align-items: stretch; }
.hv-tablist { display: grid; gap: 8px; align-content: center; }
.hv-tab {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; row-gap: 2px;
  align-items: center;
  width: 100%; text-align: start;
  padding: 16px 18px;
  border: 0; border-radius: 18px;
  background: transparent; color: var(--hv-deep);
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.hv-tab:hover { background: rgba(251, 248, 242, 0.42); }
.hv-tab[aria-selected="true"] { background: var(--hv-paper); box-shadow: 0 18px 30px -22px rgba(22, 58, 97, 0.6); }
.hv-tab .num {
  grid-row: span 2;
  width: 48px; height: 48px; display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 900; font-size: 1rem;
  background: rgba(22, 58, 97, 0.12); color: var(--hv-deep);
  --hv-n: 7px;
  clip-path: polygon(var(--hv-n) 0, calc(100% - var(--hv-n)) 0, calc(100% - var(--hv-n)) var(--hv-n), 100% var(--hv-n), 100% calc(100% - var(--hv-n)), calc(100% - var(--hv-n)) calc(100% - var(--hv-n)), calc(100% - var(--hv-n)) 100%, var(--hv-n) 100%, var(--hv-n) calc(100% - var(--hv-n)), 0 calc(100% - var(--hv-n)), 0 var(--hv-n), var(--hv-n) var(--hv-n));
  transition: background-color 0.2s ease, transform 0.35s var(--ease-spring);
}
.hv-tab[aria-selected="true"] .num { background: var(--hv-yellow); transform: rotate(-6deg); }
.hv-tab .t { font-family: var(--f-display); font-weight: 900; font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.2; }
.hv-tab .d { font-size: 0.98rem; line-height: 1.5; color: rgba(22, 58, 97, 0.9); }
.hv-stage { position: relative; min-height: clamp(300px, 34vw, 470px); }
.hv-stage figure {
  position: absolute; inset: 0; margin: 0;
  --hv-n: 22px;
  clip-path: polygon(var(--hv-n) 0, calc(100% - var(--hv-n)) 0, calc(100% - var(--hv-n)) var(--hv-n), 100% var(--hv-n), 100% calc(100% - var(--hv-n)), calc(100% - var(--hv-n)) calc(100% - var(--hv-n)), calc(100% - var(--hv-n)) 100%, var(--hv-n) 100%, var(--hv-n) calc(100% - var(--hv-n)), 0 calc(100% - var(--hv-n)), 0 var(--hv-n), var(--hv-n) var(--hv-n));
  opacity: 0; filter: blur(8px); transform: scale(1.03);
  transition: opacity 0.42s var(--ease-out), filter 0.42s var(--ease-out), transform 0.6s var(--ease-out);
}
.hv-stage figure.is-on { opacity: 1; filter: blur(0); transform: none; }
.hv-stage figure img { width: 100%; height: 100%; object-fit: cover; }
.hv-stage.instant figure { transition: none; }
.hv-stage-tag {
  position: absolute; z-index: 2; bottom: 18px; left: 18px;
  background: var(--hv-deep); color: var(--hv-cream);
  font-family: var(--f-display); font-size: 0.9rem; padding: 6px 12px; border-radius: 999px; direction: ltr;
}
.hv-stage-tag b { color: var(--hv-yellow); }

/* =================== journey =================== */
.hv-journey {
  background: var(--hv-tex) 0 0 / 420px, var(--hv-navy);
  background-blend-mode: soft-light, normal;
  padding-block: clamp(96px, 12vw, 160px) clamp(70px, 8vw, 110px);
}
.hv-journey .sec-head { max-width: 860px; }
.hv-journey .lead { max-width: 70ch; }
.hv-path { --pic: clamp(96px, 10vw, 132px); --mk: 26px; --gap: 14px; list-style: none; margin: clamp(10px, 2vw, 24px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; position: relative; }
.hv-path::before, .hv-path::after {
  content: ""; position: absolute; height: 4px; border-radius: 4px;
  top: calc(var(--pic) + var(--gap) + var(--mk) / 2 - 2px);
  right: 12.5%; left: 12.5%;
}
.hv-path::before { background: rgba(242, 237, 228, 0.18); }
.hv-path::after { background: var(--hv-yellow); transform-origin: 100% 50%; }
.reveal-on .hv-path::after { transform: scaleX(0); transition: transform 1.7s var(--ease-io) 0.2s; }
.reveal-on .hv-path.is-in::after { transform: scaleX(1); }
.st { position: relative; display: grid; justify-items: center; align-content: start; gap: var(--gap); text-align: center; }
.st-pic {
  width: var(--pic); aspect-ratio: 1; display: block; overflow: hidden;
  --hv-n: 12px;
  clip-path: polygon(var(--hv-n) 0, calc(100% - var(--hv-n)) 0, calc(100% - var(--hv-n)) var(--hv-n), 100% var(--hv-n), 100% calc(100% - var(--hv-n)), calc(100% - var(--hv-n)) calc(100% - var(--hv-n)), calc(100% - var(--hv-n)) 100%, var(--hv-n) 100%, var(--hv-n) calc(100% - var(--hv-n)), 0 calc(100% - var(--hv-n)), 0 var(--hv-n), var(--hv-n) var(--hv-n));
}
.st-pic img { width: 100%; height: 100%; object-fit: cover; }
.st-icon { display: grid; place-items: center; background: rgba(242, 237, 228, 0.1); }
.st-icon svg { width: 46%; fill: none; stroke: var(--hv-sky); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.st-mk { position: relative; z-index: 1; width: var(--mk); height: var(--mk); background: var(--hv-navy); border: 3px solid var(--hv-cream); transform: rotate(45deg); transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.5s var(--ease-spring); }
.hv-path.is-in .st-mk { background: var(--hv-yellow); border-color: var(--hv-yellow); transform: rotate(45deg) scale(1.12); transition-delay: calc(0.35s + var(--i) * 0.42s); }
.st h3 { font-size: clamp(1.1rem, 1.5vw, 1.32rem); color: var(--hv-cream); }
.st p { color: var(--on-dark-soft); font-size: 0.98rem; line-height: 1.5; max-width: 22ch; margin-top: -6px; }
.st.is-here .st-pic { outline: 3px solid var(--hv-yellow); outline-offset: -3px; }
.st-here {
  position: absolute; top: -30px; left: calc(50% + var(--pic) / 2 - 22px);
  color: var(--hv-yellow); font-size: clamp(1.2rem, 1.6vw, 1.5rem); white-space: nowrap;
  transform: rotate(-6deg); display: flex; align-items: flex-end; gap: 2px;
}
.st-here svg { width: 34px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transform: translateY(70%); }
.reveal-on .st-here { opacity: 0; transform: rotate(-6deg) translateY(8px); transition: opacity 0.4s ease 1.3s, transform 0.5s var(--ease-out) 1.3s; }
.reveal-on .hv-path.is-in .st-here { opacity: 1; transform: rotate(-6deg); }

/* =================== gallery =================== */
.hv-gallery .sec-head.row { align-items: end; }
.hv-gallery .sec-head.row > .hv-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.hv-filters button {
  font-family: var(--f-display); font-weight: 900; font-size: 0.95rem;
  padding: 0.6em 1.15em; border-radius: 999px;
  border: 1.5px solid var(--hv-line); background: var(--hv-paper); color: var(--hv-ink);
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s var(--ease-out);
}
.hv-filters button:hover { border-color: var(--hv-navy); }
.hv-filters button:active { transform: scale(0.96); }
.hv-filters button[aria-pressed="true"] { background: var(--hv-navy); border-color: var(--hv-navy); color: var(--hv-cream); }
.hv-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(140px, 14.5vw, 200px); grid-auto-flow: dense; gap: 12px; }
.g { min-width: 0; transition: opacity 0.2s ease, transform 0.25s var(--ease-out); }
.g.wide { grid-column: span 2; }
.g.tall { grid-row: span 2; }
.g.big { grid-column: span 2; grid-row: span 2; }
.g.is-out { opacity: 0; transform: scale(0.96); }
/* a filtered set is small: even two-up tiles read better than the bento */
.hv-grid.is-filtered { grid-auto-rows: clamp(170px, 19vw, 270px); }
.hv-grid.is-filtered .g { grid-column: span 2; grid-row: span 1; }
.g.is-gone { display: none; }
.g-btn { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 16px; overflow: hidden; cursor: zoom-in; background: var(--hv-sky-tint); }
.g-btn img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-out); }
.g-cap {
  position: absolute; bottom: 10px; inset-inline-start: 10px;
  background: var(--hv-paper); color: var(--hv-ink);
  font-family: var(--f-display); font-weight: 900; font-size: 0.82rem; line-height: 1;
  padding: 0.55em 0.9em; border-radius: 999px;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.25s var(--ease-out);
}
@media (hover: hover) {
  .g-btn:hover img { transform: scale(1.05); }
  .g-btn:hover .g-cap { opacity: 1; transform: none; }
}
.g-btn:focus-visible .g-cap { opacity: 1; transform: none; }
@media (hover: none) { .g-cap { opacity: 1; transform: none; } }

/* lightbox */
.hv-lb { border: 0; padding: 0; margin: 0; width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; background: transparent; color: var(--hv-cream); overflow: hidden; }
.hv-lb::backdrop { background: rgba(12, 30, 52, 0.92); }
.hv-lb[open]::backdrop { animation: hv-fade 0.25s ease both; }
.hv-lb.closing::backdrop { opacity: 0; transition: opacity 0.16s ease; }
@keyframes hv-fade { from { opacity: 0; } }
@keyframes hv-lb-in { from { opacity: 0; transform: scale(0.96); } }
.hv-lb-in { position: relative; width: 100%; height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 64px max(16px, env(safe-area-inset-right, 0px)) 28px max(16px, env(safe-area-inset-left, 0px)); }
.hv-lb-fig { margin: 0; display: grid; justify-items: center; gap: 12px; min-width: 0; touch-action: pan-y; }
.hv-lb[open] .hv-lb-fig { animation: hv-lb-in 0.28s var(--ease-out) both; }
.hv-lb.closing .hv-lb-fig { opacity: 0; transition: opacity 0.15s ease; }
.hv-lb-fig img { max-width: 100%; max-height: calc(100dvh - 150px); width: auto; height: auto; border-radius: 12px; transition: opacity 0.18s ease; user-select: none; -webkit-user-drag: none; }
.hv-lb-fig img.swap { opacity: 0.25; }
.hv-lb-fig figcaption { display: flex; gap: 14px; align-items: center; font-size: 0.95rem; color: rgba(242, 237, 228, 0.85); }
.hv-lb-cap { font-family: var(--f-display); font-weight: 900; color: var(--hv-yellow); }
.hv-lb-count { direction: ltr; }
.hv-lb-btn { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid rgba(242, 237, 228, 0.3); background: rgba(242, 237, 228, 0.08); color: var(--hv-cream); cursor: pointer; transition: background-color 0.18s ease, transform 0.18s var(--ease-out); }
.hv-lb-btn:hover { background: rgba(242, 237, 228, 0.2); }
.hv-lb-btn:active { transform: scale(0.94); }
.hv-lb-close { position: absolute; top: 12px; inset-inline-start: max(16px, env(safe-area-inset-right, 0px)); }

/* =================== visit (tickets) =================== */
.hv-visit {
  --edge: var(--hv-deep);
  background:
    var(--hv-tex) 0 0 / 420px,
    radial-gradient(60% 80% at 10% 0%, rgba(122, 200, 229, 0.16), transparent 60%),
    var(--hv-deep);
  background-blend-mode: soft-light, normal, normal;
  margin-top: max(22px, 3.8vw);
}
.hv-visit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.86fr); gap: clamp(18px, 2.4vw, 30px); align-items: stretch; }
.ticket {
  --stub: 108px;
  position: relative;
  display: grid; grid-template-columns: var(--stub) minmax(0, 1fr);
  color: var(--hv-brown);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.55s var(--ease-spring);
  filter: drop-shadow(0 26px 26px rgba(4, 16, 32, 0.45));
  -webkit-mask: radial-gradient(circle at calc(100% - var(--stub)) 0, transparent 13px, #000 13.5px) top / 100% 51% no-repeat, radial-gradient(circle at calc(100% - var(--stub)) 100%, transparent 13px, #000 13.5px) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle at calc(100% - var(--stub)) 0, transparent 13px, #000 13.5px) top / 100% 51% no-repeat, radial-gradient(circle at calc(100% - var(--stub)) 100%, transparent 13px, #000 13.5px) bottom / 100% 51% no-repeat;
}
.tk-stub {
  display: grid; align-content: center; justify-items: center; gap: 2px; text-align: center;
  background: var(--hv-yellow); color: var(--hv-deep);
  border-radius: 18px 0 0 18px; border-start-start-radius: 18px; border-end-start-radius: 18px; border-start-end-radius: 0; border-end-end-radius: 0;
  border-inline-end: 3px dashed rgba(22, 58, 97, 0.35);
  padding: 14px 8px;
  transition: transform 0.45s var(--ease-spring);
}
.tk-hday { font-family: var(--f-display); font-weight: 900; font-size: 2.9rem; line-height: 0.95; }
.tk-hmon { font-family: var(--f-display); font-weight: 900; font-size: 1.3rem; line-height: 1.1; }
.tk-greg { font-family: var(--f-display); font-weight: 400; font-size: 0.86rem; line-height: 1.2; margin-top: 8px; opacity: 0.78; }
.tk-body { background: var(--hv-paper); border-start-end-radius: 18px; border-end-end-radius: 18px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.tk-photo { display: block; height: clamp(110px, 10vw, 140px); overflow: hidden; }
.tk-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-out); }
.tk-text { padding: 16px 20px 18px; display: grid; gap: 8px; align-content: start; }
.tk-tag { justify-self: start; font-family: var(--f-display); font-weight: 900; font-size: 0.8rem; color: var(--hv-navy); background: var(--hv-sky-tint); padding: 0.4em 0.85em; border-radius: 999px; }
.tk-text h3 { font-size: clamp(1.25rem, 1.7vw, 1.5rem); color: var(--hv-ink); }
.tk-meta { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 0.98rem; }
.tk-meta li { display: flex; align-items: center; gap: 8px; }
.tk-meta .ic { width: 18px; height: 18px; color: var(--hv-navy); }
/* tickets are dealt onto the table as they come into view */
.reveal-on [data-hv="ticket"] { opacity: 0; transform: translateY(40px) rotate(calc(var(--tilt, 0deg) * 4)); transition: opacity 0.45s ease var(--td, 0s), transform 0.8s var(--ease-spring) var(--td, 0s); }
.reveal-on [data-hv="ticket"].is-in { opacity: 1; transform: rotate(var(--tilt, 0deg)); }
.reveal-on [data-hv="ticket"].is-in.settled { transition: transform 0.55s var(--ease-spring); }
@media (hover: hover) {
  .hv-visit-grid .ticket.settled:hover { transform: rotate(0deg) translateY(-6px); }
  .hv-visit-grid .ticket.settled:hover .tk-stub { transform: translateX(5px) rotate(2.5deg); }
  .hv-visit-grid .ticket.settled:hover .tk-photo img { transform: scale(1.05); }
}

.hv-call {
  display: grid; align-content: start; gap: 12px;
  padding: clamp(22px, 2.6vw, 32px);
  border-radius: 22px;
  border: 1.5px solid rgba(242, 237, 228, 0.18);
  background: rgba(242, 237, 228, 0.05);
}
.hv-call-ic {
  width: 56px; height: 56px; display: grid; place-items: center;
  background: var(--hv-yellow); color: var(--hv-deep);
  --hv-n: 9px;
  clip-path: polygon(var(--hv-n) 0, calc(100% - var(--hv-n)) 0, calc(100% - var(--hv-n)) var(--hv-n), 100% var(--hv-n), 100% calc(100% - var(--hv-n)), calc(100% - var(--hv-n)) calc(100% - var(--hv-n)), calc(100% - var(--hv-n)) 100%, var(--hv-n) 100%, var(--hv-n) calc(100% - var(--hv-n)), 0 calc(100% - var(--hv-n)), 0 var(--hv-n), var(--hv-n) var(--hv-n));
}
.hv-call-ic .ic { width: 26px; height: 26px; }
.hv-call h3 { font-size: clamp(1.3rem, 1.8vw, 1.6rem); color: var(--hv-cream); }
.hv-call p { color: var(--on-dark-soft); line-height: 1.7; }
.hv-call-row { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.hv-phone { font-family: var(--f-display); font-weight: 900; font-size: clamp(1.6rem, 2.4vw, 2.1rem); color: var(--hv-yellow); text-decoration: none; direction: ltr; }
.hv-call-info { list-style: none; margin: 4px 0 0; padding: 14px 0 0; border-top: 1px solid rgba(242, 237, 228, 0.16); display: grid; gap: 10px; }
.hv-call-info li { display: flex; align-items: center; gap: 10px; color: var(--on-dark-soft); }
.hv-call-info .ic { width: 18px; height: 18px; color: var(--hv-yellow); flex: none; }
.hv-call-info a { color: var(--hv-cream); text-decoration: none; }
.hv-call-info a:hover { text-decoration: underline; text-underline-offset: 4px; }
.hv-latin { font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif; letter-spacing: 0.01em; }
.hv-foot-contact { display: flex; flex-wrap: wrap; gap: 4px; }
.hv-foot-contact a { color: var(--on-dark-soft); text-decoration: none; }
.hv-foot-contact a:hover { color: var(--hv-cream); text-decoration: underline; text-underline-offset: 4px; }

/* =================== footer =================== */
[data-page="hativa"] .site-footer { background: #0F2D4C; --edge: #0F2D4C; margin-top: 0; }
.hv-visit { padding-bottom: clamp(90px, 10vw, 140px); }
[data-page="hativa"] .site-footer > .torn-edge.top { z-index: 0; }
.hv-foot-logo { --lg-a: var(--hv-cream); --lg-b: var(--hv-sky); }
[data-page="hativa"] .foot-brand { --logo-w: 190px; }
@media (max-width: 600px) { [data-page="hativa"] .foot-brand { --logo-w: 160px; } .hv-foot-contact { justify-content: center; } }

/* =================== responsive =================== */
@media (max-width: 1100px) {
  .hv-visit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hv-call { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  /* one column: the opening text sits under the sky glow, so the glow is softer here (text 4.5:1) */
  .hv-hero {
    background:
      var(--hv-tex) 0 0 / 420px,
      radial-gradient(70% 80% at 88% 8%, rgba(122, 200, 229, 0.08), transparent 62%),
      radial-gradient(60% 70% at 6% 96%, rgba(241, 195, 117, 0.14), transparent 60%),
      linear-gradient(160deg, var(--hv-navy-2) 0%, var(--hv-navy) 46%, var(--hv-deep) 100%);
  }
  .hv-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hv-hero-copy { justify-items: center; text-align: center; }
  .hv-hero-lead { margin-inline: auto; color: var(--on-dark); }
  .hv-hero-cta { justify-content: center; }
  .hv-gallery .sec-head.row { flex-direction: column; align-items: center; text-align: center; }
  .hv-gallery .sec-head.row > div:not(.hv-filters) { justify-items: center; }
  .hv-gallery .sec-head.row > .hv-filters { justify-content: center; }
  .hv-mosaic { justify-self: center; max-width: 560px; margin-top: 8px; }
  .hv-about-grid { grid-template-columns: minmax(0, 1fr); }
  .hv-about-media { max-width: 560px; justify-self: center; width: 100%; margin-inline: auto; }
  .hv-tabs { grid-template-columns: minmax(0, 1fr); }
  .hv-stage { order: -1; min-height: 0; aspect-ratio: 16 / 10; }
}
@media (max-width: 760px) {
  .hv-path { grid-template-columns: minmax(0, 1fr); gap: 26px; --pic: 92px; padding-inline-start: 48px; }
  .hv-path::before, .hv-path::after { top: 8px; bottom: 8px; height: auto; width: 4px; right: 11px; left: auto; }
  .hv-path::after { transform-origin: 50% 0; }
  .reveal-on .hv-path::after { transform: scaleY(0); }
  .reveal-on .hv-path.is-in::after { transform: scaleY(1); }
  .st { grid-template-columns: var(--pic) minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 16px; row-gap: 4px; justify-items: start; text-align: start; align-items: start; }
  .st-pic { grid-row: 1 / span 3; }
  .st h3 { align-self: end; padding-top: 14px; }
  .st p { margin-top: 0; }
  .st-mk { position: absolute; right: -46px; top: calc(var(--pic) / 2 - var(--mk) / 2); }
  .st-here { position: static; grid-column: 2; justify-self: start; margin-top: 2px; }
  .st-here svg { display: none; }
}
@media (max-width: 720px) {
  .hv-visit-grid { grid-template-columns: minmax(0, 1fr); }
  .hv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(120px, 34vw, 190px); gap: 8px; }
  .g.big { grid-column: span 2; grid-row: span 2; }
  .hv-lb-in { grid-template-columns: minmax(0, 1fr); padding-top: 70px; }
  .hv-lb-prev, .hv-lb-next { position: absolute; bottom: 22px; z-index: 2; }
  .hv-lb-prev { right: 22px; }
  .hv-lb-next { left: 22px; }
  .hv-lb-fig img { max-height: calc(100dvh - 190px); }
}
@media (max-width: 560px) {
  .hv-hero { --hdr: 80px; }
  .hv-hero-cta .btn { flex: 1 1 auto; }
  .hv-mosaic { aspect-ratio: 1; }
  .ticket { --stub: 88px; }
  .tk-hday { font-size: 2.4rem; }
  .hv-filters { gap: 6px; }
  .hv-filters button { font-size: 0.88rem; padding: 0.55em 0.95em; }
}

/* =================== reduced motion & capture =================== */
@media (prefers-reduced-motion: reduce) {
  [data-page="hativa"] *, [data-page="hativa"] *::before, [data-page="hativa"] *::after { animation: none !important; }
  .hv-hl, [data-hv], .hv-path::after, .st-mk, .st-here, .hv-stage figure, .ticket, .tk-stub, .tr, .g, .g-btn img, .tk-photo img, .hv-tile { transition: none !important; }
  .ticket:hover, .tr:hover { transform: rotate(var(--tilt, 0deg)) !important; }
  .hv-tile:hover { scale: none !important; rotate: var(--r, 0deg) !important; }
  .ticket:hover .tk-stub, .ticket:hover .tk-photo img, .g-btn:hover img { transform: none !important; }
  .hv-stage figure { filter: none; transform: none; }
}
.figma-capture .hv-logo-blocks polygon, .figma-capture .hv-logo-script, .figma-capture .hv-in, .figma-capture .hv-tile, .figma-capture .hv-tile img, .figma-capture .hv-letter { animation: none !important; }

/* very narrow phones (and 400% zoom): the longer header button ("לתיאום הגעה") must not push the menu button off the screen */
/* 360-379 px (common Android phones): the narrower header that style.css uses below 360 px for every page */
@media (max-width: 379px) {
  [data-page="hativa"] .nav { gap: 6px; padding-inline-start: 14px; }
  [data-page="hativa"] .nav-actions { gap: 6px; }
  [data-page="hativa"] .nav-actions .btn-sm { padding-inline: 0.8em; font-size: 0.9rem; }
}
@media (max-width: 359px) {
  /* style.css narrows the header for every page; "לתיאום הגעה" is longer, so a little more here */
  [data-page="hativa"] .nav { padding-inline-start: 12px; }
  [data-page="hativa"] .nav-actions .btn-sm { padding-inline: 0.7em; font-size: 0.82rem; }
}
