/* ==========================================================================
   BON Information Technology Systems — Design System, Direction D
   "Split panel": a persistent left rail (brand, navigation, contact, the
   Talk-to-us action) beside a scrolling content column. Manrope, one teal
   accent, ink rules instead of gradients, 4/6px radii, alternating rows.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-alt: #f4f6f5;
  --bg-elev: #ffffff;
  --border: #dfe3e6;
  --border-strong: #c9cdd2;
  --ink: #1f2328;
  --text: #1f2328;
  --text-muted: #4b5057;
  --text-faint: #666c72;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #e6f4f1;
  --on-accent: #ffffff;
  --danger: #b42318;

  --rail-w: 340px;
  --content-max: 1080px;
  --radius-s: 4px;
  --radius: 6px;
  --radius-l: 10px;
  --shadow: 0 1px 2px rgba(31, 35, 40, .06), 0 8px 24px rgba(31, 35, 40, .05);

  --font: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --bar-h: 64px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1416; --bg-alt: #151c1e; --bg-elev: #1a2225;
  --border: #263034; --border-strong: #35424a;
  --ink: #e8ecec; --text: #e8ecec; --text-muted: #b3bcbf; --text-faint: #7f8b90;
  --accent: #2dd4bf; --accent-strong: #5eead4; --accent-soft: rgba(45, 212, 191, .12);
  --on-accent: #0f1416; --danger: #fca5a5;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1416; --bg-alt: #151c1e; --bg-elev: #1a2225;
    --border: #263034; --border-strong: #35424a;
    --ink: #e8ecec; --text: #e8ecec; --text-muted: #b3bcbf; --text-faint: #7f8b90;
    --accent: #2dd4bf; --accent-strong: #5eead4; --accent-soft: rgba(45, 212, 191, .12);
    --on-accent: #0f1416; --danger: #fca5a5;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

/* --------------------------------------------------------------- Reset -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0; font-family: var(--font); font-size: 16.5px; line-height: 1.65;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
  display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); grid-template-rows: 1fr auto;
  min-height: 100vh;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 800; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 4.4vw, 3.9rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 1.7vw, 1.4rem); font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1.05em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin-bottom: .45em; }
hr { border: 0; border-top: 1.5px solid var(--ink); margin: 2.5rem 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--ink); color: var(--bg); padding: .8rem 1.2rem; }
.skip:focus { left: 0; }

/* ---------------------------------------------------------------- Rail -- */
.rail {
  grid-column: 1; grid-row: 1 / 3;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--bg-alt); border-right: 1.5px solid var(--border-strong); scrollbar-width: thin;
  padding: 30px 32px 28px; display: flex; flex-direction: column; gap: 22px;
}
.rail-top { display: flex; align-items: center; gap: .75rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); flex-shrink: 0; }
.brand:hover { text-decoration: none; color: var(--text); }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand-name { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.brand-name small { display: block; white-space: nowrap; font-size: .6rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); margin-top: .3rem; }
/* one line inside the 340px rail: 34 characters at .72rem with .07em tracking is ~270px */
.wordmark { margin: -8px 0 0; font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; line-height: 1.5; white-space: nowrap; }

.nav-actions { display: flex; align-items: center; gap: .45rem; margin-left: auto; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--radius-s);
  border: 1.5px solid var(--border-strong); background: transparent; color: var(--text-muted); cursor: pointer;
}
.icon-btn:hover { border-color: var(--ink); color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
}
.burger { display: none; }

.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1.5px solid var(--ink); }
.menu > li { margin: 0; border-bottom: 1px solid var(--border-strong); }
.menu > li > .row { display: flex; align-items: center; }
.menu > li > .row > a {
  flex: 1; padding: .72rem 0; font-size: 1.02rem; font-weight: 600; color: var(--text);
}
.menu > li > .row > a:hover { color: var(--accent); text-decoration: none; }
.menu > li > .row > a[aria-current="page"] { color: var(--accent); }
.sub-toggle {
  width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: transparent;
  color: var(--text-faint); cursor: pointer; border-radius: var(--radius-s);
}
.sub-toggle:hover { color: var(--text); background: var(--bg-elev); }
.sub-toggle svg { width: 15px; height: 15px; transition: transform .2s; }
.menu > li.open .sub-toggle svg { transform: rotate(180deg); }
.submenu { list-style: none; margin: 0; padding: 0 0 .6rem .8rem; display: none; }
.menu > li.open .submenu { display: block; }
.submenu li { margin: 0; }
.submenu a {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  padding: .4rem 0; font-size: .92rem; font-weight: 500; color: var(--text-muted);
}
.submenu a:hover { color: var(--accent); text-decoration: none; }
.submenu a[aria-current="page"] { color: var(--accent); font-weight: 700; }
.submenu-sep { height: 1px; background: var(--border); margin: .4rem 0; }
.tag-new { font-size: .58rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: .16rem .4rem; border-radius: 3px; color: var(--on-accent); background: var(--accent); }

