/* SYSDASIS public site: graphite base, amber accent. */
:root {
  --bg: #070b10;
  --bg-2: #0a1017;
  --panel: #0d141c;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --ink: #e9eff6;
  --soft: #b4c0ce;
  --muted: #7f8c9c;
  /* Accent: change these five values to recolour the whole site (the hero animation reads them too). */
  --accent: #ffb44a;
  --accent-rgb: 255, 180, 74;
  --accent-2: #ff7a59;
  --accent-2-rgb: 255, 122, 89;
  --accent-light: #ffe6bf;
  --accent-deep: #2a1b08;
  --on-accent: #2a1400;
  --grad: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
::selection { background: rgba(var(--accent-rgb), 0.3); }
.wrap { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
h1, h2, h3 { font-family: "Space Grotesk", "Inter", sans-serif; margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: normal; }

/* ---------- header ---------- */
header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s;
}
header.scrolled {
  background: rgba(7, 11, 16, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand svg { width: 30px; height: 30px; }
.brand strong { font-family: "Space Grotesk", sans-serif; font-size: 16px; letter-spacing: 0.2em; font-weight: 600; }
nav { display: flex; align-items: center; gap: 34px; font-size: 14px; color: var(--soft); }
nav a { position: relative; transition: color 0.25s; }
nav a:not(.cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease);
}
nav a:hover { color: var(--ink); }
nav a:not(.cta):hover::after { transform: scaleX(1); }
nav a.cta {
  color: var(--ink); padding: 9px 16px; border: 1px solid var(--line-2); border-radius: 999px;
  transition: border-color 0.25s, background 0.25s;
}
nav a.cta:hover { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.08); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(100vh, 980px); min-height: min(100svh, 980px); display: flex; align-items: center; isolation: isolate; }
#net {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1;
  -webkit-mask-image: linear-gradient(#000 60%, transparent 100%); mask-image: linear-gradient(#000 60%, transparent 100%);
}
.hero::before {
  content: ""; position: absolute; z-index: -2; inset: 0;
  background:
    radial-gradient(60% 50% at 78% 28%, rgba(var(--accent-rgb), 0.13), transparent 70%),
    radial-gradient(50% 45% at 12% 80%, rgba(96, 110, 255, 0.1), transparent 70%);
}
.hero-inner { padding: 120px 0 96px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent);
}
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: ping 2.4s infinite; }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}
.hero h1 { margin-top: 26px; font-size: clamp(44px, 7.6vw, 104px); line-height: 0.98; letter-spacing: -0.035em; font-weight: 600; }
.hero h1 .ln { display: block; overflow: hidden; padding-bottom: 0.2em; margin-bottom: -0.14em; }
.hero h1 .ln > span { display: inline-block; transform: translateY(110%); animation: rise 1.1s var(--ease) forwards; }
.hero h1 .ln:nth-child(2) > span { animation-delay: 0.12s; }
@keyframes rise { to { transform: none; } }
.hero p.lead {
  margin: 30px 0 0; max-width: 39rem; font-size: clamp(17px, 1.5vw, 20px); color: var(--soft);
  opacity: 0; animation: fade 1s 0.45s var(--ease) forwards;
}
.actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; opacity: 0; animation: fade 1s 0.6s var(--ease) forwards; }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 999px;
  font-weight: 500; font-size: 15px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s, background 0.3s;
}
.btn svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn.primary { background: var(--grad); color: var(--on-accent); font-weight: 600; box-shadow: 0 10px 40px -12px rgba(var(--accent-rgb), 0.6); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -12px rgba(var(--accent-rgb), 0.8); }
.btn.ghost { border: 1px solid var(--line-2); color: var(--ink); }
.btn.ghost:hover { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.06); }
.scroll-cue {
  position: absolute; left: 50%; bottom: 30px; width: 22px; height: 36px; margin-left: -11px;
  border: 1px solid var(--line-2); border-radius: 12px; opacity: 0.7;
}
.scroll-cue::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px;
  border-radius: 2px; background: var(--accent); animation: cue 2s infinite var(--ease);
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(13px); } }

