/* itechmate.uk: tokens from the design proposal §3 */
:root {
  --bg: #FFFFFF;
  --surface: #F5F7FA;
  --border: #E3E8EF;
  --text: #0F172A;
  --muted: #475569;
  --accent: #1A66DB; /* design token #1F6FEB darkened for AA on --surface */
  --accent-ink: #FFFFFF;
  --ok: #1A7F37;
  --info: #8250DF;
  --warn: #9A6700;
  --plain: #57606A;
  --term-bg: #0E1116;
  --term-text: #E6EAF0;
  --term-muted: #9AA4B2;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: 16px;
  --section: 64px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1116;
    --surface: #161B22;
    --border: #2A313C;
    --text: #E6EAF0;
    --muted: #9AA4B2;
    --accent: #4C8DFF;
    --accent-ink: #0E1116;
    --ok: #3FB950;
    --info: #A371F7;
    --warn: #D29922;
    --plain: #8B949E;
    --term-bg: #161B22;
  }
}

@media (min-width: 900px) {
  :root { --gutter: 24px; --section: 96px; }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  overflow-wrap: break-word;
}

@media (min-width: 900px) { body { font-size: 18px; } }

img, svg { max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: 36px; font-weight: 700; }
h2 { font-size: 28px; font-weight: 600; }
h3 { font-size: 20px; font-weight: 600; }
@media (min-width: 900px) {
  h1 { font-size: 52px; }
  h2 { font-size: 36px; }
  h3 { font-size: 22px; }
}

p, ul, ol, table, dl { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .9em; }
small, .small { font-size: 14px; }

.container { max-width: calc(1120px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: calc(68ch + 2 * var(--gutter)); }
.prose { max-width: 68ch; }
.container.prose { max-width: calc(1120px + 2 * var(--gutter)); }
.container.prose > * { max-width: 68ch; }
.container.prose > .spec { max-width: 760px; }
.lead { font-size: 1.15em; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }

.section { padding: var(--section) 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 68ch; margin-bottom: 32px; }

/* Skip link */
.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 8px 16px; border-radius: 8px;
}
.skip:focus { top: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; min-height: 64px; }
.logo { font-weight: 600; font-size: 22px; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.logo-i { position: relative; }
.logo-i::after {
  content: ""; position: absolute; left: 50%; top: .08em; width: .2em; height: .2em;
  margin-left: -.1em; border-radius: 50%; background: var(--accent);
}
.logo-i { color: var(--text); }

.menu-btn { display: none; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.nav-list a { color: var(--text); text-decoration: none; font-weight: 500; padding: 8px 0; display: inline-block; }
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--accent); }
.sub { list-style: none; margin: 0; padding: 0; }

/* Without JS on small screens the products sub-list is hidden and the nav wraps under the logo. */
@media (max-width: 899px) {
  .site-nav { width: 100%; }
  .sub { display: none; }
  .js .menu-btn {
    display: inline-block; font: inherit; font-weight: 600; color: var(--text); background: transparent;
    border: 1px solid var(--border); border-radius: 8px; padding: 6px 14px; cursor: pointer;
  }
  .js .site-nav { display: none; padding-bottom: 16px; }
  .js .site-nav.open { display: block; }
  .js .nav-list { flex-direction: column; gap: 0; }
  .js .nav-list a { padding: 10px 0; display: block; border-bottom: 1px solid var(--border); }
  .js .sub { display: block; padding-left: 16px; }
}

@media (min-width: 900px) {
  .has-sub { position: relative; }
  .sub {
    display: none; position: absolute; left: -16px; top: 100%; min-width: 220px;
    background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 8px 0;
  }
  .sub a { display: block; padding: 8px 16px; }
  .has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
}

/* Buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }
.btn {
  display: inline-block; padding: 12px 20px; border-radius: 8px; font-weight: 600; text-decoration: none;
  border: 2px solid var(--accent); transition: background-color 150ms, color 150ms;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: transparent; color: var(--accent); }
.btn-secondary { background: transparent; color: var(--accent); }
.btn-secondary:hover { background: var(--accent); color: var(--accent-ink); }

/* Hero */
.hero { padding: var(--section) 0 calc(var(--section) * .75); }
.hero h1 { max-width: 18ch; }
.hero .lead { margin-top: 16px; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; line-height: 1.2;
  padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text);
  vertical-align: middle; white-space: nowrap;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.badge-ok .dot { background: var(--ok); }
.badge-info .dot { background: var(--info); }
.badge-warn .dot { background: var(--warn); }
.badge-plain .dot { background: var(--plain); }

