/* DiataxIA — site styles. One accent (#FF5A36) on ink (#0f172a). Space Grotesk + Inter, self-hosted. */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0f172a;
  --ink-2: #1e293b;
  --slate: #334155;
  --muted: #64748b;
  --muted-on-soft: #475569;
  --muted-on-ink: #94a3b8;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --line-ink: #2a364b;
  --soft: #f6f7f9;
  --paper: #ffffff;
  --light: #f1f5f9;
  --accent: #ff5a36;
  --head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, sans-serif;
  --wrap: 1180px;
  --gut: 20px;
  --r: 3px;
}
@media (min-width: 768px) { :root { --gut: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--ink); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--slate);
  background: var(--paper);
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--head); color: var(--ink); margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
[id] { scroll-margin-top: 24px; }

.wrap { max-width: calc(var(--wrap) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--ink); padding: 10px 14px; font-weight: 600; z-index: 10; }
.skip:focus { left: 8px; }

/* ------------------------------------------------------------ header */
.top { background: var(--ink); color: var(--light); }
.top .wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 28px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--light); margin-right: auto; }
.brand svg { width: 34px; height: 34px; }
.brand .wm { font-family: var(--head); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; }
.wm b { color: var(--accent); font-weight: inherit; }
.menu-btn { display: none; }
.nav ul { display: flex; flex-wrap: wrap; gap: 4px 22px; align-items: center; }
.nav a { text-decoration: none; font-size: 0.95rem; color: #cbd5e1; padding: 6px 0; display: inline-block; }
.nav a:hover { color: #fff; }
.nav .lang a { border: 1px solid #475569; border-radius: var(--r); padding: 4px 10px; font-family: var(--head); font-weight: 500; color: var(--light); }
.nav .lang a:hover { border-color: var(--accent); }
@media (max-width: 899px) {
  .js .menu-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid #475569; color: var(--light); font: 500 0.95rem var(--head); padding: 8px 12px; border-radius: var(--r); cursor: pointer; }
  .js .nav { display: none; flex-basis: 100%; }
  .js .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: flex-start; gap: 0; padding-top: 8px; }
  .nav li { width: 100%; border-top: 1px solid var(--line-ink); }
  .nav a { padding: 12px 0; width: 100%; font-size: 1rem; }
  .nav .lang { padding: 12px 0 4px; }
  .nav .lang a { width: auto; padding: 6px 12px; }
}

/* ------------------------------------------------------------ buttons */
.btn { display: inline-block; font: 600 1rem var(--head); text-decoration: none; padding: 14px 22px; border-radius: var(--r); border: 1px solid transparent; line-height: 1.2; }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: #ff6f4f; }
.btn-line { border-color: #475569; color: var(--light); }
.btn-line:hover { border-color: var(--light); }
.btn-ink { background: var(--ink); color: var(--light); }
.btn-ink:hover { background: var(--ink-2); }

/* ------------------------------------------------------------ hero */
.hero { background: var(--ink); color: var(--light); padding: 48px 0 0; }
.hero h1 { color: #fff; font-size: clamp(2.5rem, 7.2vw, 5.25rem); line-height: 1; letter-spacing: -0.035em; font-weight: 600; max-width: 15ch; }
.hero .lead { margin-top: 28px; font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.5; color: #cbd5e1; max-width: 46ch; }
.hero .acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.field { margin-top: 56px; }
.field svg { width: 100%; height: auto; overflow: visible; color: #dbe3ee; }
.piece.a { color: var(--accent); }
.f-wide { display: none; }
@media (min-width: 700px) { .f-wide { display: block; } .f-narrow { display: none; } }
.piece { fill: currentColor; transform-box: fill-box; transform-origin: center; transform: var(--t); }
@media (prefers-reduced-motion: no-preference) {
  /* Load animation, disorder to order: every piece is painted scattered from the first frame (fill-mode
     backwards, so the settled layout never flashes), then the columns settle left to right, the accent one last. */
  .piece { animation: settle 1.1s var(--d) cubic-bezier(0.3, 0.7, 0.2, 1) backwards; }
  @keyframes settle { from { transform: var(--f); } }
}
.promises { border-top: 1px solid var(--line-ink); margin-top: 48px; display: grid; grid-template-columns: 1fr 1fr; }
.promises li { padding: 18px 0; font: 500 0.98rem var(--head); color: var(--light); border-bottom: 1px solid var(--line-ink); padding-right: 12px; }
@media (min-width: 900px) {
  .hero { padding-top: 72px; }
  .promises { grid-template-columns: repeat(4, 1fr); }
  .promises li { border-bottom: 0; padding: 22px 16px 26px 0; }
}
@media (max-width: 420px) { .hero .btn { width: 100%; text-align: center; } }

/* ------------------------------------------------------------ sections */
.sec { padding: 72px 0; }
.sec.soft { background: var(--soft); }
.sec.dark { background: var(--ink); color: #cbd5e1; }
.sec.dark h2, .sec.dark h3, .sec.dark h4 { color: #fff; }
@media (min-width: 900px) { .sec { padding: 104px 0; } }

.kick { display: flex; align-items: center; gap: 10px; font: 500 0.98rem var(--head); color: var(--muted-on-soft); margin-bottom: 18px; }
.dark .kick { color: var(--muted-on-ink); }
.kick i { width: 11px; height: 11px; border-radius: 2px; background: var(--accent); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .kick i { transform: rotate(28deg) translateY(-3px); background: var(--line-2); transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.7s; }
  .js .dark .kick i { background: #475569; }
  .js .seen .kick i { transform: none; background: var(--accent); }
}
h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); line-height: 1.06; letter-spacing: -0.028em; max-width: 21ch; }
.head .lead { margin-top: 22px; font-size: 1.125rem; max-width: 64ch; }
.head { margin-bottom: 48px; }
@media (min-width: 900px) { .head { margin-bottom: 64px; } }
@media (min-width: 1000px) {
  .head { display: grid; grid-template-columns: 1fr 1fr; gap: 0 64px; align-items: end; }
  .head .kick { grid-column: 1 / -1; }
  .head .lead { margin-top: 0; padding-bottom: 6px; }
}
h4 { font-size: 1.08rem; line-height: 1.3; letter-spacing: -0.005em; }
.items h4 + p { margin-top: 6px; }
h3 { font-size: 1.1875rem; line-height: 1.25; letter-spacing: -0.01em; }
.sub { margin-top: 72px; }
.sub > h3:first-child, .h3-lg { font-size: clamp(1.4rem, 2.4vw, 1.8rem); letter-spacing: -0.02em; line-height: 1.15; }
.sub > h3:first-child + p { margin-top: 12px; max-width: 64ch; }
.note { margin-top: 32px; padding: 18px 20px; border-left: 3px solid var(--accent); background: var(--soft); color: var(--slate); max-width: 78ch; font-size: 1rem; }
.soft .note { background: #fff; }
.dark .note { background: var(--ink-2); color: #dbe3ee; }

/* grid of plain items separated by hairlines */
.items { display: grid; gap: 0 40px; grid-template-columns: 1fr; }
.items > * { border-top: 1px solid var(--line-2); padding: 20px 0 24px; }
.dark .items > * { border-top-color: #3b4a63; }
.items h3 + p, .items dt + dd { margin-top: 8px; }
.items p, .items dd { font-size: 1rem; }
.items dt { font: 600 1.1rem var(--head); color: var(--ink); }
.dark .items dt { color: #fff; }
@media (min-width: 640px) { .items.c2, .items.c3, .items.c4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .items.c3 { grid-template-columns: repeat(3, 1fr); } .items.c4 { grid-template-columns: repeat(4, 1fr); } }

/* ------------------------------------------------------------ how it works */
.flow { display: grid; gap: 0; counter-reset: s; margin-bottom: 64px; }
.flow li { counter-increment: s; position: relative; padding: 0 0 26px 52px; }
.flow li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: var(--r); background: var(--ink); color: #fff; font: 600 0.95rem/32px var(--head); text-align: center; }
.flow li:last-child::before { background: var(--accent); color: var(--ink); }
.flow li::after { content: ""; position: absolute; left: 15px; top: 38px; bottom: 6px; width: 2px; background: var(--line-2); }
.flow li:last-child::after { display: none; }
.flow strong { display: block; font: 600 1.125rem var(--head); color: var(--ink); padding-top: 3px; }
.flow span { display: block; font-size: 0.95rem; color: var(--muted-on-soft); margin-top: 2px; }
@media (min-width: 720px) {
  .flow { grid-template-columns: repeat(5, 1fr); }
  .flow li { padding: 50px 20px 0 0; }
  .flow li::after { left: 40px; right: 8px; top: 15px; bottom: auto; width: auto; height: 2px; }
}

/* ------------------------------------------------------------ services */
.steps { display: grid; gap: 16px; }
.steps li { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--ink); border-radius: var(--r); padding: 26px 24px 28px; }
.steps .n { font: 600 0.95rem var(--head); color: var(--muted-on-soft); }
.steps h3 { font-size: 1.5rem; margin: 6px 0 12px; letter-spacing: -0.02em; }
.steps p { font-size: 1rem; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.ask { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
.ask p { max-width: 52ch; }

/* ------------------------------------------------------------ sectors and roles */
.markets { display: grid; gap: 48px; }
@media (min-width: 900px) { .markets { grid-template-columns: 1fr 1fr; gap: 64px; } }
.market h3 { font-size: 1.6rem; letter-spacing: -0.02em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.market h3 span { font-size: 1rem; font-weight: 500; color: var(--muted); white-space: nowrap; letter-spacing: 0; }
.market > p { margin: 10px 0 20px; font-size: 0.98rem; color: var(--muted); min-height: 3.2em; }
.rows li { border-top: 1px solid var(--line); padding: 13px 0; display: grid; gap: 2px; }
.rows li:last-child { border-bottom: 1px solid var(--line); }
.rows strong { font: 600 1.05rem var(--head); color: var(--ink); }
.rows span { font-size: 0.95rem; color: var(--muted); }
.common { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 760px) { .common { grid-template-columns: 1fr 1fr; gap: 20px; } }
.common li { background: var(--ink); color: #cbd5e1; border-left: 3px solid var(--accent); border-radius: var(--r); padding: 20px 22px 22px; font-size: 1rem; }
.common em { font: 500 0.85rem var(--head); font-style: normal; color: var(--muted-on-ink); display: block; }
.common strong { font: 600 1.15rem var(--head); color: #fff; display: block; margin: 2px 0 8px; }
.ticks { display: grid; gap: 0 40px; margin-top: 20px; }
.ticks li { position: relative; padding: 10px 0 10px 22px; border-top: 1px solid var(--line); font-size: 1rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 1.12em; width: 9px; height: 9px; border-radius: 2px; background: var(--accent); }
@media (min-width: 760px) { .ticks { grid-template-columns: 1fr 1fr; } }
.dark .ticks li { border-top-color: #3b4a63; }

/* ------------------------------------------------------------ engines */
.engines { display: grid; gap: 16px; }
@media (min-width: 760px) { .engines { grid-template-columns: 1fr 1fr; gap: 20px; } }
.engine { border: 1px solid #3b4a63; border-radius: var(--r); padding: 24px; background: transparent; transition: border-color 0.25s, background-color 0.25s; }
.engine h4 { font-size: 1.75rem; letter-spacing: -0.02em; }
.engine p { margin-top: 8px; font-size: 1rem; }
.engine .state { font: 500 0.85rem var(--head); color: var(--muted-on-ink); margin-top: 16px; min-height: 1.4em; }
.engine.on { border-color: var(--accent); background: var(--ink-2); }
.engine.on .state { color: var(--accent); }
.switch { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 20px; }
.switch[hidden] { display: none; }
.switch span { font-size: 0.95rem; color: var(--muted-on-ink); margin-right: 4px; }
.switch button { font: 500 0.95rem ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace; background: transparent; color: var(--light); border: 1px solid #475569; border-radius: var(--r); padding: 9px 14px; cursor: pointer; }
.switch button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--ink); font-weight: 600; }
.eng-note { margin-top: 20px; max-width: 70ch; }
.layers { display: grid; gap: 0 40px; }
@media (min-width: 760px) { .layers { grid-template-columns: 1fr 1fr; } }
.layer { border-top: 1px solid #3b4a63; padding: 22px 0 26px; }
.layer h4 { font-size: 1.15rem; margin-bottom: 12px; }
.layer li { padding: 6px 0; font-size: 0.98rem; color: var(--muted-on-ink); }
.layer li strong { color: var(--light); font-weight: 600; }

/* ------------------------------------------------------------ connectors */
.cgroup { border-top: 2px solid var(--ink); padding-top: 24px; margin-top: 56px; }
.cgroup:first-of-type { margin-top: 0; }
.cgroup-head { display: grid; gap: 8px 40px; margin-bottom: 24px; }
@media (min-width: 900px) { .cgroup-head { grid-template-columns: 1fr 1.4fr; align-items: baseline; } }
.cgroup-head h3 { font-size: 1.5rem; letter-spacing: -0.02em; }
.cgroup-head p { color: var(--muted); font-size: 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { border: 1px solid var(--line-2); border-radius: var(--r); padding: 7px 12px; font-size: 0.95rem; color: var(--ink); background: #fff; }

/* ------------------------------------------------------------ where it runs */
.opts { display: grid; gap: 16px; }
@media (min-width: 900px) { .opts { grid-template-columns: 1fr 1fr; gap: 20px; } }
.opt { border: 1px solid var(--line-2); border-radius: var(--r); padding: 28px 26px; background: #fff; display: grid; grid-template-columns: auto 1fr; gap: 0 18px; align-content: start; }
.opt .l { font: 600 2.6rem/1 var(--head); color: var(--accent); }
.opt h3 { font-size: 1.5rem; letter-spacing: -0.02em; align-self: center; }
.opt p, .opt ul { grid-column: 1 / -1; }
.opt p { margin-top: 16px; font-size: 1rem; }
.opt .ticks { grid-template-columns: 1fr; margin-top: 16px; }
.opt .ticks li { font-size: 0.97rem; padding: 8px 0 8px 22px; }

/* ------------------------------------------------------------ case */
.case-grid { display: grid; gap: 48px; }
@media (min-width: 900px) { .case-grid { grid-template-columns: 1.1fr 1fr; gap: 72px; } }
.stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #3b4a63; margin-bottom: 56px; }
.stats div { padding: 20px 12px 20px 0; border-bottom: 1px solid #3b4a63; }
.stats dt { font: 600 clamp(2rem, 4vw, 2.75rem)/1 var(--head); color: var(--accent); letter-spacing: -0.03em; }
.stats dd { font-size: 0.95rem; margin-top: 6px; color: #cbd5e1; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.tl li { display: grid; grid-template-columns: 6.2rem 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid #3b4a63; font-size: 1rem; }
.tl b { font: 600 0.95rem var(--head); color: #fff; padding-top: 2px; }
.case-grid h3 { margin-bottom: 14px; font-size: 1.3rem; }
blockquote { margin: 56px 0 0; padding: 0 0 0 22px; border-left: 3px solid var(--accent); font: 500 clamp(1.4rem, 2.8vw, 2.1rem)/1.2 var(--head); letter-spacing: -0.02em; color: #fff; max-width: 28ch; }
.small { font-size: 0.9rem; color: var(--muted-on-ink); margin-top: 20px; }

/* ------------------------------------------------------------ contact */
.contact { background: var(--accent); color: var(--ink); padding: 80px 0; }
.contact :focus-visible { outline-color: var(--ink); }
.contact h2 { font-size: clamp(2.6rem, 8vw, 5.5rem); letter-spacing: -0.04em; line-height: 0.98; max-width: none; }
.contact .lead { margin-top: 22px; font-size: 1.2rem; max-width: 44ch; color: var(--ink); }
.ways { margin-top: 40px; display: grid; gap: 0; border-top: 2px solid var(--ink); }
.ways div { padding: 18px 0; border-bottom: 1px solid rgba(15, 23, 42, 0.35); display: grid; gap: 2px; }
.ways dt { font: 500 0.95rem var(--head); }
.ways dd a { font: 600 clamp(1.35rem, 3.4vw, 2rem) var(--head); letter-spacing: -0.02em; text-decoration: none; overflow-wrap: anywhere; }
.ways dd a:hover { text-decoration: underline; text-underline-offset: 5px; }
.contact .for { margin-top: 32px; max-width: 62ch; font-size: 1rem; }
@media (min-width: 900px) {
  .contact { padding: 128px 0; }
  .ways { grid-template-columns: 1fr 1fr; gap: 0 40px; }
}

/* ------------------------------------------------------------ footer */
.foot { background: var(--ink); color: var(--muted-on-ink); padding: 48px 0 40px; font-size: 0.95rem; }
.foot .wrap { display: grid; gap: 28px; }
.foot .brand { margin: 0 0 10px; color: var(--light); }
.foot nav ul { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { color: #cbd5e1; text-underline-offset: 3px; }
.foot a:hover { color: #fff; }
@media (min-width: 900px) { .foot .wrap { grid-template-columns: 1fr auto; align-items: end; } }

/* ------------------------------------------------------------ legal and 404 */
.doc { padding: 56px 0 96px; }
.doc .wrap { max-width: calc(760px + 2 * var(--gut)); }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); letter-spacing: -0.03em; line-height: 1.05; }
.doc .upd { color: var(--muted); margin-top: 12px; font-size: 0.95rem; }
.doc h2 { font-size: 1.45rem; letter-spacing: -0.015em; margin: 44px 0 12px; max-width: none; }
.doc p, .doc ul { margin-top: 12px; }
.doc ul { list-style: square; padding-left: 22px; }
.doc li { margin-top: 6px; }
.doc li::marker { color: var(--accent); }
.doc a { text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.doc mark { background: #ffe7e0; color: var(--ink); padding: 1px 5px; border-radius: 2px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.92em; }
.nf { background: var(--ink); color: var(--light); min-height: 70vh; padding: 72px 0 96px; }
.nf h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: -0.035em; line-height: 1; max-width: 16ch; }
.nf p { margin-top: 22px; max-width: 50ch; color: #cbd5e1; }
.nf .acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.nf svg { width: 120px; height: 120px; color: #dbe3ee; margin-bottom: 32px; }

/* ------------------------------------------------------------ third-party logos (monochrome, decorative) */
.lg { display: inline-block; flex: none; opacity: 0.82; }
.lg-wide { object-fit: cover; }
.dark .lg { filter: invert(1); opacity: 0.92; }
.lgs { display: flex; gap: 10px; height: 26px; margin-bottom: 14px; }
.tags li { display: inline-flex; align-items: center; gap: 8px; }
.engine h4 { display: flex; align-items: center; gap: 12px; }
.layer li { display: flex; gap: 10px; align-items: flex-start; }
.layer li .lg { margin-top: 3px; }
@media (max-width: 639px) { .lgs:empty { display: none; } }

/* ------------------------------------------------------------ authenticator card (security) */
.auth { display: flex; gap: 20px; align-items: flex-start; background: var(--ink); color: #cbd5e1; border-left: 3px solid var(--accent); border-radius: var(--r); padding: 26px 28px; margin-top: 16px; max-width: 78ch; }
.auth .lg { filter: invert(1); opacity: 0.95; margin-top: 2px; }
.auth h3 { color: #fff; font-size: 1.3rem; letter-spacing: -0.015em; margin-bottom: 8px; }
.auth p { font-size: 1rem; }
@media (max-width: 480px) { .auth { flex-direction: column; gap: 12px; padding: 22px 20px; } }
