/* דף הבית: פשוט, בשפת הרנטגן (css/xr.css). רגע תנועה אחד: קו רנטגן כחול שעובר על האתר הקודם של ש. גוטובסקי ומגלה את החדש.
   כל השאר שקט: עבודות, לפני ואחרי, שירותים, איך זה עובד, סרטים, מערכות ויצירת קשר. */

/* ---------- מבנה ---------- */
.sec { width: min(100% - 2 * var(--m), var(--wrap)); margin-inline: auto; padding-top: clamp(4.5rem, 13vh, 9rem); }
.sec-head { display: grid; gap: 1.1rem; margin-bottom: clamp(2.2rem, 6vh, 3.6rem); }
.sec-head .xr-lead { max-width: 40ch; }
@media (min-width: 900px) { .sec-head:has(.xr-lead) { grid-template-columns: auto minmax(0, 1fr); align-items: end; column-gap: clamp(2rem, 6vw, 6rem); } .sec-head .xr-lead { justify-self: end; margin-bottom: .4rem; } }
.sec-head--row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; }
.sec-more { display: inline-flex; align-items: center; min-height: 44px; color: var(--fg); text-decoration: underline; text-decoration-color: var(--fg-line); text-underline-offset: .35em; }
.sec-more:hover { text-decoration-color: var(--signal); }

