/* ===== RESET & VARIABLES ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #5B9BD5;
  --blue-light: #e8f1fa;
  --blue-dark: #3a7dbf;
  --blue-glow: rgba(91, 155, 213, 0.15);
  --dark: #16213e;
  --dark-soft: #1a2744;
  --cream: #faf9f7;
  --gray: #f2f0ed;
  --text: #2c3e50;
  --text-light: #6b7c93;
  --white: #ffffff;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.14);
  --radius: 20px;
  --radius-sm: 12px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Rubik', sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }

/* ===== TYPOGRAPHY ===== */
[lang="he"] h1, [lang="he"] h2, [lang="he"] h3 {
  font-family: 'Secular One', 'Rubik', sans-serif;
  font-weight: 400; /* Secular One only has 400 */
}
[lang="en"] h1, [lang="en"] h2, [lang="en"] h3 {
  font-family: 'Urbanist', 'Rubik', sans-serif;
  font-weight: 600;
}

h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); line-height: 1.3; margin-bottom: 0.5em; }
h3 { font-size: 1.1rem; }

/* ===== NAV ===== */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(250, 249, 247, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: box-shadow 0.3s;
}
.topnav.scrolled { box-shadow: var(--shadow-sm); }
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Urbanist', 'Secular One', sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--dark);
}
.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.beta-badge {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--blue-light), #d4e6f6);
  color: var(--blue-dark);
  line-height: 1.4;
}
#lang-toggle {
  background: var(--white);
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: 20px;
  padding: 6px 16px;
  font-family: 'Rubik', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
#lang-toggle:hover {
  background: var(--blue-light);
  border-color: var(--blue);
  color: var(--blue-dark);
}

/* ===== HERO ===== */
.hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 72px;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 35%, var(--blue-glow) 0%, transparent 55%),
    var(--cream);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(91,155,213,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.avatar-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 32px;
  animation: float 5s ease-in-out infinite;
}
.avatar-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 50%;
  display: block;
  filter: drop-shadow(0 8px 24px var(--blue-glow));
}
.avatar-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px dashed var(--blue);
  opacity: 0.3;
  animation: spin 20s linear infinite;
}
.hero h1 {
  color: var(--dark);
  margin-bottom: 12px;
}
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-light);
  max-width: 480px;
  margin: 0 auto 36px;
}
.hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 32px;
  padding: 8px 20px;
  background: var(--white);
  border-radius: 50px;
  box-shadow: var(--shadow-sm);
}
.hero-stat strong {
  color: var(--blue);
  font-size: 1.2em;
  font-weight: 700;
}

/* ===== SCROLL HINT ===== */
.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s ease-in-out infinite;
  opacity: 0.4;
  transition: opacity 0.3s;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}
.scroll-hint:hover { opacity: 0.7; }
.scroll-hint svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-light);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ===== CTA BUTTON ===== */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: var(--white);
  padding: 14px 36px;
  border-radius: 50px;
  font-family: 'Rubik', sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(91,155,213,0.35);
}
.cta:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(91,155,213,0.45);
  color: var(--white);
}
.cta-arrow {
  transition: transform 0.3s;
}
.cta:hover .cta-arrow { transform: translateX(3px); }
[dir="rtl"] .cta:hover .cta-arrow { transform: translateX(-3px); }

/* ===== DEMO SECTION ===== */
.demo-section {
  padding: 80px 24px;
  background: var(--white);
  position: relative;
}
.demo-section h2 { text-align: center; color: var(--dark); }
.demo-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 40px;
  font-size: 1.05rem;
}
.chat-card {
  max-width: 420px;
  margin: 0 auto;
  background: #efeae2;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}
/* Telegram-like chat pattern bg */
.chat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 5l5 10h-10z' fill='%23000' opacity='0.3'/%3E%3C/svg%3E");
  pointer-events: none;
}
.chat-header {
  background: var(--blue);
  color: var(--white);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.chat-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
}
.chat-header-name {
  font-weight: 500;
  font-size: 1rem;
}
.chat-header-status {
  font-size: 0.75rem;
  opacity: 0.8;
}
.chat-body {
  padding: 16px 12px;
  position: relative;
  z-index: 1;
}
.bubble {
  background: var(--white);
  border-radius: 12px 12px 12px 4px;
  padding: 10px 14px;
  max-width: 92%;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
[dir="rtl"] .bubble {
  border-radius: 12px 12px 4px 12px;
}
.bubble-content {
  font-size: 0.88rem;
  line-height: 1.65;
  white-space: pre-line;
}
.bubble-time {
  display: block;
  text-align: end;
  font-size: 0.7rem;
  color: var(--text-light);
  margin-top: 4px;
}
.bubble-child {
  color: var(--dark);
  font-weight: 600;
  display: block;
  margin-top: 8px;
}
.bubble-child:first-of-type { margin-top: 4px; }
.bubble-detail {
  display: block;
  padding-inline-start: 2px;
}
.bubble-source {
  display: block;
  font-size: 0.78rem;
  color: var(--text-light);
  padding-inline-start: 2px;
}
.bubble-calendar {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.06);
  color: var(--dark);
  font-weight: 500;
}
.bubble-task {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding-inline-start: 2px;
}
.bubble-task-btn {
  display: inline-block;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-weight: 500;
  white-space: nowrap;
}
.bubble-summary {
  display: block;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.06);
  color: var(--text-light);
  font-size: 0.82rem;
}

