/* StellarCortex HQ landing page. One stylesheet, no external resources.
   Colours sampled from brand/logo-final.png. Logical properties keep RTL/LTR symmetric. */

:root {
  --bg: #0b1019;
  --bg-deep: #070a12;
  --surface: #121829;
  --surface-2: #181f35;
  --border: #2a3350;
  --text: #e8ebf4;
  --muted: #aeb6cc;
  --purple: #b36bff;
  --magenta: #e45bdc;
  --cyan: #8bf6fe;
  --grad: linear-gradient(90deg, var(--magenta), var(--purple) 45%, var(--cyan));
  --radius: 14px;
  --max: 68rem;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background:
    radial-gradient(60rem 40rem at 20% -10%, rgba(120, 60, 190, 0.22), transparent 60%),
    radial-gradient(50rem 36rem at 90% 20%, rgba(40, 150, 200, 0.14), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Hebrew", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--cyan); text-underline-offset: 0.2em; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

code, .ltr {
  direction: ltr;
  unicode-bidi: isolate;
}
.ltr { white-space: nowrap; }
code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.05em 0.35em;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--surface-2);
  color: var(--text);
  padding: 0.6rem 1rem;
  border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(7, 10, 18, 0.88);
  border-bottom: 1px solid var(--border);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(7, 10, 18, 0.7); backdrop-filter: blur(8px); }
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.brand img { width: 28px; height: 28px; border-radius: 6px; }
.nav { display: flex; align-items: center; gap: 1rem; }
.nav ul {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.1rem;
}
.nav ul a { color: var(--muted); text-decoration: none; }
.nav ul a:hover { color: var(--text); }
.lang-switch {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  min-height: 44px;
  line-height: 2.1rem;
}
.lang-switch:hover { border-color: var(--cyan); }

/* Hero */
.hero { padding-block: 2rem 3rem; text-align: center; }
.hero h1 { margin: 0; }
.hero picture img {
  width: 100%;
  max-width: 56rem;
  margin-inline: auto;
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
}
.pitch {
  margin: 1.5rem auto 0.5rem;
  font-size: clamp(1.35rem, 4.5vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  max-width: 40rem;
}
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sub { margin: 0 auto; color: var(--muted); max-width: 38rem; }

/* Sections */
section { padding-block: 3rem; scroll-margin-top: 4rem; }
section + section { border-top: 1px solid rgba(42, 51, 80, 0.6); }
h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.25;
}
h2::after {
  content: "";
  display: block;
  width: 4rem;
  height: 3px;
  margin-top: 0.6rem;
  border-radius: 3px;
  background: var(--grad);
}
h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.15rem; max-width: 46rem; }

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  padding-inline-start: 4.25rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 1.1rem;
  top: 1.15rem;
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: var(--bg-deep);
  font-weight: 800;
}
.steps p { margin: 0; color: var(--muted); }

.cards {
  list-style: none;
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
}
.cards li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--purple);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}
.cards li:nth-child(3n + 2) { border-inline-start-color: var(--magenta); }
.cards li:nth-child(3n) { border-inline-start-color: var(--cyan); }
.cards p { margin: 0; color: var(--muted); }
.section-intro { color: var(--muted); }

.roadmap { display: grid; gap: 1rem; }
.roadmap div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.roadmap ul { margin: 0; padding-inline-start: 1.25rem; }
.roadmap li { margin-block: 0.35rem; }
.roadmap .done li::marker { content: "✓  "; color: var(--cyan); }
.roadmap .next li::marker { content: "○  "; color: var(--magenta); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--muted);
  font-size: 0.95rem;
  padding-block: 1.5rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; }
.site-footer p { margin: 0; }

/* Larger screens */
@media (min-width: 48rem) {
  .nav ul { display: flex; }
  .hero { padding-block: 3rem 4rem; }
  section { padding-block: 4rem; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { padding: 4rem 1.25rem 1.25rem; }
  .steps li::before { top: 1.1rem; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .roadmap { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 72rem) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

.construction {
  background: linear-gradient(90deg, rgba(228,91,220,.18), rgba(179,107,255,.18) 45%, rgba(139,246,254,.18));
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-align: center;
  font-size: .95rem;
  padding: .6rem 1rem;
}

.cards.compare h3 { font-size: 1.05rem; }

@media (min-width: 60rem) { #what .steps { grid-template-columns: repeat(4, 1fr); } }

.hierarchy { list-style: none; margin: 1.5rem auto 0; padding: 0; max-width: 40rem; display: grid; gap: .75rem; }
.hierarchy li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-align: center;
  position: relative;
}
.hierarchy li:nth-child(1) { border-color: var(--magenta); margin-inline: 6rem; }
.hierarchy li:nth-child(2) { border-color: var(--purple); margin-inline: 4rem; }
.hierarchy li:nth-child(3) { margin-inline: 2rem; }
.hierarchy li:nth-child(4) { border-color: var(--cyan); }
.hierarchy li + li::before {
  content: "";
  position: absolute;
  top: -.8rem;
  inset-inline-start: 50%;
  width: 2px;
  height: .75rem;
  background: var(--grad);
}
.hierarchy h3 { margin: 0 0 .25rem; }
.hierarchy p { margin: 0; color: var(--muted); }
@media (max-width: 40rem) { .hierarchy li:nth-child(n) { margin-inline: 0; } }
@media (min-width: 48rem) { #security .cards { grid-template-columns: repeat(2, 1fr); } }

.feature .wrap {
  background: linear-gradient(135deg, rgba(228,91,220,.10), rgba(179,107,255,.10) 45%, rgba(139,246,254,.08));
  border: 1px solid var(--purple);
  border-radius: calc(var(--radius) * 1.5);
  padding-block: 2.5rem;
  box-shadow: 0 0 40px rgba(179,107,255,.18);
}
.badge {
  display: inline-block;
  background: var(--grad);
  color: var(--bg-deep);
  font-weight: 700;
  font-size: .85rem;
  border-radius: 999px;
  padding: .25rem .8rem;
  margin-bottom: .75rem;
}
@media (min-width: 48rem) { .brain-cards { grid-template-columns: repeat(2, 1fr) !important; } }

.table-wrap { margin-top: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.compare-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.compare-table th, .compare-table td { padding: .9rem 1.1rem; text-align: start; vertical-align: top; border-bottom: 1px solid var(--border); }
.compare-table thead th { background: var(--bg-deep); color: var(--muted); font-size: .9rem; font-weight: 600; }
.compare-table thead th.ours { color: var(--text); background: linear-gradient(90deg, rgba(228,91,220,.22), rgba(179,107,255,.22) 50%, rgba(139,246,254,.18)); }
.compare-table tbody th { color: var(--text); font-weight: 700; white-space: nowrap; }
.compare-table td { color: var(--muted); }
.compare-table td.ours { color: var(--text); background: rgba(179,107,255,.07); border-inline-start: 2px solid var(--purple); }
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 48rem) {
  .compare-table thead { display: none; }
  .compare-table, .compare-table tbody, .compare-table tr, .compare-table th, .compare-table td { display: block; width: 100%; }
  .compare-table tr { border-bottom: 1px solid var(--border); }
  .compare-table tbody th { background: var(--bg-deep); border-bottom: 0; }
  .compare-table td { border-bottom: 0; }
  .compare-table td::before { content: attr(data-label); display: block; font-size: .8rem; font-weight: 600; color: var(--purple); margin-bottom: .25rem; }
}
