/* =========================================================================
   Cortex IT Solutions — styles.css (v2, "night blueprint")
   Tokens → base → header → section shell + spine → hero → pillars →
   services → products → practice → contact → motion → responsive.
   Rationale and contrast table: DESIGN.md (v2).
   ========================================================================= */

/* ---- Fonts (self-hosted, latin subset) --------------------------------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public-sans-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("/fonts/space-mono-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* ---- Tokens ------------------------------------------------------------ */
:root {
  --bg: #0a1120;
  --panel: #0e182b;
  --card: #132038;
  --card-hi: #182842;
  --text: #e6edf5;
  --text-2: #a7b4c6;
  --text-3: #8a9bb2;
  --cyan: #7cc4e8;
  --amber: #ffb067;
  --violet: #b9a8ff;
  --teal: #5fd4c0;
  --on-amber: #1a1206;

  --line: rgba(148, 178, 214, 0.14);
  --line-hi: rgba(148, 178, 214, 0.28);

  --font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --rail: 4.5rem;
  --wrap: 76rem;
  --page-pad: clamp(1rem, 4vw, 2.5rem);
  --section-gap: clamp(4.5rem, 8vw, 7.5rem);

  --radius: 10px;
  --radius-lg: 16px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---- Base -------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; margin: 0; }
p { margin: 0; }
a { color: var(--cyan); text-underline-offset: 3px; }
ul, ol { margin: 0; padding: 0; }

::selection { background: var(--amber); color: var(--on-amber); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  background: var(--amber);
  color: var(--on-amber);
  padding: 0.6rem 0.9rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0.75rem; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1.1rem;
}
.eyebrow-idx { color: var(--amber); }

.display { letter-spacing: -0.02em; }
h2.display {
  font-size: clamp(1.85rem, 1.3rem + 2.2vw, 2.75rem);
  max-width: 22ch;
}

.lead {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.2rem);
  color: var(--text-2);
  max-width: 62ch;
  margin-top: 1.25rem;
}

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.8rem 1.35rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--amber);
  color: var(--on-amber);
  box-shadow: 0 6px 24px -8px rgba(255, 176, 103, 0.55);
}
.btn--primary:hover { background: #ffc085; box-shadow: 0 8px 30px -8px rgba(255, 176, 103, 0.7); }
.btn--ghost {
  color: var(--text);
  border-color: var(--line-hi);
  background: rgba(19, 32, 56, 0.5);
}
.btn--ghost:hover { border-color: var(--cyan); color: #fff; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---- Header ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-header.is-stuck {
  background: rgba(10, 17, 32, 0.78);
  backdrop-filter: saturate(1.3) blur(12px);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  border-bottom-color: var(--line);
}
.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0.8rem var(--page-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}
/* logo mark: a three-node lineage graph, same drawing as the favicon */
.wordmark-mark { width: 24px; height: 24px; flex: none; overflow: visible; }
.wordmark-mark path { fill: none; stroke: var(--cyan); stroke-width: 1.6; opacity: 0.7; }
.wordmark-mark .m-a { fill: var(--text); }
.wordmark-mark .m-b { fill: var(--amber); filter: drop-shadow(0 0 4px rgba(255, 176, 103, 0.6)); }
.wordmark-mark .m-c { fill: var(--cyan); }
.wordmark-rest { color: var(--text-2); font-weight: 500; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 2.5vw, 1.75rem);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}
.site-nav a {
  position: relative;
  color: var(--text-2);
  text-decoration: none;
  padding: 0.35rem 0;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.site-nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.site-nav a:hover,
.site-nav a.is-active { color: var(--text); }
.site-nav a.is-active::after { transform: scaleX(1); }
.site-nav .nav-cta {
  color: var(--text);
  border: 1px solid var(--line-hi);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  background: rgba(19, 32, 56, 0.6);
}
.site-nav .nav-cta:hover,
.site-nav .nav-cta.is-active { border-color: var(--amber); color: #fff; }

/* ---- Section shell (full-bleed, content centred by padding) ------------ */
.section {
  position: relative;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  column-gap: clamp(0.5rem, 2vw, 1.75rem);
  padding-block: var(--section-gap);
  padding-inline: max(var(--page-pad), calc((100% - var(--wrap)) / 2));
}
.section--band {
  background: linear-gradient(180deg, var(--panel), #0c1628);
  border-block: 1px solid var(--line);
}
.content { grid-column: 2; min-width: 0; }

/* lineage spine */
.rail { position: relative; grid-column: 1; }
.rail-line {
  position: absolute;
  top: calc(var(--section-gap) * -1);
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: calc(100% + var(--section-gap) * 2);
  overflow: visible;
}
/* the spine starts at the first node, not above the page */
.section--home .rail-line { top: 0; height: calc(100% + var(--section-gap)); }
.rail-line line {
  stroke: var(--cyan);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  opacity: 0.35;
}
.rail-node {
  position: absolute;
  top: -0.15rem;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
}
.node-glyph { width: 40px; height: 40px; overflow: visible; }
.node-glyph .branch {
  stroke: var(--cyan);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  opacity: 0.5;
}
.node-glyph .sq {
  fill: var(--bg);
  stroke: var(--cyan);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  transition: fill 0.3s var(--ease), stroke 0.3s var(--ease);
}
.section--band .node-glyph .sq { fill: var(--panel); }
.rail-num {
  position: absolute;
  top: 2.75rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-3);
  letter-spacing: 0.08em;
}
.section.is-active .node-glyph .sq { fill: var(--amber); stroke: var(--amber); }
.section.is-active .rail-num { color: var(--amber); }

/* ---- Hero -------------------------------------------------------------- */
.section--home {
  isolation: isolate;
  padding-top: clamp(3rem, 6vw, 5.5rem);
}
/* atmosphere: blueprint grid + two soft light fields, faded out downward */
.section--home::before {
  content: "";
  position: absolute;
  inset: -6rem 0 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38rem 26rem at 78% 18%, rgba(124, 196, 232, 0.16), transparent 70%),
    radial-gradient(30rem 22rem at 12% 8%, rgba(255, 176, 103, 0.1), transparent 70%),
    linear-gradient(rgba(148, 178, 214, 0.07) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(148, 178, 214, 0.07) 1px, transparent 1px) 0 0 / 48px 48px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 92%);
  mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 92%);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}
