/*
  Synplus Ltd -- site stylesheet.
  Hand-written, no build step. Custom properties carry the palette so the
  page supports light and dark themes from a single source.
*/

:root {
  /* Light palette (default) */
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --text: #1a1d24;
  --text-muted: #4b5563;
  --border: #d7dbe1;
  --border-strong: #b7bec9;
  --accent: #1f5fa8;
  --accent-strong: #17427a;
  --accent-soft: #e8f0fa;
  --focus-ring: #1f5fa8;

  /* Spacing scale, 4px base */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Type scale */
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.375rem;
  --text-xl: 1.75rem;
  --text-2xl: 2.25rem;
  --text-3xl: 2.75rem;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;

  --content-max: 76ch;
  --page-max: 72rem;
  --radius: 3px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12151b;
    --surface: #181c24;
    --surface-raised: #1a1e26;
    --text: #e7e9ee;
    --text-muted: #a7adba;
    --border: #2c313c;
    --border-strong: #3a4150;
    --accent: #5b9bd5;
    --accent-strong: #7fb2e0;
    --accent-soft: #1d2a3a;
    --focus-ring: #7fb2e0;
  }
}

:root[data-theme="dark"] {
  --bg: #12151b;
  --surface: #181c24;
  --surface-raised: #1a1e26;
  --text: #e7e9ee;
  --text-muted: #a7adba;
  --border: #2c313c;
  --border-strong: #3a4150;
  --accent: #5b9bd5;
  --accent-strong: #7fb2e0;
  --accent-soft: #1d2a3a;
  --focus-ring: #7fb2e0;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 650; margin: 0 0 var(--space-4); }
h1 { font-size: var(--text-3xl); letter-spacing: -0.01em; }
h2 { font-size: var(--text-2xl); letter-spacing: -0.005em; }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); }
p { margin: 0 0 var(--space-4); }
ul, ol, dl { margin: 0 0 var(--space-4); padding-left: 1.25em; }
dl { padding-left: 0; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
strong { font-weight: 650; }
code, .mono { font-family: var(--font-mono); font-size: 0.92em; }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -3rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus { top: var(--space-4); }

/* Layout helpers */
.wrap {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.prose > * { max-width: var(--content-max); }
section { padding-block: var(--space-8); }
section + section { border-top: 1px solid var(--border); }
.section-tight { padding-block: var(--space-6); }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.header-inner {
  max-width: var(--page-max);
  margin-inline: auto;
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.logotype {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  font-size: var(--text-md);
  letter-spacing: -0.01em;
}
.logotype:hover { color: var(--text); }

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
}
.nav-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  padding-block: var(--space-1);
  border-bottom: 2px solid transparent;
}
.nav-list a:hover { color: var(--text); }
.nav-list a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; }
  .nav-list { gap: var(--space-3) var(--space-4); }
}

/* Hero */
.hero { padding-block: var(--space-9) var(--space-8); border-top: none; }
.hero .eyebrow {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.hero h1 { max-width: 22ch; }
.hero .lede {
  font-size: var(--text-md);
  color: var(--text-muted);
  max-width: var(--content-max);
}
.hero-summary { max-width: var(--content-max); }

/* Cards / grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-5);
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.card .ref {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.card h3 { margin-bottom: 0; }
.card p:last-child { margin-bottom: 0; }

/* Lists with rule between items (how-we-work, engagement models) */
.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.step-list li {
  padding-block: var(--space-5);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: var(--space-4);
}
.step-list li:first-child { border-top: none; }
.step-list .step-index {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: var(--text-md);
}
.step-list h3 { margin-bottom: var(--space-2); }
.step-list p:last-child { margin-bottom: 0; }

/* Case studies */
.case {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  background: var(--surface);
}
.case + .case { margin-top: var(--space-6); }
.case-meta {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.case h3 { margin-bottom: var(--space-4); }
.case h4 {
  font-size: var(--text-sm);
  text-transform: none;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  font-weight: 650;
}
.case-block { margin-bottom: var(--space-5); }
.case-block:last-child { margin-bottom: 0; }
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}
.tech-tags li {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-1) var(--space-2);
  color: var(--text-muted);
}

.confidentiality-note {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  margin-bottom: var(--space-6);
}
.confidentiality-note p { margin-bottom: 0; }

/* Definition list: company details */
.details-list {
  display: grid;
  grid-template-columns: minmax(10rem, 14rem) 1fr;
  gap: var(--space-2) var(--space-5);
  padding: 0;
  margin: 0;
}
.details-list dt {
  color: var(--text-muted);
  font-size: var(--text-sm);
  padding-top: var(--space-1);
}
.details-list dd {
  margin: 0;
  padding-top: var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
  word-break: break-word;
}
@media (max-width: 560px) {
  .details-list { grid-template-columns: 1fr; }
  .details-list dt { padding-top: var(--space-3); }
}

/* Contact strip / CTA */
.contact-strip {
  background: var(--surface-raised);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.contact-strip .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding-block: var(--space-6);
}
.contact-strip h2 { margin-bottom: var(--space-2); font-size: var(--text-xl); }
.contact-strip p { color: var(--text-muted); margin-bottom: 0; }

.button {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-weight: 600;
  border: 1px solid transparent;
}
.button:hover { background: var(--accent-strong); color: #ffffff; }
.button-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.button-secondary:hover { border-color: var(--accent); color: var(--text); background: transparent; }

.svg-email-protection {
  width: 200px;
  height: 24px;
  vertical-align: middle;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-6);
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.footer-inner {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  align-items: center;
  justify-content: space-between;
}
.footer-links { display: flex; gap: var(--space-4); list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }

/* Response window / info notes */
.note {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
}

@media (max-width: 640px) {
  .hero { padding-block: var(--space-7) var(--space-6); }
  section { padding-block: var(--space-6); }
  h1 { font-size: var(--text-2xl); }
  .step-list li { grid-template-columns: 1fr; gap: var(--space-2); }
}
