/* =========================================================
   בז'רנו ביטוחים — bejerano-ins.co.il
   Tokens ported from the Kota AI design system + the site's
   dark/sky theme overrides (see site/README.md in the design
   project). Desktop layout lives inline in the HTML (1:1 with
   the design); this file holds tokens, shared behaviors, and
   the ≤800px mobile layer (per the "4b" mobile reference).
   ========================================================= */

/* ---------- Tokens: light "warm paper" base (fallbacks under sky) ---------- */
:root {
  --bg:           #f5f1ea;
  --bg-1:         #fbf8f3;
  --bg-2:         #efeae0;
  --bg-3:         #e6dfd1;
  --line:         #e3dccd;
  --line-strong:  #d3cab6;
  --ink:          #1a1814;
  --ink-soft:     #3a352d;
  --ink-dim:      #6b6357;
  --ink-mute:     #8d8474;
  --ink-faint:    #b8af9e;
  --accent:       #4f46e5;
  --accent-soft:  #eef0fe;
  --accent-deep:  #3730a3;
  --warm:         #c2410c;
  --warm-soft:    #fde9d9;
  --positive:     #16a34a;
  --positive-bg:  rgba(22, 163, 74, 0.06);
  --caution:      #b45309;
  --caution-bg:   rgba(245, 158, 11, 0.06);
  --negative:     #b91c1c;
  --negative-bg:  rgba(220, 38, 38, 0.06);
  --shadow-1:      0 1px 2px rgba(60, 50, 30, 0.04), 0 0 0 1px rgba(60, 50, 30, 0.04);
  --shadow-2:      0 4px 16px rgba(60, 50, 30, 0.06), 0 0 0 1px rgba(60, 50, 30, 0.04);
  --shadow-panel:  0 24px 48px rgba(60, 50, 30, 0.08), 0 0 0 1px rgba(60, 50, 30, 0.05);
  --shadow-card:   0 30px 70px rgba(60, 50, 30, 0.10), 0 6px 18px rgba(60, 50, 30, 0.05), 0 0 0 1px rgba(60, 50, 30, 0.05);

  --hs: "Assistant", "Almoni Neue", "Helvetica Neue", system-ui, sans-serif;
  --hb: "Assistant", "Almoni Neue", "Helvetica Neue", system-ui, sans-serif;
  --on-accent: #1f1d24;
  --glow: rgba(196, 181, 253, .22);
}

/* ---------- Dark theme (site default) ---------- */
[data-theme="dark"] {
  --bg:           #1f1d24;
  --bg-1:         #2a2832;
  --bg-2:         #34323d;
  --bg-3:         #3f3d49;
  --line:         #3d3a47;
  --line-strong:  #4f4c5b;
  --ink:          #f5f1ea;
  --ink-soft:     #ddd6c8;
  --ink-dim:      #b3aa9b;
  --ink-mute:     #8a8175;
  --ink-faint:    #5e5750;
  --accent:       #c4b5fd;
  --accent-soft:  rgba(196, 181, 253, 0.14);
  --accent-deep:  #ddd6fe;
  --warm:         #fdba74;
  --warm-soft:    rgba(253, 186, 116, 0.14);
  --shadow-1:      0 1px 2px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.05);
  --shadow-2:      0 4px 16px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.05);
  --shadow-panel:  0 24px 48px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.06);
  --shadow-card:   0 40px 90px rgba(0,0,0,0.65), 0 10px 25px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.06);
  --on-accent: #1f1d24;
  --glow: rgba(196, 181, 253, .22);
}