/* ---------- פתיחה ---------- */
@property --s { syntax: "<percentage>"; inherits: true; initial-value: 46%; }
@property --lo { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --mo { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --mn { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --no { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --st { syntax: "<number>"; inherits: true; initial-value: 0; }

.hx { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); align-items: center; column-gap: clamp(2rem, 6vw, 7rem);
  min-height: min(calc(100svh - 68px), 980px); padding: clamp(1.6rem, 5vh, 4rem) max(var(--m), (100% - var(--wrap)) / 2); }
.hx-copy { display: grid; justify-items: start; }
.hx-t { font-size: clamp(4.2rem, 6.8vw, 7.4rem); line-height: .92; }
.hx-sub { margin: clamp(1.2rem, 3vh, 2rem) 0 0; font: 750 clamp(1.9rem, 2.6vw, 2.8rem)/1 var(--f-display); }
.hx-what { margin: .9rem 0 0; max-width: 38ch; color: var(--fg-dim); font-size: clamp(1.08rem, 1.3vw, 1.25rem); line-height: 1.5; }
.hx-act { margin: clamp(1.8rem, 4vh, 2.6rem) 0 0; }

.hx-fig { justify-self: center; --s: 46%; --lo: 1; --mo: 1; --mn: 1; --no: 1; --st: 0; position: relative; margin: 0; display: grid; justify-items: center; gap: 1.1rem; }
.hx-phone { --pw: clamp(230px, calc((100svh - 68px - 170px) * .462), 350px); }
.hx-screen > div { position: absolute; inset: 0; }
.hx-old { z-index: 1; } .hx-new { z-index: 2; } .hx-ray { z-index: 3; }
.hx-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.hx-new { clip-path: inset(0 0 calc(100% - var(--s)) 0); opacity: var(--no); }
/* רצועת הרנטגן: אותו אתר חדש, כשלד כחול, ממש מעל הקו */
.hx-ray { clip-path: inset(max(0%, calc(var(--s) - 15%)) 0 calc(100% - var(--s)) 0); opacity: var(--lo); background: #07101f; }
.hx-ray img { filter: grayscale(1) invert(1) contrast(1.2) brightness(.5); }
.hx-ray::before { content: ""; position: absolute; inset: 0; z-index: 1; background: #3d7bff; mix-blend-mode: multiply; }
.hx-ray::after { content: ""; position: absolute; inset: 0; z-index: 2; background: repeating-linear-gradient(to bottom, rgba(61, 123, 255, .22) 0 1px, transparent 1px 6px), linear-gradient(to bottom, rgba(7, 16, 31, .55), transparent 55%, rgba(61, 123, 255, .3)); }
.hx-line { position: absolute; z-index: 4; left: 0; right: 0; top: var(--s); height: 3px; margin-top: -1.5px; background: var(--blue); box-shadow: 0 0 18px 5px rgba(61, 123, 255, .6); opacity: var(--lo); }
/* הסימונים: כחול מקווקו לבעיה (טקסט קטן מדי), כתום מלא לתיקון */
.hx-mark { position: absolute; z-index: 2; border-radius: calc(var(--pw) * .03); }
.hx-mark-old { top: 32.5%; bottom: 28.5%; left: 2.5%; right: 2.5%; border: 2px dashed var(--blue); opacity: var(--mo); }
.hx-mark-new { top: 17%; height: 19%; left: 22%; right: 3%; border: 2.5px solid var(--signal); opacity: var(--mn); }

.hx-cap { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; }
.hx-state { display: grid; }
.hx-state > * { grid-area: 1 / 1; justify-self: start; }
.hx-s-old, .hx-s-new { visibility: hidden; }
.hx-pause { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--fg-line); border-radius: 50%; background: var(--ink); color: var(--fg); cursor: pointer; }
.hx-pause:hover { border-color: var(--fg); }
.hx-pause svg { width: 18px; height: 18px; fill: currentColor; }
.hx-pause span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hx-pause .i-play, .hx-pause[aria-pressed="true"] .i-pause { display: none; }
.hx-pause[aria-pressed="true"] .i-play { display: block; }

/* התנועה: אנימציה אחת על הדמות, וכל השכבות קוראות ממנה (לכן גם עצירה אחת) */
@keyframes hx-scan {
  0% { --s: 0%; --lo: 0; --mo: 0; --mn: 0; --no: 1; --st: 0; }
  9% { --mo: 0; }
  14% { --mo: 1; }
  21% { --s: 0%; --lo: 0; }
  23% { --s: 0%; --lo: 1; animation-timing-function: cubic-bezier(.42, .06, .36, 1); }
  37% { --st: 0; }
  39% { --st: 1; }
  56% { --s: 100%; --lo: 1; }
  60% { --lo: 0; }
  63% { --mn: 0; }
  68% { --mn: 1; }
  86% { --mo: 1; }
  88% { --mo: 0; }
  90% { --mn: 1; --no: 1; --st: 1; }
  97% { --s: 100%; --mn: 0; --no: 0; --st: 0; }
  98% { --s: 0%; }
  100% { --s: 0%; --lo: 0; --mo: 0; --mn: 0; --no: 0; --st: 0; }
}
html.motion .hx-fig { animation: hx-scan 9.5s linear infinite; }
html.motion .hx-fig.is-paused { animation-play-state: paused; }
html.motion .hx-s-both { display: none; }
html.motion .hx-s-old { visibility: visible; opacity: calc(1 - var(--st)); }
html.motion .hx-s-new { visibility: visible; opacity: var(--st); }

@media (max-width: 899px) {
  .hx { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t t" "c f" "a a"; align-items: start; column-gap: 14px; min-height: 0; padding-top: 1.4rem; padding-bottom: 1rem; }
  .hx-copy { display: contents; }
  .hx-t { grid-area: t; font-size: clamp(2.7rem, 14.6vw, 4.6rem); }
  .hx-intro { grid-area: c; margin-top: 1.4rem; }
  .hx-sub { margin: 0; font-size: clamp(1.5rem, 6.8vw, 2.2rem); line-height: 1.02; text-wrap: balance; }
  .hx-what { margin-top: .8rem; font-size: 1rem; }
  .hx-fig { grid-area: f; margin-top: 1.4rem; gap: .7rem; }
  .hx-phone { --pw: clamp(118px, 37vw, 230px); }
  .hx-act { grid-area: a; margin-top: 1.4rem; }
  .hx-act .xr-btn { width: 100%; }
  .hx-cap .xr-pill { min-height: 26px; padding: 0 .6rem; font-size: .78rem; }
  .hx-cap > .xr-pill--solid { display: none; }
  .hx-s-both { white-space: normal; text-align: center; }
}
@media (max-width: 374px) {
  .hx { grid-template-columns: minmax(0, 1fr); grid-template-areas: "t" "c" "a" "f"; }
  .hx-fig { justify-self: center; margin-top: 2rem; }
  .hx-phone { --pw: 54vw; }
}

/* ---------- עבודות ---------- */
.wk-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2.4rem clamp(16px, 2vw, 32px); margin: 0; padding: 0; list-style: none; }
.wk-item { display: grid; align-content: start; gap: 1.3rem; }
.wk-phone { --pw: min(100%, 230px); width: 100%; max-width: 230px; padding: 3.5%; border-radius: 15%/7%; }
.wk-phone::after { top: 2.6%; height: 3%; }
.wk-phone .xr-screen { border-radius: 12%/5.6%; }
.wk-txt { display: grid; gap: .35rem; }
.wk-name { margin: 0; font: 750 clamp(1.9rem, 2.3vw, 2.4rem)/1 var(--f-display); }
.wk-what { margin: 0; color: var(--fg-dim); font-size: .95rem; line-height: 1.4; }
.wk-line { margin: .35rem 0 0; color: var(--fg-2); font-size: 1rem; line-height: 1.5; }
.wk-links { display: flex; flex-wrap: wrap; gap: 0 1.1rem; margin: .2rem 0 0; }
.wk-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--fg); font-size: .95rem; text-decoration: underline; text-decoration-color: var(--fg-line); text-underline-offset: .35em; }
.wk-links a:hover { text-decoration-color: var(--signal); }
@media (max-width: 1099px) { .wk-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 699px) {
  .wk-list { grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid var(--fg-faint); }
  .wk-item { grid-template-columns: 112px minmax(0, 1fr); align-items: start; gap: 18px; padding: 1.4rem 0; border-bottom: 1px solid var(--fg-faint); }
  .wk-name { font-size: 2rem; }
}

/* ---------- לפני ואחרי ---------- */
.ba { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: clamp(2rem, 7vw, 8rem); }
.ba-txt { display: grid; justify-items: start; gap: 1.2rem; }
.ba-txt .xr-lead { max-width: 30ch; }
.ba-num { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem 1.6rem; margin: .8rem 0 0; }
.ba-num dt { flex-basis: 100%; color: var(--fg-dim); font-size: .95rem; }
.ba-num dd { display: grid; gap: .4rem; margin: 0; }
.ba-num dd > span { color: var(--fg-dim); font-size: .9rem; }
.ba-num b { display: inline-flex; align-items: center; min-height: 3.6rem; padding: 0 1.1rem; border-radius: 99px; font: 750 2.6rem/1 var(--f-display); }
.ba-was b { border: 2px dashed var(--blue); color: var(--fg); }
.ba-now b { background: var(--signal); color: var(--ink); }
.ba-note { margin: 0; color: var(--fg-dim); font-size: .9rem; }
.ba-fig { margin: 0; display: grid; justify-items: center; gap: .9rem; }
.ba-phone { --pw: clamp(240px, 26vw, 320px); }
.ba-screen { --cut: 25%; }
.ba-screen .ba-after { clip-path: inset(0 calc(100% - var(--cut)) 0 0); }
.ba-tag { position: absolute; z-index: 2; bottom: 14px; padding: .2rem .7rem; border-radius: 99px; font: 500 .85rem/1.4 var(--f-body); pointer-events: none; }
.ba-tag-b { right: 12px; background: rgba(10, 10, 11, .78); color: var(--fg); border: 1px dashed var(--blue); }
.ba-tag-a { left: 12px; background: var(--signal); color: var(--ink); }
.ba-range { position: absolute; z-index: 4; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; touch-action: pan-y; }
.ba-seam { position: absolute; z-index: 3; top: 0; bottom: 0; left: var(--cut); width: 3px; margin-left: -1.5px; background: var(--blue); box-shadow: 0 0 16px 4px rgba(61, 123, 255, .55); pointer-events: none; }
.ba-seam i { position: absolute; top: 50%; left: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: var(--blue); box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.ba-seam i::before, .ba-seam i::after { content: ""; position: absolute; top: 50%; width: 7px; height: 7px; margin-top: -4.5px; border: solid #fff; border-width: 0 0 2px 2px; }
.ba-seam i::before { left: 9px; transform: rotate(45deg); }
.ba-seam i::after { right: 9px; transform: rotate(-135deg); }
.ba-range:focus-visible ~ .ba-seam i { outline: 2px solid var(--fg); outline-offset: 3px; }
.ba-hint { color: var(--fg-dim); font-size: .9rem; }
.globe { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 1.1rem; margin-top: 1.6rem; padding: .8rem 1.2rem .8rem .8rem; max-width: 30rem;
  border: 1px solid var(--fg-faint); border-radius: 22px; background: var(--ink-soft); color: var(--fg); text-decoration: none; transition: border-color .2s ease; }
.globe:hover { border-color: var(--fg-line); }
.globe img { width: 92px; height: 92px; border-radius: 16px; object-fit: cover; }
.globe-t { display: grid; gap: .25rem; }
.globe-t b { font: 750 1.8rem/1 var(--f-display); }
.globe-t span { color: var(--fg-dim); font-size: .95rem; line-height: 1.45; }
@media (max-width: 899px) {
  .ba { grid-template-columns: minmax(0, 1fr); row-gap: 2.6rem; }
  .ba-fig { grid-row: 2; }
  .ba-phone { --pw: min(72vw, 300px); }
}

/* ---------- שירותים ---------- */
.svc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 5vw, 5rem); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--fg-faint); }
.svc-list li { border-bottom: 1px solid var(--fg-faint); }
.svc-list li:nth-child(-n+2) { border-top: 0; }
.svc-list a { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem 1rem; padding: 1.25rem 0; color: var(--fg); text-decoration: none; }
.svc-list b { font: 750 clamp(2rem, 3vw, 2.8rem)/1 var(--f-display); }
.svc-list span { color: var(--fg-dim); font-size: 1rem; }
.svc-list a:hover b { color: var(--signal); }
@media (max-width: 699px) { .svc-list { grid-template-columns: minmax(0, 1fr); } }

/* ---------- איך זה עובד ---------- */
.how-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.6rem clamp(16px, 2.4vw, 40px); margin: 0; padding: 0; list-style: none; counter-reset: none; }
.how-steps li { display: grid; justify-items: start; align-content: start; gap: 1.1rem; padding-top: 1.4rem; border-top: 1px solid var(--fg-faint); }
.how-steps h3 { margin: 0; font: 750 clamp(1.8rem, 2.4vw, 2.4rem)/1.02 var(--f-display); text-wrap: balance; }
.how-promise { display: flex; flex-wrap: wrap; gap: .6rem; margin: clamp(2.2rem, 5vh, 3rem) 0 0; padding: 0; list-style: none; }
.how-promise .xr-pill { min-height: 40px; padding: 0 1.1rem; font-size: 1rem; color: var(--fg-2); }
@media (max-width: 899px) {
  .how-steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .how-steps li { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1rem; padding: 1.1rem 0; }
}

