/* ============================================================
   Design Tokens — Amnon Bahar | בהירות פיננסית
   Source: brand/brand-tokens.json (2026-06-21)
   Luminous Sea/Sky palette — warm blues, amber accent
   ============================================================ */

:root {
  /* Sea palette */
  --sea-50:  #EBF6FA;
  --sea-100: #CCEAF3;
  --sea-200: #99D2E6;
  --sea-300: #5BB8D4;
  --sea-400: #2E9DC0;
  --sea-500: #1A87A8; /* AA-large only — hero/large UI */
  --sea-600: #116E8B; /* AA all sizes — buttons, links, fills */
  --sea-700: #0A556D;
  --sea-800: #063E52;
  --sea-900: #02293A; /* text only, never background */

  /* Sky palette */
  --sky-50:  #EDF8F6;
  --sky-100: #C9EDE8;
  --sky-200: #93DAD0;
  --sky-300: #52C4B6;
  --sky-400: #27AFA0;
  --sky-500: #1A9B8C;
  --sky-600: #128374;
  --sky-700: #0A6B5E;

  /* Amber palette */
  --amber-50:  #FEF9EE;
  --amber-100: #FDEFC9;
  --amber-200: #F9D983;
  --amber-400: #F0B429;
  --amber-500: #D99A14;
  --amber-700: #9A6B07;

  /* Neutral */
  --white:     #FFFFFF;
  --off-white: #F7FAFB;
  --slate-100: #EDF1F4;
  --slate-200: #D9E0E6;
  --slate-400: #8FA3B0;
  --slate-600: #4D6475;
  --slate-800: #253645;
  --slate-900: #111E29;

  /* Semantic aliases */
  --bg:              var(--off-white);       /* #F7FAFB — body */
  --surface:         var(--white);
  --primary:         var(--sea-500);         /* hero/large only */
  --primary-button:  var(--sea-600);         /* AA-safe buttons */
  --primary-hover:   var(--sea-700);
  --link:            var(--sea-600);
  --secondary:       var(--sky-500);
  --accent:          var(--amber-400);
  --text-primary:    var(--slate-800);       /* #253645 */
  --text-secondary:  var(--slate-600);       /* #4D6475 */
  --text-on-primary: var(--white);
  --border:          var(--slate-100);
  --tool-surface:    var(--sky-50);
  --tool-result:     var(--sea-50);
  --success:         var(--sky-500);
  --warning:         var(--amber-400);
  --error:           #C0392B;
  --focus-ring:      var(--sea-400);

  /* Typography */
  --font-hebrew:  'Heebo', sans-serif;
  --font-latin:   'Plus Jakarta Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Spacing (4px base) */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;

  /* Radius */
  --radius-xs:  4px;
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-full: 9999px;
  --radius-btn:  12px;
  --radius-card: 20px;
  --radius-tool: 24px;
  --radius-input: 10px;
  --radius-hero:  32px;

  /* Sea-tinted shadows */
  --shadow-xs:   0 1px 3px rgba(26, 135, 168, 0.06);
  --shadow-sm:   0 2px 8px rgba(26, 135, 168, 0.09);
  --shadow-md:   0 4px 16px rgba(26, 135, 168, 0.12);
  --shadow-lg:   0 8px 32px rgba(26, 135, 168, 0.14);
  --shadow-xl:   0 16px 48px rgba(26, 135, 168, 0.18);
  --shadow-tool: 0 8px 40px rgba(26, 155, 140, 0.15);
  --shadow-ambient: 0 24px 64px rgba(26, 135, 168, 0.10);

  /* Motion */
  --dur-instant: 80ms;
  --dur-fast:   150ms;
  --dur-normal: 250ms;
  --dur-slow:   400ms;
  --dur-reveal: 600ms;
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --ease-enter: cubic-bezier(0.0, 0.0, 0.2, 1);
  --ease-calm:  cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Layout */
  --max-site:    1280px;
  --max-content: 800px;
  --max-narrow:  640px;
  --max-tool:    960px;
}

/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-hebrew);
  background: var(--bg);
  color: var(--text-primary);
  direction: rtl;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Typography Scale ─────────────────────────────────────── */
