/* RiA ERP site. Palette from the RiA brand: deep navy, porcelain text, cyan accent. */
:root {
  --bg: #060a14;
  --bg-raised: #0c1322;
  --bg-card: #0e1729;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef3fa;
  --muted: #8c98ae;
  --faint: #5b6679;
  --cyan: #22d3ee;
  --cyan-soft: #7de8ff;
  --cyan-deep: #0891b2;
  --on-cyan: #060a14;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1120px;
  --font: Inter, "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::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: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan-soft); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.wrap { width: min(var(--max), 100% - 32px); margin: 0 auto; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 44rem; }
.kicker {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 14px;
}

/* ---- header ---- */
.header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(6, 10, 20, 0.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand span small { display: block; font-size: 0.68rem; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; }
.nav { display: flex; gap: 2px; margin-left: 8px; }
.nav a {
  color: var(--muted); font-size: 0.93rem; font-weight: 500; padding: 8px 11px; border-radius: 8px;
}
.nav a:hover, .nav a[aria-current] { color: var(--text); background: rgba(255,255,255,0.05); text-decoration: none; }
.actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid var(--line-strong); color: var(--text); background: transparent; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:hover { background: rgba(255,255,255,0.06); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cyan); color: var(--on-cyan); border-color: var(--cyan); }
.btn-primary:hover { background: var(--cyan-soft); border-color: var(--cyan-soft); }
.btn-lg { padding: 13px 22px; font-size: 1.02rem; }
.menu-toggle { display: none; }

/* ---- hero ---- */
.hero { padding: 72px 0 40px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 70%;
  background: radial-gradient(60% 60% at 50% 40%, rgba(34, 211, 238, 0.14), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { max-width: 13ch; }
.hero .lead { margin-top: 20px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: 0.85rem; color: var(--faint); }

/* The operational scene: one card with the live graph and the Ask RiA exchange. */
.scene {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}
.scene-graph { padding: 12px 12px 0; background: linear-gradient(180deg, #0b1a33, #0c1322 70%); }
.scene-graph svg { width: 100%; height: auto; display: block; }
.scene-graph .edge { stroke: rgba(255,255,255,0.14); stroke-width: 1.2; transition: stroke 0.25s, stroke-width 0.25s; }
.scene-graph .node circle { fill: #15213a; stroke: rgba(255,255,255,0.22); stroke-width: 1.2; transition: all 0.25s; }
.scene-graph .node text { fill: var(--muted); font-size: 10.5px; font-family: var(--font); font-weight: 600; transition: fill 0.25s; }
.scene-graph .node .glyph { fill: var(--muted); font-size: 12px; font-weight: 700; }
.scene-graph.has-focus .node:not(.lit) circle { stroke: rgba(255,255,255,0.1); }
.scene-graph.has-focus .node:not(.lit) text { fill: var(--faint); }
.scene-graph .node.lit circle { fill: #0f3a4a; stroke: var(--cyan); stroke-width: 1.8; }
.scene-graph .node.lit text { fill: var(--text); }
.scene-graph .node.lit .glyph { fill: var(--cyan-soft); }
.scene-graph .node.risk.lit circle { fill: #4a2a0f; stroke: var(--warning); }
.scene-graph .node.alarm.lit circle { fill: #4a1a1a; stroke: var(--danger); }
.scene-graph .edge.lit { stroke: var(--cyan); stroke-width: 1.8; }
.scene-graph .edge.lit.warn { stroke: var(--warning); }
.scene-graph .edge.lit.hot { stroke: var(--danger); }

.chat { padding: 16px 18px 18px; display: grid; gap: 12px; }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg .who {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 700; background: #16243f; color: var(--muted); overflow: hidden;
}
.msg .who img { width: 100%; height: 100%; object-fit: cover; }
.msg.ria .who { border: 1px solid rgba(34,211,238,0.5); }
.bubble { background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: 14px; padding: 10px 13px; font-size: 0.95rem; }
.msg.me .bubble { background: #16243f; }
.situations { display: grid; gap: 8px; margin-top: 4px; }
.situation {
  text-align: left; display: flex; gap: 10px; align-items: center; width: 100%;
  background: rgba(255,255,255,0.03); border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 10px 12px; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.situation:hover { background: rgba(255,255,255,0.06); }
.situation[aria-pressed="true"] { border-color: var(--cyan); background: rgba(34,211,238,0.08); }
.situation .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); }
.situation .dot.warn { background: var(--warning); }
.situation .dot.hot { background: var(--danger); }
.situation small { display: block; color: var(--muted); font-size: 0.82rem; }
.prepared { border-top: 1px solid var(--line); padding-top: 12px; display: none; }
.prepared.show { display: block; }
.prepared h4 { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.prepared ul { display: grid; gap: 6px; }
.prepared li { display: flex; gap: 8px; align-items: baseline; font-size: 0.92rem; }
.prepared li::before { content: "→"; color: var(--cyan); flex: none; }
.prepared .auth {
  margin-top: 10px; font-size: 0.82rem; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.prepared .auth b { color: var(--text); font-weight: 600; }

/* ---- sections ---- */
.section { padding: 72px 0; border-top: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: 36px; }
.section-head .lead { margin-top: 12px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.95rem; }
.card .badge { margin-bottom: 12px; }
.card-link { display: inline-block; margin-top: 12px; font-size: 0.9rem; font-weight: 600; }

/* Status labels: the five the brief asks for, never more than one per component. */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--muted);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-available { color: var(--success); border-color: rgba(52,211,153,0.4); }
.badge-integration { color: var(--cyan-soft); border-color: rgba(34,211,238,0.4); }
.badge-beta { color: var(--warning); border-color: rgba(251,191,36,0.4); }
.badge-pilot { color: #c4b5fd; border-color: rgba(196,181,253,0.4); }
.badge-roadmap { color: var(--muted); }

/* The loop and other chains. */
.chain { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chain li {
  background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 13px; font-size: 0.86rem; font-weight: 600; letter-spacing: 0.03em;
}
.chain li.hl { border-color: var(--cyan); color: var(--cyan-soft); }
.chain .arrow { color: var(--faint); font-size: 0.9rem; }
.chain-vertical { display: grid; gap: 0; counter-reset: step; }
.chain-vertical li {
  position: relative; padding: 12px 0 12px 44px; border-left: 1px solid var(--line-strong); margin-left: 14px;
}
.chain-vertical li::before {
  counter-increment: step; content: counter(step); position: absolute; left: -15px; top: 10px;
  width: 29px; height: 29px; border-radius: 50%; background: var(--bg-card); border: 1px solid var(--line-strong);
  display: grid; place-items: center; font-size: 0.78rem; font-weight: 700; color: var(--cyan-soft);
}
.chain-vertical li b { display: block; font-weight: 650; }
.chain-vertical li span { color: var(--muted); font-size: 0.93rem; }
.chain-vertical li.human::before { background: var(--cyan); color: var(--on-cyan); border-color: var(--cyan); }

/* Compact list of ERP apps: one foundation, not fifty icons. */
.apps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.apps li { font-size: 0.88rem; color: var(--muted); padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px; }

/* Layer stack for the architecture story. */
.stack { display: grid; gap: 10px; }
.layer {
  display: grid; grid-template-columns: 220px 1fr auto; gap: 16px; align-items: center;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
}
.layer b { font-weight: 650; }
.layer p { color: var(--muted); font-size: 0.93rem; }
.layer.io { background: transparent; border-style: dashed; }

/* The actors legend: a person, an agent, a system, a robot, an integration. */
.actors { display: flex; flex-wrap: wrap; gap: 10px; }
.actor { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.9rem; }
.actor i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Scenario with futures. */
.futures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.future { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.future.rec { border-color: var(--cyan); }
.future .conf { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--muted); margin-top: 10px; }
.meter { flex: 1; height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--cyan); }
.note { font-size: 0.85rem; color: var(--faint); margin-top: 14px; }

/* Governance questions. */
.qa { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; }
.qa li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.qa li b { color: var(--cyan-soft); font-weight: 650; }
.qa li span { color: var(--muted); }

/* Tables. */
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--faint); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
td { color: var(--muted); }
td:first-child { color: var(--text); font-weight: 600; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.86em; background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 6px; color: var(--cyan-soft); }
pre { background: #050811; border: 1px solid var(--line); border-radius: 12px; padding: 16px; overflow: auto; font-size: 0.85rem; color: var(--muted); }
pre code { background: none; padding: 0; color: inherit; }

/* Forms. */
.form { display: grid; gap: 14px; max-width: 560px; }
.form label { display: grid; gap: 6px; font-size: 0.9rem; font-weight: 600; }
.form input, .form select, .form textarea {
  font: inherit; color: var(--text); background: var(--bg-raised); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 11px 13px; width: 100%;
}
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--cyan); outline: none; }
.form .hint { font-size: 0.85rem; color: var(--faint); }

/* CTA band and footer. */
.cta {
  padding: 80px 0; text-align: center; border-top: 1px solid var(--line);
  background: radial-gradient(50% 80% at 50% 100%, rgba(34,211,238,0.12), transparent 70%);
}
.cta h2 { max-width: 24ch; margin: 0 auto 24px; }
.cta .hero-cta { justify-content: center; }
.footer { border-top: 1px solid var(--line); padding: 40px 0 32px; color: var(--muted); font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.footer h4 { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.footer li { margin: 6px 0; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.82rem; color: var(--faint); }

.page-head { padding: 64px 0 24px; }
.page-head .lead { margin-top: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.legend { display: grid; gap: 8px; }
.legend li { display: flex; gap: 12px; align-items: baseline; font-size: 0.93rem; color: var(--muted); }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { max-width: none; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .futures { grid-template-columns: 1fr; }
  .layer { grid-template-columns: 1fr; gap: 6px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr; }
  .qa { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; gap: 0;
    background: var(--bg-raised); border-bottom: 1px solid var(--line); padding: 8px 16px 14px; margin: 0;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; font-size: 1rem; }
  .menu-toggle {
    display: inline-flex; margin-left: auto; width: 40px; height: 40px; border-radius: 10px;
    border: 1px solid var(--line-strong); background: transparent; color: var(--text); align-items: center; justify-content: center; cursor: pointer;
  }
  .actions { margin-left: 0; }
  .actions .btn-ghost { display: none; }
  .actions .btn { padding: 9px 13px; font-size: 0.9rem; white-space: nowrap; }
  .brand span small { display: none; }
  .hero { padding-top: 44px; }
  .section { padding: 52px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .qa li { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
