/* Antellect — site styles. No external fonts or resources: everything is served from this origin. */

:root {
  --bg: #05070f;
  --bg-raised: #0a0f1e;
  --surface: rgba(255, 255, 255, 0.025);
  --surface-hover: rgba(255, 255, 255, 0.05);
  --border: rgba(148, 163, 255, 0.12);
  --border-strong: rgba(148, 163, 255, 0.24);
  --text: #e7eaf6;
  --text-muted: #9aa3bf;
  --text-faint: #6b7392;
  --accent: #5b8cff;
  --accent-2: #9a6bff;
  --accent-3: #2fd4f0;
  --gradient: linear-gradient(120deg, var(--accent-3) 0%, var(--accent) 45%, var(--accent-2) 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient backdrop: soft glows + a faint technical grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(154, 107, 255, 0.16), transparent 60%),
    radial-gradient(50rem 36rem at -10% 10%, rgba(47, 212, 240, 0.10), transparent 60%),
    linear-gradient(rgba(148, 163, 255, 0.035) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(148, 163, 255, 0.035) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--bg);
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
a:hover { color: #fff; text-decoration-color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.6em; font-weight: 650; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.6rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.75rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-3); margin: 0 0 1.4rem;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.7; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 7, 15, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; letter-spacing: 0.22em; font-size: 0.95rem; }
.brand img { width: 30px; height: 30px; }

.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--border-strong); color: var(--text);
  border-radius: 10px; padding: 8px 10px; cursor: pointer; font: inherit; font-size: 0.85rem;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.site-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 8px 12px; border-radius: 8px; font-size: 0.92rem; color: var(--text-muted); text-decoration: none; }
.site-nav a:hover { color: #fff; background: var(--surface-hover); }
.site-nav .nav-cta { color: #fff; border: 1px solid var(--border-strong); margin-left: 8px; }
.site-nav .nav-cta:hover { border-color: var(--accent); }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 10px; }
  .site-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: rgba(5, 7, 15, 0.97); border-bottom: 1px solid var(--border); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 10px var(--gutter) 18px; gap: 2px; }
  .site-nav a { padding: 12px 8px; font-size: 1rem; }
  .site-nav .nav-cta { margin: 8px 0 0; text-align: center; }
  /* Without JS the menu stays reachable */
  html:not(.js) .site-nav { display: block; position: static; background: none; border: 0; }
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .site-header .container { height: auto; flex-wrap: wrap; padding-top: 12px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 0.98rem; text-decoration: none;
  border: 1px solid transparent; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 8px 30px -10px rgba(91, 140, 255, 0.7); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 36px -10px rgba(154, 107, 255, 0.8); color: #fff; }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); background: var(--surface-hover); }
.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(56px, 8vw, 104px); }
.hero .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-lead { font-size: clamp(1.1rem, 1.6vw, 1.28rem); color: var(--text-muted); max-width: 36ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-modalities { display: flex; flex-wrap: wrap; gap: 8px; margin: 2.4rem 0 0; padding: 0; list-style: none; }
.hero-modalities li {
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.06em; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; background: var(--surface);
}

.hero-visual { position: relative; }
.hero-visual::before {
  content: ""; position: absolute; inset: 12% 8%; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 140, 255, 0.28), transparent 65%); filter: blur(20px);
}