.display-xl { font-size: 3.5rem;   font-weight: 800; line-height: 1.1;  }
.display-lg { font-size: 2.75rem;  font-weight: 800; line-height: 1.15; }
.display-md { font-size: 2.25rem;  font-weight: 700; line-height: 1.2;  }
.heading-xl { font-size: 1.875rem; font-weight: 700; line-height: 1.25; }
.heading-lg { font-size: 1.5rem;   font-weight: 700; line-height: 1.3;  }
.heading-md { font-size: 1.25rem;  font-weight: 600; line-height: 1.35; }
.heading-sm { font-size: 1.125rem; font-weight: 600; line-height: 1.4;  }
.body-lg    { font-size: 1.125rem; font-weight: 400; line-height: 1.75; }
.body-md    { font-size: 1rem;     font-weight: 400; line-height: 1.7;  }
.body-sm    { font-size: 0.875rem; font-weight: 400; line-height: 1.65; }
.label-lg   { font-size: 0.875rem; font-weight: 600; line-height: 1.4;  }
.label-sm   { font-size: 0.75rem;  font-weight: 500; line-height: 1.4;  }

.mono       { font-family: var(--font-mono); }
.number-xl  { font-family: var(--font-mono); font-size: 3rem;    font-weight: 500; line-height: 1.0; }
.number-lg  { font-family: var(--font-mono); font-size: 1.75rem; font-weight: 500; line-height: 1.1; }
.number-md  { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 400; line-height: 1.2; }

/* ─── Layout Utilities ─────────────────────────────────────── */
.container {
  max-width: var(--max-site);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}
.container-tool  { max-width: var(--max-tool);    margin-inline: auto; padding-inline: var(--sp-6); }
.container-content { max-width: var(--max-content); margin-inline: auto; padding-inline: var(--sp-6); }

/* ─── Shared Components ────────────────────────────────────── */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-hebrew);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  transition: all var(--dur-normal) var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}
.btn-primary {
  background: var(--primary-button);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--primary-button);
  border: 2px solid var(--primary-button);
}
.btn-secondary:hover {
  background: var(--sea-50);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--sea-50); }
.btn-wa {
  background: #25D366;
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-wa:hover { background: #1ebe57; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-sm { padding: 10px 20px; font-size: 0.875rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow var(--dur-normal) var(--ease),
              transform var(--dur-normal) var(--ease);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

/* Chip / badge */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  line-height: 1.4;
}
.chip-sea   { background: var(--sea-100);   color: var(--sea-700);   }
.chip-sky   { background: var(--sky-100);   color: var(--sky-700);   }
.chip-amber { background: var(--amber-100); color: var(--amber-700); }

/* Section wrapper */
.section { padding-block: var(--sp-20); }
.section-alt { background: var(--sea-50); }
.section-dark { background: var(--sea-800); color: var(--white); }

/* ─── NAV ──────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  padding-block: var(--sp-4);
  max-width: var(--max-site);
  margin-inline: auto;
  padding-inline: var(--sp-6);
  height: 68px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--sea-500) 0%, var(--sky-500) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}
.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.nav-logo-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--sea-900);
}
.nav-logo-tagline {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 400;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  list-style: none;
}
.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--primary-button);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-fast) var(--ease);
}
.nav-links a:hover { color: var(--primary-button); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; border-radius: 4px; }

.nav-actions { display: flex; align-items: center; gap: var(--sp-3); flex-shrink: 0; }
.nav-wa-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: #25D366;
  color: var(--white);
  padding: 10px 20px;
  border-radius: var(--radius-btn);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease);
  box-shadow: var(--shadow-xs);
}
.nav-wa-btn:hover { background: #1ebe57; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.nav-wa-btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--sp-2);
  border: none;
  background: none;
  border-radius: var(--radius-sm);
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--sea-700);
  border-radius: 2px;
  transition: all var(--dur-fast) var(--ease);
}
.nav-hamburger:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }

/* Mobile menu */
.nav-mobile-menu {
  display: none;
  position: fixed;
  inset: 68px 0 0;
  background: var(--white);
  padding: var(--sp-6);
  z-index: 99;
  border-top: 1px solid var(--border);
  flex-direction: column;
  gap: var(--sp-4);
  overflow-y: auto;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  padding-block: var(--sp-3);
  border-bottom: 1px solid var(--border);
}
.nav-mobile-menu a:hover { color: var(--primary-button); }

/* ─── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--sea-800);
  color: var(--white);
  padding-block: var(--sp-16) var(--sp-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2.5fr 1fr 1fr 1fr;
  gap: var(--sp-8);
  padding-bottom: var(--sp-10);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: var(--sp-6);
}
.footer-brand-name {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--sp-2);
}
.footer-brand-desc {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  margin-bottom: var(--sp-4);
  max-width: 280px;
}
.footer-license {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: var(--sp-4);
}
.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--sp-4);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: var(--sp-3); }
.footer-col a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
.footer-col a:hover { color: var(--white); }
.footer-col a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; border-radius: 3px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-6);
  flex-wrap: wrap;
}
.footer-copy {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}
.footer-copy a { color: rgba(255,255,255,0.5); text-decoration: none; }
.footer-copy a:hover { color: rgba(255,255,255,0.8); }
.footer-disclaimer {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.5;
  max-width: 600px;
}

/* ─── WhatsApp Floating CTA ────────────────────────────────── */
.wa-float {
  position: fixed;
  bottom: var(--sp-6);
  left: var(--sp-6);
  z-index: 200;
  background: #25D366;
  color: var(--white);
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: all var(--dur-normal) var(--ease);
  text-decoration: none;
}
.wa-float:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(37,211,102,0.5); }
.wa-float:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ─── Scroll Reveal ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur-reveal) var(--ease-calm),
              transform var(--dur-reveal) var(--ease-calm);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }

