/*
  htv.css — בסיס משותף לכל עמודי הנחיתה.
  ---------------------------------------------------------------
  נותן: RTL, פונט, צבעי מותג כמשתנים, ועיצוב לטופס ולמצבים שלו.
  העמוד יכול לדרוס כל דבר כאן ב-<style> משלו. הקובץ הזה לא משתנה לפי עמוד.
*/

:root {
  /* --- צבעי המותג (מתוך hidabroot.org). קמפיין יכול לדרוס, לא למחוק. --- */
  --htv-brand:        #E70F57;   /* אדום-מג'נטה: הצבע המזהה של הידברות. לכפתור הראשי ולהדגשה אחת. */
  --htv-brand-dark:   #B80B45;
  --htv-navy:         #081421;   /* כחול-שחור: רקעים כהים, טקסט כותרות על בהיר */
  --htv-navy-soft:    #112236;
  --htv-sky:          #4FC3F7;   /* תכלת: הדגשה משנית, קישורים על כהה. לא לכפתורים. */
  --htv-accent:       var(--htv-brand);
  --htv-ink:          #121820;
  --htv-muted:        #5B6572;
  --htv-bg:           #FFFFFF;
  --htv-bg-soft:      #F3F5F8;
  --htv-ok:           #1E7E34;
  --htv-err:          #C62828;

  /* --- צורה: הידברות עגולה (כפתורי pill). קמפיין יכול לבחור חד או מעוגל-קל, אבל עקבי. --- */
  --htv-radius:       14px;
  --htv-radius-btn:   999px;

  /* --- טיפוגרפיה. display = כותרות (Almoni Tzar אם יש רישיון, אחרת הגיבוי). body = גוף. --- */
  --htv-font-display: 'Almoni Tzar', 'Heebo', 'Assistant', system-ui, sans-serif;
  --htv-font-body:    'Heebo', 'Assistant', 'Open Sans Hebrew', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --htv-font:         var(--htv-font-body);

  /* --- סולם טיפוגרפי נוזלי. --- */
  --fs-xs:   clamp(0.78rem, 0.74rem + 0.2vw, 0.9rem);
  --fs-sm:   clamp(0.9rem, 0.86rem + 0.2vw, 1rem);
  --fs-md:   clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  --fs-lg:   clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem);
  --fs-xl:   clamp(1.6rem, 1.3rem + 1.5vw, 2.4rem);
  --fs-2xl:  clamp(2.2rem, 1.6rem + 3vw, 4rem);
  --fs-3xl:  clamp(2.8rem, 1.8rem + 5vw, 6rem);
  --fs-hero: clamp(3rem, 2rem + 7vw, 8.5rem);

  /* --- מרווחים. --- */
  --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem; --sp-4: 1rem; --sp-6: 1.5rem; --sp-8: 2rem;
  --sp-12: 3rem; --sp-16: 4rem; --sp-24: 6rem; --sp-32: 8rem;
  --section: clamp(4rem, 10vw, 9rem);

  --htv-max:          1160px;
  --htv-measure:      62ch;   /* רוחב שורה מקסימלי לטקסט רץ בעברית */
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-gutter: stable; }

body {
  margin: 0;
  direction: rtl;
  text-align: start;
  font-family: var(--htv-font-body);
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--htv-ink);
  background: var(--htv-bg);
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--htv-font-display); line-height: 1.1; margin: 0 0 .5em; font-weight: 800; text-wrap: balance; letter-spacing: 0; font-synthesis: none; }
/* עברית: אין italic. הדגשה = bold. אין letter-spacing אף פעם. */
em, i { font-style: normal; font-weight: 700; }
:lang(he) { letter-spacing: 0; quotes: "\201D" "\201D" "\2019" "\2019"; }
[dir="ltr"], .ltr { direction: ltr; unicode-bidi: isolate; }
.tnum { font-variant-numeric: tabular-nums; }
h1 { font-size: var(--fs-3xl); line-height: 1.02; }
h2 { font-size: var(--fs-2xl); line-height: 1.08; }
h3 { font-size: var(--fs-lg); line-height: 1.2; }
p  { margin: 0 0 1em; max-width: var(--htv-measure); text-wrap: pretty; }
.htv-center p { margin-inline: auto; }
a  { color: var(--htv-brand); }
:focus-visible { outline: 3px solid var(--htv-sky); outline-offset: 3px; }