/* ---------- סרטים ותמונות ---------- */
.fs-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: clamp(12px, 1.6vw, 22px); margin: 0; padding: 0; list-style: none; }
.fs-lead { grid-row: span 2; }
.fs-item { display: grid; gap: .55rem; width: 100%; padding: 0; border: 0; background: none; color: var(--fg); text-align: start; cursor: pointer; }
.fs-media { position: relative; display: block; overflow: hidden; border-radius: 18px; aspect-ratio: 16 / 9; background: var(--ink-soft); }
.fs-media img, .fs-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fs-media video { opacity: 0; transition: opacity .6s ease; }
.fs-media video[src] { opacity: 1; }
.fs-play { position: absolute; z-index: 2; inset-inline-start: 12px; bottom: 12px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--signal); color: var(--ink); }
.fs-play svg { width: 18px; height: 18px; fill: currentColor; }
.fs-lead .fs-play { width: 60px; height: 60px; inset-inline-start: 18px; bottom: 18px; }
.fs-lead .fs-play svg { width: 24px; height: 24px; }
.fs-t { font: 750 1.6rem/1 var(--f-display); }
.fs-lead .fs-t { font-size: 2.2rem; }
.fs-k { justify-self: start; color: var(--fg-dim); font-size: .92rem; }
.fs-item:hover .fs-media { outline: 1px solid var(--fg-line); outline-offset: 3px; }
.fs-item:focus-visible { outline: none; }
.fs-item:focus-visible .fs-media { outline: 2px solid var(--fg); outline-offset: 3px; }
.fs-ai { margin: 1.6rem 0 0; color: var(--fg-dim); font-size: .92rem; line-height: 1.55; max-width: 60ch; }
.fs-lead .fs-media { aspect-ratio: auto; height: 100%; min-height: 0; }
.fs-lead .fs-item { grid-template-rows: minmax(0, 1fr) auto auto; height: 100%; }
@media (max-width: 899px) {
  .fs-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fs-lead { grid-column: 1 / -1; grid-row: auto; }
  .fs-lead .fs-media { aspect-ratio: 16 / 9; height: auto; }
  .fs-t { font-size: 1.4rem; }
}

