/* ==========================================================
   Teleios IT Consulting — site styles
   Plain CSS, no build step. Mobile-first.
   Dark, flat, hairline structure. No gradients or glows:
   the only colour is one blue accent and one status green.
   ========================================================== */

/* Fonts are self-hosted so visitors' browsers never contact a third party (POPIA / GDPR).
   IBM Plex, SIL Open Font License 1.1. Latin subset only. */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-var-latin.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-400-latin.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-500-latin.woff2") format("woff2");
}

:root {
  --bg: #0a0a0b;
  --bg-2: #111114;
  --bg-3: #17171b;
  --line: #222226;
  --line-2: #2e2e34;
  --line-3: #45454d;
  --text: #ededef;
  --muted: #a1a1aa;
  --dim: #80808a;
  --accent: #5b8cff;     /* StoreSuite blue, lightened for dark backgrounds */
  --ok: #3fcf8e;

  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1200px;
  --gutter: 20px;
  --header-h: 64px;
  --space: clamp(72px, 9vw, 128px);
}

@media (min-width: 768px) {
  :root { --gutter: 40px; }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
p, figure, dl, dd { margin: 0; }

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-wrap: balance;
}

a { color: inherit; }

::selection { background: var(--accent); color: #fff; }

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
}
.skip-link:focus { left: 12px; }

.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--dim);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(63, 207, 142, 0.15);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: #fff; }
.btn-outline { border-color: var(--line-2); color: var(--text); }
.btn-outline:hover { border-color: var(--line-3); background: var(--bg-2); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.875rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 11, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-name { font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; }
.brand-sub {
  padding-left: 10px;
  border-left: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
}

.nav-toggle {
  min-height: 36px;
  padding: 0 14px;
  font: inherit;
  font-size: 0.875rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  cursor: pointer;
}

.nav-menu {
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  padding: 0 var(--gutter) 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav-menu.is-open { display: flex; }

.nav-link {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
}
.nav-link:hover,
.nav-link[aria-current="page"] { color: var(--text); }
.nav-link[aria-current="page"] { font-weight: 500; box-shadow: inset 2px 0 0 var(--accent); padding-left: 12px; }
.nav-menu .btn { margin-top: 20px; align-self: flex-start; }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .nav-menu {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 28px;
    padding: 0;
    border: 0;
    background: none;
  }
  .nav-menu { align-self: stretch; gap: 26px; }
  .nav-link {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-size: 0.9063rem;
  }
  .nav-link[aria-current="page"] { padding-left: 0; box-shadow: none; border-bottom-color: var(--accent); }
  .nav-menu .btn { margin: 0 0 0 4px; align-self: center; }
}

/* ---------- Hero ---------- */

.hero { padding-top: clamp(56px, 8vw, 112px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 64px; }
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 14ch;
}

.lead {
  margin-top: 24px;
  max-width: 56ch;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  color: var(--muted);
}
.lead a { color: var(--text); text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.lead a:hover { text-decoration-color: var(--text); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Layer diagram */
.stack {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  overflow: hidden;
}
.stack-cap {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
}
.stack-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
}
@media (min-width: 520px) {
  .stack-body { grid-template-columns: minmax(0, 1fr) 40px 40px; gap: 10px; }
}
@media (max-width: 519px) {
  .layer-tags { display: none; }
  .layers li { padding-block: 12px; }
}

.layers {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.layers li {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 3px;
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--bg-3);
  transition: border-color 0.15s ease;
}
.layers li:hover { border-color: var(--accent); }
.layers li + li::before {
  /* connector between layers */
  content: "";
  position: absolute;
  top: -13px;
  left: 31px;
  width: 1px;
  height: 12px;
  background: var(--line-3);
}
.layer-id { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); padding-top: 3px; }
.layer-name { font-weight: 600; font-size: 0.9688rem; }
.layer-tags { grid-column: 2; font-family: var(--mono); font-size: 0.75rem; color: var(--dim); }

.crossbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px dashed rgba(91, 140, 255, 0.6);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-align: center;
}
.crossbar-ok { border-color: rgba(63, 207, 142, 0.55); color: var(--ok); }
@media (min-width: 520px) {
  .crossbar span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
}