h1.display {
  font-weight: 700;
  font-size: clamp(2.3rem, 1.4rem + 3.4vw, 3.9rem);
  line-height: 1.04;
  background: linear-gradient(180deg, #ffffff 30%, #c9d7e8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* window chrome shared by console + mockups */
.win-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-3);
}
.win-dots { display: inline-flex; gap: 5px; flex: none; }
.win-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(148, 178, 214, 0.25); }
.win-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-status {
  margin-left: auto;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.win-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
}

.console {
  margin: 0;
  position: relative;
  background: linear-gradient(180deg, rgba(24, 40, 66, 0.92), rgba(15, 26, 46, 0.95));
  border: 1px solid var(--line-hi);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(124, 196, 232, 0.05) inset;
  overflow: hidden;
}
.dag { display: block; width: 100%; height: auto; padding: 1rem 0.9rem 0.25rem; }
.dag-edges path { fill: none; stroke: rgba(124, 196, 232, 0.35); stroke-width: 1.5; }
.dag-flow path {
  fill: none;
  stroke: var(--amber);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 3 16;
  opacity: 0.9;
}
.dag-nodes rect { fill: var(--card); stroke: rgba(124, 196, 232, 0.4); stroke-width: 1; }
.dag-nodes text {
  fill: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  text-anchor: middle;
  dominant-baseline: middle;
}
.dag-nodes .n-bronze rect { stroke: #d39a6a; }
.dag-nodes .n-silver rect { stroke: #b8c6d8; }
.dag-nodes .n-gold rect { stroke: #f2c46b; }
.dag-nodes .n-ai rect { stroke: var(--violet); }

.runlog {
  list-style: none;
  padding: 0.5rem 1rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.9;
  color: var(--text-2);
}
.runlog li { display: flex; gap: 0.7rem; white-space: nowrap; overflow: hidden; }
.runlog .t { color: var(--text-3); }
.runlog .ok { color: var(--teal); }
.runlog .run { color: var(--amber); }
.runlog .k { color: var(--text); min-width: 3.6rem; }
.runlog .m { overflow: hidden; text-overflow: ellipsis; }
.console-cap,
.mock-cap {
  position: absolute;
  right: 0.85rem;
  bottom: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  opacity: 0.8;
}

/* stack strip */
.stack {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: clamp(2.75rem, 5vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.stack-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.stack-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.stack-list li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-2);
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(19, 32, 56, 0.55);
}

/* ---- Pillars ----------------------------------------------------------- */
.pillars {
  list-style: none;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.pillar {
  position: relative;
  padding: 1.5rem 1.35rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(24, 40, 66, 0.7), rgba(19, 32, 56, 0.35));
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), background 0.25s var(--ease);
}
.pillar:hover {
  border-color: rgba(124, 196, 232, 0.4);
  transform: translateY(-3px);
}
.pillar-ico {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pillar-idx {
  position: absolute;
  top: 1.5rem;
  right: 1.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--amber);
}
.pillar-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1rem 0 0.55rem;
  letter-spacing: -0.01em;
}
.pillar p { color: var(--text-2); font-size: 0.95rem; }

/* ---- Services (ledger) ------------------------------------------------- */
.services {
  list-style: none;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line-hi);
}
.service {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
  padding: clamp(1.75rem, 4vw, 2.5rem) 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.25s var(--ease);
}
.service-head { display: flex; gap: clamp(1rem, 2vw, 1.5rem); align-items: baseline; }
.service-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--cyan), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.service-title { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; }
.service-summary { color: var(--text-2); margin-top: 0.4rem; font-size: 0.975rem; }
.deliverables { list-style: none; align-self: center; }
.deliverables li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.5rem;
  font-size: 0.95rem;
  color: var(--text-2);
  border-bottom: 1px dashed var(--line);
}
.deliverables li:last-child { border-bottom: 0; }
.deliverables li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--amber);
  font-family: var(--font-mono);
}

