:root {
  --bg: #07060d;
  --bg-2: #0e0a20;
  --surface: rgba(28, 21, 64, 0.45);
  --border: rgba(196, 180, 255, 0.14);
  --text: #f1effa;
  --muted: #a9a3c7;
  --accent: #a48fff;
  --cyan: #2fd8f0;
  --pink: #ff6bb5;
  --grad: linear-gradient(110deg, #a48fff 0%, #ff6bb5 50%, #2fd8f0 100%);
  --net: rgba(164, 143, 255, 0.16);
  --radius: 1.25rem;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f5fc;
    --bg-2: #ece8fa;
    --surface: rgba(255, 255, 255, 0.72);
    --border: rgba(18, 12, 42, 0.1);
    --text: #120c2a;
    --muted: #5b5775;
    --accent: #6d4aff;
    --cyan: #00788f;
    --pink: #b4307f;
    --grad: linear-gradient(110deg, #6d4aff 0%, #b4307f 55%, #00788f 100%);
    --net: rgba(109, 74, 255, 0.12);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Background: soft colour orbs + a faint neural-network drawing. */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(ellipse at 50% -10%, var(--bg-2), var(--bg) 60%); }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.35; animation: drift 24s ease-in-out infinite alternate; }
.o1 { width: 520px; height: 520px; background: #8f74ff; top: -160px; left: -120px; }
.o2 { width: 440px; height: 440px; background: #ff6bb5; top: 30%; right: -160px; animation-delay: -8s; opacity: 0.22; }
.o3 { width: 480px; height: 480px; background: #2fd8f0; bottom: -200px; left: 30%; animation-delay: -16s; opacity: 0.18; }
.net { position: absolute; inset: 0; width: 100%; height: 100%; }
.net line { stroke: var(--net); stroke-width: 1; }
.net circle { fill: var(--accent); opacity: 0.45; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } html { scroll-behavior: auto; } }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.85rem max(16px, calc((100vw - 1160px) / 2));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; font-weight: 700; letter-spacing: 0.12em; }
.brand em { font-style: normal; font-weight: 500; letter-spacing: 0.02em; color: var(--muted); }
.links { display: flex; gap: 1.4rem; margin-inline-start: auto; }
.links a { text-decoration: none; color: var(--muted); font-size: 0.95rem; }
.links a:hover { color: var(--text); }
.lang { position: relative; display: flex; align-items: center; gap: 0.35rem; border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 0.7rem; }
.lang svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.6; }
.lang select { appearance: none; background: transparent; border: 0; color: var(--text); font: inherit; font-size: 0.9rem; cursor: pointer; }
.lang select option { color: #120c2a; }

main { padding: 0 16px; }
section { max-width: 1160px; margin: 0 auto; }

/* Hero */
.hero { padding: clamp(4rem, 12vw, 8.5rem) 0 clamp(3rem, 8vw, 5rem); text-align: center; }
.eyebrow { display: inline-block; margin: 0 0 1.4rem; padding: 0.35rem 0.9rem; border: 1px solid var(--border); border-radius: 999px; font-size: 0.85rem; color: var(--muted); background: var(--surface); }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4.8rem); font-weight: 800; max-width: 14ch; margin: 0 auto; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 46rem; margin: 1.5rem auto 0; font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--muted); }
.ctas { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; margin-top: 2.2rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.5rem; border-radius: 999px; text-decoration: none; font-weight: 600; transition: transform 0.15s, box-shadow 0.15s; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: linear-gradient(110deg, #6d4aff, #b4307f); color: #fff; box-shadow: 0 12px 32px -12px rgba(109, 74, 255, 0.7); }
.btn.ghost { border: 1px solid var(--border); background: var(--surface); }
.btn:focus-visible, .links a:focus-visible, .lang select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.stats { list-style: none; padding: 0; margin: clamp(3rem, 8vw, 4.5rem) auto 0; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); backdrop-filter: blur(10px); }
.stats li { padding: 1.4rem 1rem; display: flex; flex-direction: column; gap: 0.2rem; }
.stats li + li { border-inline-start: 1px solid var(--border); }
.stats strong { font-size: 1.45rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { color: var(--muted); font-size: 0.9rem; }

/* Blocks */
.block { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.block h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); font-weight: 750; }
.sub { color: var(--muted); max-width: 44rem; margin: 0.9rem 0 0; font-size: 1.08rem; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2.2rem; }
.card { padding: 1.6rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); backdrop-filter: blur(10px); transition: border-color 0.2s, transform 0.2s; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); transform: translateY(-2px); }
.card h3 { font-size: 1.15rem; margin-top: 0.9rem; }
.card.plain h3 { margin-top: 0; }
.card p { color: var(--muted); margin: 0.6rem 0 0; }
.ico { width: 42px; height: 42px; padding: 9px; border-radius: 12px; fill: none; stroke: var(--text); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; background: linear-gradient(135deg, rgba(143, 116, 255, 0.35), rgba(47, 216, 240, 0.25)); }

