/* Utilisys Corp: black, Inter, large two-tone headings, mono badges,
   dark cards. Same look as the original utilisyscorp.com. */
:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: #0c0c0e;
  --surface-2: #141417;
  --surface-3: #1b1b1f;
  --text: #fafafa;
  --muted: #a1a1aa;
  --dim: #52525b;
  --border: #232327;
  --border-2: #2e2e33;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --green: #16a34a;
  --ok: #22c55e;
  --warn: #f59e0b;
  --radius: 14px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); font-weight: 700; letter-spacing: -0.045em; }
.hero > .container > h1 { font-size: clamp(2.6rem, 8vw, 6rem); letter-spacing: -0.05em; }
h2 { font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 700; letter-spacing: -0.035em; }
h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-3); padding: 0.1em 0.35em; border-radius: 4px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .container { padding: 0 32px; } }
.section { padding: 112px 0; }
.section-tight { padding: 56px 0; }
.section.rule { border-top: 1px solid var(--border); }
.center { text-align: center; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 640px; font-weight: 300; }
.center .lead { margin-left: auto; margin-right: auto; }

/* Two-tone heading: second line grey. */
.tone { color: #52525b; display: block; }

/* Small mono badge (EARLY ACCESS PREVIEW, DELTA XML ENGINE, ...). */
.badge, .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: #60a5fa; background: rgba(59, 130, 246, 0.08); border: 1px solid rgba(59, 130, 246, 0.28);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 22px;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #3b82f6; box-shadow: 0 0 8px #3b82f6; }
.badge.green { color: #4ade80; background: rgba(34, 197, 94, 0.08); border-color: rgba(34, 197, 94, 0.3); }
.badge.green::before { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.eyebrow { border-radius: 6px; }

/* ---- header ---- */
#site-header { position: sticky; top: 0; z-index: 50; background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,0.04); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-weight: 700; letter-spacing: 0.06em; color: var(--text); font-size: 1rem; }
.brand:hover { text-decoration: none; }
.brand-light { font-weight: 700; margin-left: 0.5em; }
.brand-mark { width: 26px; height: 26px; border-radius: 6px; background: #2563eb; display: inline-grid; place-items: center; }
.brand-mark::after { content: ""; width: 12px; height: 15px; background: #fff; clip-path: polygon(58% 0, 8% 58%, 46% 58%, 34% 100%, 92% 38%, 54% 38%); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: #d4d4d8; font-weight: 500; font-size: 0.9rem; }
.nav-links a[aria-current="page"], .nav-links a:hover { color: #fff; text-decoration: none; }
.nav-links .btn { color: #000; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border-2); border-radius: 8px; color: var(--text); font-size: 1.1rem; padding: 4px 10px; cursor: pointer; }
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #000; border-bottom: 1px solid var(--border); padding: 8px 16px 16px; }
  .nav-links a { padding: 10px 0; }
  .nav-links .btn { margin-top: 8px; }
  #site-header.open .nav-links { display: flex; }
}

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; border: 1px solid transparent; cursor: pointer; transition: transform .1s ease, background .15s ease, border-color .15s ease; font-family: inherit; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { background: #e4e4e7; }
.btn-ghost, .btn-light { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover, .btn-light:hover { border-color: #52525b; background: rgba(255,255,255,0.04); }
.btn-green { background: var(--green); color: #fff; border-radius: 10px; }
.btn-green:hover { background: #15803d; }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; border-radius: 8px; }
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.center .btn-row { justify-content: center; }

/* ---- hero ---- */
.hero { position: relative; padding: 110px 0 90px; text-align: center; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -20% 0 auto; height: 520px; background: radial-gradient(600px 300px at 50% 30%, rgba(59,130,246,0.10), transparent 70%); pointer-events: none; }
.hero .lead { margin: 0 auto 36px; }
.hero-note { margin-top: 18px; font-size: 0.82rem; color: var(--dim); font-family: var(--mono); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; text-align: left; }
.hero-grid .lead { margin-left: 0; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-sm h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }

/* App window (pipeline, diff, one-line). */
.window { background: #0a0a0b; border: 1px solid var(--border-2); border-radius: 14px; box-shadow: 0 40px 120px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,0.02) inset; overflow: hidden; text-align: left; }
.window-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 0.72rem; color: #71717a; font-family: var(--mono); position: relative; }
.window-bar .title { position: absolute; left: 0; right: 0; text-align: center; pointer-events: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #3f3f46; }
.hero .window { max-width: 900px; margin: 64px auto 0; }

/* Pipeline: IMPORT -> PARSE -> TOPOLOGY -> SOLVE -> VISUALIZE */
.pipeline { padding: 40px 28px 28px; }
.stages { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; margin-bottom: 32px; }
.stages::before { content: ""; position: absolute; top: 22px; left: 10%; right: 10%; height: 2px; background: var(--border-2); }
.stages::after { content: ""; position: absolute; top: 22px; left: 10%; height: 2px; width: 0; background: #3b82f6; box-shadow: 0 0 12px #3b82f6; animation: progress 9s ease-in-out infinite; }
.stage { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; color: #52525b; }
.stage .node { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #0a0a0b; border: 1px solid var(--border-2); color: #52525b; animation: lit 9s ease-in-out infinite; }
.stage .node svg { width: 18px; height: 18px; }
.stage:nth-child(1) .node, .stage:nth-child(1) span { animation-delay: 0s; }
.stage:nth-child(2) .node { animation-delay: 1.6s; }
.stage:nth-child(3) .node { animation-delay: 3.2s; }
.stage:nth-child(4) .node { animation-delay: 4.8s; }
.stage:nth-child(5) .node { animation-delay: 6.4s; }
@keyframes lit {
  0%, 100% { border-color: var(--border-2); color: #52525b; box-shadow: none; }
  8%, 80% { border-color: #3b82f6; color: #93c5fd; box-shadow: 0 0 18px rgba(59,130,246,.45); }
}
@keyframes progress { 0% { width: 0; } 80%, 90% { width: 80%; } 100% { width: 80%; opacity: 0; } }
@media (max-width: 560px) { .stage { font-size: 0.5rem; letter-spacing: 0.04em; } .stage .node { width: 36px; height: 36px; } .stages::before, .stages::after { top: 18px; } }
.syslog { max-width: 520px; margin: 0 auto; background: #050505; border: 1px solid var(--border); border-radius: 10px; font-family: var(--mono); font-size: 0.74rem; overflow: hidden; }
.syslog-head { display: flex; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--border); color: #52525b; font-size: 0.64rem; letter-spacing: 0.1em; }
.syslog-body { padding: 12px; min-height: 120px; color: #60a5fa; }
.syslog-body div { opacity: 0; animation: line 9s steps(1) infinite; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.syslog-body div.ok { color: #4ade80; }
.syslog-body div:nth-child(1) { animation-delay: .2s; }
.syslog-body div:nth-child(2) { animation-delay: 1.6s; }
.syslog-body div:nth-child(3) { animation-delay: 3.2s; }
.syslog-body div:nth-child(4) { animation-delay: 4.8s; }
.syslog-body div:nth-child(5) { animation-delay: 6.4s; }
@keyframes line { 0% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .stage .node, .stages::after, .syslog-body div { animation: none !important; opacity: 1; }
}

/* ---- section heads ---- */
.section-head { margin-bottom: 56px; }
.section-head h2 { margin-bottom: 14px; }
.section-head .lead { margin-left: 0; }
.center.section-head .lead { margin-left: auto; }

/* ---- cards / grids ---- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; transition: border-color .2s ease, background .2s ease; }
.card:hover { border-color: var(--border-2); background: #0f0f11; }
.card h3 { margin-bottom: 0.5em; }
.card p { color: var(--muted); font-size: 0.92rem; font-weight: 300; }
.card p:last-child { margin-bottom: 0; }
.card.big { padding: 36px 32px 44px; }
.card.big h3 { font-size: 1.4rem; margin-top: 28px; }
.step-n { font-family: var(--mono); color: #52525b; font-size: 0.72rem; }
.icon-badge { width: 42px; height: 42px; border-radius: 10px; background: #18181b; border: 1px solid var(--border-2); color: #60a5fa; display: grid; place-items: center; margin-bottom: 18px; font-family: var(--mono); font-size: 0.72rem; font-weight: 700; }
.icon-badge svg { width: 20px; height: 20px; }
.icon-badge.c2 { color: #4ade80; }
.icon-badge.c3 { color: #fb923c; }
.icon-badge.c4 { color: #c084fc; }
.icon-badge.c5 { color: #f472b6; }
.icon-badge.c6 { color: #818cf8; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding-left: 34px; position: relative; margin: 0 0 16px; color: #e4e4e7; font-size: 0.95rem; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid #3f3f46; background: #18181b; }
.checklist li::after { content: ""; position: absolute; left: 7px; top: 7px; width: 6px; height: 9px; border: solid #a1a1aa; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -2px); }
.checklist.green li::before { border-color: rgba(34,197,94,.45); background: rgba(34,197,94,.08); }
.checklist.green li::after { border-color: #4ade80; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 40px; } }
.stack { display: grid; gap: 14px; }
.stack .card { padding: 22px 24px; }
.stack .card:nth-child(odd) { opacity: .62; }
.stack .card:hover { opacity: 1; }
.band { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #030303; }

/* Diff window */
.diff { font-family: var(--mono); font-size: 0.68rem; line-height: 1.75; }
.diff-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
.diff-tabs div { padding: 8px 12px; color: #71717a; font-size: 0.66rem; text-align: center; letter-spacing: 0.08em; }
.diff-tabs div + div { border-left: 1px solid var(--border); }
.diff-cols { display: grid; grid-template-columns: 1fr 1fr; }
.diff-cols > div + div { border-left: 1px solid var(--border); }
.diff-line { display: flex; padding: 0 10px 0 0; color: #a1a1aa; white-space: pre; overflow: hidden; }
.diff-line i { flex: 0 0 30px; font-style: normal; color: #3f3f46; text-align: right; padding-right: 10px; }
.diff-line.del { background: rgba(239,68,68,.16); color: #fca5a5; }
.diff-line.add { background: rgba(34,197,94,.15); color: #86efac; }
.diff-line .k { color: #60a5fa; }
.diff-line .v { color: #fbbf24; }

/* CTA card */
.cta { position: relative; background: radial-gradient(700px 300px at 50% 0%, rgba(59,130,246,.10), transparent 70%), linear-gradient(180deg, #0e0e10, #070708); border: 1px solid var(--border-2); border-radius: 24px; padding: 72px 28px 40px; text-align: center; overflow: hidden; }
.cta h2 { max-width: 640px; margin: 0 auto 18px; }
.cta .lead { margin: 0 auto 36px; }
.cta-strip { margin-top: 48px; display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em; color: #52525b; text-transform: uppercase; }

/* Closing hero + footer wordmark */
.closing { padding: 120px 0 100px; text-align: center; border-top: 1px solid var(--border); }
.closing .lead { margin: 0 auto 32px; }
.wordmark { font-weight: 900; font-size: clamp(2.4rem, 11.5vw, 9.5rem); letter-spacing: -0.04em; line-height: .8; text-align: center; color: transparent; background: linear-gradient(180deg, #1c1c1f, #050505); -webkit-background-clip: text; background-clip: text; user-select: none; margin-top: 56px; white-space: nowrap; overflow: hidden; }

/* ---- FAQ ---- */
.faq { max-width: 760px; margin: 0 auto; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
details { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0; }
.faq details:last-child { border-bottom: none; }
details:not(.faq details) { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 600; font-size: 0.95rem; padding: 18px 22px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: #71717a; font-weight: 400; transition: transform .2s ease; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0; padding: 0 22px 20px; color: var(--muted); font-size: 0.92rem; font-weight: 300; }

/* ---- forms ---- */
form .field { margin-bottom: 16px; }
label { display: block; font-weight: 500; font-size: 0.86rem; margin-bottom: 6px; color: #d4d4d8; }
input[type=text], input[type=email], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border-2);
  background: #09090b; color: var(--text); font: inherit;
}
input::placeholder, textarea::placeholder { color: #52525b; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(59,130,246,.45); border-color: #3b82f6; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 0.86rem; color: var(--muted); }
.check input { margin-top: 4px; accent-color: #3b82f6; }
.form-msg { margin-top: 10px; font-size: 0.9rem; }
.form-msg.error { color: #f87171; }
.form-msg.ok { color: var(--ok); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- download / releases ---- */
.release-card { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
.release-card .app-icon { width: 72px; height: 72px; }
.version-pill { display: inline-block; font-family: var(--mono); font-size: 0.76rem; background: var(--accent-soft); color: #93c5fd; border: 1px solid rgba(59,130,246,.3); padding: 2px 10px; border-radius: 999px; font-weight: 600; }
.meta { color: var(--muted); font-size: 0.88rem; }
.post { border-bottom: 1px solid var(--border); padding: 36px 0; }
.post:last-child { border-bottom: none; }
.post h2 { font-size: 1.6rem; margin-bottom: 0.25em; }
.change-list { padding-left: 1.2em; color: #d4d4d8; }
.change-list li { margin-bottom: 8px; }
.tag { display: inline-block; font-family: var(--mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; padding: 1px 7px; border-radius: 5px; margin-right: 6px; background: var(--surface-3); color: var(--muted); }
.tag.feat { background: rgba(34,197,94,.12); color: #4ade80; }
.tag.fix { background: rgba(245,158,11,.12); color: #fbbf24; }
.older table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.older th, .older td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--border); }
.older th { color: var(--muted); font-weight: 500; font-size: 0.8rem; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--border-2), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; height: 1em; }
@keyframes sk { to { background-position: -200% 0; } }
.notice { border: 1px solid var(--border-2); background: var(--surface-2); border-radius: 10px; padding: 12px 16px; font-size: 0.9rem; color: var(--muted); }

/* ---- admin ---- */
.stat { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.table-wrap th, .table-wrap td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.table-wrap th { background: var(--surface-2); font-weight: 600; position: sticky; top: 0; color: var(--muted); }
.bars { display: grid; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 40px; gap: 10px; align-items: center; font-size: 0.84rem; }
.bar { height: 10px; background: #3b82f6; border-radius: 5px; }

/* ---- consent ---- */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 620px; margin: 0 auto; background: #0c0c0e; border: 1px solid var(--border-2); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.7); padding: 16px 18px; z-index: 100; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.consent p { margin: 0; font-size: 0.86rem; color: var(--muted); flex: 1 1 280px; }
.consent a { color: #fff; text-decoration: underline; }
.consent-actions { display: flex; gap: 8px; }

/* ---- footer ---- */
#site-footer { border-top: 1px solid var(--border); padding: 64px 0 0; overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.footer-grid p { font-size: 0.86rem; max-width: 260px; margin-top: 14px; }
.footer-grid h4 { font-size: 0.9rem; color: #fff; margin: 0 0 14px; font-weight: 600; }
.footer-grid a:not(.brand) { display: block; color: #71717a; font-size: 0.88rem; margin-bottom: 10px; }
.footer-grid a:not(.brand):hover { color: #fff; text-decoration: none; }
.footer-bottom { text-align: center; padding: 18px 0 28px; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: #3f3f46; }
#site-footer .wordmark { margin-top: 48px; border-top: 1px solid var(--border); padding-top: 40px; }

/* ---- inner pages ---- */
.page-head { padding: 96px 0 40px; }
.page-head h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.prose { max-width: 760px; color: #d4d4d8; }
.prose h2 { font-size: 1.4rem; margin-top: 1.8em; letter-spacing: -0.02em; }
.prose ul { padding-left: 1.2em; }
.prose a { text-decoration: underline; }
