:root {
  --bg: #070b14;
  --bg-alt: #0b1120;
  --surface: #0d1428;
  --surface-2: #111a33;
  --border: #1d2947;
  --text: #e8edf9;
  --text-dim: #9aa7c7;
  --accent: #4da6ff;
  --accent-2: #35e6c8;
  --star: #ffd166;
  --radius: 14px;
  --font-head: 'Sora', 'Noto Sans Hebrew', sans-serif;
  --font-body: 'Inter', 'Noto Sans Hebrew', sans-serif;
  --container-w: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

html[dir="rtl"] body { font-family: 'Noto Sans Hebrew', var(--font-body); }

h1, h2, h3, .logo-text { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.01em; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 11, 20, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 700;
}
.logo-star {
  color: var(--star);
  font-size: 1.3rem;
  text-shadow: 0 0 12px rgba(255, 209, 102, 0.7);
}

.main-nav { display: flex; gap: 32px; }
.main-nav a {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.main-nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 20px; }

.lang-switch { position: relative; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.lang-toggle:hover, .lang-toggle[aria-expanded="true"] { border-color: var(--accent); }

.lang-caret {
  color: var(--text-dim);
  font-size: 0.7rem;
  transition: transform 0.2s;
}
.lang-toggle[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  min-width: 140px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 60;
}
.lang-menu[hidden] { display: none; }

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.lang-option:hover { background: var(--surface-2); color: var(--text); }
.lang-option.is-active { color: var(--accent-2); }

.lang-flag {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  flex-shrink: 0;
}
.lang-flag svg {
  display: block;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.lang-code { line-height: 1; }

html[dir="rtl"] .lang-menu { right: auto; left: 0; }
html[dir="rtl"] .lang-option { text-align: right; }

.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 32px; height: 32px; background: none; border: none; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  padding: 160px 0 120px;
  text-align: center;
}
.hero-inner { max-width: 820px; margin: 0 auto; }

.eyebrow, .kicker {
  display: inline-block;
  color: var(--accent-2);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.kicker.center { display: block; text-align: center; }

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  margin: 0 0 24px;
  background: linear-gradient(135deg, #ffffff 10%, var(--accent) 60%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.15;
}

.lead {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 40px;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-3d-wrap {
  margin: 48px auto 0;
  max-width: 320px;
  width: 100%;
}
.hero-3d {
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  cursor: grab;
  touch-action: none;
  border-radius: 50%;
  overflow: hidden;
}
.hero-3d:active { cursor: grabbing; }
.hero-3d-hint {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  margin: 14px 0 0;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04101f;
  box-shadow: 0 8px 24px rgba(77, 166, 255, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(77, 166, 255, 0.35); }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Sections ---------- */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}
.section:nth-of-type(even) { background: linear-gradient(180deg, transparent, rgba(13, 20, 40, 0.4) 15%, rgba(13, 20, 40, 0.4) 85%, transparent); }

.section h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin: 0 0 16px;
}
.center { text-align: center; }
.section-subtitle { color: var(--text-dim); font-size: 1.05rem; max-width: 560px; }
.section-subtitle.center { margin: 0 auto 56px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* About */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 64px; align-items: center; }
.about-text p { color: var(--text-dim); margin-bottom: 18px; }
.about-stats { display: flex; flex-direction: column; gap: 28px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-num { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--accent-2); }
.stat-label { color: var(--text-dim); font-size: 0.9rem; }

/* Services */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}
.card-icon {
  font-size: 1.6rem;
  color: var(--star);
  margin-bottom: 18px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 209, 102, 0.08);
  border-radius: 12px;
}
.card h3 { font-size: 1.1rem; margin: 0 0 12px; }
.card p { color: var(--text-dim); font-size: 0.95rem; margin: 0; }

/* Why */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.why-item {
  border-top: 2px solid var(--accent);
  padding-top: 20px;
}
.why-item h3 { font-size: 1.05rem; margin: 0 0 10px; }
.why-item p { color: var(--text-dim); font-size: 0.92rem; margin: 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.contact-list { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-direction: column; gap: 20px; }
.contact-list li { display: flex; flex-direction: column; gap: 4px; }
.contact-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); }
.contact-value { font-size: 1.05rem; font-weight: 500; }
a.contact-value:hover { color: var(--accent); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-form label { display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; color: var(--text-dim); }
.contact-form input, .contact-form textarea {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-form button { align-self: flex-start; border: none; }

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 20px 24px;
    gap: 18px;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
  }
  .main-nav.is-open { transform: translateY(0); opacity: 1; }
  .nav-toggle { display: flex; }
  .hero { padding: 120px 0 80px; }
  .cards-grid, .why-grid { grid-template-columns: 1fr; }
  .hero-3d-wrap { max-width: 260px; margin: 40px auto 0; }
}

@media (max-width: 420px) {
  .hero-3d-wrap { max-width: 220px; margin: 32px auto 0; }
  .hero-3d-hint { font-size: 0.72rem; }
}

html[dir="rtl"] .why-item { border-top: none; border-right: 2px solid var(--accent); padding-top: 0; padding-right: 20px; }
html[dir="rtl"] .contact-form button { align-self: flex-end; }
