/* רנטגן: השפה של כל העמודים בעברית, כמו הפרקים באינסטגרם (tools/xray).
   דיו, נייר חם, כתום שמסמן פעולה ואת השורה השנייה של כותרת, וכחול רק לקו הסריקה ולסימונים.
   כותרות ב-Handjet (750), טקסט ב-Rubik, והסימן HG·STUDIO ב-HG Mark עם נקודה כתומה.
   כאן: גופנים, משתנים, הכותרת העליונה והתחתונה (tools/header.py), פס הפנייה בטלפון, כרטיס העוגיות, הכפתורים הצפים,
   ורכיבים משותפים: כפתור, תגית, כותרת בשתי שורות, עיגול ממוספר, טלפון ורשת רקע.
   העמודים באנגלית, work.html, archive/ ו-elef/ לא טוענים את הקובץ הזה (נשארים עם css/head.css וההמשך שלהם). */

/* ---------- גופנים ---------- */
@font-face { font-family: "HG Mark"; src: url("../fonts/hg-mark.woff2") format("woff2"); font-weight: 800; font-display: swap; unicode-range: U+20, U+2E, U+44, U+47-49, U+4F-50, U+52-55, U+64, U+67-69, U+6F-70, U+72-75, U+B7; }
@font-face { font-family: "HG Handjet"; src: url("../fonts/handjet-hebrew.woff2") format("woff2"); font-weight: 750; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "HG Handjet"; src: url("../fonts/handjet-latin.woff2") format("woff2"); font-weight: 750; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "HG Handjet"; src: url("../fonts/handjet-ascii.woff2") format("woff2"); font-weight: 750; font-display: swap; unicode-range: U+0020-007E, U+00A0, U+00AB, U+00BB, U+00D7, U+2010-2027, U+2030, U+2039-203A; }
@font-face { font-family: "Rubik"; src: url("../fonts/g/rubik-hebrew-423ede.woff2") format("woff2"); font-weight: 300 900; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Rubik"; src: url("../fonts/g/rubik-latin-f673d8.woff2") format("woff2"); font-weight: 300 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Rubik"; src: url("../fonts/g/rubik-punct.woff2") format("woff2"); font-weight: 300 900; font-display: swap; unicode-range: U+0020-0040, U+005B-0060, U+007B-007E, U+00A0, U+00AB, U+00BB, U+00D7, U+2010-2027, U+2030, U+2039-203A; }

/* ---------- משתנים ---------- */
:root {
  --ink: #0a0a0b; --ink-soft: #141416; --ink-2: #1c1c1f; --paper: #ede8de;
  --fg: #ede8de; --fg-2: rgba(237, 232, 222, .86); --fg-dim: rgba(237, 232, 222, .64); --fg-faint: rgba(237, 232, 222, .14); --fg-line: rgba(237, 232, 222, .26);
  --signal: #ff4f1a; --signal-hi: #ff6b3d; --blue: #3d7bff;
  --f-display: "HG Handjet", "Rubik", system-ui, sans-serif; --f-body: "Rubik", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --m: clamp(16px, 4.4vw, 64px); --wrap: 1240px;
  --ease: cubic-bezier(.22, .61, .2, 1);
  /* שמות ישנים שקבצים אחרים (atelier.css, systems.css, assistant.js) עדיין קוראים */
  --st-display: var(--f-display); --st-text: var(--f-body); --at-m: var(--m); --hg-orange: var(--signal);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; background: var(--ink); scrollbar-color: rgba(237, 232, 222, .28) var(--ink); }
body { margin: 0; background: var(--ink); color: var(--fg); font: 400 1.0625rem/1.6 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--signal); color: var(--ink); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 200; padding: .7rem 1.1rem; border-radius: 99px; background: var(--fg); color: var(--ink); text-decoration: none; transform: translateY(-180%); }
.skip:focus { transform: none; }

/* ---------- רכיבים משותפים ---------- */
/* כותרת בשתי שורות: השנייה תמיד בכתום (כמו בכל פרק של הסדרה) */
.xr-t { margin: 0; font: 750 clamp(2.6rem, 5.6vw, 5.4rem)/.96 var(--f-display); letter-spacing: 0; text-wrap: balance; }
.xr-t > span { display: block; }
.xr-t > span + span { color: var(--signal); }
.xr-lead { margin: 0; color: var(--fg-dim); font-size: clamp(1.1rem, 1.4vw, 1.3rem); line-height: 1.5; text-wrap: pretty; }
.xr-lead b { color: var(--fg); font-weight: 600; }