/* ---------- marquee ---------- */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); overflow: hidden; padding: 18px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.track { display: flex; width: max-content; animation: slide 46s linear infinite; }
.track span {
  display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; font-size: 13px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.track span::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: 0.7; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
section { position: relative; }
.pad { padding: clamp(80px, 11vw, 140px) 0; }
.kicker { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
.head { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: end; margin-bottom: 56px; }
.head h2 { margin-top: 16px; font-size: clamp(32px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 600; }
.head p { margin: 0; color: var(--soft); font-size: 17px; max-width: 30rem; justify-self: end; }

/* services */
.grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
}
.card { position: relative; background: var(--bg); padding: 30px 26px 32px; min-height: 250px; overflow: hidden; transition: background 0.4s; }
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.13), transparent 60%);
}
.card:hover { background: var(--panel); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; }
.card .n { font-size: 12px; color: var(--muted); letter-spacing: 0.1em; }
.card .ico {
  width: 44px; height: 44px; margin: 22px 0 20px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--line-2); color: var(--accent); background: rgba(var(--accent-rgb), 0.05);
  transition: transform 0.5s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.card:hover .ico { transform: translateY(-4px); border-color: rgba(var(--accent-rgb), 0.5); box-shadow: 0 10px 30px -10px rgba(var(--accent-rgb), 0.5); }
.card .ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.card p { margin: 10px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; transition: color 0.4s; }
.card:hover p { color: var(--soft); }

/* linked-data feature */
.feature { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.split h2 { margin-top: 16px; font-size: clamp(30px, 4vw, 50px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 600; }
.split p { color: var(--soft); font-size: 17px; margin: 22px 0 0; max-width: 32rem; }
.graph { width: 100%; height: auto; display: block; }
.graph .e { stroke: rgba(255, 255, 255, 0.16); stroke-width: 1.2; fill: none; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease); }
.graph .e.hot { stroke: var(--accent); stroke-opacity: 0.75; stroke-width: 1.8; }
.graph .nd { fill: var(--bg-2); stroke: rgba(255, 255, 255, 0.35); stroke-width: 1.4; transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform 0.7s var(--ease); }
.graph .nd.hot { stroke: var(--accent); fill: var(--accent-deep); }
.graph .lbl { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em; fill: var(--muted); opacity: 0; transition: opacity 0.8s 1s; text-transform: uppercase; }
.graph .core { fill: var(--accent); transform-box: fill-box; transform-origin: center; animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.35); opacity: 0.75; } }
.graph .dot { fill: var(--accent-light); opacity: 0; transition: opacity 0.6s 1.4s; }
.in .graph .e { stroke-dashoffset: 0; }
.in .graph .nd { transform: scale(1); }
.in .graph .lbl, .in .graph .dot { opacity: 1; }

/* approach */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 21px; height: 1px; background: var(--line); }
.steps::after {
  content: ""; position: absolute; left: 0; top: 21px; height: 1px; width: 100%; background: var(--grad);
  transform: scaleX(0); transform-origin: left; transition: transform 2s 0.2s var(--ease);
}
.steps.in::after { transform: scaleX(1); }
.step .b {
  position: relative; z-index: 1; width: 43px; height: 43px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--line-2); font-size: 12px; color: var(--accent);
}
.step h3 { margin-top: 24px; font-size: 21px; font-weight: 600; }
.step p { margin: 10px 0 0; color: var(--muted); font-size: 15px; }

/* contact */
.cta-box {
  position: relative; border-radius: 28px; padding: clamp(40px, 7vw, 88px); text-align: center; overflow: hidden;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(130deg, rgba(var(--accent-rgb), 0.7), rgba(255, 255, 255, 0.06) 40%, rgba(var(--accent-2-rgb), 0.6)) border-box;
}
.cta-box::before {
  content: ""; position: absolute; width: 620px; height: 620px; left: 50%; top: -420px; margin-left: -310px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.22), transparent); animation: drift 9s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(60px, 40px) scale(1.15); } }
