:root {
  --bg: #ffffff;
  --bg-soft: #f7fafc;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --text: #12202b;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.12);
  --accent: #18b89a;
  --accent-strong: #0f9f85;
  --accent-ink: #ffffff;
  --blue: #4f86e8;
  --shadow: 0 24px 64px rgba(15, 23, 42, 0.12);
}

body {
  background:
    radial-gradient(circle at 16% 8%, rgba(79, 134, 232, 0.07), transparent 28rem),
    radial-gradient(circle at 84% 14%, rgba(24, 184, 154, 0.07), transparent 26rem),
    #ffffff;
  color: var(--text);
}

body::before {
  opacity: 0.58;
  background-image:
    linear-gradient(rgba(71, 85, 105, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(71, 85, 105, 0.065) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black 0%, rgba(0,0,0,0.7) 55%, transparent 100%);
}

.site-header {
  border-bottom-color: rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.brand-mark {
  border-color: rgba(24, 184, 154, 0.42);
  color: #0f8f79;
  background: #effcf8;
}

.nav,
.hero-note,
.trust-strip,
.feature-card p,
.workflow-step p,
.early-access-card p,
.consent-row,
.form-status,
.site-footer,
.result-label,
.metric span {
  color: var(--muted);
}

.nav a:hover,
.footer-links a:hover {
  color: var(--text);
}

.language-switcher button {
  color: var(--muted);
}

.language-switcher button[aria-pressed="true"] {
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.12);
  background: #f2f6f8;
}

.eyebrow,
.feature-index,
.workflow-step > span {
  color: #0f9f85;
}

.hero-lead,
.ea-form > label:first-child {
  color: #425466;
}

.hero h1 {
  text-wrap: balance;
}

.hero-lead {
  text-wrap: pretty;
}

.button.primary {
  border-color: #18b89a;
  background: #18b89a;
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(24, 184, 154, 0.18);
}

.button.primary:hover {
  background: #0f9f85;
}

.button.secondary {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
}

.button.secondary:hover {
  border-color: rgba(15, 23, 42, 0.24);
  background: #ffffff;
}

.product-panel {
  border-color: rgba(15, 23, 42, 0.14);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.window-bar {
  border-bottom-color: rgba(15, 23, 42, 0.1);
  color: #64748b;
  background: #f8fafc;
}

.window-dots span {
  background: #b7c2cf;
}

.workspace {
  background: #ffffff;
}

.toolrail {
  border-right-color: rgba(15, 23, 42, 0.1);
  background: #f8fafc;
}

.toolrail span {
  border-color: rgba(15, 23, 42, 0.12);
  color: #607080;
  background: #ffffff;
}

.schematic {
  background-color: #ffffff;
  background-image:
    linear-gradient(rgba(100, 116, 139, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 116, 139, 0.10) 1px, transparent 1px);
  background-size: 18px 18px;
}

.component {
  border-color: rgba(24, 184, 154, 0.58);
  background: #ffffff;
  color: #163a34;
  box-shadow: 0 3px 9px rgba(15, 23, 42, 0.06);
}

.output {
  border-color: rgba(79, 134, 232, 0.55);
  color: #244d91;
}

.wire {
  background: rgba(15, 159, 133, 0.72);
}

.node {
  background: #18b89a;
  box-shadow: 0 0 0 5px rgba(24, 184, 154, 0.1);
}

.results-card {
  border-color: rgba(15, 23, 42, 0.13);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.11);
}

.trust-strip {
  border-block-color: rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.74);
}

.trust-strip span {
  border-inline-end-color: rgba(15, 23, 42, 0.1);
}

.feature-grid {
  border-top-color: rgba(15, 23, 42, 0.1);
  border-left-color: rgba(15, 23, 42, 0.1);
}