/* ===== VALUE PROPS STRIP ===== */
.value-strip {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.value-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
}
.value-chip-icon {
  font-size: 1.15rem;
}

/* ===== STEPS SECTION ===== */
.steps-section {
  padding: 80px 24px;
  background: var(--gray);
}
.steps-section h2 {
  text-align: center;
  color: var(--dark);
  margin-bottom: 48px;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}
/* Connecting line */
.steps-grid::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--blue), var(--blue), transparent);
  opacity: 0.3;
}
[dir="rtl"] .steps-grid::before {
  background: linear-gradient(to left, transparent, var(--blue), var(--blue), transparent);
}
.step {
  text-align: center;
  position: relative;
}
.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--blue);
  color: var(--blue);
  font-family: 'Urbanist', 'Secular One', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  position: relative;
  z-index: 1;
  transition: all 0.3s;
}
.step:hover .step-number {
  background: var(--blue);
  color: var(--white);
  transform: scale(1.08);
}
.step-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}
.step h3 {
  color: var(--dark);
  margin-bottom: 4px;
  font-size: 0.95rem;
}
.step p {
  color: var(--text-light);
  font-size: 0.82rem;
  line-height: 1.5;
}

/* ===== PRIVACY SECTION ===== */
.privacy-section {
  padding: 80px 24px;
  background: linear-gradient(135deg, #16213e 0%, #1a2744 50%, #0f3460 100%);
  color: rgba(255,255,255,0.9);
  position: relative;
  overflow: hidden;
}
.privacy-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(91,155,213,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.privacy-section h2 {
  text-align: center;
  color: var(--white);
  margin-bottom: 40px;
}
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 640px;
  margin: 0 auto;
}
.privacy-grid .privacy-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: 308px;
  margin: 0 auto;
}
.privacy-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.06);
  transition: background 0.3s;
}
.privacy-item:hover {
  background: rgba(255,255,255,0.08);
}
.privacy-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.privacy-item h3 {
  color: var(--white);
  margin-bottom: 2px;
  font-size: 0.95rem;
}
.privacy-item p {
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.65);
}

/* ===== FOOTER ===== */
.site-footer {
  padding: 32px 24px;
  background: var(--dark);
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}
.footer-links a {
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--blue); }
.footer-heart { color: #e74c3c; }

/* ===== ANIMATIONS ===== */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Chat message stagger */
.bubble { animation: fadeUp 0.5s ease both; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .steps-grid::before { display: none; }
  .privacy-grid {
    grid-template-columns: 1fr;
  }
  .avatar-wrap {
    width: 130px;
    height: 130px;
  }
}

@media (max-width: 480px) {
  .steps-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .hero { padding: 90px 20px 48px; }
  .demo-section, .steps-section, .privacy-section { padding: 56px 20px; }
  .chat-card { margin: 0 -4px; border-radius: 16px; }
}

/* ===== LEGAL PAGES ===== */
.legal-page { max-width: 680px; margin: 0 auto; padding: 100px 24px 60px; }
.legal-page h1 { margin-bottom: 8px; }
.legal-page .last-updated { color: var(--text-light); font-size: 0.85rem; margin-bottom: 40px; }
.legal-page h2 { margin-top: 36px; margin-bottom: 12px; font-size: 1.2rem; }
.legal-page p, .legal-page li { font-size: 0.95rem; line-height: 1.8; color: var(--text); }
.legal-page ul { padding-inline-start: 20px; margin: 8px 0 16px; }
.legal-page li { margin-bottom: 4px; }
.legal-page a { color: var(--blue); }
.legal-page .highlight { background: var(--blue-light); padding: 16px 20px; border-radius: var(--radius-sm); margin: 20px 0; }
.legal-page .highlight p { margin: 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 24px; font-size: 0.9rem; color: var(--text-light); }
.back-link:hover { color: var(--blue); }

/* ===== LANGUAGE BLOCKS ===== */
.lang-he, .lang-en { min-height: 100dvh; }

/* ===== PREFERS REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .avatar-main { animation: none; }
  .avatar-ring { animation: none; }
  .animate-in { opacity: 1; transform: none; transition: none; }
  .bubble { animation: none; }
  html { scroll-behavior: auto; }
}