/* Fact strip */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; list-style: none; padding: 0; margin: 0; }
.facts li { border-left: 3px solid var(--accent); padding-left: 16px; }
.facts strong { display: block; font-size: clamp(26px, 7vw, 32px); white-space: nowrap; line-height: 1.1; font-weight: 700; }
.facts span { color: var(--muted); font-size: 15px; }
.facts + p { margin-top: 24px; }
.fact-line { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.fact-line li { font-size: 14px; border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; background: var(--bg); }

/* Cards */
.cards { display: grid; gap: 24px; grid-template-columns: 1fr; list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cards.three { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.section.alt .card { background: var(--bg); }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--muted); }
.card .more { margin-top: auto; font-weight: 600; }
.card-icon { color: var(--accent); }
.card-icon .icon { width: 40px; height: 40px; }

/* Feature grid */
.features { display: grid; gap: 24px 32px; grid-template-columns: 1fr; list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .features.three { grid-template-columns: repeat(3, 1fr); } }
.features li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.features .icon { color: var(--accent); margin-top: 3px; }
.features strong { display: block; }

/* Simple lists */
.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 6px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
.steps { padding-left: 1.4em; }
.steps li { margin-bottom: 8px; padding-left: 4px; }

/* Product rows (overview) */
.product-row { display: grid; gap: 24px; padding: 40px 0; border-top: 1px solid var(--border); }
.product-row:first-of-type { border-top: 0; }
@media (min-width: 900px) {
  .product-row { grid-template-columns: 140px 1fr; gap: 40px; }
}
.product-mark {
  width: 96px; height: 96px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--accent);
}
.product-mark .icon { width: 48px; height: 48px; }
.product-row h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 28px; }

/* Product page */
.breadcrumb { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--muted); }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 8px; }
.title-row h1 { margin: 0; }

/* Tables */
.spec { width: 100%; max-width: 760px; border-collapse: collapse; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.spec th, .spec td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.spec th { width: 34%; font-weight: 600; background: var(--surface); }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }

/* Terminal */
.terminal {
  position: relative; background: var(--term-bg); color: var(--term-text); border-radius: 12px; border: 1px solid var(--border);
  padding: 20px 20px 20px; font: 15px/1.6 var(--mono); overflow-x: auto; max-width: 760px; margin: 0 0 1em;
}
.terminal pre { margin: 0; font: inherit; white-space: pre; }
.terminal .prompt { color: var(--term-muted); user-select: none; }
.copy-btn {
  position: absolute; top: 10px; right: 10px; font: 600 13px var(--font); color: var(--term-text);
  background: transparent; border: 1px solid #3A4350; border-radius: 6px; padding: 4px 10px; cursor: pointer;
}
.copy-btn:hover { border-color: var(--term-text); }

/* Diagrams */
.diagram { margin: 0 0 1em; max-width: 860px; }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram figcaption { color: var(--muted); font-size: 15px; margin-top: 12px; }
.dg-box { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; }
.dg-box.key { stroke: var(--accent); }
.dg-text { fill: var(--text); font: 600 16px var(--font); }
.dg-small { fill: var(--muted); font: 400 13px var(--font); }
.dg-arrow { stroke: var(--accent); stroke-width: 2; fill: none; }
.dg-head { fill: var(--accent); }

/* FAQ */
.faq details { border: 1px solid var(--border); border-radius: 12px; padding: 0 20px; margin-bottom: 12px; background: var(--bg); max-width: 760px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 16px 0; }
.faq details[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.faq details p { margin: 0 0 16px; }

/* Contact */
.contact-card a { font-weight: 600; font-size: 1.05em; }
address { font-style: normal; }

/* CTA band */
.cta-band { background: var(--surface); border-top: 1px solid var(--border); padding: var(--section) 0; }
.cta-band h2 { margin-bottom: 8px; }

.note { border-left: 3px solid var(--warn); padding: 8px 16px; background: var(--surface); max-width: 760px; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 48px 0 32px; font-size: 15px; }
.footer-cols { display: grid; gap: 24px; grid-template-columns: repeat(2, 1fr); margin-bottom: 32px; }
@media (min-width: 900px) { .footer-cols { grid-template-columns: repeat(4, 1fr); } }
.footer-h { font-size: 15px; font-weight: 700; margin: 0 0 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--text); }
.site-footer a:hover { color: var(--accent); }
.company-line { color: var(--muted); font-size: 14px; border-top: 1px solid var(--border); padding-top: 24px; margin: 0; }
.company-line a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

.h3 { font-size: 20px; font-weight: 600; margin: 0; }
@media (min-width: 900px) { .h3 { font-size: 22px; } }
.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;
}