.rail nav { display: flex; flex-direction: column; flex: 1; gap: 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.aside-card li span { display: block; padding: .38rem 0; font-size: .92rem; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.rail-contact { margin-top: auto; display: flex; flex-direction: column; gap: .5rem; font-size: .86rem; color: var(--text-muted); }
.rail-contact a { color: var(--text-muted); }
.rail-contact .btn { margin-top: .6rem; }

/* ------------------------------------------------------------- Content -- */
main { grid-column: 2; min-width: 0; container-type: inline-size; }
.footer { grid-column: 2; }
.wrap { width: 100%; max-width: var(--content-max); margin-inline: auto; padding-inline: clamp(24px, 5vw, 72px); }
.wrap-narrow { max-width: 860px; }
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-tight { padding: clamp(2rem, 4vw, 3rem) 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-alt + .section-alt, .hero + .section-alt, .page-hero + .section-alt { border-top: 0; }
.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
@container (max-width: 640px) { .split { grid-template-columns: 1fr; } }
.center { text-align: center; }

.eyebrow { display: inline-flex; align-items: center; gap: .55rem; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .9rem; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); }
.section-head { max-width: 720px; margin-bottom: clamp(1.8rem, 3.5vw, 2.6rem); }
.section-head.center { margin-inline: auto; }
.section-head.center .eyebrow { justify-content: center; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.18rem); color: var(--text-muted); line-height: 1.6; max-width: 62ch; }

/* ------------------------------------------------------------ Buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .78rem 1.4rem; border-radius: var(--radius-s); font-weight: 700; font-size: .95rem;
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-light { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-light:hover { border-color: var(--ink); }
.btn-sm { padding: .55rem 1rem; font-size: .86rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.btn-row.center { justify-content: center; }
.rail-top .nav-cta { display: none; }
.rail-contact .btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); width: 100%; }
.rail-contact .btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }

/* -------------------------------------------------------------- Cards -- */
.card {
  position: relative; background: var(--bg-elev); border: 1.5px solid var(--border-strong);
  border-radius: var(--radius); padding: 1.6rem 1.5rem; transition: border-color .15s;
}
.card:hover { border-color: var(--ink); }
.card h3 { margin-bottom: .45rem; }
.card p { color: var(--text-muted); margin-bottom: 0; font-size: .96rem; }
.card p + p { margin-top: .8rem; }
.card-link { display: block; color: inherit; }
.card-link:hover { text-decoration: none; color: inherit; }
.card-flat { border-color: var(--border); }
.icon-badge {
  width: 46px; height: 46px; border-radius: var(--radius); display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 1rem;
}
.icon-badge svg { width: 24px; height: 24px; stroke-width: 1.7; }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.checks li { position: relative; padding-left: 1.7rem; margin: 0; color: var(--text-muted); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 1rem; height: 1rem; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9.6 16.6 5 12l1.4-1.4 3.2 3.2 8-8L19 7.2z'/%3E%3C/svg%3E") center/110% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9.6 16.6 5 12l1.4-1.4 3.2 3.2 8-8L19 7.2z'/%3E%3C/svg%3E") center/110% no-repeat;
}
.checks.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .6rem 2rem; }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: 1rem 0 0; list-style: none; }
.chips li { margin: 0; }
.chip { display: inline-block; padding: .35rem .75rem; border-radius: 999px; border: 1.5px solid var(--border-strong); font-size: .8rem; font-weight: 600; color: var(--text-muted); background: transparent; }
.chip-brand { border-color: var(--accent); color: var(--accent); }

/* --------------------------------------------------------------- Heroes -- */
.hero, .page-hero { padding: clamp(2.6rem, 5vw, 4.2rem) 0 clamp(2.2rem, 4vw, 3rem); border-bottom: 1.5px solid var(--ink); }
.hero h1, .page-hero h1 { max-width: 16ch; }
/* The homepage headline stays on one line: sized to the column (the text is about 19 x its
   font-size wide) and capped by the type scale. Narrow columns wrap it instead of shrinking
   it below 2rem. Browsers without container units keep the wrapped layout. */
