:root {
  --paper-white: #f6f6f8;
  --card-white: #ffffff;
  --deep-ink: #011821;
  --carbon: #12161e;
  --slate: #7c7f88;
  --mist: #e3e4e8;
  --fog: #a9acb6;
  --graphite: #3b3e47;
  --deep-indigo: #111a4a;
  --ember-orange: #ec652b;
  --midnight-teal: #023247;
  --forest-teal: #167e6c;
  --pale-cyan: #c1e8ef;
  
  --shadow-blue: rgba(17, 26, 74, 0.1);
  --shadow: 0 4px 12px var(--shadow-blue), 0 16px 32px var(--shadow-blue);
  
  --radius: 8px;
  --radius-pill: 9999px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--paper-white);
  color: var(--deep-ink);
  font-family: 'Geologica', 'Heebo', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

.mono {
  font-family: 'IBM Plex Mono', 'IBM Plex Sans Hebrew', monospace;
}

h1, h2, h3, h4 { font-weight: 300; }
h1 { font-size: 60px; line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; }

/* Map Background */
.map-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  background-image: url('assets/map.svg');
  background-size: cover;
  background-position: center top;
  opacity: 0.6;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-gap { margin-top: 80px; margin-bottom: 80px; }

/* Buttons */
.btn-primary {
  background: var(--deep-indigo);
  color: var(--card-white);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--shadow-blue);
}
.btn-primary::after { content: ' →'; opacity: 0.8; }

.btn-ghost {
  background: transparent;
  color: var(--deep-ink);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--mist);
  cursor: pointer;
}
.btn-ghost:hover { color: var(--deep-indigo); }

/* Badges */
.badge-pill {
  background: var(--pale-cyan);
  color: var(--forest-teal);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

/* Cards */
.card {
  background: var(--card-white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card-ember {
  background: var(--ember-orange);
  color: var(--card-white);
}

/* Header */
header {
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lang-select {
  padding: 4px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--mist);
  background: transparent;
}

/* Steps (Hero) */
.hero-steps {
  position: relative;
  min-height: 500px;
}
.step-card {
  position: absolute;
  width: 320px;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
}
.step-card.visible { opacity: 1; }

.step-bars {
  display: flex;
  gap: 4px;
  height: 24px;
  margin-top: 12px;
  align-items: flex-end;
}
.bar {
  flex: 1;
  border-radius: 2px 2px 0 0;
}
.bar.pos { background: var(--midnight-teal); }
.bar.neg { background: var(--slate); }

.two-tone-text span:first-child { color: var(--deep-ink); }
.two-tone-text span:last-child { color: var(--fog); }

/* Chat Panel */
.chat-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  border-radius: 50%;
  width: 56px; height: 56px;
  background: var(--deep-indigo);
  color: white;
  border: none;
  box-shadow: var(--shadow);
  cursor: pointer;
  z-index: 1000;
}
html[dir="rtl"] .chat-btn { right: auto; left: 24px; }

.chat-panel {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 350px;
  height: 500px;
  background: var(--card-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  z-index: 999;
}
html[dir="rtl"] .chat-panel { right: auto; left: 24px; }
.chat-panel.open { display: flex; }
.chat-header {
  padding: 16px;
  border-bottom: 1px solid var(--mist);
  font-weight: 500;
  display: flex;
  justify-content: space-between;
}
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-input-area {
  padding: 16px;
  border-top: 1px solid var(--mist);
}
.chat-input {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  margin-bottom: 4px;
}
.chat-hint {
  font-size: 11px;
  color: var(--slate);
}
.msg { padding: 8px 12px; border-radius: var(--radius); max-width: 85%; font-size: 14px; }
.msg.user { background: var(--paper-white); align-self: flex-end; }
.msg.bot { background: var(--mist); align-self: flex-start; }

/* Responsive */
@media (max-width: 1280px) {}
@media (max-width: 1024px) {}
@media (max-width: 768px) {
  .hero-steps { min-height: auto; display: flex; flex-direction: column; gap: 16px; position: static; }
  .step-card { position: static; width: 100%; transform: none !important; }
  header { flex-direction: column; align-items: flex-start; gap: 12px; }
  header nav { flex-wrap: wrap; margin-right: 0 !important; justify-content: center; }
  header > div { margin: 0 auto; }
}
@media (max-width: 375px) {}

.deal-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(1, 24, 33, 0.5);
  display: none;
  z-index: 2000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
}
.deal-panel.open { display: flex; }

.deal-panel-content {
  background: var(--card-white);
  width: 90%;
  max-width: 800px;
  height: 80vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .deal-panel-content { flex-direction: column; height: 90vh; }
}

.deal-context {
  flex: 1;
  padding: 32px;
  background: var(--paper-white);
  border-right: 1px solid var(--mist);
  overflow-y: auto;
}
html[dir="rtl"] .deal-context { border-right: none; border-left: 1px solid var(--mist); }

.deal-copilot {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

.close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  border: none;
  background: var(--mist);
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
html[dir="rtl"] .close-btn { right: auto; left: 16px; }

.cursor-ptr { cursor: pointer; }

.processing-step {
  font-size: 14px;
  color: var(--midnight-teal);
  margin-bottom: 8px;
  opacity: 0.2;
  transition: opacity 0.3s;
}

.draft-box {
  margin-top: 24px;
  padding-left: 16px;
  border-left: 4px solid var(--forest-teal);
}
html[dir="rtl"] .draft-box { padding-left: 0; padding-right: 16px; border-left: none; border-right: 4px solid var(--forest-teal); }