/* ─── Form Elements ────────────────────────────────────────── */
.field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}
.field-input {
  width: 100%;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-input);
  padding: 12px 14px;
  font-size: 1rem;
  font-family: var(--font-hebrew);
  color: var(--text-primary);
  background: var(--white);
  transition: border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
  direction: rtl;
}
.field-input:focus {
  outline: none;
  border-color: var(--sea-400);
  box-shadow: 0 0 0 3px rgba(46,157,192,0.15);
}
.field-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: var(--sp-1);
  font-weight: 400;
}

/* Range inputs */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--slate-200);
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-button);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--primary-button), var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; border-radius: 3px; }

/* Toggle buttons */
.toggle-group {
  display: flex;
  gap: var(--sp-2);
  background: var(--slate-100);
  border-radius: var(--radius-md);
  padding: 4px;
}
.toggle-btn {
  flex: 1;
  padding: 10px var(--sp-4);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-hebrew);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  text-align: center;
}
.toggle-btn.active {
  background: var(--white);
  color: var(--primary-button);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.toggle-btn:hover:not(.active) { color: var(--text-primary); }
.toggle-btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: -2px; border-radius: var(--radius-sm); }

/* Option cards (wizard) */
.option-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4) var(--sp-3);
  cursor: pointer;
  text-align: center;
  transition: all var(--dur-fast) var(--ease);
  background: var(--white);
}
.option-card:hover {
  border-color: var(--sea-400);
  background: var(--sea-50);
}
.option-card.selected {
  border-color: var(--primary-button);
  background: var(--sea-50);
  box-shadow: 0 0 0 3px rgba(17,110,139,0.12);
}
.option-card:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Check items */
.check-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  background: var(--white);
}
.check-item:hover { border-color: var(--sea-400); background: var(--sea-50); }
.check-item.checked { border-color: var(--primary-button); background: var(--sea-50); }
.check-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--slate-400);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--white);
  transition: all var(--dur-fast) var(--ease);
}
.check-item.checked .check-box {
  border-color: var(--primary-button);
  background: var(--primary-button);
}

/* ─── Tool Ring (SVG-based) ────────────────────────────────── */
.ring-container { position: relative; display: inline-block; }
.ring-label-inside {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

/* ─── Progress bar ─────────────────────────────────────────── */
.progress-bar-track {
  height: 6px;
  background: var(--slate-100);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sea-500), var(--sky-400));
  border-radius: 3px;
  transition: width var(--dur-slow) var(--ease);
}

/* ─── Illustrative disclaimer ─────────────────────────────── */
.disclaimer-bar {
  background: var(--amber-50);
  border: 1px solid var(--amber-200);
  border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4);
  font-size: 0.75rem;
  color: var(--amber-700);
  line-height: 1.5;
  display: flex;
  gap: var(--sp-2);
  align-items: flex-start;
}
.disclaimer-legal {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ─── Responsive: mobile ───────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links, .nav-actions .btn-secondary { display: none; }
  .nav-hamburger { display: flex; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-6);
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: var(--sp-4); }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .container { padding-inline: var(--sp-4); }
}