.xr-btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 56px; padding: 0 1.8rem; border: 0; border-radius: 99px;
  background: var(--signal); color: var(--ink); font: 600 1.06rem/1.15 var(--f-body); text-decoration: none; cursor: pointer; transition: background-color .25s ease; }
.xr-btn:hover { background: var(--signal-hi); }
.xr-btn svg { width: 22px; height: 22px; flex: none; fill: currentColor; }
.xr-btn--line { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg-line); }
.xr-btn--line:hover { background: transparent; box-shadow: inset 0 0 0 1px var(--fg); }

/* תגית: מלאה למה שקובע, מקווקוות למידע (כמו "עסק בדיוני" בסדרה) */
.xr-pill { display: inline-flex; align-items: center; min-height: 30px; padding: 0 .85rem; border-radius: 99px; font: 500 .9rem/1.2 var(--f-body); white-space: nowrap;
  color: var(--fg-dim); border: 1px dashed rgba(237, 232, 222, .38); }
.xr-pill--solid { border: 0; background: var(--fg); color: var(--ink); }
.xr-pill--signal { border: 0; background: var(--signal); color: var(--ink); }

/* עיגול ממוספר: רק לרצף אמיתי */
.xr-n { display: inline-grid; place-items: center; flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--signal); color: var(--ink); font: 750 1.6rem/1 var(--f-display); }

/* רשת עדינה, מעומעמת לכיוון הקצוות */
.xr-grid { position: relative; isolation: isolate; }
.xr-grid::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--fg-faint) 1px, transparent 1px), linear-gradient(90deg, var(--fg-faint) 1px, transparent 1px); background-size: 54px 54px; background-position: center top;
  opacity: .32; -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 46%, #000 18%, transparent 76%); mask-image: radial-gradient(ellipse 70% 62% at 50% 46%, #000 18%, transparent 76%); }