/* ---------- Sky theme (light, vivid) ---------- */
[data-theme="sky"] {
  --bg:           #f5f9fd;
  --bg-1:         #eaf2fa;
  --bg-2:         #dbe9f6;
  --bg-3:         #d3e5f6;
  --line:         #d8e5f2;
  --line-strong:  #b7cfe7;
  --ink:          #0f1f33;
  --ink-soft:     #243a55;
  --ink-dim:      #4d6581;
  --ink-mute:     #7b91a9;
  --ink-faint:    #adc0d4;
  --accent:       #0272b3;
  --accent-soft:  #dceffb;
  --accent-deep:  #02507f;
  --warm:         #d9651f;
  --warm-soft:    #fde8d8;
  --positive:     #12915a;
  --positive-bg:  rgba(18, 145, 90, .08);
  --caution:      #b3620a;
  --caution-bg:   rgba(245, 158, 11, .1);
  --on-accent:    #ffffff;
  --glow:         rgba(56, 189, 248, .38);
  --shadow-card:  0 30px 70px rgba(15, 40, 80, .12), 0 6px 18px rgba(15, 40, 80, .06), 0 0 0 1px rgba(15, 40, 80, .05);
}

/* ---------- Base ---------- */
html { direction: rtl; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--hb);
  -webkit-font-smoothing: antialiased;
}
em { font-style: normal; }
a { color: var(--accent); }
a:hover { color: var(--accent-deep); }
input, select, textarea, button { font: inherit; color: inherit; }
input::placeholder, textarea::placeholder { color: var(--ink-mute); }
img { max-width: 100%; }

@keyframes bz-marquee { from { transform: translateX(0) } to { transform: translateX(50%) } }
@keyframes bz-rise { from { opacity: 0; transform: translateY(18px) } to { opacity: 1; transform: none } }
@media (prefers-reduced-motion: reduce) {
  .bz-marquee-track { animation: none !important; }
  .bz-rise { animation: none !important; }
  html { scroll-behavior: auto; }
}

.page { background: var(--bg); color: var(--ink); min-height: 100vh; direction: rtl; font-family: var(--hb); position: relative; overflow: hidden; }
.glow { position: absolute; top: -200px; right: -100px; width: 700px; height: 700px; border-radius: 999px; background: radial-gradient(circle, var(--glow), transparent 65%); pointer-events: none; }
.bz-rise { animation: bz-rise .9s cubic-bezier(.2,.7,.2,1) both; }

.skip-link { position: absolute; top: -48px; right: 16px; z-index: 50; background: var(--accent); color: var(--on-accent); padding: 8px 16px; border-radius: 999px; font-size: 14px; text-decoration: none; transition: top .15s; }
.skip-link:focus { top: 10px; color: var(--on-accent); }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 18px 64px; direction: rtl; font-family: var(--hb); color: var(--ink); }
.logo-link { display: block; text-decoration: none; }
.logo-link img { height: 68px; width: auto; display: block; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="sky"] .logo-dark { display: none; }
.main-nav { display: flex; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 4px; background: var(--bg-1); }
.nav-link { font-size: 13px; color: var(--ink-soft); text-decoration: none; padding: 8px 14px; border-radius: 999px; }
.nav-link:hover { background: var(--bg-2); color: var(--ink-soft); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.theme-btn { width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-1); color: var(--ink-soft); cursor: pointer; font-size: 14px; display: grid; place-items: center; padding: 0; }
[data-theme="dark"] .glyph-light { display: none; }
[data-theme="sky"] .glyph-dark { display: none; }
.phone-pill { background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.phone-pill:hover { color: var(--bg); }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-1); color: var(--ink); font-size: 16px; cursor: pointer; place-items: center; padding: 0; }

/* Mobile menu overlay */
.mobile-menu { display: none; position: fixed; inset: 0; z-index: 40; background: var(--bg); padding: 24px 20px; flex-direction: column; }
.mobile-menu.open { display: flex; }
.mobile-menu .mm-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.mobile-menu .mm-close { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-1); color: var(--ink); font-size: 18px; cursor: pointer; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu nav a { font-family: var(--hs); font-weight: 600; font-size: 32px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.mobile-menu .mm-cta { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; }

/* ---------- Shared components ---------- */
.card-tile:hover { border-color: var(--accent) !important; background: var(--bg-2) !important; }
.acc-item { border-bottom: 1px solid var(--line); cursor: pointer; }
.acc-a { display: none; }
.acc-item.open .acc-a { display: block; }
.bz-marquee-track { display: flex; width: max-content; animation: bz-marquee 40s linear infinite; direction: rtl; }
.bz-marquee-track span { display: inline-flex; align-items: center; gap: 28px; font-family: var(--hs); font-weight: 600; font-size: 24px; letter-spacing: -0.01em; color: var(--ink-soft); padding-inline-end: 28px; white-space: nowrap; }
.bz-marquee-track i { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); display: inline-block; }

