/* Xintrax website — one memorable thing: the live one-line diagram in the hero.
   Everything else stays quiet: paper background, ink text, one teal for actions. */
:root {
  --midnight: #0a1220;
  --steel-panel: #131f2e;
  --paper: #f4f6f9;
  --ink: #0f1a2a;
  --steel: #556578;
  --rule: #d6dde6;
  --teal: #0b6a86;       /* actions on light backgrounds (AA on paper) */
  --teal-hover: #08546b;
  --cyan: #22d3ee;       /* brand colour, only on dark */
  --ice: #e6edf5;
  --amber: #e8a317;      /* used only for the alarm moment in the diagram */
  --measure: 62ch;
  --font: "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--teal); text-underline-offset: 0.18em; }
a:hover { color: var(--teal-hover); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--paper); padding: 0.5rem 0.75rem; }

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }

/* ---------- header ---------- */
.site-header {
  background: var(--midnight);
  color: var(--ice);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.1rem; }
.logo { display: flex; align-items: center; gap: 0.7rem; color: var(--ice); text-decoration: none; }
.logo img { width: 34px; height: 34px; }
.logo span { font-weight: 600; letter-spacing: 0.2em; font-variation-settings: "wdth" 112; font-size: 1.05rem; }
.nav { display: flex; align-items: center; gap: 1.6rem; font-size: 0.95rem; }
.nav a { color: #b8c6d6; text-decoration: none; }
.nav a:hover { color: var(--ice); }
.nav .lang { border: 1px solid #2c3d52; border-radius: 6px; padding: 0.2rem 0.55rem; }
@media (max-width: 760px) { .nav .hide-sm { display: none; } }

/* ---------- hero ---------- */
.hero { background: var(--midnight); color: var(--ice); padding-block: 3.5rem 0; overflow: hidden; }
.hero h1 {
  margin: 0;
  max-width: 15ch;
  font-size: clamp(2.6rem, 6.4vw, 5.4rem);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.015em;
  font-variation-settings: "wdth" 118;
}
.hero-lede { max-width: 54ch; margin: 1.4rem 0 0; color: #b8c6d6; font-size: 1.15rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.9rem 1.4rem; align-items: center; margin-top: 2rem; }
.button {
  display: inline-block;
  background: var(--cyan);
  color: var(--midnight);
  font-weight: 600;
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border-radius: 8px;
}
.button:hover { background: #67e3f3; color: var(--midnight); }
.button.on-light { background: var(--teal); color: #fff; }
.button.on-light:hover { background: var(--teal-hover); color: #fff; }
.hero .quiet { color: var(--ice); }

/* the diagram band */
.diagram { margin-top: 3.2rem; border-top: 1px solid #1f2e41; background: linear-gradient(#0b1424, var(--midnight)); }
.diagram figure { margin: 0 auto; padding-block: 2rem 1.6rem; }
.diagram svg { width: 100%; height: auto; }
.diagram figcaption { color: #8fa3b8; font-size: 0.92rem; max-width: 70ch; margin-top: 0.8rem; min-height: 3em; }
.diagram figcaption strong { color: var(--ice); font-weight: 600; }
.diagram figcaption .xin { color: var(--cyan); font-weight: 600; }

/* SVG diagram parts */
.dg-line { stroke: #34506c; stroke-width: 2; fill: none; }
.dg-flow { stroke: var(--cyan); stroke-width: 2; fill: none; stroke-dasharray: 3 14; opacity: 0.75; }
.dg-box { fill: var(--steel-panel); stroke: #2c3d52; stroke-width: 1.2; }
.dg-tag { fill: var(--ice); font: 600 13px var(--font); font-variation-settings: "wdth" 108; }
.dg-sub { fill: #8fa3b8; font: 400 11.5px var(--font); }
.dg-val { fill: var(--cyan); font: 600 13px var(--font); font-variant-numeric: tabular-nums; }
.dg-group { fill: #5f7389; font: 500 11px var(--font); letter-spacing: 0.04em; }
.dg-alarm .dg-box { stroke: var(--amber); }
.dg-alarm #v-upsroom { fill: var(--amber); }
.dg-finder { fill: none; stroke: var(--cyan); stroke-width: 3; stroke-linecap: round; opacity: 0; }
.dg-finder.on { opacity: 1; transition: opacity 300ms ease; }
@media (prefers-reduced-motion: no-preference) {
  .dg-flow { animation: flow 1.6s linear infinite; }
}
@keyframes flow { to { stroke-dashoffset: -17; } }

/* ---------- sections ---------- */
section { padding-block: 5.5rem; }
section + section { border-top: 1px solid var(--rule); }
h2 {
  margin: 0 0 1.2rem;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variation-settings: "wdth" 112;
  max-width: 22ch;
}
h3 { margin: 0 0 0.4rem; font-size: 1.2rem; font-weight: 600; line-height: 1.3; }
p { margin: 0 0 1rem; max-width: var(--measure); }
.lede { font-size: 1.2rem; color: var(--steel); max-width: 58ch; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem 4.5rem; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.reads { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.reads li { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--rule); }
.reads b { font-weight: 600; }
.reads span { color: var(--steel); }
@media (max-width: 520px) { .reads li { grid-template-columns: 1fr; gap: 0.1rem; } }

.gets { columns: 2 16rem; column-gap: 3rem; margin: 2.5rem 0 0; padding: 0; list-style: none; }
.gets li { break-inside: avoid; padding: 0 0 1.4rem; }
.gets h3 { font-size: 1.08rem; }
.gets p { color: var(--steel); margin: 0; }

/* how it works: a real sequence */
.steps { list-style: none; margin: 2.5rem 0 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 1rem; }
.steps li::before {
  content: counter(step);
  display: block;
  font-size: 2.6rem;
  line-height: 1;
  font-weight: 600;
  font-variation-settings: "wdth" 118;
  color: var(--teal);
  margin-bottom: 0.8rem;
}
.steps p { color: var(--steel); margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* safety: the one dark section after the hero */
.safety { background: var(--midnight); color: var(--ice); border-top: 0; }
.safety h2 { color: var(--ice); }
.safety .lede { color: #b8c6d6; }
.safety dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 4rem; margin: 2.5rem 0 0; }
.safety dt { font-weight: 600; font-size: 1.12rem; margin-bottom: 0.35rem; }
.safety dd { margin: 0; color: #b8c6d6; max-width: 48ch; }
.safety .note { margin-top: 2.5rem; color: #8fa3b8; font-size: 0.95rem; }
.safety a { color: var(--cyan); }
@media (max-width: 760px) { .safety dl { grid-template-columns: 1fr; } }
.safety + section { border-top: 0; }

/* industries */
.industries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin-top: 2.5rem; }
.industries > div { border-left: 3px solid var(--teal); padding-left: 1.2rem; }
.industries p { color: var(--steel); margin: 0; }
@media (max-width: 860px) { .industries { grid-template-columns: 1fr; } }

/* packages: a comparison table, not cards */
.table-wrap { overflow-x: auto; margin-top: 2.5rem; }
table.packages { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 0.98rem; }
.packages th, .packages td { text-align: left; padding: 0.8rem 1rem 0.8rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.packages thead th { border-bottom: 2px solid var(--ink); font-size: 1.15rem; font-weight: 600; }
.packages thead th span { display: block; font-size: 0.9rem; font-weight: 400; color: var(--steel); }
.packages td.yes { color: var(--teal); font-weight: 600; }
.packages td.no { color: #a3b0be; }
.addons { margin-top: 1.8rem; color: var(--steel); }
.addons b { color: var(--ink); }

/* demo form */
.demo { background: #e9eef4; }
form.demo-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.4rem; max-width: 760px; margin-top: 2rem; }
.demo-form label { display: grid; gap: 0.35rem; font-weight: 500; font-size: 0.95rem; }
.demo-form .wide { grid-column: 1 / -1; }
.demo-form input, .demo-form select, .demo-form textarea {
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: #fff;
  border: 1px solid #b9c4d1;
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
}
.demo-form textarea { min-height: 7rem; resize: vertical; }
.demo-form .hp { position: absolute; left: -9999px; }
.demo-form button { justify-self: start; border: 0; cursor: pointer; font: inherit; }
.demo-form button[disabled] { opacity: 0.6; cursor: wait; }
.form-status { grid-column: 1 / -1; min-height: 1.6em; margin: 0; font-weight: 500; }
.form-status.ok { color: #0e6b3a; }
.form-status.err { color: #a12a1c; }
.consent { grid-column: 1 / -1; color: var(--steel); font-size: 0.88rem; margin: 0; }
@media (max-width: 640px) { form.demo-form { grid-template-columns: 1fr; } }

/* footer */
.site-footer { background: var(--midnight); color: #8fa3b8; padding-block: 2.5rem; font-size: 0.92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.site-footer a { color: #b8c6d6; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