@supports (font-size: 1cqi) {
  .hero h1 { max-width: none; white-space: nowrap; font-size: min(clamp(2.3rem, 4.4vw, 3.9rem), calc((min(100cqi, 1080px) - 2 * clamp(24px, 5vw, 72px)) / 19.4)); }
  @container (max-width: 640px) { .hero h1 { white-space: normal; font-size: clamp(1.9rem, 7.5cqi, 2.4rem); } }
}
.hero .lead, .page-hero .lead { margin-bottom: 0; }
.gradient-text { color: var(--accent); }
.hero-badge {
  display: inline-flex; align-items: center; gap: .55rem; padding: .35rem .85rem .35rem .4rem;
  border-radius: 999px; border: 1.5px solid var(--border-strong); font-size: .8rem; font-weight: 700; color: var(--text-muted); margin-bottom: 1.3rem;
}
.hero-badge b { padding: .15rem .5rem; border-radius: 999px; font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; background: var(--accent); color: var(--on-accent); }
.hero-wide { margin: clamp(1.6rem, 3vw, 2.4rem) 0 0; border: 1.5px solid var(--border-strong); border-radius: var(--radius); padding: clamp(1rem, 2.5vw, 2rem); background: var(--bg-elev); }
.crumbs { display: flex; flex-wrap: wrap; gap: .45rem; font-size: .82rem; margin-top: 1.3rem; color: var(--text-faint); }
.crumbs a { color: var(--text-muted); }
.crumbs span[aria-current] { color: var(--text); font-weight: 600; }
.crumbs .sep { opacity: .5; }
.hero-wordmark { display: none; }   /* the name lives in the rail now */

/* --------------------------------------------------------------- Stats -- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border-bottom: 1px solid var(--border-strong); }
.stat { padding: 1.3rem 1.2rem 1.3rem 0; border-left: 1px solid var(--border-strong); padding-left: 1.2rem; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b { display: block; font-size: clamp(1.9rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: var(--text); }
.stat span { font-size: .76rem; font-weight: 700; letter-spacing: .08em; color: var(--text-faint); text-transform: uppercase; }
.stats-bar { margin-top: clamp(1.6rem, 3vw, 2.4rem); }

/* ------------------------------------------------- Alternating rows -- */
.rows { display: flex; flex-direction: column; }
.row-item {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  padding: clamp(1.6rem, 3vw, 2.4rem) 0; border-top: 1px solid var(--border-strong);
}
.row-item:nth-child(even) .row-media { order: 2; }
.row-media { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 1rem; background: var(--bg-elev); }
.row-body h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); margin-bottom: .4rem; }
.row-body p { color: var(--text-muted); }
@container (max-width: 560px) { .row-item { grid-template-columns: 1fr; } .row-item:nth-child(even) .row-media { order: 0; } }

/* --------------------------------------------------------------- Steps -- */
.steps { counter-reset: step; display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); container-type: inline-size; }
.step { position: relative; padding-top: 3.1rem; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0; width: 2.4rem; height: 2.4rem; display: grid; place-items: center;
  border-radius: var(--radius-s); background: var(--ink); color: var(--bg); font-weight: 800; font-size: .95rem;
}
.step h3 { font-size: 1.08rem; margin-bottom: .35rem; }
.step p { color: var(--text-muted); font-size: .94rem; margin: 0; }
/* .steps is a size container, and style containment scopes CSS counters per step,
   so the numbers are set by position instead of counted */
.step:nth-child(1)::before { content: "01"; } .step:nth-child(2)::before { content: "02"; } .step:nth-child(3)::before { content: "03"; }
.step:nth-child(4)::before { content: "04"; } .step:nth-child(5)::before { content: "05"; } .step:nth-child(6)::before { content: "06"; }