.tech, .company { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.stack { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.stack li { display: flex; gap: 1rem; align-items: baseline; padding: 1rem 0; border-bottom: 1px solid var(--border); font-size: 1.05rem; }
.stack .n { font-variant-numeric: tabular-nums; font-size: 0.85rem; color: var(--cyan); font-weight: 600; }

.facts { margin: 0; display: grid; gap: 0.8rem; }
.facts div { padding: 1rem 1.2rem; border: 1px solid var(--border); border-radius: 0.9rem; background: var(--surface); }
.facts dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.facts dd { margin: 0.2rem 0 0; font-weight: 600; }

.contact { text-align: center; }
.contact .sub { margin: 0.9rem auto 1.8rem; }

.foot { max-width: 1160px; margin: 0 auto; padding: 2rem 16px 2.5rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: 0.9rem; }
.foot a { color: var(--muted); }

/* "Our project": the three-card fan of the evarixa.ai home hero, as static pictures. */
.project { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-top: 0; }
.project .eyebrow { margin-bottom: 1rem; }
.project .btn { margin-top: 1.8rem; gap: 0.5rem; }
.arrow { display: inline-block; transition: transform 0.15s; }
.btn:hover .arrow { transform: translateX(3px); }
[dir="rtl"] .arrow { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(3px); }
.fan { --w: 14rem; --step: 120px; position: relative; display: block; height: 440px; text-decoration: none; color: var(--text); border-radius: var(--radius); }
.fan::before { content: ""; position: absolute; inset: 2rem; border-radius: 50%; background: color-mix(in srgb, var(--accent) 25%, transparent); filter: blur(48px); }
.fan:focus-visible { outline: 2px solid var(--cyan); outline-offset: 6px; }
.fan-card {
  position: absolute; top: 50%; left: 50%; width: var(--w); margin: 0; padding: 0.5rem;
  border: 1px solid var(--border); border-radius: 1.5rem; background: var(--surface);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 24px 48px -16px rgba(10, 6, 30, 0.55);
  transition: transform 0.25s ease-out;
}
.fan-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 1rem; background: var(--bg-2); }
.fan-card figcaption { padding: 0.7rem 0.5rem 0.25rem; display: flex; flex-direction: column; min-width: 0; }
.fan-card strong { font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fan-card span { font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f0 { transform: translate(-50%, -50%) translateX(calc(var(--step) * -1)) rotate(-8deg) scale(0.92); z-index: 1; }
.f1 { transform: translate(-50%, -50%) scale(1.05); z-index: 3; }
.f2 { transform: translate(-50%, -50%) translateX(var(--step)) rotate(8deg) scale(0.92); z-index: 1; }
.fan:hover .f0 { transform: translate(-50%, -50%) translateX(calc(var(--step) * -1.15)) rotate(-10deg) scale(0.92); }
.fan:hover .f2 { transform: translate(-50%, -50%) translateX(calc(var(--step) * 1.15)) rotate(10deg) scale(0.92); }
@media (prefers-color-scheme: light) { .fan-card { box-shadow: 0 24px 48px -20px rgba(40, 24, 110, 0.35); } }
@media (prefers-reduced-motion: reduce) { .fan-card, .arrow { transition: none; } }

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .cards.three { grid-template-columns: 1fr; }
  .tech, .company, .project { grid-template-columns: 1fr; }
  .project { text-align: center; }
  .project .sub { margin-inline: auto; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats li:nth-child(3) { border-inline-start: 0; }
  .stats li:nth-child(n + 3) { border-top: 1px solid var(--border); }
}
@media (max-width: 720px) {
  .links { display: none; }
  .lang { margin-inline-start: auto; }
  .cards { grid-template-columns: 1fr; }
  .brand span { font-size: 0.95rem; }
  .fan { --w: 9.5rem; --step: 78px; height: 300px; }
}