/* חלון הסרט והתמונה (js/atelier.js, js/stills.js) */
.pm-lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(5, 5, 6, .97); color: var(--fg); }
.pm-lightbox::backdrop { background: #000; }
.pm-lb-in { position: relative; display: grid; place-items: center; width: 100%; height: 100%; padding: clamp(56px, 8vh, 88px) var(--m); }
.pm-lightbox video, .pm-lightbox img { max-width: 100%; max-height: calc(100dvh - 180px); width: auto; height: auto; border-radius: 14px; background: #000; }
.pm-lightbox video { width: min(1280px, 100%); }
.pm-lightbox.is-v video { width: auto; height: calc(100dvh - 180px); }
.pm-lb-t { margin: 1rem 0 0; color: var(--fg-dim); font-size: .95rem; text-align: center; }
.pm-lb-x { position: absolute; top: 16px; inset-inline-end: 16px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--fg-line); background: transparent; cursor: pointer; }
.pm-lb-x span { position: absolute; top: 50%; left: 50%; width: 16px; height: 2px; background: var(--fg); transform: translate(-50%, -50%) rotate(45deg); }
.pm-lb-x span + span { transform: translate(-50%, -50%) rotate(-45deg); }
.pm-lb-bar { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; width: min(1100px, 100%); }
.pm-lb-bar .pm-lb-t { margin: 0; flex: 1; text-align: start; }
.pm-lb-n { margin: 0; color: var(--fg-dim); font-size: .85rem; font-variant-numeric: tabular-nums; }
.pm-lb-nav { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--fg-line); background: transparent; color: var(--fg); cursor: pointer; }
.pm-lb-nav:hover, .pm-lb-x:hover { border-color: var(--fg); }

