/* Nodentia — light, document-like. The gradient lives only in the logo. */
/* Fonts are served with the site, not from a font service. SIL Open Font License. */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2-variations");
}
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --white: #FFFFFF;
  --paper: #F6F8FA;
  --tint: #EFF3F7;
  --ink: #0A2540;
  --ink-hover: #163A61;
  --text: #2E3E52;
  --muted: #5B6B80;
  --rule: #DDE3EA;
  --rule-strong: #C7D1DC;
  --field-border: #7D8DA1;
  --blue: #0B63CE;
  --blue-soft: #E7F0FC;
  --marker: #FFE58A;
  --ok: #1F9D55;
  --error: #B42318;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-pad: clamp(72px, 9vw, 120px);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

[hidden] { display: none !important; }

a { color: inherit; }

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */
.display {
  margin: 18px 0 0;
  max-width: 19ch;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5.8vw, 4.6rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
.title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}
.section-intro {
  margin: 0;
  max-width: 34em;
  font-size: 1.08rem;
  color: var(--muted);
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease;
}
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-hover); }
.btn-small { min-height: 40px; padding: 8px 16px; font-size: 0.95rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.link-arrow .arrow { flex: none; transition: transform 160ms ease; }
.link-arrow:hover .arrow { transform: translateX(3px); }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark { width: 32px; height: 27px; }
.brand-word { width: 112px; height: 18px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.6vw, 32px);
}
.site-nav a:not(.btn) {
  font-size: 0.97rem;
  color: var(--text);
  text-decoration: none;
}
.site-nav a:not(.btn):hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(56px, 8vw, 104px); }
.hero-copy { max-width: 900px; }
.kicker {
  margin: 0;
  font-size: 0.97rem;
  font-weight: 500;
  color: var(--muted);
}
.hero-lede {
  margin: 26px 0 0;
  max-width: 40em;
  font-size: clamp(1.08rem, 1.5vw, 1.22rem);
  line-height: 1.6;
  color: var(--muted);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 34px;
}

/* The product, shown rather than described */
.demo-band {
  margin-top: clamp(48px, 7vw, 84px);
  padding-bottom: clamp(56px, 8vw, 96px);
  background: linear-gradient(to bottom, var(--white) 0, var(--white) 120px, var(--tint) 120px);
}
.demo { margin: 0; }
.demo figcaption {
  margin-top: 16px;
  font-size: 0.92rem;
  color: var(--muted);
}

.app {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--rule-strong);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(10, 37, 64, 0.05), 0 32px 64px -32px rgba(10, 37, 64, 0.3);
}
.app-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--rule);
  background: #FAFBFC;
  font-size: 0.9rem;
}
.app-name { font-weight: 600; color: var(--ink); }
.app-project {
  padding-left: 16px;
  border-left: 1px solid var(--rule);
  color: var(--muted);
}
.app-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--muted);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(31, 157, 85, 0.16);
}

