/* =============================================================
   Afrobora — public website stylesheet
   Ink + cobalt + logo orange; Inter for text, Inter Tight for headings,
   JetBrains Mono for small labels. Borders over shadows, one spacing scale,
   1240px content width. Contrast ratios noted against white.
   ============================================================= */

:root {
  /* Colour — dark brand surfaces (contrast ratios against --bg #050a18) */
  color-scheme: dark;
  --ink: #f3f6fb;          /* headings: 18.1:1 */
  --ink-2: #d3dae6;        /* body text: 13.6:1 */
  --muted: #a3adc2;        /* secondary text: 8.6:1, 7.9:1 on --paper */
  --line: rgba(255, 255, 255, .1);
  --line-strong: rgba(255, 255, 255, .22);
  --bg: #050a18;
  --paper: #08122a;
  --cobalt: #2563eb;       /* fills with white text: 5.2:1 */
  --cobalt-ink: #8fb4ff;   /* links: 9.5:1 */
  --cobalt-tint: rgba(37, 99, 235, .16);
  --on-ink-muted: #b9c2d4;
  --on-ink-link: #a9c1ff;
  --danger: #fda29b;       /* 10.1:1 */
  --danger-tint: rgba(240, 68, 56, .12);
  --success: #75e0a7;      /* 12.0:1 */
  --success-tint: rgba(23, 178, 106, .12);
  --focus: #fdba74;
  --field-line: #6b7488;   /* input borders: 4.1:1 (non-text 3:1) */

  /* Type */
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Inter Tight", "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --orange: #f97316;       /* logo orange */
  --night: #050a18;        /* dark brand surface */

  /* Spacing scale (4px base) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  --max: 1240px;
  --gutter: 24px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cobalt-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
p, ul, ol, address { margin: 0; }
address { font-style: normal; }
ul[class], ol[class], .site-nav ul, .hero-index ol, .cap ul, .crumbs ol { list-style: none; padding: 0; margin: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }

.skip-link {
  position: absolute; left: var(--s4); top: -100px; z-index: 100;
  background: var(--orange); color: #1a0c02; padding: var(--s3) var(--s4); border-radius: var(--radius);
}
.skip-link:focus { top: var(--s4); }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Type ---------- */
.display {
  font-family: var(--display); font-weight: 600; letter-spacing: -0.03em;
  font-size: clamp(40px, 6vw, 72px); line-height: 1.04; max-width: 18ch;
}
.h2 { font-family: var(--display); font-weight: 600; font-size: clamp(32px, 4vw, 48px); line-height: 1.08; letter-spacing: -0.025em; max-width: 22ch; }
.h3 { font-size: 20px; line-height: 1.3; }
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: var(--s4);
}
.lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 62ch; margin-top: var(--s5); }
.muted { color: var(--muted); }
.prose p + p, .prose p + ul, .prose ul + p, .prose h2 + p, .prose p + h2 { margin-top: var(--s4); }
.prose h2 { font-size: 22px; margin-top: var(--s7); }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: var(--s2); }
.prose { max-width: 70ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font: 600 16px/1.2 var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--cobalt); color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-light { background: #fff; color: var(--night); }
.btn-light:hover { background: #e8ecf5; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .65; cursor: progress; }
.text-link { font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.text-link::after { content: "→"; transition: transform .15s; }
.text-link:hover::after { transform: translateX(3px); }
.text-link:hover { text-decoration: underline; }

/* Header, footer, page intro and CTA band: see brand.css */

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 9vw, 96px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-paper { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-paper + .section { border-top: 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s6) var(--s8); align-items: end; margin-bottom: var(--s7); }
.section-head p { color: var(--muted); max-width: 56ch; }
.section-head.stacked { grid-template-columns: 1fr; gap: var(--s4); }
@media (max-width: 860px) {
  .section-head { grid-template-columns: 1fr; gap: var(--s4); margin-bottom: var(--s6); }
}

/* ---------- Hero ---------- */
.hero { padding: var(--s9) 0 var(--s8); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--s8); align-items: end; }
.hero .display { font-size: clamp(42px, 6.4vw, 80px); max-width: 15ch; }
.hero .lead { margin-top: var(--s5); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.hero-index { border-top: 1px solid var(--line-strong); }
.hero-index h2 { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: var(--s4) 0 var(--s2); }
.hero-index li { border-bottom: 1px solid var(--line); }
.hero-index a {
  display: grid; grid-template-columns: 36px 1fr auto; align-items: baseline; gap: var(--s3);
  padding: 14px 0; color: var(--ink); text-decoration: none; font-weight: 500;
}
.hero-index a span:first-child { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }
.hero-index a span:last-child { color: var(--muted); transition: transform .15s, color .15s; }
.hero-index a:hover span:last-child { color: var(--cobalt-ink); transform: translateX(3px); }
.hero-index a:hover span:nth-child(2) { text-decoration: underline; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: var(--s7); } .hero { padding: var(--s8) 0 var(--s7); } }

/* ---------- Intro + facts ---------- */
.intro-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s8); }
.intro-grid .statement { font-family: var(--display); font-weight: 500; letter-spacing: -0.02em; font-size: clamp(26px, 3vw, 36px); line-height: 1.25; color: var(--ink); }
.intro-grid .statement + p { margin-top: var(--s5); color: var(--muted); max-width: 60ch; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: var(--s8); border-top: 1px solid var(--line-strong); }
.facts > div { padding: var(--s5) var(--s5) 0 0; }
.facts > div + div { padding-left: var(--s5); border-left: 1px solid var(--line); }
.facts dt { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: var(--s2) 0 0; color: var(--ink); font-size: 18px; font-weight: 500; }
@media (max-width: 860px) {
  .intro-grid { grid-template-columns: 1fr; gap: var(--s5); }
  .facts { grid-template-columns: 1fr; }
  .facts > div, .facts > div + div { padding: var(--s4) 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Capability columns ---------- */
.cap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.cap { padding: var(--s6) var(--s6) var(--s6) 0; }
.cap + .cap { padding-left: var(--s6); border-left: 1px solid var(--line); }
.cap .num { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cap h3 { font-family: var(--display); font-weight: 600; font-size: 32px; margin: var(--s2) 0 var(--s3); }
.cap p { color: var(--muted); }
.cap ul { margin-top: var(--s5); border-top: 1px solid var(--line); }
.cap li { border-bottom: 1px solid var(--line); }
.cap li a { display: flex; justify-content: space-between; gap: var(--s3); padding: 12px 0; color: var(--ink); text-decoration: none; font-weight: 500; }
.cap li a::after { content: "→"; color: var(--muted); }
.cap li a:hover { color: var(--cobalt-ink); text-decoration: underline; }
@media (max-width: 960px) {
  .cap-grid { grid-template-columns: 1fr; }
  .cap, .cap + .cap { padding: var(--s6) 0; border-left: 0; }
  .cap + .cap { border-top: 1px solid var(--line); }
}

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  display: flex; flex-direction: column; gap: var(--s3);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015)); border: 1px solid var(--line); border-radius: 22px; padding: var(--s6);
}
.section-paper .card { background: rgba(255, 255, 255, .04); }
.card .kind { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card h3 { font-size: 21px; }
.card p { color: var(--muted); }
.card .tags { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: auto; padding-top: var(--s3); }
.card .tags li { font-size: 13px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); }
.card .card-foot { margin-top: auto; padding-top: var(--s4); display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); align-items: center; }
a.card { text-decoration: none; transition: border-color .15s; }
a.card:hover { border-color: rgba(143, 180, 255, .45); }
a.card:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.note { margin-top: var(--s5); color: var(--muted); font-size: 15px; max-width: 70ch; }
@media (max-width: 960px) { .card-grid, .card-grid.two { grid-template-columns: 1fr; } .card { padding: var(--s5); } }

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); counter-reset: step; border-top: 1px solid var(--line-strong); }
.process li { counter-increment: step; padding: var(--s5) var(--s4) 0 0; }
.process li + li { padding-left: var(--s4); border-left: 1px solid var(--line); }
.process li::before { content: counter(step, decimal-leading-zero); display: block; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.process h3 { font-size: 18px; margin: var(--s2) 0; }
.process p { color: var(--muted); font-size: 15px; }
@media (max-width: 1023px) {
  .process { grid-template-columns: 1fr; }
  .process li, .process li + li { display: grid; grid-template-columns: 48px 1fr; padding: var(--s4) 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .process li::before { grid-row: span 2; padding-top: 3px; }
  .process h3 { margin-top: 0; }
}

/* ---------- Dark band (partnerships, CTA) ---------- */
.band-ink { background: var(--paper); color: var(--on-ink-muted); }
.band-ink h2, .band-ink h3 { color: #fff; }
.band-ink a:not(.btn) { color: var(--on-ink-link); }
.band-ink .eyebrow, .band-ink .lead { color: var(--on-ink-muted); }
.split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--s8); align-items: start; }
.split .list-ruled li { border-color: #33363d; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; gap: var(--s6); } }

.list-ruled { border-top: 1px solid var(--line); }
.list-ruled li { padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.list-ruled strong { display: block; color: var(--ink); font-weight: 600; }
.band-ink .list-ruled { border-color: #33363d; }
.band-ink .list-ruled strong { color: #fff; }
.list-check li { position: relative; padding-left: 28px; }
.list-check li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 12px; height: 7px; border-left: 2px solid var(--cobalt); border-bottom: 2px solid var(--cobalt); transform: rotate(-45deg); }
.list-check li + li { margin-top: var(--s3); }

.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s5); }
.link-light { color: #fff; font-weight: 500; }

/* ---------- Page intro & breadcrumbs ---------- */
.page-intro { padding: var(--s8) 0 var(--s7); border-bottom: 1px solid var(--line); }
.page-intro .display { font-size: clamp(38px, 5.4vw, 64px); max-width: 20ch; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; padding: 0; margin: 0 0 var(--s6); font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: var(--s2); color: var(--line-strong); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); }

/* ---------- Two-column detail layout (service / industry) ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--s8); align-items: start; }
.detail aside { position: sticky; top: 96px; border-top: 1px solid var(--line-strong); padding-top: var(--s5); }
.detail aside h2 { font-size: 18px; }
.detail aside p { color: var(--muted); margin-top: var(--s3); font-size: 15px; }
.detail aside .btn { width: 100%; margin-top: var(--s5); }
.detail h2.sub { font-family: var(--display); font-weight: 600; font-size: 32px; margin: var(--s7) 0 var(--s5); }
.detail h2.sub:first-child { margin-top: 0; }
.offer { border-top: 1px solid var(--line); }
.offer > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--s5); padding: var(--s5) 0; border-bottom: 1px solid var(--line); }
.offer dt { color: var(--ink); font-weight: 600; }
.offer dd { margin: 0; color: var(--muted); }
.callout { margin-top: var(--s6); padding: var(--s5); background: var(--paper); border-left: 3px solid var(--cobalt); color: var(--ink-2); }
@media (max-width: 960px) {
  .detail { grid-template-columns: 1fr; gap: var(--s7); }
  .detail aside { position: static; }
  .offer > div { grid-template-columns: 1fr; gap: var(--s2); }
}

/* ---------- Product groups ---------- */
.groups { border-top: 1px solid var(--line-strong); }
.group { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s6); padding: var(--s6) 0; border-bottom: 1px solid var(--line); }
.group > h3 { font-family: var(--display); font-weight: 600; font-size: 28px; line-height: 1.15; }
.products { display: grid; gap: var(--s5); }
.product { display: grid; gap: var(--s2); }
.product + .product { padding-top: var(--s5); border-top: 1px solid var(--line); }
.product h4 { font-size: 18px; color: var(--ink); }
.product p { color: var(--muted); max-width: 52ch; }
.product a { justify-self: start; }
@media (max-width: 860px) {
  .group { grid-template-columns: 1fr; gap: var(--s4); }
}

/* ---------- Forms ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--s8); align-items: start; }
@media (max-width: 960px) { .form-layout { grid-template-columns: 1fr; gap: var(--s7); } }
.enquiry-form { display: grid; gap: var(--s5); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: var(--s2); align-content: start; }
.field label, .field legend { font-weight: 600; color: var(--ink); font-size: 15px; }
.field .req { color: var(--danger); }
.field .hint { color: var(--muted); font-size: 14px; }
.field input, .field select, .field textarea {
  width: 100%; font: 400 16px/1.5 var(--font); color: var(--ink);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--field-line); border-radius: var(--radius);
  padding: 11px 14px; min-height: 48px;
}
.field textarea { min-height: 180px; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.field [aria-invalid="true"] { border-color: var(--danger); border-width: 2px; }
.field .error { color: var(--danger); font-size: 14px; font-weight: 500; }
.field .error:empty { display: none; }
.field .counter { color: var(--muted); font-size: 13px; text-align: right; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: var(--s3); align-items: start; }
.field .check input { width: 22px; height: 22px; min-height: 0; padding: 0; margin: 2px 0 0; accent-color: var(--cobalt); }
.check label { font-weight: 400; color: var(--ink-2); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-summary { padding: var(--s4) var(--s5); border: 2px solid var(--danger); background: var(--danger-tint); border-radius: var(--radius); color: var(--ink); }
.form-summary h2 { font-size: 17px; color: var(--danger); }
.form-summary ul { margin-top: var(--s2); padding-left: 1.2em; }
.form-summary a { color: var(--danger); font-weight: 500; }
.form-status { min-height: 1em; font-size: 15px; color: var(--muted); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); }
.success-panel { padding: var(--s6); border: 1px solid var(--line); border-top: 3px solid var(--success); background: var(--paper); border-radius: var(--radius); }
.success-panel h2 { font-family: var(--display); font-weight: 600; font-size: 34px; }
.success-panel p { margin-top: var(--s3); color: var(--ink-2); }
.success-panel .ref { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 15px; }
.preselect { padding: var(--s4) var(--s5); background: var(--cobalt-tint); border-radius: var(--radius); color: var(--ink); }
.contact-aside { border-top: 1px solid var(--line-strong); padding-top: var(--s5); display: grid; gap: var(--s6); }
.contact-aside h2 { font-size: 18px; }
.contact-aside p, .contact-aside address { color: var(--muted); margin-top: var(--s2); }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; display: none; }
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); padding: var(--s8) 0 var(--s5); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2fr)); gap: var(--s6); }
.footer-brand img { width: 132px; }
.footer-brand p { margin-top: var(--s4); color: var(--muted); max-width: 34ch; }
.footer-h { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s3); }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { padding: 4px 0; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--cobalt-ink); text-decoration: underline; }
.site-footer address { color: var(--ink-2); margin-bottom: var(--s3); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line); color: var(--muted); }
.footer-base ul { display: flex; flex-wrap: wrap; gap: var(--s5); }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { gap: var(--s5) var(--s4); } .footer-grid > div:last-child { grid-column: 1 / -1; } }

/* ---------- Misc ---------- */
.not-found .actions { margin-top: var(--s6); }
.pending-banner { background: rgba(250, 204, 21, .1); border-bottom: 1px solid rgba(250, 204, 21, .3); color: #fde68a; padding: var(--s3) 0; font-size: 15px; }

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .cta-band, .nav-toggle { display: none; }
}

.mt-6 { margin-top: var(--s6); }
.preselect, .form-summary { margin-bottom: var(--s5); }

.field select option { background: #0b1328; color: #f3f6fb; }