.cta-box > * { position: relative; }
.cta-box h2 { margin: 16px auto 0; max-width: 24ch; font-size: clamp(32px, 5vw, 62px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 600; }
.cta-box p { margin: 22px auto 0; max-width: 34rem; color: var(--soft); font-size: 17px; }
.cta-box .btn { margin-top: 36px; }

/* footer */
footer { border-top: 1px solid var(--line); padding: 30px 0 38px; color: var(--muted); font-size: 13px; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot a { transition: color 0.25s, opacity 0.25s; }
.foot a:hover { color: var(--ink); }
.foot .links { display: flex; gap: 22px; align-items: center; }
.foot .quiet { opacity: 0.4; }
.foot .quiet:hover { opacity: 1; }

/* legal pages */
.legal { width: min(760px, calc(100% - 48px)); margin: 0 auto; padding: 130px 0 90px; }
.legal h1 { margin-top: 14px; font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.03em; line-height: 1.05; font-weight: 600; }
.legal h2 { margin-top: 40px; font-size: 20px; font-weight: 600; }
.legal p { color: var(--soft); margin: 12px 0 0; }
.legal p a { color: var(--accent); border-bottom: 1px solid rgba(var(--accent-rgb), 0.4); }

/* reveal on scroll (only when JS is running) */
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.js .rv.in { opacity: 1; transform: none; }

@media (max-width: 1020px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .head, .split { grid-template-columns: 1fr; }
  .head p { justify-self: start; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 44px; }
  .steps::before, .steps::after { display: none; }
}
@media (max-width: 620px) {
  .wrap { width: calc(100% - 40px); }
  nav a:not(.cta) { display: none; }
  .grid, .steps { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .hero-inner { padding: 110px 0 90px; }
  .foot { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero h1 .ln > span { transform: none; }
  .hero p.lead, .actions { opacity: 1; }
  .js .rv { opacity: 1; transform: none; }
  .graph .e { stroke-dashoffset: 0; }
  .graph .nd { transform: scale(1); }
  .graph .lbl, .graph .dot { opacity: 1; }
  .steps::after { transform: scaleX(1); }
}

/* ---------- discreet portal link (lock icon in the header) ---------- */
.portal-link {
  display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-left: -14px;
  border-radius: 8px; color: rgba(156, 163, 175, 0.32); transition: color 0.18s ease, background 0.18s ease;
}
.portal-link:hover, .portal-link:focus-visible { color: rgba(229, 231, 235, 0.85); background: rgba(255, 255, 255, 0.06); }
nav a.portal-link::after { display: none; }

/* ---------- contact popup ---------- */
dialog#contact-dialog {
  width: min(480px, calc(100% - 32px)); padding: 0; border: 1px solid transparent; border-radius: 24px; color: var(--ink);
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(140deg, rgba(var(--accent-rgb), 0.7), rgba(255, 255, 255, 0.08) 45%, rgba(var(--accent-2-rgb), 0.5)) border-box;
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.8);
}
dialog#contact-dialog[open] { animation: pop 0.45s var(--ease); }
dialog#contact-dialog::backdrop {
  background: rgba(4, 7, 11, 0.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: dim 0.3s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(0.97); } }
@keyframes dim { from { opacity: 0; } }
.dlg { position: relative; padding: 34px 34px 28px; }
.dlg h2 { margin-top: 18px; font-size: 28px; letter-spacing: -0.02em; line-height: 1.15; font-weight: 600; }
.dlg p { margin: 10px 0 0; color: var(--soft); font-size: 15px; }
.dlg p strong { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.dlg [data-step]:not([hidden]) { animation: fade 0.5s var(--ease); }
.dlg-x {
  position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer;
  border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--muted); transition: color 0.2s, border-color 0.2s;
}
.dlg-x:hover { color: var(--ink); border-color: var(--line-2); }
.dlg-x svg { width: 14px; height: 14px; }
.dlg-progress { display: flex; gap: 6px; margin-top: 16px; }
.dlg-progress i { height: 3px; flex: 1; border-radius: 3px; background: var(--line-2); transition: background 0.4s; }
.dlg-progress i.on { background: var(--grad); }
.dlg label { display: block; margin-top: 20px; font-size: 13px; color: var(--muted); }
.dlg input, .dlg textarea {
  display: block; width: 100%; margin-top: 8px; padding: 13px 14px; border-radius: 12px; font: inherit; font-size: 16px;
  color: var(--ink); background: var(--bg); border: 1px solid var(--line-2); outline: none; resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.dlg input:focus, .dlg textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.14); }
.dlg input.code { font-family: "JetBrains Mono", monospace; font-size: 26px; letter-spacing: 0.5em; text-align: center; padding-left: 0.5em; }
.dlg input.code::placeholder { color: rgba(255, 255, 255, 0.14); }
.dlg .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.dlg .btn { margin-top: 24px; width: 100%; justify-content: center; border: 0; cursor: pointer; font-family: inherit; }
.dlg .btn.ghost { border: 1px solid var(--line-2); background: none; }
.dlg .btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.dlg-link { display: block; margin: 14px auto 0; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.dlg-link:hover { color: var(--ink); }
.dlg .dlg-status { min-height: 1.4em; margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.dlg .dlg-status.bad { color: #ff8f8f; }
@media (max-width: 620px) {
  .dlg { padding: 28px 22px 22px; }
  nav a.portal-link { display: flex; }
  .portal-link { margin-left: -6px; }
}