/* הטלפון: מסגרת שחורה, אי בראש המסך, והמסך עצמו בפנים */
.xr-phone { --pw: 240px; position: relative; width: var(--pw); padding: calc(var(--pw) * .028); border-radius: calc(var(--pw) * .14); background: #050506;
  box-shadow: 0 0 0 1px #2a2a2e, 0 0 0 calc(var(--pw) * .02) rgba(237, 232, 222, .03), 0 40px 80px -36px rgba(0, 0, 0, .95); }
.xr-phone::after { content: ""; position: absolute; z-index: 5; top: calc(var(--pw) * .052); left: 50%; width: 26%; height: calc(var(--pw) * .066); border-radius: 99px; background: #050506; transform: translateX(-50%); }
.xr-screen { position: relative; overflow: hidden; border-radius: calc(var(--pw) * .115); background: #fff; aspect-ratio: 480 / 1039; }
.xr-screen > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* ---------- סימן ---------- */
.top .logo, .ft-mark { display: inline-flex; align-items: center; direction: ltr; min-height: 44px; color: var(--fg); font: 800 1.32rem/1 "HG Mark", var(--f-body); letter-spacing: .02em; text-decoration: none; white-space: nowrap; }
.top .logo b, .ft-mark b { color: var(--signal); font-weight: inherit; }

/* ---------- כותרת עליונה ---------- */
.top { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.6rem); min-height: 68px; padding: 0 var(--m);
  background: rgba(10, 10, 11, .92); border-bottom: 1px solid transparent; color: var(--fg); font-family: var(--f-body); transition: border-color .3s ease;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.top.is-scrolled { border-bottom-color: var(--fg-faint); }
.top > .nav, .top > .menu { margin-inline-start: auto; }
.top .nav { display: none; align-items: center; gap: clamp(1.1rem, 2.2vw, 2.2rem); }
.top .nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; color: var(--fg-2); font: 500 .98rem/1 var(--f-body); text-decoration: none; transition: color .2s ease; }
.top .nav a:hover, .top .nav a[aria-current] { color: var(--fg); }
.top .nav a[aria-current]::after { content: ""; position: absolute; inset-inline: 0; bottom: 6px; height: 2px; border-radius: 2px; background: var(--signal); }
.top .nav .top-lang { color: var(--fg-dim); font-size: .9rem; }
.top .top-wa { display: none; align-items: center; min-height: 42px; padding: 0 1.25rem; border-radius: 99px; background: var(--signal); color: var(--ink); font: 600 .95rem/1 var(--f-body); text-decoration: none; transition: background-color .2s ease; }
.top .top-wa:hover { background: var(--signal-hi); }
.top .menu { position: relative; display: block; }
.top .menu summary { list-style: none; width: 44px; height: 44px; display: grid; place-content: center; gap: 7px; margin-inline-end: -10px; cursor: pointer; }
.top .menu summary::-webkit-details-marker { display: none; }
.top .menu summary span { display: block; width: 24px; height: 2px; border-radius: 2px; background: var(--fg); transition: transform .3s ease; }
.top .menu[open] summary span:first-child { transform: translateY(4.5px) rotate(45deg); }
.top .menu[open] summary span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
.top .menu-sheet { position: fixed; inset: 68px 0 auto 0; display: grid; align-content: start; max-height: calc(100dvh - 68px); overflow-y: auto; padding: .8rem var(--m) 2rem;
  background: var(--ink); border-top: 1px solid var(--fg-faint); box-shadow: 0 40px 80px -30px #000; }
.top .menu-sheet a, .top .menu-sheet button { display: flex; align-items: center; gap: .4em; min-height: 52px; padding: 0; border: 0; background: none; color: var(--fg); font: 750 2.2rem/1 var(--f-display); text-align: start; text-decoration: none; cursor: pointer; }
.top .menu-sheet .top-lang, .top .menu-sheet a[href^="tel:"], .top .menu-sheet button { order: 2; min-height: 44px; color: var(--fg-dim); font: 400 1.05rem/1.3 var(--f-body); }
.top .menu-sheet a[aria-current] { color: var(--signal); }
.top .menu-sheet .menu-wa { order: 1; justify-self: start; justify-content: center; min-height: 54px; margin: 1.2rem 0 .6rem; padding: 0 1.8rem; border-radius: 99px; background: var(--signal); color: var(--ink); font: 600 1.06rem/1 var(--f-body); }
@media (min-width: 900px) {
  .top .nav { display: flex; }
  .top .top-wa { display: inline-flex; }
  .top .menu { display: none; }
}

/* ---------- כותרת תחתונה ---------- */
.ft { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem clamp(1.4rem, 3vw, 3rem); margin: 0; padding: clamp(2rem, 5vh, 3rem) var(--m); border-top: 1px solid var(--fg-faint);
  background: var(--ink); color: var(--fg-dim); font: 400 .95rem/1.4 var(--f-body); }
.ft a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: none; transition: color .2s ease; }
.ft a:hover { color: var(--fg); }
.ft-mark { font-size: 1.1rem; }
.ft-reach, .ft-nav { display: flex; flex-wrap: wrap; gap: 0 clamp(1rem, 2vw, 1.7rem); margin: 0; }
.ft-nav { margin-inline-start: auto; }
@media (max-width: 720px) { .ft { flex-direction: column; align-items: flex-start; } .ft-nav { margin-inline-start: 0; } }

/* ---------- פס פנייה בטלפון (js/chrome.js) ---------- */
.dock { display: none; }
@media (max-width: 899px) {
  .dock { position: fixed; z-index: 96; inset: auto 0 0 0; display: flex; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); padding-inline-end: 116px;
    background: rgba(10, 10, 11, .94); border-top: 1px solid var(--fg-faint); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: transform .4s var(--ease); }
  .dock a { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 99px; font: 600 1rem/1 var(--f-body); text-decoration: none; }
  .dock .dock-wa { flex-grow: 1.5; background: var(--signal); color: var(--ink); }
  .dock .dock-call { color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg-line); }
  .dock.is-wait:not(.is-on) { transform: translateY(105%); }
  .dock.is-wait:not(.is-on) a { visibility: hidden; transition: visibility 0s .4s; }
  .menu-open .dock { visibility: hidden; }
  html:has(.dock) { scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  html.js body:has([data-dock-wait]) .dock:not(.is-on) { transform: translateY(105%); }
  html.js body:has([data-dock-wait]) .dock:not(.is-on) a { visibility: hidden; }
  body:has(.dock) .a11y { z-index: 97; bottom: calc(11px + env(safe-area-inset-bottom, 0px)) !important; inset-inline-end: 12px; }
  body:has(.dock) .ht-btn { z-index: 97; bottom: calc(11px + env(safe-area-inset-bottom, 0px)) !important; inset-inline-start: auto !important; inset-inline-end: 64px !important; display: grid !important; }
  body:has(.dock) .ht-hint { display: none !important; }
  body:has(.dock) .consent { inset-inline: 0 !important; bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important; border-radius: 0; padding: .45rem 12px; }
  body:has(.dock.is-wait:not(.is-on)) .consent { bottom: 0 !important; }
  body:has(.dock) .ft { padding-bottom: calc(clamp(2rem, 5vh, 3rem) + 72px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- הכפתורים הצפים: נגישות וצ'אט ---------- */
body .a11y__btn, body .ht-btn { width: 44px !important; height: 44px !important; border-radius: 50% !important; background: var(--ink-soft) !important; color: var(--fg) !important;
  border: 1px solid rgba(237, 232, 222, .3) !important; box-shadow: 0 8px 22px -10px #000 !important; transition: border-color .2s ease; }
body .a11y__btn:hover, body .ht-btn:hover { border-color: var(--fg) !important; }
body .a11y__btn svg { width: 19px; height: 19px; }
body .ht-btn { bottom: 16px; inset-inline-start: 16px; }
body .ht-btn svg { width: 17px; height: 17px; }
body .a11y__btn:focus-visible, body .ht-btn:focus-visible { outline: 2px solid var(--fg) !important; outline-offset: 3px; }
.menu-open .a11y, .menu-open .ht-btn { visibility: hidden; }

/* ---------- תפריט נגישות (js/a11y.js) ---------- */
html.a11y-font-lg { font-size: 118%; }
html.a11y-font-xl { font-size: 136%; }
html.a11y-links a { text-decoration: underline !important; text-underline-offset: 3px; }
html.a11y-readable body, html.a11y-readable button, html.a11y-readable input, html.a11y-readable h1, html.a11y-readable h2, html.a11y-readable h3, html.a11y-readable p, html.a11y-readable a { font-family: Arial, sans-serif !important; letter-spacing: .01em; }
html.a11y-no-motion *, html.a11y-no-motion *::before, html.a11y-no-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-focus *:focus { outline: 3px solid var(--signal) !important; outline-offset: 2px !important; }
html.a11y-contrast { --fg-2: var(--fg); --fg-dim: rgba(237, 232, 222, .9); --fg-faint: rgba(237, 232, 222, .4); --fg-line: rgba(237, 232, 222, .7); }
.a11y { position: fixed; bottom: 16px; inset-inline-end: 16px; z-index: 95; }
.a11y__btn { display: grid; place-items: center; cursor: pointer; }
.a11y__panel { display: none; position: absolute; bottom: 54px; inset-inline-end: 0; width: min(320px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; padding: 16px; border-radius: 18px;
  background: var(--ink-soft); color: var(--fg); border: 1px solid var(--fg-line); font: 400 1rem/1.4 var(--f-body); box-shadow: 0 30px 60px -20px #000; }
.a11y__panel[data-open="true"], .a11y__panel.is-shown { display: block; }
.a11y__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.a11y__head h2 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.a11y__close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--fg-line); background: transparent; color: var(--fg); font-size: 1.15rem; cursor: pointer; }
.a11y__list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.a11y__list button { width: 100%; display: flex; justify-content: space-between; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--fg-faint); background: transparent; color: var(--fg); font: inherit; text-align: start; cursor: pointer; }
.a11y__list button[aria-pressed="true"] { background: var(--fg); color: var(--ink); }
.a11y__list button[aria-pressed="true"]::after { content: "✓"; }
.a11y__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: .92rem; }
.a11y__foot a, .a11y__reset { color: var(--fg); }
.a11y__reset { background: none; border: 0; text-decoration: underline; font: inherit; cursor: pointer; }

/* ---------- העוגיות (js/consent.js מזריק את המבנה; כאן רק המראה) ---------- */
body .consent { background: var(--ink-soft); color: var(--fg); border: 0; border-top: 1px solid var(--fg-faint); border-radius: 0; box-shadow: 0 -16px 40px -24px #000; font-family: var(--f-body); }
body .consent__text { color: var(--fg-2); }
body .consent__text a { color: var(--fg); }
body .consent__btn { border-radius: 99px; border: 1px solid var(--fg-line); background: transparent; color: var(--fg); font-weight: 500; }
body .consent__btn:hover { border-color: var(--fg); }
body .consent__btn[data-choice="yes"] { background: var(--fg); border-color: var(--fg); color: var(--ink); }
@media (min-width: 900px) {
  body .consent { inset: auto 0 0 0 !important; width: auto; display: flex; align-items: center; justify-content: space-between; gap: 1.6rem; padding: .55rem var(--m); font-size: .9rem; line-height: 1.4; }
  body .consent__text { flex: 0 1 auto; }
  body .consent__actions { flex: none; }
  body .consent__btn { flex: none; min-height: 40px; padding: 0 1.1rem; }
  body:has(.consent:not([hidden])) { padding-bottom: 56px; }
  body:has(.consent:not([hidden])) .a11y, body:has(.consent:not([hidden])) .ht-btn { bottom: 72px !important; }
}

@media (prefers-reduced-motion: reduce) { .dock, .top, .top .menu summary span, .xr-btn { transition: none; } }