/* ---- Products ---------------------------------------------------------- */
.product {
  --tint: var(--teal);
  --tint-soft: rgba(95, 212, 192, 0.1);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(40rem 20rem at 100% 0%, var(--tint-soft), transparent 70%),
    linear-gradient(180deg, rgba(19, 32, 56, 0.75), rgba(14, 24, 43, 0.6));
  overflow: hidden;
}
.product--invoicing { --tint: var(--amber); --tint-soft: rgba(255, 176, 103, 0.1); }
.product--web { --tint: var(--violet); --tint-soft: rgba(185, 168, 255, 0.11); }
.product--flip .product-copy { order: 2; }
.product--flip { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
.product--flip {
  background:
    radial-gradient(40rem 20rem at 0% 0%, var(--tint-soft), transparent 70%),
    linear-gradient(180deg, rgba(19, 32, 56, 0.75), rgba(14, 24, 43, 0.6));
}

.product-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--tint);
  padding: 0.3rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--tint) 35%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--tint) 8%, transparent);
}
.product-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tint);
  box-shadow: 0 0 8px var(--tint);
}
.product-name {
  font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-top: 1rem;
}
.product-tagline {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
  margin-top: 0.5rem;
}
.product-body { color: var(--text-2); margin-top: 1rem; font-size: 0.98rem; }
.product-features { list-style: none; margin-top: 1.25rem; display: grid; gap: 0.5rem; }
.product-features li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.94rem;
  color: var(--text-2);
}
.product-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tint) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 50%, transparent);
}
.product-features li::after {
  content: "";
  position: absolute;
  left: 0.31rem;
  top: calc(0.35em + 0.24rem);
  width: 0.28rem;
  height: 0.46rem;
  border: solid var(--tint);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.btn--product {
  margin-top: 1.6rem;
  color: var(--text);
  border-color: color-mix(in srgb, var(--tint) 45%, transparent);
  background: color-mix(in srgb, var(--tint) 10%, transparent);
}
.btn--product::after { content: "→"; transition: transform 0.2s var(--ease); }
.btn--product:hover { border-color: var(--tint); background: color-mix(in srgb, var(--tint) 18%, transparent); }
.btn--product:hover::after { transform: translateX(3px); }

/* mock shell */
.mock {
  position: relative;
  margin: 0;
  background: linear-gradient(180deg, var(--card-hi), var(--card));
  border: 1px solid var(--line-hi);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.75);
  overflow: hidden;
  padding-bottom: 1.6rem;
}
.mk-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.45rem;
}

/* RoleFit mock */
.rf {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem;
  padding: 1rem;
}
.rf-jd {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 17, 32, 0.45);
}
.rf-role { font-family: var(--font-display); font-weight: 600; font-size: 1rem; margin-bottom: 0.75rem; }
.rf-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 1rem; }
.rf-tags li {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--teal);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(95, 212, 192, 0.1);
}
.rf-count { font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1; color: var(--text); }
.rf-list { list-style: none; display: grid; gap: 0.45rem; margin-bottom: 1rem; }
.rf-list li {
  display: grid;
  grid-template-columns: 6.4rem minmax(0, 1fr) 1.6rem;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-2);
}
.rf-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf-bar { height: 6px; border-radius: 3px; background: rgba(148, 178, 214, 0.14); overflow: hidden; }
.rf-bar i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(95, 212, 192, 0.55), var(--teal));
  transform-origin: left;
}
.rf-s { color: var(--teal); text-align: right; }
.rf-second { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.rf-second li {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-2);
  padding: 0.2rem 0.5rem;
  border: 1px dashed var(--line-hi);
  border-radius: 4px;
}