.app-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.app-chat { padding: 28px 32px 32px; }
.chat-label {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.chat-question {
  margin: 6px 0 26px;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
}
.chat-answer {
  margin: 8px 0 14px;
  line-height: 1.7;
  color: var(--text);
}
.cite {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.7;
  white-space: nowrap;
  vertical-align: 1px;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}
.cite:hover { border-color: rgba(11, 99, 206, 0.35); }
.cite[aria-pressed="true"] { background: var(--blue); color: var(--white); }
.chat-hint {
  margin: 22px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.app-source {
  padding: 28px;
  background: var(--tint);
  border-left: 1px solid var(--rule);
}
.page {
  padding: 20px 24px 22px;
  background: var(--white);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(10, 37, 64, 0.12), 0 8px 24px -16px rgba(10, 37, 64, 0.25);
  font-size: 0.88rem;
  color: var(--text);
}
.page-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.page-title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}
.page-table {
  width: 100%;
  border-collapse: collapse;
}
.page-table th,
.page-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
.page-table th {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}
.page-table tr.is-cited td { color: var(--ink); font-weight: 500; }
.page-text { margin: 12px 0; line-height: 1.6; }
.page-lines span {
  display: block;
  height: 7px;
  margin: 10px 0;
  border-radius: 4px;
  background: #E7EBF0;
}
.page-lines span:nth-child(2) { width: 92%; }
.page-lines span:nth-child(3) { width: 68%; }

/* The highlighter: the cited words get marked when their page opens */
mark {
  padding: 0 2px;
  color: var(--ink);
  background-color: transparent;
  background-image: linear-gradient(var(--marker), var(--marker));
  background-repeat: no-repeat;
  background-position: 0 55%;
  background-size: 100% 78%;
  animation: highlight 700ms cubic-bezier(0.3, 0.7, 0.4, 1) 300ms both;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
@keyframes highlight {
  from { background-size: 0% 78%; }
  to { background-size: 100% 78%; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-pad); }
.section-tint { background: var(--tint); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 24px clamp(32px, 6vw, 96px);
  margin-bottom: clamp(36px, 5vw, 56px);
}

/* Services: an index, not a grid of cards */
.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 6vw, 96px);
}
.service {
  padding: 30px 0 34px;
  border-top: 1px solid var(--rule-strong);
}
.service-name {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}
.service-desc { margin: 0 0 16px; }
.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 0.97rem;
  color: var(--muted);
}
.service-list li {
  position: relative;
  padding-left: 18px;
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 6px;
  height: 6px;
  background: var(--blue);
}

/* Deployment spec sheet */
.deployment {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px clamp(32px, 6vw, 96px);
  align-items: start;
}
.deployment-copy { position: sticky; top: 110px; }
.deployment-copy .section-intro { margin-top: 18px; }
.spec { margin: 0; }
.spec-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--rule-strong);
}
.spec-row:last-child { border-bottom: 1px solid var(--rule-strong); }
.spec dt { font-weight: 600; color: var(--ink); }
.spec dd { margin: 0; }

/* Clients */
.clients {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 32px clamp(32px, 6vw, 96px);
  align-items: start;
}
.client-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.client-list li {
  padding: 18px 0;
  border-top: 1px solid var(--rule-strong);
  font-size: 1.12rem;
  color: var(--ink);
}
.client-list li:last-child { border-bottom: 1px solid var(--rule-strong); }

/* Process: a real sequence, so it is numbered */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  counter-reset: step;
}
.step {
  counter-increment: step;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}
.step::before {
  content: counter(step);
  display: block;
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1;
  color: var(--blue);
}
.step-name {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}
.step p { margin: 0; font-size: 0.98rem; color: var(--muted); }

/* Common questions: native disclosure, works without JavaScript */
.faq {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 32px clamp(32px, 6vw, 96px);
  align-items: start;
}
.faq-item { border-top: 1px solid var(--rule-strong); }
.faq-item:last-child { border-bottom: 1px solid var(--rule-strong); }
.faq-item summary {
  position: relative;
  padding: 18px 40px 18px 0;
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}
.faq-item[open] summary::after { margin-top: -2px; transform: rotate(-135deg); }
@media (hover: hover) {
  .faq-item summary:hover { text-decoration: underline; text-underline-offset: 4px; }
}
.faq-item p { margin: 0 0 20px; max-width: 38em; color: var(--muted); }

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 40px clamp(32px, 6vw, 96px);
  align-items: start;
}
.contact-copy .section-intro { margin-top: 18px; }
.address {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-style: normal;
  line-height: 1.7;
  color: var(--muted);
}
.email-link { color: var(--ink); text-underline-offset: 3px; overflow-wrap: anywhere; }
.form-note a { color: var(--ink); text-underline-offset: 3px; }
.contact-panel {
  padding: clamp(22px, 3.5vw, 36px);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 14px;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.field-full { grid-column: 1 / -1; }
.field label { font-size: 0.95rem; font-weight: 500; color: var(--ink); }
.optional { font-weight: 400; color: var(--muted); }

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--field-border);
  border-radius: 8px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.contact-form textarea { min-height: 148px; resize: vertical; line-height: 1.5; }