.img-slot { background: var(--bg-2); border: 1px solid var(--line); display: grid; place-items: center; text-align: center; color: var(--ink-mute); font-size: 13px; line-height: 1.4; padding: 8px; box-sizing: border-box; overflow: hidden; }
.img-slot.circle { border-radius: 50%; }
.img-slot img { width: 100%; height: 100%; object-fit: cover; }

.topic-chip { font-size: 13px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-soft); cursor: pointer; }
.topic-chip.on { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }

/* Sticky mobile call bar (4b) */
.call-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; padding: 12px 16px 20px; background: linear-gradient(to top, var(--bg) 60%, transparent); gap: 8px; }
.call-bar a { flex: 1; text-align: center; text-decoration: none; font-size: 14.5px; border-radius: 999px; }
.call-bar .cb-call { background: var(--accent); color: var(--on-accent); padding: 14px; font-weight: 600; }
.call-bar .cb-wa { background: var(--bg-2); border: 1px solid var(--line-strong); color: var(--ink); padding: 13px; }

/* ---------- Mobile layer (≤800px, per design option 4b) ---------- */
@media (max-width: 800px) {
  .site-header { padding: 14px 20px !important; }
  .logo-link img { height: 40px; }
  .main-nav { display: none; }
  .menu-btn { display: grid; }
  .call-bar { display: flex; }

  /* section paddings: 64px gutters → 20px */
  .sp { padding-left: 20px !important; padding-right: 20px !important; }
  .sm { margin-left: 20px !important; margin-right: 20px !important; }

  /* grids collapse */
  .g1m { grid-template-columns: 1fr !important; }
  .flex-col-m { flex-direction: column !important; align-items: stretch !important; }
  .cta-row { flex-direction: column !important; }
  .cta-row a { text-align: center; }

  /* type scale per 4b */
  .h1-hero { font-size: 52px !important; line-height: .98 !important; }
  .h2-60 { font-size: 40px !important; }
  .h2-56 { font-size: 38px !important; }
  .h2-54, .h2-50, .h2-48 { font-size: 34px !important; }
  .h2-40 { font-size: 30px !important; }
  .h2-72 { font-size: 44px !important; }
  .stat-88 { font-size: 56px !important; }
  .lead-19 { font-size: 16px !important; }

  /* timeline: 48px 1fr 460px → 40px 1fr, card drops under the text */
  .tl-row { grid-template-columns: 40px 1fr !important; gap: 16px !important; padding-bottom: 40px !important; }
  .tl-row > .tl-card { grid-column: 2; }
  .tl-dot { width: 40px !important; height: 40px !important; font-size: 15px !important; }
  .tl-line { right: 19px !important; }
  .tl-title { font-size: 24px !important; }

  /* big panels */
  .panel-72 { padding: 28px 22px !important; }
  .steps-grid { grid-template-columns: 1fr !important; }
  .team-grid { grid-template-columns: 1fr 1fr !important; }
  .team-grid > div { grid-column: span 1 !important; }
  .facts-card { margin-top: 8px; }

  /* service tabs: scrollable chip row */
  .tabs-row { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 8px; scrollbar-width: none; }
  .tabs-row::-webkit-scrollbar { display: none; }
  .tabs-row a { flex: none; }

  /* misc */
  .hide-m { display: none !important; }
  .sticky-side { position: static !important; }
  .footer-pad { padding: 80px 20px 110px !important; }
  .page { overflow-x: hidden; }
  .others-grid { grid-template-columns: 1fr 1fr !important; }
}