/* Invoice mock */
.inv { padding: 1rem; }
.inv-fields { display: grid; gap: 0.6rem; margin-bottom: 1rem; }
.inv-field {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
}
.inv-field .mk-label { margin: 0; }
.inv-select,
.inv-num {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text);
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line-hi);
  border-radius: 6px;
  background: rgba(10, 17, 32, 0.5);
  white-space: nowrap;
  overflow: hidden;
}
.inv-select b { margin-left: auto; color: var(--text-3); font-weight: 400; }
.inv-select .lock { font-size: 0.7rem; }
.inv-num { font-family: var(--font-mono); color: var(--amber); border-color: rgba(255, 176, 103, 0.35); }
.inv-num em { margin-left: auto; font-style: normal; font-size: 0.625rem; color: var(--text-3); }
.inv-items { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.inv-items th {
  text-align: left;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0.4rem 0.3rem;
  border-bottom: 1px solid var(--line-hi);
}
.inv-items td { padding: 0.5rem 0.3rem; color: var(--text-2); border-bottom: 1px solid var(--line); }
.inv-items th:nth-child(2),
.inv-items td:nth-child(2) { text-align: center; width: 2.5rem; }
.inv-items th:last-child,
.inv-items td:last-child { text-align: right; white-space: nowrap; font-family: var(--font-mono); }
.inv-items tfoot td { border: 0; color: var(--text); font-weight: 600; padding-top: 0.7rem; font-size: 0.9rem; }
.inv-items tfoot td:last-child { color: var(--amber); }
.inv-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--teal);
}
.inv-foot span:last-child { color: var(--text-3); }