/* --------------------------------------------------------------- Prose -- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.4rem; }
.prose h3 { margin-top: 1.8rem; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-muted); }
.prose strong { color: var(--text); font-weight: 700; }
.prose blockquote { margin: 1.8rem 0; padding: 1.1rem 1.4rem; border-left: 3px solid var(--accent); background: var(--bg-alt); font-size: 1.05rem; color: var(--text); font-style: italic; }
.prose blockquote p:last-child { margin-bottom: 0; }

.doc { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(2rem, 4vw, 3rem); align-items: start; }
@container (max-width: 700px) { .doc { grid-template-columns: 1fr; } }
.doc-aside { position: sticky; top: 24px; display: grid; gap: 1.1rem; }
@container (max-width: 700px) { .doc-aside { position: static; } }
.aside-card { background: var(--bg-alt); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 1.3rem; }
.aside-card h4 { margin-bottom: .7rem; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); }
.aside-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .1rem; }
.aside-card li { margin: 0; }
.aside-card li a { display: block; padding: .38rem 0; font-size: .92rem; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.aside-card li a:hover { color: var(--accent); text-decoration: none; }
.aside-card li a[aria-current="page"] { color: var(--accent); }

.table-scroll { overflow-x: auto; border: 1.5px solid var(--border-strong); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 520px; }
th, td { padding: .85rem 1.1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg-alt); font-weight: 800; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
tbody tr:last-child td { border-bottom: 0; }
td { color: var(--text-muted); }
caption { color: var(--text-faint); }

/* ------------------------------------------------------------ Showcase -- */
.shot { border: 1.5px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; background: var(--bg-alt); }
.shot img { width: 100%; aspect-ratio: 16/9; object-fit: cover; object-position: top center; }
.project .shot { margin-bottom: 1rem; }
.illus { margin: 0; padding: clamp(1rem, 2.5vw, 1.8rem); border: 1.5px solid var(--border-strong); border-radius: var(--radius); background: var(--bg-elev); }
.illus img { width: 100%; height: auto; }
.illus figcaption { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--border); font-size: .88rem; color: var(--text-muted); }
.illus-sm { max-width: 560px; margin-inline: auto; }

/* ----------------------------------------------------------------- CTA -- */
.cta { padding: clamp(2rem, 4vw, 3rem) 0 0; border-top: 1.5px solid var(--ink); }
.cta-inner { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; }
.cta-inner > div { flex: 1 1 380px; }
.cta h2 { max-width: 22ch; }
.cta p { color: var(--text-muted); max-width: 56ch; margin-bottom: 0; }