.feature-card {
  border-right-color: rgba(15, 23, 42, 0.1);
  border-bottom-color: rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

.feature-card:hover {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(24, 184, 154, 0.08);
}

.workflow-section {
  border-top-color: rgba(15, 23, 42, 0.1);
}

.workflow-step {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.84);
}

.workflow-arrow {
  color: rgba(15, 23, 42, 0.28);
}

.early-access-card {
  border-color: rgba(24, 184, 154, 0.28);
  background: linear-gradient(140deg, rgba(226, 250, 244, 0.84), rgba(237, 244, 255, 0.72));
  box-shadow: 0 18px 52px rgba(15, 23, 42, 0.08);
}

.form-row input {
  border-color: rgba(15, 23, 42, 0.14);
  color: var(--text);
  background: #ffffff;
}

.form-row input:focus {
  border-color: rgba(24, 184, 154, 0.65);
  box-shadow: 0 0 0 3px rgba(24, 184, 154, 0.1);
}

.form-status.success { color: #0f8f79; }
.form-status.error { color: #b42318; }

.site-footer {
  border-top-color: rgba(15, 23, 42, 0.1);
}

/* Arabic/RTL: keep the mirrored layout while giving Arabic glyphs more room. */
html[dir="rtl"] body {
  font-family: "Segoe UI Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}

html[dir="rtl"] .hero {
  grid-template-columns: minmax(0, 1.12fr) minmax(400px, 0.88fr);
}

html[dir="rtl"] .hero-copy {
  max-width: 760px;
  justify-self: end;
}

html[dir="rtl"] .hero h1 {
  max-width: 760px;
  font-size: clamp(3rem, 4.8vw, 4.8rem);
  line-height: 1.14;
  letter-spacing: 0;
  font-weight: 700;
  text-wrap: balance;
}

html[dir="rtl"] .hero-lead {
  max-width: 720px;
  line-height: 1.75;
}

/* Legal pages: more compact and easier to scan than the marketing hero. */
.legal-shell {
  width: min(1040px, 90vw);
  padding-block: 4.8rem 5rem;
}

.legal-title {
  max-width: 920px;
  margin-bottom: 1.35rem;
  font-size: clamp(3.2rem, 7vw, 5.4rem);
  line-height: 0.98;
}

.legal-status {
  max-width: 900px;
  margin-bottom: 3.2rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(24, 184, 154, 0.22);
  border-radius: 12px;
  background: rgba(239, 252, 248, 0.9);
  color: #334155;
}

.legal-card {
  max-width: 900px;
  padding: 2rem 0 2.25rem;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.legal-card h2 {
  max-width: 820px;
  margin-bottom: 1rem;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.legal-card p,
.legal-card li {
  max-width: 820px;
  color: #425466;
  font-size: 1rem;
  line-height: 1.75;
}

.legal-card ul {
  max-width: 820px;
  padding-left: 1.4rem;
}

.legal-card code {
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 5px;
  padding: 0.08rem 0.3rem;
  background: #f5f7f9;
  color: #234255;
}

.legal-note {
  margin-top: 0.7rem;
  padding-inline: 1.2rem;
  border: 1px solid rgba(79, 134, 232, 0.16);
  border-radius: 12px;
  background: rgba(242, 247, 255, 0.75);
}

@media (max-width: 980px) {
  html[dir="rtl"] .hero {
    grid-template-columns: 1fr;
  }

  html[dir="rtl"] .hero-copy {
    max-width: 760px;
    justify-self: stretch;
  }
}

@media (max-width: 640px) {
  body::before { background-size: 24px 24px; }
  .legal-shell { padding-block: 3.2rem 4rem; }
  .legal-title { font-size: clamp(2.8rem, 15vw, 4rem); }
  .legal-card { padding-block: 1.55rem 1.8rem; }
  .legal-card h2 { font-size: clamp(1.45rem, 8vw, 2rem); }

  html[dir="rtl"] .hero h1 {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
    line-height: 1.16;
  }
}