/* ---------- מערכות ---------- */
.sys-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); align-items: center; gap: clamp(1.6rem, 4vw, 4rem); padding: clamp(1.4rem, 4vw, 3.4rem);
  border: 1px solid var(--fg-faint); border-radius: 28px; background: var(--ink-soft); }
.sys-txt { display: grid; justify-items: start; gap: 1.3rem; }
.sys-t { font-size: clamp(2.4rem, 4.2vw, 4.2rem); }
.sys-line { margin: 0; max-width: 46ch; color: var(--fg-2); line-height: 1.6; }
.sys-img { width: 100%; height: auto; border-radius: 16px; }
@media (max-width: 899px) { .sys-card { grid-template-columns: minmax(0, 1fr); } .sys-img { grid-row: 1; } }

/* ---------- יצירת קשר ---------- */
.ct { width: auto; display: grid; justify-items: start; gap: 1.6rem; margin-top: clamp(5rem, 13vh, 9rem); padding: clamp(4rem, 12vh, 8rem) max(var(--m), (100% - var(--wrap)) / 2) clamp(4rem, 12vh, 8rem); }
.ct-t { font-size: clamp(3.2rem, 8vw, 7.6rem); }
.ct .xr-lead { max-width: 40ch; }
.ct-reach { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.8rem; margin: 0; padding: 0; list-style: none; }
.ct-reach li:has(> [hidden]) { display: none; }
.ct-reach a, .ct-reach button { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: var(--fg); font: 400 1.05rem/1.2 var(--f-body);
  text-decoration: underline; text-decoration-color: var(--fg-line); text-underline-offset: .35em; cursor: pointer; }
.ct-reach a:hover, .ct-reach button:hover { text-decoration-color: var(--signal); }

@media (prefers-reduced-motion: reduce) { .fs-media video { transition: none; } }