/* -------------------------------------------------------------- Footer -- */
.footer { border-top: 1.5px solid var(--ink); padding: 1.4rem 0 1.6rem; color: var(--text-faint); font-size: .86rem; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; align-items: center; justify-content: space-between; }
.footer a { color: var(--text-muted); }
.social { display: flex; gap: .45rem; }
.social a { width: 34px; height: 34px; display: grid; place-items: center; border: 1.5px solid var(--border-strong); border-radius: var(--radius-s); color: var(--text-muted); }
.social a:hover { border-color: var(--ink); color: var(--text); text-decoration: none; }
.social svg { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- Form -- */
.form-grid { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: .35rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .85rem; font-weight: 700; }
.field input, .field textarea, .field select {
  width: 100%; padding: .72rem .9rem; font: inherit; font-size: .95rem; color: var(--text);
  background: var(--bg); border: 1.5px solid var(--border-strong); border-radius: var(--radius-s);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field .err { font-size: .8rem; color: var(--danger); min-height: 1em; }
.form-note { font-size: .84rem; color: var(--text-faint); }
.contact-row { display: flex; gap: .9rem; align-items: flex-start; }
.contact-row + .contact-row { margin-top: 1.3rem; }
.contact-row .icon-badge { margin: 0; flex: 0 0 auto; width: 40px; height: 40px; }
.contact-row .icon-badge svg { width: 20px; height: 20px; }
.contact-row h4 { margin-bottom: .1rem; font-size: .95rem; }
.contact-row p { margin: 0; color: var(--text-muted); font-size: .94rem; }

/* -------------------------------------------------------------- Reveal -- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal, .js .reveal { opacity: 1; transform: none; transition: none; } }

/* --------------------------------------------------------------- Utils -- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.muted { color: var(--text-muted); } .small { font-size: .9rem; }

/* ----------------------------------------------------- Letter wave -- */
.wave .ch { display: inline-block; white-space: pre; }
.wave .wd { display: inline-block; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .wave .ch { opacity: 0; animation: chIn .6s cubic-bezier(.2, .8, .3, 1) forwards; animation-delay: calc(var(--i) * 30ms); }
  .wave-loop .ch { animation: chIn .6s cubic-bezier(.2, .8, .3, 1) forwards, chWeight 4.5s ease-in-out infinite; animation-delay: calc(var(--i) * 30ms), calc(2.2s + var(--i) * 46ms); }
}
@keyframes chIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes chWeight { 0%, 62%, 100% { font-weight: var(--w-hi, 800); transform: none; } 78% { font-weight: var(--w-lo, 500); transform: translateY(-3px); } }

/* ----------------------------------------------------- Colour wave -- */
.colorwave { --c1: #0f766e; --c2: #1d4ed8; --c3: #7c3aed; --c4: #b42318; --c5: #b45309; --c6: #0e7490; --step: 90ms; }
:root[data-theme="dark"] .colorwave { --c1: #2dd4bf; --c2: #60a5fa; --c3: #a78bfa; --c4: #f87171; --c5: #fbbf24; --c6: #22d3ee; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .colorwave { --c1: #2dd4bf; --c2: #60a5fa; --c3: #a78bfa; --c4: #f87171; --c5: #fbbf24; --c6: #22d3ee; }
}
.colorwave .ch { animation: chColor calc(var(--step) * 6) steps(1, end) infinite; animation-delay: calc(var(--i) * var(--step) * -1); animation-play-state: paused; }
@media (prefers-reduced-motion: no-preference) { .colorwave .ch { animation-play-state: running; } }
@keyframes chColor { 0% { color: var(--c1); } 16.666% { color: var(--c2); } 33.333% { color: var(--c3); } 50% { color: var(--c4); } 66.666% { color: var(--c5); } 83.333% { color: var(--c6); } }

/* ------------------------------------------------------------- Slider -- */
.slider { position: relative; }
.slider-frame { position: relative; overflow: hidden; border-radius: var(--radius); border: 1.5px solid var(--border-strong); background: var(--bg-alt); }
.slider-track { display: flex; transition: transform .6s cubic-bezier(.4, .1, .2, 1); }
@media (prefers-reduced-motion: reduce) { .slider-track { transition: none; } }
.slide { flex: 0 0 100%; min-width: 0; position: relative; }
.slide img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top center; background: var(--bg-alt); }
.slide-caption { position: absolute; inset: auto 0 0 0; padding: 2.4rem 1.4rem 1.2rem; background: linear-gradient(to top, rgba(15, 20, 22, .9) 15%, rgba(15, 20, 22, .5) 55%, transparent); color: #fff; }
.slide-caption h3 { color: #fff; margin: 0 0 .2rem; font-size: 1.2rem; }
.slide-caption p { margin: 0; color: #d5dbdb; font-size: .9rem; max-width: 62ch; }
.slide-caption .chip { border-color: rgba(255,255,255,.4); color: #fff; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 42px; height: 42px; border-radius: var(--radius-s); display: grid; place-items: center; background: var(--bg); color: var(--text); border: 1.5px solid var(--ink); cursor: pointer; }
.slider-btn:hover { background: var(--ink); color: var(--bg); }
.slider-btn svg { width: 19px; height: 19px; }
.slider-prev { left: 12px; } .slider-next { right: 12px; }
.slider-bar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.slider-dots { display: flex; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.slider-dots li { margin: 0; }
.slider-dot { width: 28px; height: 4px; border-radius: 2px; border: 0; padding: 0; cursor: pointer; background: var(--border-strong); }
.slider-dot[aria-current="true"] { background: var(--accent); width: 44px; }
.slider-status { font-size: .84rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.slider-play { margin-left: auto; display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .85rem; border-radius: var(--radius-s); background: transparent; border: 1.5px solid var(--border-strong); color: var(--text-muted); font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; }
.slider-play:hover { border-color: var(--ink); color: var(--text); }
.slider-play svg { width: 12px; height: 12px; }
.slider-play .i-play { display: none; }
.slider.is-paused .slider-play .i-play { display: block; }
.slider.is-paused .slider-play .i-pause { display: none; }
.slider-thumbs { display: flex; gap: .5rem; margin: .8rem 0 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.slider-thumbs li { margin: 0; flex: 0 0 auto; }
.slider-thumb { width: 100px; padding: 0; border-radius: var(--radius-s); overflow: hidden; cursor: pointer; border: 1.5px solid var(--border-strong); background: none; display: block; opacity: .6; }
.slider-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top center; }
.slider-thumb:hover { opacity: .9; }
.slider-thumb[aria-current="true"] { opacity: 1; border-color: var(--accent); }
@media (max-width: 560px) { .slider-thumbs { display: none; } }

/* -------------------------------------------------------- 3-D ring -- */
.ring-stage { --w: 250px; --h: 176px; --r: 320px; position: relative; perspective: 1500px; height: calc(var(--h) + 36px); overflow: hidden; }
.ring { position: absolute; inset: 18px 0 auto 0; height: var(--h); transform-style: preserve-3d; transform: rotateY(var(--angle, 0deg)); transition: transform .8s cubic-bezier(.25, .8, .3, 1); }
@media (prefers-reduced-motion: reduce) { .ring { transition: none; } }
.ring-face {
  position: absolute; top: 0; left: 50%; width: var(--w); height: var(--h); margin-left: calc(var(--w) / -2);
  transform: rotateY(var(--a)) translateZ(var(--r)); backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: grid; place-content: center; gap: .4rem; padding: 1rem; text-align: center;
  border-radius: var(--radius); background: var(--bg-elev); border: 1.5px solid var(--border-strong); opacity: .45; transition: opacity .4s, border-color .4s;
}
.ring-face[data-active="true"] { opacity: 1; border-color: var(--accent); }
.ring-face .ring-icon { width: 42px; height: 42px; margin: 0 auto .3rem; display: grid; place-items: center; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); }
.ring-face .ring-icon svg { width: 22px; height: 22px; stroke-width: 1.7; }
.ring-face b { font-size: 1rem; font-weight: 800; color: var(--text); }
.ring-face span { font-size: .8rem; color: var(--text-muted); }
.ring-bar { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-top: 1.2rem; }
.ring-btn { width: 40px; height: 40px; border-radius: var(--radius-s); display: grid; place-items: center; background: var(--bg); color: var(--text); border: 1.5px solid var(--ink); cursor: pointer; }
.ring-btn:hover { background: var(--ink); color: var(--bg); }
.ring-btn svg { width: 18px; height: 18px; }
.ring-label { font-size: .9rem; font-weight: 700; min-width: 12ch; text-align: center; }
@media (max-width: 720px) { .ring-stage { --w: 190px; --h: 160px; --r: 240px; } }
@media (max-width: 460px) { .ring-stage { --w: 160px; --h: 150px; --r: 200px; } }

/* ------------------------------------------------------------ Mobile -- */
@media (max-width: 1080px) {
  body { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .rail { grid-column: 1; grid-row: 1; height: var(--bar-h); overflow: visible; z-index: 100; padding: .7rem 18px; gap: 0; flex-direction: row; align-items: center; border-right: 0; border-bottom: 1.5px solid var(--border-strong); }
  .rail-top { flex: 1; }
  .rail nav { display: none; }
  .burger { display: grid; }
  .rail-top .nav-cta { display: inline-flex; }
  main, .footer { grid-column: 1; }
  .brand-name small { display: none; }
  /* the whole nav (name, menu, contact) becomes the overlay while the menu is open */
  .rail nav:has(> .menu.mobile-open) { display: flex; position: fixed; top: var(--bar-h); left: 0; right: 0; bottom: 0; overflow-y: auto; background: var(--bg); border-top: 1.5px solid var(--ink); padding: 1rem 18px 2rem; gap: 1.2rem; z-index: 99; }
  .rail nav:has(> .menu.mobile-open) .rail-contact { margin-top: .6rem; }
  .menu { border-top: 0; }
  .menu.mobile-open > li > .row > a { padding: .9rem 0; }
}

/* short desktop viewports: keep the rail's contact block and button in reach */
@media (min-width: 1081px) and (max-height: 900px) {
  .rail { padding: 18px 24px 18px; gap: 14px; }
  .menu > li > .row > a { padding: .5rem 0; }
  .submenu a { padding: .28rem 0; }
  .rail-contact { font-size: .8rem; }
}
/* very narrow phones: the compact pill gives way so the brand and controls fit */
@media (max-width: 380px) { .rail-top .nav-cta { display: none; } }

/* --------------------------------------------------------- Image motion -- */
/* One orchestrated reveal: a teal bar sweeps across as the image wipes in
   behind it and settles from a slight zoom; siblings stagger by --i. Hover
   gives a gentle lift; the active slide drifts slowly. Reduced motion gets
   the finished state immediately, and so does a page without JS. */
.img-anim { display: block; position: relative; overflow: hidden; border-radius: inherit; }
.img-anim img { display: block; width: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .js .img-anim img {
    clip-path: inset(0 100% 0 0); transform: scale(1.06);
    transition: clip-path .9s cubic-bezier(.65, 0, .35, 1) calc(var(--i, 0) * 110ms),
                transform 1.3s cubic-bezier(.2, .8, .3, 1) calc(var(--i, 0) * 110ms);
  }
  .js .img-anim.in img { clip-path: inset(0 0 0 0); transform: none; }
  .js .img-anim::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 3px;
    background: var(--accent); opacity: 0; pointer-events: none;
  }
  .js .img-anim.in::after { animation: imgSweep .9s cubic-bezier(.65, 0, .35, 1) calc(var(--i, 0) * 110ms) forwards; }
  @keyframes imgSweep { 0% { opacity: 1; left: 0; } 85% { opacity: 1; } 100% { opacity: 0; left: 100%; } }
  @media (hover: hover) {
    .img-anim.in img { transition: transform .5s cubic-bezier(.2, .8, .3, 1); }
    .img-anim.in:hover img { transform: scale(1.03); }
  }
  .slide[aria-hidden="false"] img { animation: kenBurns 9s ease-out forwards; }
  @keyframes kenBurns { from { transform: scale(1.07); } to { transform: scale(1); } }
}
/* hover colour on the frame that holds the image */
.row-media:has(.img-anim.in:hover), .illus:has(.img-anim.in:hover), .shot:has(.img-anim.in:hover), .hero-wide:has(.img-anim.in:hover) { border-color: var(--accent); transition: border-color .3s; }

/* ---------------------------------------------------------- Hero scene -- */
/* An inline SVG, so it takes the theme tokens: an AI core inside a cloud, six
   service satellites on two orbits (SMIL motion, paused by script when the
   visitor prefers reduced motion or the scene is off-screen), data packets
   running in from four dashboard cards, a pointer parallax on desktop and a
   staggered entrance keyed off the figure's reveal. Reduced motion, or no
   script, gets the finished picture straight away. */
:root { --hs-b: #2563eb; --hs-c: #d97706; --hs-d: #7c3aed; }
:root[data-theme="dark"] { --hs-b: #60a5fa; --hs-c: #fbbf24; --hs-d: #a78bfa; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --hs-b: #60a5fa; --hs-c: #fbbf24; --hs-d: #a78bfa; } }

.hero-stage { --px: 0; --py: 0; position: relative; overflow: hidden; }
/* pointer-events off so the figure is the hover target and the SVG <title> never shows as a tooltip */
.hero-scene { display: block; width: 100%; height: auto; max-width: 720px; margin: 0 auto; user-select: none; pointer-events: none; }
.hero-scene text { font-family: var(--font); }
.hs-dot { fill: var(--border-strong); }
.hs-st-a { stop-color: var(--accent); }
.hs-st-b { stop-color: var(--hs-b); }
.hs-lane { fill: none; stroke: var(--border-strong); stroke-width: 1.5; stroke-dasharray: 3 6; }
.hs-orbit { fill: none; stroke: var(--border-strong); stroke-width: 1.2; stroke-dasharray: 2 6; }
.hs-pkt { fill: var(--sc); }
.hs-cloud { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }
.hs-pin { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.hs-chip { fill: var(--bg-elev); stroke: var(--ink); stroke-width: 2; }
.hs-chip-in { fill: var(--accent); }
.hs-core-t { fill: var(--on-accent); font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.hs-pulse { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: 0; }
.hs-sat circle { fill: var(--bg-elev); stroke: var(--sc); stroke-width: 2; }
.hs-sat path, .hs-sat rect, .hs-sat ellipse { fill: none; stroke: var(--sc); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hs-sat .hs-fill { fill: var(--sc); stroke: none; }
.hs-sat-t { fill: var(--text-muted); font-size: 13px; font-weight: 700; }
.hs-card { fill: var(--bg-elev); stroke: var(--border-strong); stroke-width: 1.5; }
.hs-lbl { fill: var(--text-faint); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.hs-val { fill: var(--text); font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.hs-val.c { fill: var(--hs-c); }
.hs-sub { fill: var(--text-muted); font-size: 11px; font-weight: 600; }
.hs-tiny { fill: var(--text-muted); font-size: 10px; font-weight: 800; }
.hs-spark { fill: none; stroke: var(--hs-b); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hs-spark-dot { fill: var(--hs-b); }
.hs-track { fill: none; stroke: var(--border); stroke-width: 6; stroke-linecap: round; }
.hs-gauge { fill: none; stroke: var(--hs-c); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 82; stroke-dashoffset: 26; }
.hs-bar { fill: var(--accent); }
.hs-bar.alt { fill: var(--hs-b); }
.hs-pill { fill: var(--accent-soft); }
.hs-pill-i { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hs-pill-t { fill: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.hs-link { stroke: var(--border-strong); stroke-width: 1; }
.hs-node { fill: var(--hs-d); }
.hs-node.a { fill: var(--accent); }
.hs-sig { fill: var(--accent); }
/* narrow columns: crop to the hub and orbits, drop the side cards */
@container (max-width: 600px) {
  .hero-scene { aspect-ratio: 4 / 3; }
  .hero-scene .hs-side { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .hero-scene .hs-in {
    opacity: 0; transform: translateY(14px);
    transition: opacity .7s ease calc(.15s + var(--i, 0) * 120ms), transform .7s cubic-bezier(.2, .8, .3, 1) calc(.15s + var(--i, 0) * 120ms);
  }
  .js .hero-stage.in .hs-in { opacity: 1; transform: none; }
  .hs-pulse { animation: hsPulse 4.2s cubic-bezier(.2, .6, .3, 1) infinite; animation-delay: calc(var(--i, 0) * 1.4s); transform-box: fill-box; transform-origin: center; }
  .hs-float { animation: hsFloat 5.5s ease-in-out infinite alternate; animation-delay: calc(var(--f, 0) * -1.4s); }
  .hs-blob { animation: hsDrift 16s ease-in-out infinite alternate; animation-delay: calc(var(--f, 0) * -8s); }
  .hs-lane { animation: hsFlow 1.1s linear infinite; }
  .hs-node { animation: hsNode 2.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -.35s); }
  .hs-spark-dot { animation: hsDot 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .js .hero-scene .hs-spark { stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.6s ease-out .9s; }
  .js .hero-stage.in .hs-spark { stroke-dashoffset: 0; }
  .js .hero-scene .hs-gauge { stroke-dashoffset: 82; transition: stroke-dashoffset 1.4s cubic-bezier(.2, .8, .3, 1) 1s; }
  .js .hero-stage.in .hs-gauge { stroke-dashoffset: 26; }
  .js .hero-scene .hs-bar { transform: scaleY(0); transform-box: fill-box; transform-origin: bottom; transition: transform .8s cubic-bezier(.2, .8, .3, 1) calc(1s + var(--i, 0) * 80ms); }
  .js .hero-stage.in .hs-bar { transform: none; }
  @media (hover: hover) and (pointer: fine) {
    .hs-layer { transform: translate(calc(var(--px) * var(--d, 0) * 1px), calc(var(--py) * var(--d, 0) * 1px)); transition: transform .5s cubic-bezier(.2, .8, .3, 1); }
  }
  @keyframes hsPulse { 0% { transform: scale(.7); opacity: .6; } 100% { transform: scale(2.4); opacity: 0; } }
  @keyframes hsFloat { from { transform: translateY(0); } to { transform: translateY(-6px); } }
  @keyframes hsDrift { from { transform: translate(0, 0); } to { transform: translate(28px, 18px); } }
  @keyframes hsFlow { to { stroke-dashoffset: -9; } }
  @keyframes hsNode { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
  @keyframes hsDot { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.7); } }
}
@media (prefers-reduced-motion: reduce) { .hs-pulse, .hs-pkt, .hs-sig { display: none; } }
/* set by script while the scene is scrolled out of view or the tab is hidden */
.hs-off .hero-scene * { animation-play-state: paused; }

/* ---------------------------------------------------- Homepage graphics -- */
/* icons on the stats, the delivery steps (with a connector that draws in
   between them on wide layouts), the "why" cards and the closing CTA */
.stat .stat-ico { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--radius-s); background: var(--accent-soft); color: var(--accent); margin-bottom: .75rem; }
.stat .stat-ico svg { width: 19px; height: 19px; stroke-width: 1.9; }
.step-ico { position: absolute; top: 0; left: 2.9rem; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: var(--radius-s); background: var(--accent-soft); color: var(--accent); }
.step-ico svg { width: 20px; height: 20px; stroke-width: 1.9; }
/* only once all four steps sit on one row (4 x 200px + 3 gaps) */
@container (min-width: 872px) {
  .step:not(:last-child)::after { content: ""; position: absolute; top: 1.2rem; left: 5.7rem; right: -1.4rem; height: 1.5px; background: var(--border-strong); transform-origin: left; }
  @media (prefers-reduced-motion: no-preference) {
    .js .step:not(:last-child)::after { transform: scaleX(0); transition: transform .8s cubic-bezier(.2, .8, .3, 1) .35s; }
    .js .step.in:not(:last-child)::after { transform: none; }
  }
}
.cta-inner > .cta-art { flex: 0 0 auto; width: 150px; margin-inline: auto; }
.cta-art svg { width: 100%; height: auto; overflow: visible; }
.ca-ring { fill: none; stroke: var(--border-strong); stroke-width: 1.5; stroke-dasharray: 3 6; }
.ca-dot { fill: var(--accent); }
.ca-dot.b { fill: var(--hs-b); }
.ca-dot.c { fill: var(--hs-c); }
.ca-dot.d { fill: var(--hs-d); }
.ca-core { fill: var(--accent); }
.ca-plane { fill: none; stroke: var(--on-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ca-spin { transform-box: view-box; transform-origin: 80px 80px; }
@container (max-width: 700px) { .cta-inner > .cta-art { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  .ca-spin-1 { animation: caSpin 30s linear infinite; }
  .ca-spin-2 { animation: caSpin 18s linear infinite reverse; }
  @keyframes caSpin { to { transform: rotate(360deg); } }
}