.htv-container { width: min(100% - 2rem, var(--htv-max)); margin-inline: auto; }
.htv-section   { padding: var(--section) 0; }
.htv-section--soft { background: var(--htv-bg-soft); }
.htv-section--dark { background: var(--htv-navy); color: #fff; }
.htv-section--dark a { color: var(--htv-sky); }
.htv-center    { text-align: center; }
.htv-muted     { color: var(--htv-muted); }
.htv-measure   { max-width: var(--htv-measure); }

/* --- לוגו: /_shared/brand/logo-dark.svg (רקע בהיר) או logo-white.svg (רקע כהה). יחס 3.55:1. --- */
.htv-logo { display: inline-block; line-height: 0; }
.htv-logo img { height: 36px; width: auto; display: inline-block; }
.htv-logo--sm, .htv-logo--sm img { height: 26px; vertical-align: middle; }

/* --- כפתורים: ראשי = מותג. משני = ללא צבע (מסגרת), לא צבע שני. --- */
.htv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 48px;                    /* יעד מגע */
  padding: .85em 1.9em;
  border: 2px solid transparent;
  border-radius: var(--htv-radius-btn);
  background: var(--htv-brand);
  color: #fff;
  font: inherit;
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-micro, 160ms) ease, filter var(--dur-micro, 160ms) ease, background var(--dur-micro, 160ms) ease;
}
.htv-btn:hover  { filter: brightness(1.08); transform: translateY(-2px); }
.htv-btn:active { transform: translateY(0) scale(.97); }
.htv-btn:disabled { opacity: .6; cursor: default; transform: none; filter: none; }
.htv-btn--brand { background: var(--htv-brand); color: #fff; }
.htv-btn--ghost { background: transparent; color: currentColor; border-color: currentColor; }
.htv-btn--ghost:hover { background: rgba(127,127,127,.08); }
.htv-btn--light { background: #fff; color: var(--htv-navy); }
.htv-btn--block { display: flex; width: 100%; }
.htv-btn--lg { font-size: var(--fs-lg); padding: .9em 2.2em; }

/* --- הטופס --- */
form[data-lead] {
  display: grid;
  gap: .9rem;
  max-width: 520px;
  margin-inline: auto;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--htv-bg);
  color: var(--htv-ink);
  border: 1px solid #E3E6EC;
  border-radius: var(--htv-radius);
  box-shadow: 0 18px 50px -20px rgba(8, 20, 33, .25);
}
form[data-lead] label { display: grid; gap: .3rem; font-weight: 600; font-size: var(--fs-sm); }
form[data-lead] input:not([type="checkbox"]):not([type="radio"]),
form[data-lead] select,
form[data-lead] textarea {
  width: 100%;
  min-height: 48px;
  padding: .7em .9em;
  font: inherit;
  font-size: max(16px, 1em);           /* מונע zoom ב-iOS */
  color: var(--htv-ink);
  background: #fff;
  border: 1.5px solid #CFD5DF;
  border-radius: calc(var(--htv-radius) * .6);
  outline: none;
  transition: border-color 160ms, box-shadow 160ms;
}
form[data-lead] input[type="tel"],
form[data-lead] input[type="email"],
form[data-lead] input[type="number"] { direction: ltr; text-align: end; }   /* מספרים ואימייל נשארים LTR */
form[data-lead] input:focus,
form[data-lead] select:focus,
form[data-lead] textarea:focus { border-color: var(--htv-brand); box-shadow: 0 0 0 4px rgba(231, 15, 87, .14); }
form[data-lead] input:user-invalid { border-color: var(--htv-err); }
form[data-lead] .htv-check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; cursor: pointer; }
form[data-lead] .htv-check input { margin-top: .3em; width: 20px; height: 20px; accent-color: var(--htv-brand); flex: none; }
form[data-lead] .htv-fine { font-size: var(--fs-xs); color: var(--htv-muted); margin: 0; }
form[data-lead] .htv-btn { margin-top: .25rem; }

/* honeypot: מוסתר מבני אדם, לא מבוטים */
.htv-hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; width: 0; }

.htv-error   { color: var(--htv-err); font-weight: 600; margin: 0; }
.htv-success {
  max-width: 520px;
  margin-inline: auto;
  padding: 1.75rem 1.5rem;
  border-radius: var(--htv-radius);
  background: #EAF7EE;
  color: #14532D;
  text-align: center;
}
.htv-success__msg  { font-weight: 700; font-size: var(--fs-lg); margin: 0 0 .5rem; max-width: none; }
.htv-success__note { font-size: var(--fs-sm); color: #2F5A3C; margin: 0; max-width: none; }
.htv-success__actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: 1.1rem; }
.htv-success__actions .htv-btn { color: #14532D; border-color: #14532D; }

/* --- פס CTA דביק למובייל (אופציונלי): <div class="htv-sticky-cta"><a class="htv-btn" href="#form">…</a></div> --- */
.htv-sticky-cta {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 9000;
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid #E3E6EC;
  display: none;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}
.htv-sticky-cta.is-hidden { transform: translateY(120%); }
.htv-sticky-cta .htv-btn { width: 100%; }
@media (max-width: 800px) { .htv-sticky-cta { display: block; } body:has(.htv-sticky-cta) { padding-bottom: 5rem; } }

/* --- תג תצוגה מקדימה --- */
.htv-preview-badge {
  position: fixed;
  inset-inline-start: 12px;
  bottom: 12px;
  z-index: 9999;
  padding: .4em .9em;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: .8rem;
  opacity: .85;
  pointer-events: none;
}

/* --- עזרים. לא תבנית: נקודת התחלה שדורסים. --- */
.htv-grid-2 { display: grid; gap: clamp(1.5rem, 4vw, 4rem); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: center; }
.htv-grid-3 { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.htv-footer { padding: 2rem 0; font-size: var(--fs-sm); color: var(--htv-muted); border-top: 1px solid #E3E6EC; }
.htv-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .htv-btn { transition: none; } .htv-btn:hover, .htv-btn:active { transform: none; } }
