/* ירושלים 17 — the shared base. Each page sets the tokens below in its own <style> and builds
   its own layout; the form, the sticky bar, the dialogs and the legal footer come from here so
   they behave identically on all eight pages. */
:root {
  --bg: #f6f8fa; --ink: #1f2b37; --muted: #5a6774; --surface: #fff; --line: #dde3e9;
  --accent: #14506e; --accent-ink: #fff; --accent-2: #1f3b57;
  --radius: 14px; --font-body: "Heebo", "Assistant", Arial, sans-serif; --font-display: var(--font-body);
  --field-bg: #fff; --field-ink: #1f2b37; --field-line: #c9d3dc; --field-focus: var(--accent);
  --btn-bg: var(--accent); --btn-ink: var(--accent-ink); --form-bg: var(--surface); --form-ink: var(--ink);
  --bar-bg: #0f1d29; --bar-ink: #fff; --bar-h: 64px; --err: #b42318;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
/* very wide screens: the whole page grows with the window (rem-based), 1920 stays as designed */
@media screen and (min-width: 1921px) { html { font-size: clamp(100%, min(100vw / 120, 100vh / 60), 200%); } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; padding-bottom: var(--bar-h); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100; background: #fff; color: #000; padding: .5rem 1rem; border-radius: 8px; }
.skip:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--field-focus); outline-offset: 2px; }
.note { font-size: .78rem; color: var(--muted); }
.js-reveal [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js-reveal [data-reveal].in { opacity: 1; transform: none; }

/* ---------- the lead form ---------- */
.lead { background: var(--form-bg); color: var(--form-ink); border-radius: var(--radius); padding: 1.25rem; position: relative; }
.lead h2, .lead h3 { font-size: 1.35rem; margin-bottom: .25rem; }
.lead .lead-sub { color: inherit; opacity: .8; font-size: .95rem; margin-bottom: .9rem; }
.lead .row { margin-bottom: .6rem; }
.lead .lead-direct { display: flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 700; margin: -.35rem 0 .7rem; color: inherit; }
.lead .lead-direct svg { width: 1rem; height: 1rem; flex: none; color: var(--btn-bg); }
.lead label.lbl { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .2rem; }
.lead input[type=text], .lead input[type=tel], .lead select {
  width: 100%; height: 3rem; padding: 0 .9rem; font: inherit; font-size: 1rem; color: var(--field-ink);
  background: var(--field-bg); border: 1px solid var(--field-line); border-radius: calc(var(--radius) * .6); appearance: none;
}
.lead select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235a6774' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left .9rem center; background-size: .75rem; padding-left: 2.4rem; }
.lead input:focus, .lead select:focus { border-color: var(--field-focus); outline: 2px solid color-mix(in srgb, var(--field-focus) 35%, transparent); outline-offset: 0; }
.lead [aria-invalid="true"] { border-color: var(--err); }
.lead .err { color: var(--err); font-size: .82rem; min-height: 0; display: block; }
.lead .err:empty { display: none; }
.lead .purpose { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; font-size: .9rem; margin: .1rem 0 .7rem; }
.lead .purpose span { opacity: .8; }
.lead .purpose label { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border: 1px solid var(--field-line); border-radius: 999px; cursor: pointer; }
.lead .purpose input { accent-color: var(--accent); }
.lead button[type=submit] { width: 100%; height: 3.25rem; border: 0; border-radius: calc(var(--radius) * .6); background: var(--btn-bg); color: var(--btn-ink); font: inherit; font-weight: 700; font-size: 1.1rem; cursor: pointer; transition: filter .2s; }
.lead button[type=submit]:hover { filter: brightness(1.08); }
.lead button[disabled] { opacity: .6; cursor: progress; }
.lead .consent { font-size: .72rem; opacity: .75; margin: .55rem 0 0; line-height: 1.4; }
.lead .status { font-size: .88rem; color: var(--err); margin-top: .5rem; }
.lead .status:empty { display: none; }
.lead .hp { position: absolute; top: -9999px; inset-inline-start: 0; width: 1px; height: 1px; overflow: hidden; }
.lead .thanks { text-align: center; padding: 1.5rem .5rem; }
.lead .thanks strong { display: block; font-family: var(--font-display); font-size: 1.5rem; margin-bottom: .4rem; }
.lead.is-sent > :not(.thanks) { display: none; }
.lead-grid-2 { display: grid; gap: .6rem; }
@media (min-width: 640px) { .lead.wide .lead-grid-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- sticky bar (never hides) ---------- */
.bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 50; height: var(--bar-h); background: var(--bar-bg); color: var(--bar-ink); display: flex; gap: .5rem; align-items: center; justify-content: center; padding: .5rem .75rem; box-shadow: 0 -6px 24px rgba(0,0,0,.18); }
.bar a { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; height: 2.9rem; padding: 0 1rem; border-radius: 10px; text-decoration: none; font-weight: 700; white-space: nowrap; }
.bar a svg { width: 1.25rem; height: 1.25rem; flex: none; }
.bar .bar-main { flex: 1 1 auto; max-width: 26rem; background: var(--btn-bg); color: var(--btn-ink); }
.bar .bar-ico { flex: 0 0 auto; width: 2.9rem; padding: 0; border: 1px solid rgba(255,255,255,.35); color: var(--bar-ink); }
.bar .bar-ico svg { width: 1.3rem; height: 1.3rem; }
@media (min-width: 760px) { .bar .bar-ico { width: auto; padding: 0 1rem; } }
.bar .ico-label { display: none; }
@media (min-width: 760px) { .bar .ico-label { display: inline; } }

/* ---------- dialogs ---------- */
dialog { border: 0; padding: 0; border-radius: var(--radius); max-width: min(96vw, 64rem); width: 100%; max-height: 92vh; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: rgba(10, 18, 26, .72); }
dialog .dlg-close { position: sticky; top: .5rem; float: left; margin: .5rem; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 1.4rem; cursor: pointer; z-index: 2; }
#lightbox { background: #0b1117; max-width: 98vw; }
#lightbox img { width: 100%; height: auto; max-height: 90vh; object-fit: contain; }
#unit-dialog .dlg-body { padding: 1rem 1.25rem 1.5rem; }

/* ---------- 2D/3D toggle + tabs basics ---------- */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 3px; background: var(--surface); }
.seg button { border: 0; background: transparent; color: inherit; font: inherit; font-size: .9rem; padding: .4rem 1rem; border-radius: 999px; cursor: pointer; min-height: 2.5rem; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
[role="tablist"] { display: flex; gap: .4rem; flex-wrap: wrap; }
[role="tab"] { font: inherit; cursor: pointer; min-height: 2.75rem; }

/* ---------- footer ---------- */
.foot { padding: 2.5rem 0 1.5rem; font-size: .85rem; color: var(--muted); }
.foot .foot-row { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; justify-content: space-between; }
.foot img.logo { height: 2rem; width: auto; }
.foot a { text-decoration: underline; text-underline-offset: 3px; }
.foot .legal { margin-top: 1rem; font-size: .75rem; line-height: 1.5; }

/* floats step aside while typing on a phone */
@media (max-width: 767px) { html.typing .bar { transform: none; } }
