/* c.css — Direction C "Structured": developer-enterprise, grid-driven, mono labels, sharp — Latvian red #9D2235 */

/* Desktop shell scale. On :root, not .c-root, which would shadow it. */
:root { --shell-max: 1140px; --pad-x: 48px; }
@media (min-width: 1440px) { :root { --shell-max: 1280px; --pad-x: 56px; } }
@media (min-width: 1680px) { :root { --shell-max: 1360px; --pad-x: 64px; } }
@media (min-width: 1920px) { :root { --shell-max: 1440px; --pad-x: 72px; } }

.c-root {
  --blue: #9D2235; --blue-d: #7A1A29; --blue-t: #FBECEE;
  --ink: #0A0A0B; --ink-2: #2D3138; --muted: #626974;
  --bg: #FCFCFD; --paper: #FFFFFF; --line: #E3E4E8; --line-2: #EDEEF1;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  color: var(--ink); background: var(--bg); width: 100%;
  -webkit-font-smoothing: antialiased; line-height: 1.6;
}
.c-root *, .c-root *::before, .c-root *::after { box-sizing: border-box; }
/* Skip link: off-screen until focused, then pinned over the nav. */
.c-skip { position: absolute; left: -9999px; }
.c-skip:focus { left: var(--pad-x); top: 12px; z-index: 100; background: #0A0A0B; color: #fff; padding: 12px 20px; font-family: "IBM Plex Mono",monospace; font-size: 13px; }

/* Keyboard focus ring. :where() zeroes the selector list so only
   :focus-visible carries weight and components keep their own cue.
   The offset holds the ring clear of filled buttons. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #0A0A0B; outline-offset: 3px; border-radius: 0; }
.c-wrap { max-width: var(--shell-max); margin: 0 auto; padding-inline: 0; border-inline: 1px solid var(--line); }
.c-pad { padding-inline: var(--pad-x); }
.c-root h1,.c-root h2,.c-root h3 { margin: 0; font-family: "Space Grotesk", sans-serif; font-weight: 600; letter-spacing: -.02em; line-height: 1.05; }
.c-root p { margin: 0; }
.c-root a { color: inherit; text-decoration: none; }
.c-mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.c-lbl { font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); font-weight: 500; }

.c-shell { max-width: var(--shell-max); margin: 0 auto; overflow-x: clip; }
.c-nav { display: flex; align-items: center; justify-content: space-between; padding: 18px var(--pad-x); border-bottom: 1px solid var(--line); background: var(--bg); position: relative; }
.c-logo { display: flex; align-items: center; gap: 12px; font-family: "Space Grotesk",sans-serif; font-weight: 600; font-size: 19px; letter-spacing: -.02em; }
.c-mark { width: 38px; height: 38px; flex: none; color: var(--blue); display: grid; place-items: center; }
.c-mark svg { display: block; }
.c-logo .c-brandwrap { display: flex; flex-direction: column; line-height: 1.1; max-width: 240px; }
.c-logo .c-brandwrap .co { font-family: "Space Grotesk",sans-serif; font-weight: 600; font-size: 17px; letter-spacing: -.01em; color: var(--ink); }
.c-logo .c-brandwrap .struct { font-family: "IBM Plex Mono",monospace; font-weight: 400; font-size: 12px; letter-spacing: .04em; color: var(--muted); margin-top: 3px; white-space: normal; }
.c-navlinks { display: flex; gap: 30px; }
.c-navlinks a { font-family: "IBM Plex Mono",monospace; font-size: 13px; color: var(--ink-2); letter-spacing: .02em; }
.c-navlinks a:hover { color: var(--blue); }
.c-nav-r { display: flex; align-items: center; gap: 8px; }
.c-navmenu { display: flex; align-items: center; }
.c-burger { display: none; flex-direction: column; gap: 5px;
  width: 42px; height: 42px; padding: 11px; background: none;
  border: 1px solid var(--line); cursor: pointer; }
.c-burger span { display: block; height: 2px; background: var(--ink);
  transition: transform .2s ease, opacity .2s ease; }
body.nav-open .c-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg); }
body.nav-open .c-burger span:nth-child(2) { opacity: 0; }
body.nav-open .c-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg); }

/* hero */
.c-hero { border-bottom: 1px solid var(--line); position: relative; background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px); background-size: 56px 56px; background-position: -1px -1px; }
.c-hero-in { padding: 60px var(--pad-x) 54px; max-width: none; display: grid; grid-template-columns: 1.06fr .82fr; gap: 52px; align-items: center; }
.c-hero-l { min-width: 0; }
.c-hero .idx { display: flex; gap: 16px; align-items: center; }
.c-hero h1 { font-size: clamp(48px, 4.2vw, 72px); line-height: 1.02; margin-top: 24px; letter-spacing: -.035em; }
.c-hero h1 .ac { color: var(--blue); }
.c-hero .sub { margin-top: 24px; font-size: 18px; color: var(--ink-2); max-width: 34em; }
.c-hero .cta { margin-top: 22px; display: flex; flex-direction: column; align-items: stretch; gap: 12px; }