/* Website browser frames */
.browsers {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}
.browser {
  border: 1px solid var(--line-hi);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.8);
}
.browser--shop { margin-top: 2.25rem; }
.browser-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--line);
}
.browser-url {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-3);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(10, 17, 32, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bw { padding: 0.6rem; }
.bw-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
.bw-logo { width: 1.6rem; height: 0.45rem; border-radius: 2px; background: var(--text-2); }
.bw-links { display: flex; gap: 0.3rem; }
.bw-links i { width: 0.9rem; height: 0.3rem; border-radius: 2px; background: rgba(148, 178, 214, 0.35); }
.bw-hero {
  position: relative;
  height: 5.5rem;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(180deg, #f0a86a 0%, #c9697b 55%, #5b4a8c 100%);
}
.bw-hero svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bw-hero circle { fill: #ffe2b0; }
.bw-hero path { fill: #2b2f5a; opacity: 0.85; }
.bw-cta {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: #1a1206;
  background: #ffe2b0;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}
.bw-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; margin-top: 0.5rem; }
.bw-cards i {
  height: 2.4rem;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(185, 168, 255, 0.35), rgba(185, 168, 255, 0.12));
}
.bw-search { width: 55%; height: 0.55rem; border-radius: 999px; background: rgba(148, 178, 214, 0.2); }
.bw-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
.bw-phone {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.3rem 0.4rem;
  border-radius: 6px;
  background: rgba(10, 17, 32, 0.5);
  border: 1px solid var(--line);
}
.bw-phone i {
  width: 1.3rem;
  height: 2.3rem;
  border-radius: 0.3rem;
  background: linear-gradient(160deg, #cbd6e6, #6f7f9a);
  box-shadow: inset 0 0 0 2px #1d2a44;
}
.bw-phone b { font-family: var(--font-mono); font-size: 0.55rem; font-weight: 400; color: var(--violet); }

/* ---- Practice (spec sheet) -------------------------------------------- */
.spec {
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(10, 17, 32, 0.4);
  overflow: hidden;
}
.spec-row {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.1rem, 2.5vw, 1.5rem) clamp(1rem, 2.5vw, 1.75rem);
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition: background 0.2s var(--ease);
}
.spec-row:last-child { border-bottom: 0; }
.spec-row:hover { background: rgba(124, 196, 232, 0.04); }
.spec-row dt { margin: 0; }
.spec-key { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--cyan); }
.spec-key::before { content: "› "; color: var(--amber); }
.spec-row dd { margin: 0; color: var(--text-2); max-width: 60ch; }

/* ---- Contact ----------------------------------------------------------- */
.contact-grid {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
.contact-form-wrap {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(19, 32, 56, 0.7), rgba(14, 24, 43, 0.5));
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.field { margin-bottom: 1.15rem; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.45rem;
}
.field .req { color: var(--amber); }
.field .opt { text-transform: none; letter-spacing: 0; }
.field input,
.field textarea,
.field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: rgba(10, 17, 32, 0.65);
  border: 1px solid var(--line-hi);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238A9BB2' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 11px 8px;
}
.field select option { background: var(--card); color: var(--text); }
.field textarea { resize: vertical; min-height: 7.5rem; }
.field input:hover,
.field textarea:hover,
.field select:hover { border-color: rgba(124, 196, 232, 0.45); }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(255, 176, 103, 0.2);
}
.field.has-error input,
.field.has-error textarea { border-color: #ff9b85; }
.field-error { display: none; font-size: 0.8125rem; color: #ff9b85; margin-top: 0.4rem; }
.field.has-error .field-error { display: block; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin-top: 1rem; font-size: 0.9375rem; min-height: 1.2em; color: var(--text-2); }
.form-status.is-error { color: #ff9b85; }

.form-success { padding: 0.5rem 0.25rem; }
.success-mark { font-family: var(--font-mono); color: var(--teal); font-size: 1.6rem; line-height: 1; }
.success-title { font-size: 1.4rem; margin: 0.6rem 0; }
.form-success p { color: var(--text-2); }

.record {
  font-style: normal;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(19, 32, 56, 0.5);
  overflow: hidden;
}
.record-row {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.record-row:last-child { border-bottom: 0; }
.record-key { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-3); }
.record-val { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text); word-break: break-word; }
a.record-val { color: var(--cyan); text-decoration: none; }
a.record-val:hover { text-decoration: underline; }
.info-note { margin-top: 1rem; font-size: 0.875rem; color: var(--text-2); }

/* ---- Footer ------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 1.5rem var(--page-pad); }
.footer-inner p { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-3); }

/* =========================================================================
   Motion — opt-in behind html.js so no-JS renders fully and statically
   ========================================================================= */
html.js .reveal { opacity: 0; transform: translateY(16px); }
html.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
/* spine draws downward on reveal (scaleY, not dash offsets: dashes combined
   with non-scaling-stroke render with gaps in Chromium) */
html.js .rail-line { transform: translateX(-50%) scaleY(0); transform-origin: 50% 0; }
html.js .section.is-revealed .rail-line {
  transform: translateX(-50%) scaleY(1);
  transition: transform 1.2s var(--ease);
}
html.js .section.is-active .node-glyph .sq { animation: node-pulse 2.4s var(--ease) infinite; }
@keyframes node-pulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 176, 103, 0)); }
  50% { filter: drop-shadow(0 0 6px rgba(255, 176, 103, 0.8)); }
}

/* data flowing along the DAG edges */
.dag-flow path { animation: flow 1.8s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -38; } }
.runlog .is-running .run { animation: blink 1.2s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

/* RoleFit bars fill in when the product scrolls into view */
html.js .rf-bar i { transform: scaleX(0); }
html.js .is-in .rf-bar i { transform: scaleX(1); transition: transform 1.1s var(--ease) 0.3s; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1180px) {
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .product,
  .product--flip { grid-template-columns: minmax(0, 1fr); }
  .product--flip .product-copy { order: 0; }
}

@media (max-width: 860px) {
  .service { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .spec-row { grid-template-columns: 9rem minmax(0, 1fr); }
}

@media (max-width: 640px) {
  :root { --rail: 1.5rem; }
  .rail-num { display: none; }
  .rail-node,
  .node-glyph { width: 26px; height: 26px; }
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .spec-row { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
  .service-head { flex-direction: column; gap: 0.5rem; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .rf { grid-template-columns: minmax(0, 1fr); }
  .browsers { grid-template-columns: minmax(0, 1fr); }
  .browser--shop { margin-top: 0; }
  .product { padding: 1.25rem; border-radius: 16px; }
  .wordmark-rest { display: none; }
}

@media (max-width: 480px) {
  .site-nav { gap: 0.8rem; font-size: 0.75rem; }
  .site-nav .nav-cta { display: none; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .runlog .m { display: none; }
  .inv-field { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; }
  .inv-select, .inv-num { font-size: 0.75rem; }
  .record-row { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
}

/* =========================================================================
   Reduced motion — respect fully
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
  html.js .rail-line { transform: translateX(-50%); }
  html.js .rf-bar i { transform: none; }
  .pillar:hover { transform: none; }
}