.contact-form select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6B80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}
.contact-form input:hover,
.contact-form select:hover,
.contact-form textarea:hover { border-color: var(--muted); }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 99, 206, 0.18);
}
.contact-form [aria-invalid="true"] { border-color: var(--error); }
.contact-form [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.16); }
.field-error { margin: 0; font-size: 0.9rem; color: var(--error); }

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

/* Turnstile bot check: usually invisible, so it stays out of the layout and
   the form does not jump when it loads. contact.js adds .is-visible only when
   it has to ask the visitor something. */
.turnstile { position: absolute; }
.turnstile.is-visible { position: static; }

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 4px;
}
.form-note { margin: 0; font-size: 0.92rem; color: var(--muted); }
.form-foot .btn:disabled { opacity: 0.7; cursor: progress; }

.form-status { margin: 0; }
.form-status:empty { display: none; }
.form-status.is-error {
  padding: 12px 16px;
  border-radius: 8px;
  background: #FDECEC;
  color: #8A1C1C;
  font-size: 0.95rem;
}

.form-done p { margin: 8px 0 0; color: var(--muted); }
.form-done strong { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #B6C3D3;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr) minmax(0, 0.9fr);
  gap: 32px clamp(32px, 5vw, 72px);
  padding-block: 56px 40px;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
}
.footer-brand p { margin: 16px 0 0; max-width: 30em; }
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-nav a { color: #DCE4EE; text-decoration: none; }
.footer-nav a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.footer-address { font-style: normal; line-height: 1.7; }
.footer-address .email-link,
.footer-base a { color: #DCE4EE; }
.footer-address .email-link:hover,
.footer-base a:hover { color: var(--white); }
.footer-base { font-size: 0.88rem; }
.footer-base p {
  margin: 0;
  padding-block: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-base a { text-underline-offset: 3px; }

/* ---------- Standalone pages (privacy notice, not found) ---------- */
/* Keep the footer at the bottom of the window when the page is short. */
.standalone { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.standalone main { flex: 1 0 auto; }
.doc-page { padding-block: clamp(56px, 8vw, 96px) var(--section-pad); }
.doc-page .title { margin-bottom: 12px; }
.doc-meta { margin: 0 0 40px; color: var(--muted); font-size: 0.95rem; }
.prose { max-width: 42em; }
.prose h2 {
  margin: 40px 0 12px;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}
.prose p, .prose ul { margin: 0 0 16px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--ink); text-underline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .section-head,
  .deployment,
  .clients,
  .faq,
  .contact { grid-template-columns: minmax(0, 1fr); }
  .section-head { align-items: start; }
  .deployment-copy { position: static; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .app-body { grid-template-columns: minmax(0, 1fr); }
  .app-source { border-left: 0; border-top: 1px solid var(--rule); }
  .services { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .site-nav a:not(.btn) { display: none; }
  .app-project { display: none; }
  .app-chat { padding: 22px 20px 24px; }
  .app-source { padding: 18px; }
  .page { padding: 16px 16px 18px; }
  /* Narrow screens: clause number above, item and value side by side. */
  .page-table,
  .page-table tbody { display: block; }
  .page-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto);
    column-gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--rule);
  }
  .page-table th,
  .page-table td { padding: 0; border-bottom: 0; }
  .page-table th { grid-column: 1 / -1; margin-bottom: 2px; }
  .page-table td:last-child { text-align: right; max-width: 11em; }
  .steps { grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
  .spec-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .contact-form { grid-template-columns: minmax(0, 1fr); }
  .form-foot .btn { width: 100%; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  mark { animation: none; }
  .btn, .cite, .link-arrow .arrow, .faq-item summary::after { transition: none; }
}