/* hero CTA system — high-conviction primary */
.cta-block { margin-top: 34px; }
.c-cta-lead { display: flex; align-items: center; gap: 11px; margin: 0 0 12px; font-family: "IBM Plex Mono",monospace; font-size: 13px; letter-spacing: .015em; color: var(--muted); }
.c-cta-lead .st { width: 8px; height: 8px; background: var(--blue); position: relative; flex: none; }
.c-cta-lead .st::after { content: ""; position: absolute; inset: 0; background: var(--blue); transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .c-cta-lead .st::after { animation: ctaping 2.6s ease-out infinite; }
}
@keyframes ctaping { 0% { opacity: .55; transform: scale(1); } 70%,100% { opacity: 0; transform: scale(2.6); } }
.c-strip { display: flex; border-top: 1px solid var(--line); }
.c-strip .si { flex: 1; padding: 18px 24px; border-right: 1px solid var(--line); font-family: "IBM Plex Mono",monospace; font-size: 12.5px; color: var(--ink-2); letter-spacing: .03em; }
.c-strip .si:last-child { border-right: 0; }
.c-strip .si b { display: block; color: var(--ink); font-weight: 600; font-size: 13px; margin-bottom: 3px; }

/* ---- C blueprint systems diagram ---- */
.c-hero-r { min-width: 0; }
.c-bp { border: 1px solid var(--line); background: var(--paper); }
.c-bp-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-bottom: 1px solid var(--line); font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.c-bp-head .l { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.c-bp-head .l .gd { width: 6px; height: 6px; background: var(--blue); }
.c-bp-svg { display: block; width: 100%; height: auto; }
.cbp-frame { fill: none; stroke: var(--line); stroke-width: 1; }
.cbp-grid { stroke: rgba(157,34,53,.06); stroke-width: 1; }
.cbp-box { fill: var(--paper); stroke: #D9DADF; stroke-width: 1.1; }
.cbp-box.lit { stroke: var(--blue); }
.cbp-title { fill: var(--ink); font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 13.5px; letter-spacing: -.01em; }
.cbp-sub { fill: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .12em; }
.cbp-idx { fill: var(--blue); font-family: "IBM Plex Mono", monospace; font-size: 9px; letter-spacing: .04em; }
.cbp-ic { color: #7E7F86; }
.cbp-ic.lit { color: var(--blue); }
.cbp-conn { stroke: #CFD0D6; stroke-width: 1.2; fill: none; }
.cbp-flow { stroke: var(--blue); stroke-width: 1.2; fill: none; stroke-dasharray: 3 6; opacity: .6; }
.cbp-tick { stroke: #CFD0D6; stroke-width: 1; }
.cbp-tracer { fill: var(--blue); }
.cbp-edge { fill: none; stroke: var(--blue); stroke-width: 2; stroke-dasharray: 46 554; stroke-dashoffset: 0; opacity: 0; stroke-linecap: round; filter: drop-shadow(0 0 2.5px rgba(157,34,53,.55)); }
@media (prefers-reduced-motion: no-preference) {
  .cbp-flow { animation: cbpflow 1.4s linear infinite; }
  .cbp-tracer { animation: cbptrace 4.2s linear infinite; }
  .cbp-edge { animation: cbpedge 4.2s linear infinite; }
  .cbp-edge.e0 { animation-delay: .20s; } .cbp-edge.e1 { animation-delay: .98s; }
  .cbp-edge.e2 { animation-delay: 1.76s; } .cbp-edge.e3 { animation-delay: 2.55s; }
  .cbp-edge.e4 { animation-delay: 3.33s; }
}
@keyframes cbpflow { to { stroke-dashoffset: -18; } }
@keyframes cbptrace { 0% { transform: translateY(0); opacity: 0; } 5% { opacity: 1; } 95% { opacity: 1; } 100% { transform: translateY(450px); opacity: 0; } }
@keyframes cbpedge {
  0% { opacity: 0; stroke-dashoffset: 0; }
  2% { opacity: 1; }
  16% { stroke-dashoffset: -600; opacity: 1; }
  21% { opacity: 0; stroke-dashoffset: -600; }
  100% { opacity: 0; stroke-dashoffset: -600; }
}

.c-sec { border-bottom: 1px solid var(--line); }
.c-sec-head { padding: var(--pad-x); display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.c-sec-head h2 { font-size: clamp(28px, 2.4vw, 38px); margin-top: 14px; }
.c-sec-head .sh-r { font-family: "IBM Plex Mono",monospace; font-size: 12px; color: var(--muted); letter-spacing: .1em; white-space: nowrap; }

/* services — editorial intro */
.c-intro { padding: 78px var(--pad-x) 54px; border-bottom: 1px solid var(--line); }
.c-intro-meta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 26px; margin-bottom: 38px; border-bottom: 1px solid var(--line-2); }
.c-intro-meta .sh-r { font-family: "IBM Plex Mono",monospace; font-size: 12px; color: var(--muted); letter-spacing: .1em; white-space: nowrap; }
.c-intro-meta .c-lbl { white-space: nowrap; }
.c-intro-h { font-family: "Space Grotesk",sans-serif; font-weight: 600; font-size: clamp(30px, 2.9vw, 44px); letter-spacing: -.032em; line-height: 1.04; max-width: 19ch; }
.c-intro-h .ac { color: var(--blue); }
.c-intro-sub { margin-top: 24px; font-size: 18px; line-height: 1.62; color: var(--ink-2); max-width: 56ch; }

/* services — premium consulting cards */
.c-svc-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; padding: 40px var(--pad-x) 48px; }
.c-svc { position: relative; display: flex; flex-direction: column; padding: 32px 30px 30px; border: 1px solid var(--line); background: var(--paper); transition: border-color .2s ease, transform .28s ease, box-shadow .28s ease; }
.c-svc::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.c-svc:hover { border-color: #C7C8CE; transform: translateY(-4px); box-shadow: 0 18px 38px -28px rgba(10,10,11,.45); }
.c-svc:hover::before { transform: scaleX(1); }
.c-svc-top { display: flex; align-items: flex-start; justify-content: space-between; }
.c-svc-ic { width: 58px; height: 58px; flex: none; border: 1px solid #EAD9DC; background: var(--blue-t); color: var(--blue); display: grid; place-items: center; transition: background .24s ease, color .24s ease, border-color .24s ease; }
.c-svc-ic svg { width: 28px; height: 28px; }
.c-svc:hover .c-svc-ic { background: var(--blue); color: #fff; border-color: var(--blue); }
.c-svc-ix { font-family: "IBM Plex Mono",monospace; font-size: 12px; letter-spacing: .14em; color: var(--muted); padding-top: 4px; }
.c-svc h2 { font-size: 22px; margin-top: 28px; letter-spacing: -.02em; }
.c-svc-cb { margin-top: 12px; margin-bottom: 18px; font-size: 14.5px; color: var(--ink-2); line-height: 1.62; }
.c-svc-cap { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--line); font-family: "IBM Plex Mono",monospace; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.c-list { margin: 6px 0 0; padding: 0; list-style: none; }
.c-list li { padding: 10px 0; border-top: 1px solid var(--line-2); font-family: "IBM Plex Mono",monospace; font-size: 12.5px; color: var(--ink); letter-spacing: .01em; display: flex; align-items: center; gap: 11px; transition: color .18s ease; }
.c-list li:first-of-type { border-top: 0; }
.c-list li::before { content: ""; width: 5px; height: 5px; flex: none; background: var(--blue); transition: transform .18s ease; }
.c-svc:hover .c-list li::before { transform: rotate(45deg); }

/* featured */
.c-work { display: grid; grid-template-columns: 1.05fr 1fr; }
.c-work-l { padding: var(--pad-x); border-right: 1px solid var(--line); }
.c-work-l .wt { display: flex; gap: 8px; }
.c-work-l :is(h2,h3) { font-size: 32px; margin-top: 20px; }
.c-work-l .ws { margin-top: 16px; font-size: 15.5px; color: var(--ink-2); line-height: 1.6; max-width: 42ch; }
.c-wbul { margin: 24px 0 0; padding: 0; list-style: none; }
.c-wbul li { padding: 12px 0; border-top: 1px solid var(--line-2); font-size: 14px; color: var(--ink-2); display: flex; gap: 12px; }
.c-wbul li .n { font-family: "IBM Plex Mono",monospace; color: var(--blue); font-size: 12px; }
.c-wtags { margin-top: 24px; display: flex; gap: 8px; flex-wrap: wrap; }
.c-tag { font-family: "IBM Plex Mono",monospace; font-size: 12px; padding: 5px 11px; border: 1px solid var(--line); color: var(--ink-2); letter-spacing: .02em; white-space: nowrap; }
.c-work-r { padding: var(--pad-x); background: var(--bg); display: flex; align-items: center; background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px); background-size: 40px 40px; }
.c-calc { display: block; width: 100%; background: var(--paper);
  border: 1px solid var(--ink); color: inherit;
  transition: transform .24s ease, box-shadow .24s ease; }
.c-calc:hover { transform: translateY(-3px);
  box-shadow: 0 18px 38px -28px rgba(10,10,11,.5); }
.c-calc-h { padding: 14px 18px; border-bottom: 1px solid var(--line); font-family: "IBM Plex Mono",monospace; font-size: 12.5px; letter-spacing: .04em; display: flex; align-items: center; justify-content: space-between; }
.c-calc-h .tr { color: var(--blue); }
.c-calc-b { padding: 20px; }
.c-fld { margin-bottom: 16px; }
.c-fld .fl { font-family: "IBM Plex Mono",monospace; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; letter-spacing: .03em; }
.c-fld .fl b { color: var(--ink); font-weight: 600; }
.c-track { height: 5px; background: var(--line); margin-top: 9px; position: relative; }
.c-track .fill { position: absolute; height: 100%; background: var(--blue); }
.c-result { margin-top: 20px; padding: 16px 18px; border: 1px solid var(--blue); background: var(--blue-t); display: flex; align-items: baseline; justify-content: space-between; }
.c-result .rl { font-family: "IBM Plex Mono",monospace; font-size: 11.5px; color: var(--blue-d); letter-spacing: .04em; }
.c-result .rv { font-family: "Space Grotesk",sans-serif; font-size: 27px; font-weight: 600; color: var(--blue-d); letter-spacing: -.02em; }
/* The card's final row is the Primary button variant; o-buttons.css
   carries its geometry, fill and arrow. Only the seam against the
   panel above it belongs here. */
.c-calc-open { border-top: 1px solid var(--line); }
.c-calc:hover .c-calc-open { background: var(--blue-d); }

/* writing — engineering publication */
.c-posts { }
.c-post { display: grid; grid-template-columns: 64px 1fr auto; gap: 36px; padding: 24px var(--pad-x); border-bottom: 1px solid var(--line-2); align-items: start; transition: background .22s ease; cursor: pointer; text-decoration: none; color: inherit; }
.c-post:last-child { border-bottom: 0; }
.c-post:hover { background: var(--paper); }
.c-post:hover .c-post-no { color: var(--blue); }
.c-post:hover :is(h2,h3) { color: var(--blue); }
.c-post:hover .ar { transform: translate(4px,-4px); color: var(--blue); }
.c-post-no { font-family: "IBM Plex Mono",monospace; font-size: 12px; color: var(--muted); letter-spacing: .04em; padding-top: 7px; transition: color .2s ease; }
.c-post-meta { display: flex; align-items: center; gap: 14px; }
.c-post-meta .pt { font-family: "IBM Plex Mono",monospace; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); border: 1px solid #EAD9DC; background: var(--blue-t); padding: 4px 10px; white-space: nowrap; }
.c-post-meta .pd { font-family: "IBM Plex Mono",monospace; font-size: 12px; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.c-post-meta .dot { width: 3px; height: 3px; background: #8A8C94; border-radius: 50%; }
.c-post-body { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.c-post :is(h2,h3) { font-size: 16px; font-weight: 500; line-height: 1.3; margin-top: 10px; letter-spacing: -.018em; max-width: 38ch; transition: color .2s ease; }
/* Excerpt capped at three lines. -webkit-line-clamp needs the box to
   stay -webkit-box, so the gap above comes from the flex parent rather
   than a margin here. */
.c-post .pe { font-size: 13px; line-height: 1.6; color: var(--muted); max-width: 62ch; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.c-post-foot { margin-top: 18px; display: flex; align-items: center; gap: 9px; font-family: "IBM Plex Mono",monospace; font-size: 12px; letter-spacing: .04em; color: var(--ink); white-space: nowrap; }
.c-post-foot .rl { color: var(--blue); }
.c-post .ar { color: #8A8C94; transition: transform .24s cubic-bezier(.2,.7,.2,1), color .2s ease; padding-top: 6px; }

/* contact */
.c-cta { padding: 0; border-bottom: 1px solid var(--line); position: relative; background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px); background-size: 56px 56px; }
.c-cta-grid { display: grid; grid-template-columns: 1.1fr .9fr; }
.c-cta-l { padding: 72px var(--pad-x); border-right: 1px solid var(--line); }
.c-cta-l h2 { font-size: 44px; margin-top: 16px; letter-spacing: -.03em; line-height: 1.05; }
.c-cta-l h2 .ac { color: var(--blue); }
.c-cta-intro { margin-top: 20px; font-size: 16.5px; color: var(--ink-2); line-height: 1.62; max-width: 42ch; }
.c-cta-actions { margin-top: 32px; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.c-cta-note { font-family: "IBM Plex Mono",monospace; font-size: 12px; color: var(--muted); letter-spacing: .02em; }
/* Calculator side-door line on the contact page (contact_full) */
.c-calc-line { margin-top: 14px; font-size: 14.5px; color: var(--muted); max-width: 46ch; line-height: 1.6; }
.c-calc-line a { color: var(--blue); font-family: "IBM Plex Mono",monospace; font-size: 13px; text-decoration: none; white-space: nowrap; }
.c-calc-line a:hover { text-decoration: underline; }
.c-cta-r { padding: 72px var(--pad-x); background: rgba(255,255,255,.5); display: flex; flex-direction: column; }
.c-facts { border: 1px solid var(--line); background: var(--paper); }
.c-fact { padding: 20px 22px; border-bottom: 1px solid var(--line-2); }
.c-fact:last-child { border-bottom: 0; }
.c-fact .fk { font-family: "IBM Plex Mono",monospace; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.c-fact .fv { margin-top: 8px; font-size: 15px; color: var(--ink); line-height: 1.45; }
.c-fact .fv.avail { display: flex; align-items: center; gap: 10px; font-family: "Space Grotesk",sans-serif; font-weight: 600; }
.c-fact .fdot { width: 9px; height: 9px; background: #2E9E6B; position: relative; flex: none; }
.c-fact .fdot::after { content: ""; position: absolute; inset: 0; background: #2E9E6B; }
@media (prefers-reduced-motion: no-preference) { .c-fact .fdot::after { animation: cfping 2.6s ease-out infinite; } }
@keyframes cfping { 0% { opacity: .6; transform: scale(1); } 70%,100% { opacity: 0; transform: scale(2.6); } }
.c-fact .fv.focus { font-size: 14px; color: var(--ink-2); }

/* founder profile */
.c-founder { border-bottom: 1px solid var(--line); }
.c-founder-in { display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; padding: 34px var(--pad-x); }
.c-founder-photo { width: 88px; height: 88px; flex: none; border: 1px solid var(--line); filter: grayscale(1) contrast(1.04); background: var(--bg-2); }
.c-founder-id { min-width: 0; }
.c-founder-id .nm { font-family: "Space Grotesk",sans-serif; font-weight: 600; font-size: 20px; letter-spacing: -.015em; color: var(--ink); }
.c-founder-id .rl { margin-top: 5px; font-family: "IBM Plex Mono",monospace; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.c-founder-id .rl .loc { color: var(--muted); letter-spacing: .1em; white-space: nowrap; }
.c-founder-id .rl .sep { width: 3px; height: 3px; background: #8A8C94; border-radius: 50%; flex: none; }
.c-founder-id .bio { margin-top: 12px; font-size: 14.5px; line-height: 1.58; color: var(--ink-2); max-width: 64ch; }
.c-founder-sig { font-family: "IBM Plex Mono",monospace; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); white-space: nowrap; align-self: start; padding-top: 4px; }