/* Facts row */
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(56px, 7vw, 96px);
  border-top: 1px solid var(--line);
}
@media (min-width: 860px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.facts div { padding: 18px 16px 22px 0; min-width: 0; }
.facts dt { font-family: var(--mono); font-size: 0.75rem; color: var(--dim); }
.facts dd { margin-top: 4px; font-size: 0.9375rem; overflow-wrap: anywhere; }
.facts a { text-decoration: none; }
.facts a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Sections ---------- */

.section { padding-block: var(--space); border-top: 1px solid var(--line); }

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
@media (min-width: 900px) {
  .sec-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 64px; align-items: end; }
}
.sec-head h2,
.case h2,
.about h2,
.contact-panel h2 {
  margin-top: 14px;
  font-size: clamp(1.875rem, 1.3rem + 2vw, 2.75rem);
}
.sec-intro { max-width: 52ch; font-size: 1.0625rem; color: var(--muted); }

/* ---------- Page header (inner pages) ---------- */

.page-head {
  padding-block: clamp(56px, 8vw, 104px) clamp(40px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  margin-top: 18px;
  max-width: 20ch;
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}
.page-head .lead { margin-top: 22px; }
.page-head + .section { border-top: 0; padding-top: clamp(40px, 5vw, 64px); }

/* ---------- Approach ---------- */

.problems {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
@media (min-width: 760px) { .problems { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .problems-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.problem { padding: clamp(24px, 3vw, 32px); background: var(--bg); }
.problem-tag { font-family: var(--mono); font-size: 0.75rem; color: var(--dim); }
.problem-tag s { color: var(--muted); text-decoration-color: var(--dim); }
.problem-tag b { font-weight: 500; color: var(--accent); }
.problem h3 { margin-top: 20px; font-size: 1.125rem; letter-spacing: -0.015em; line-height: 1.3; }
.problem > p:last-child { margin-top: 10px; font-size: 0.9688rem; color: var(--muted); }

.honest {
  margin-top: 24px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 8px;
  background: var(--bg-2);
}
.honest p { max-width: 82ch; color: var(--muted); }
.honest strong { color: var(--text); font-weight: 500; }

/* ---------- Services ---------- */

.services {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
@media (min-width: 860px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.service {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 36px);
  background: var(--bg);
  transition: background-color 0.2s ease;
}
.service:hover { background: var(--bg-2); }

.service-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 28px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
}
.service-top span { color: var(--accent); }
.service h3 { font-size: 1.375rem; letter-spacing: -0.02em; line-height: 1.2; }
.service-desc { margin-top: 12px; font-size: 0.9844rem; color: var(--muted); }

.includes {
  display: grid;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}
.includes li { display: grid; grid-template-columns: 20px minmax(0, 1fr); }
.includes li::before { content: "+"; font-family: var(--mono); color: var(--accent); }

.service-stack {
  margin-top: auto;
  padding-top: 28px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
}

/* ---------- Home: services overview ---------- */

.overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
@media (min-width: 640px) { .overview { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .overview { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.overview li { display: flex; }
.overview a {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--bg);
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.overview a:hover { background: var(--bg-2); }
.overview-kind { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); }
.overview-title { margin-top: 16px; font-weight: 600; font-size: 1.0625rem; line-height: 1.3; letter-spacing: -0.01em; }
.overview-desc { margin-top: 8px; font-size: 0.9375rem; color: var(--muted); }
.overview-more { margin-top: auto; padding-top: 20px; font-family: var(--mono); font-size: 0.75rem; color: var(--dim); }
.overview a:hover .overview-more { color: var(--text); }

/* ---------- Call to action (end of each page) ---------- */

.cta { padding-block: clamp(56px, 7vw, 96px); }
.cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-2);
}
@media (min-width: 960px) {
  .cta-panel { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 48px; }
}
.cta-panel h2 { max-width: 22ch; font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.25rem); }
.cta-panel p { margin-top: 12px; color: var(--muted); }
.cta-panel .actions { margin-top: 0; }

/* ---------- Compliance ---------- */

.compliance {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
@media (min-width: 860px) { .compliance { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.compliance > div { padding: clamp(24px, 3vw, 36px); background: var(--bg); }
.compliance h3 { font-size: 1.25rem; letter-spacing: -0.02em; }
.compliance .includes li::before { content: "\2713"; color: var(--ok); }
.compliance-note { margin-top: 24px; font-size: 0.875rem; color: var(--dim); }

/* ---------- StoreSuite ---------- */

.case {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
@media (min-width: 960px) { .case { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; } }
.case-link { margin-top: 28px; }

.case h2 { max-width: 20ch; }
.case-lead { max-width: 58ch; font-size: 1.125rem; }
.case-text { margin-top: 14px; max-width: 58ch; color: var(--muted); }

.spec {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  overflow: hidden;
  font-size: 0.9375rem;
}
.spec-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
}
.spec dl div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  padding: 12px 16px;
  align-items: baseline;
}
.spec dl div + div { border-top: 1px solid var(--line); }
@media (min-width: 520px) {
  .spec dl div { grid-template-columns: 130px minmax(0, 1fr); gap: 12px; }
}
.spec dt { font-family: var(--mono); font-size: 0.8125rem; color: var(--dim); }
.spec dd { color: var(--text); }
.spec a { color: var(--accent); text-decoration: none; }
.spec a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- About ---------- */

.about { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 900px) { .about { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 64px; } }

.greek { margin-top: 20px; font-family: var(--mono); font-size: 0.8125rem; color: var(--dim); }
.greek span { color: var(--text); }

.prose p { max-width: 60ch; color: var(--muted); }
.prose p + p { margin-top: 18px; }

/* ---------- Contact ---------- */

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-2);
}
.contact-note { color: var(--muted); }
.contact-label { margin-top: 12px; }
.contact-actions { margin-top: 8px; }
.promises { margin-top: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.promises li::before,
.tips .includes li::before { content: "\2713"; color: var(--ok); }

.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: start; }
}
.tips {
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.tips h2 { font-size: 1.25rem; letter-spacing: -0.02em; }
.contact-email {
  justify-self: start;
  font-size: clamp(1.375rem, 1rem + 1.4vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  overflow-wrap: anywhere;
}
.contact-email:hover { color: var(--accent); }

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 28px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
}
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
@media (min-width: 860px) { .faq { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.faq-item { padding: clamp(22px, 3vw, 30px); background: var(--bg); }
.faq-item h2 { font-size: 1.125rem; letter-spacing: -0.015em; line-height: 1.3; }
.faq-item p { margin-top: 10px; color: var(--muted); font-size: 0.9688rem; }
.page-head .lead a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--line-3); }

/* ---------- Privacy notice ---------- */

.doc { padding-block: clamp(48px, 7vw, 96px) var(--space); }
.doc-inner { max-width: 760px; }
.doc h1 { margin-top: 14px; font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem); line-height: 1.05; }
.doc .updated { margin-top: 12px; font-family: var(--mono); font-size: 0.8125rem; color: var(--dim); }
.doc h2 { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 1.375rem; letter-spacing: -0.02em; }
.doc p, .doc li { color: var(--muted); }
.doc p { margin-top: 14px; }
.doc ul { margin: 14px 0 0; padding-left: 20px; }
.doc li + li { margin-top: 6px; }
.doc strong { color: var(--text); font-weight: 500; }
.doc a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* ---------- 404 ---------- */

.error-page { min-height: 100vh; display: grid; align-content: center; justify-items: start; padding-block: 64px; }
.error-page .label { margin-top: 56px; }
.error-page h1 { margin-top: 14px; font-size: clamp(2.25rem, 1.5rem + 3vw, 3.75rem); max-width: 16ch; }
.error-page p.error-text { margin-top: 14px; color: var(--muted); }
.error-page .btn { margin-top: 28px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