/* Diagram (inline SVG) */
.diagram { width: 100%; height: auto; overflow: visible; }
.diagram .node rect { fill: rgba(10, 15, 30, 0.9); stroke: var(--border-strong); }
.diagram .node text { fill: var(--text); font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; }
.diagram .node circle { fill: var(--accent-3); }
.diagram .flow { fill: none; stroke: url(#flowGradient); stroke-width: 1.5; opacity: 0.55; }
.diagram .pulse { fill: none; stroke: url(#flowGradient); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 10 300; animation: flow 3.6s linear infinite; }
.diagram .pulse:nth-of-type(2) { animation-delay: -0.7s; }
.diagram .pulse:nth-of-type(3) { animation-delay: -1.4s; }
.diagram .pulse:nth-of-type(4) { animation-delay: -2.1s; }
.diagram .pulse:nth-of-type(5) { animation-delay: -2.8s; }
.diagram .chip-body { fill: #0b1124; stroke: url(#chipGradient); stroke-width: 2; }
.diagram .chip-core { fill: url(#coreGradient); opacity: 0.9; }
.diagram .chip-pin { stroke: var(--border-strong); stroke-width: 3; stroke-linecap: round; }
.diagram .chip-label { fill: #fff; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.18em; }
.diagram .chip-sub { fill: var(--text-muted); font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; }
.diagram .chip-glow { fill: url(#glowGradient); animation: breathe 4s ease-in-out infinite; transform-origin: 400px 210px; }
.diagram .out-flow { fill: none; stroke: var(--accent-2); stroke-width: 1.5; stroke-dasharray: 4 6; opacity: 0.6; animation: dash 1.6s linear infinite; }
.diagram .out-label { fill: var(--text-muted); font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; }

@keyframes flow { from { stroke-dashoffset: 310; } to { stroke-dashoffset: 0; } }
@keyframes dash { to { stroke-dashoffset: -20; } }
@keyframes breathe { 0%, 100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 0.9; transform: scale(1.06); } }

@media (max-width: 880px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; margin: 0 auto; width: 100%; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--border); }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { color: var(--text-muted); font-size: 1.1rem; }

.about-body { max-width: 780px; }
.about-body p { color: var(--text-muted); }
.about-body p strong { color: var(--text); font-weight: 600; }


.cards { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 880px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px 24px; transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.card:hover { border-color: var(--border-strong); background: var(--surface-hover); transform: translateY(-2px); }
.card p { color: var(--text-muted); font-size: 0.98rem; margin: 0; }
.card-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(47, 212, 240, 0.14), rgba(154, 107, 255, 0.14)); border: 1px solid var(--border-strong);
}
.card-icon svg { width: 22px; height: 22px; stroke: var(--accent-3); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-tag { display: inline-block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; color: var(--text-faint); margin-bottom: 8px; text-transform: uppercase; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.pillar { background: var(--bg-raised); padding: 30px 28px; }
.pillar-num { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); margin-bottom: 14px; display: block; }
.pillar p { color: var(--text-muted); margin: 0; font-size: 0.98rem; }
@media (max-width: 880px) { .pillars { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pillars { grid-template-columns: 1fr; } }

.app-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 880px) { .app-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .app-list { grid-template-columns: 1fr; } }
.app-list li { display: flex; gap: 16px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.app-list h3 { margin-bottom: 0.3em; }
.app-list p { margin: 0; color: var(--text-muted); font-size: 0.97rem; }
.app-list .dot { flex: none; width: 10px; height: 10px; margin-top: 8px; border-radius: 50%; background: var(--gradient); box-shadow: 0 0 14px rgba(91, 140, 255, 0.8); }
.note { margin-top: 20px; font-size: 0.88rem; color: var(--text-faint); }

/* ---------- Contact ---------- */
.contact-panel {
  text-align: center; padding: clamp(40px, 7vw, 80px) var(--gutter); border-radius: calc(var(--radius) + 8px);
  border: 1px solid var(--border-strong); position: relative; overflow: hidden;
  background: radial-gradient(40rem 20rem at 50% 0%, rgba(91, 140, 255, 0.2), transparent 70%), var(--bg-raised);
}
.contact-panel p { color: var(--text-muted); max-width: 54ch; margin: 0 auto 2rem; font-size: 1.08rem; }
.contact-email { display: inline-block; font-size: clamp(1.25rem, 3.4vw, 2rem); font-weight: 600; letter-spacing: -0.01em; text-decoration: none; margin-bottom: 1.6rem; word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 48px; margin-top: clamp(64px, 9vw, 112px); color: var(--text-faint); font-size: 0.9rem; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.site-footer p { margin: 0; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: #fff; }

/* ---------- Legal / simple pages ---------- */
.page { padding: clamp(48px, 8vw, 96px) 0 0; }
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.prose h2 { font-size: 1.35rem; margin-top: 2.4em; }
.prose p, .prose li { color: var(--text-muted); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose .updated { font-family: var(--mono); font-size: 0.82rem; color: var(--text-faint); }

.not-found { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.not-found .code { font-family: var(--mono); font-size: clamp(4rem, 14vw, 8rem); font-weight: 700; line-height: 1; margin-bottom: 0.2em; }
.not-found p { color: var(--text-muted); margin-bottom: 2rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
