/* -------------------------
   Design tokens
-------------------------- */

:root {
  /* Colours */
  --color-bg: #000020;
  --color-surface: #F9FAFB;
  --color-text: #c5c5c5;
  --color-text-muted: #828282;
  --color-border: #e5e7eb;
  --color-primary: var(--color-bg);
  --color-primary-contrast: var(--color-surface);
  --color-footer-bg: var(--color-bg);
  --color-footer-text: var(--color-text);

  /* Typography */

  --heading-font-family: Nohemi, sans-serif;
  --heading-color: var(--color-surface);
  --heading-line-height: calc(4px + 2ex);
  --heading-font-weight: 400;
  --heading-letter-spacing: -0.01em;
  --heading-text-wrap: balance;
  --base-heading-lh: calc(4px + 2ex);
  --h1-max-width: 100%;
  --h2-max-width: 100%;
  --h3-font-weight: 500;
  --h3-max-width: 100%;
  --h4-line-height: calc(4px + 2ex);
  --h4-max-width: 100%;
  --h5-max-width: 100%;
  --h6-max-width: 100%;
  --text-font-family: Nohemi, sans-serif;
  --text-color: var(--color-text);
  --text-line-height: calc(6px + 2ex);
  --text-text-wrap: pretty;
  
  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
}

/* -------------------------
   Spacing
-------------------------- */

@supports (padding: clamp(1vw, 2vw, 3vw)) {
  :root {
    --space-xs: clamp(0.8441720333rem, calc(-0.0173419199vw + 0.8485075132rem), 0.8333333333rem);
    --space-s: clamp(1.1252813203rem, calc(0.1995498875vw + 1.0753938485rem), 1.25rem);
    --space-m: clamp(1.5rem, calc(0.6vw + 1.35rem), 1.875rem);
    --space-l: clamp(1.9995rem, calc(1.3008vw + 1.6743rem), 2.8125rem);
    --space-xl: clamp(2.6653335rem, calc(2.4854664vw + 2.0439669rem), 4.21875rem);
    --space-xxl: clamp(3.5528895555rem, calc(4.4403767112vw + 2.4427953777rem), 6.328125rem);
    --section-space-xs: clamp(1.6883440665rem, calc(1.2986494936vw + 1.3636816931rem), 2.5rem);
    --section-space-s: clamp(2.2505626407rem, calc(2.3990997749vw + 1.6507876969rem), 3.75rem);
    --section-space-m: clamp(3rem, calc(4.2vw + 1.95rem), 5.625rem);
    --section-space-l: clamp(3.999rem, calc(7.1016vw + 2.2236rem), 8.4375rem);
    --section-space-xl: clamp(5.330667rem, calc(11.7209328vw + 2.4004338rem), 12.65625rem);
    --section-space-xxl: clamp(7.105779111rem, calc(19.0057534224vw + 2.3543407554rem), 18.984375rem);
    --section-padding-x: clamp(1.25rem, calc(4vw + 0.25rem), 3.75rem);
    --gutter: clamp(1.25rem, calc(4vw + 0.25rem), 3.75rem);
  }
}

@supports (font-size: clamp(1vw, 2vw, 3vw)) {
  :root {
    --text-xs: clamp(0.75rem, calc(-0.2432716956vw + 0.8108179239rem), 0.5979551902rem);
    --text-s: clamp(0.8125rem, calc(-0.0246811703vw + 0.8186702926rem), 0.7970742686rem);
    --text-m: clamp(0.9375rem, calc(0.2vw + 0.8875rem), 1.0625rem);
    --text-l: clamp(1.125rem, calc(0.4661vw + 1.008475rem), 1.4163125rem);
    --text-xl: clamp(1.35rem, calc(0.8607113vw + 1.134822175rem), 1.8879445625rem);
    --text-xxl: clamp(1.62rem, calc(1.4346081629vw + 1.2613479593rem), 2.5166301018rem);
    --h6: clamp(0.75rem, calc(-0.074437289vw + 0.7686093222rem), 0.7034766944rem);
    --h5: clamp(0.8125rem, calc(0.2003750938vw + 0.7624062266rem), 0.9377344336rem);
    --h4: clamp(1rem, calc(0.4vw + 0.9rem), 1.25rem);
    --h3: clamp(1.2rem, calc(0.746vw + 1.0135rem), 1.66625rem);
    --h2: clamp(1.44rem, calc(1.249778vw + 1.1275555rem), 2.22111125rem);
    --h1: clamp(1.728rem, calc(1.972386074vw + 1.2349034815rem), 2.9607412963rem);
  }
}

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

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

/* -------------------------
   Layout helpers
-------------------------- */

.container {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section {
  padding: var(--space-l) 0;
}

.services-grid li,
.case-studies-grid li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-s);
}

/* -------------------------
   Typography
-------------------------- */


.h1 {
  font-size: var(--h1);
  line-height: var(--base-heading-lh);
  font-weight: var(--heading-font-weight);
}

.h2 {
  font-size: var(--h2);
  line-height: var(--base-heading-lh);
  font-weight: var(--heading-font-weight);
}

.h3 {
  font-size: var(--h3);
  line-height: var(--base-heading-lh);
  font-weight: var(--heading-font-weight);
}

.h4 {
  font-size: var(--h4);
  line-height: var(--base-heading-lh);
  font-weight: var(--heading-font-weight);
}

.h5 {
  font-size: var(--h5);
  line-height: var(--base-heading-lh);
  font-weight: var(--heading-font-weight);
}

.h6 {
  font-size: var(--h6);
  line-height: var(--base-heading-lh);
  font-weight: var(--heading-font-weight);
}

.lead {
  font-size: var(--lead);
  line-height: var(--text-line-height);
}

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

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-weight: 700;
  text-decoration: none;
  color: inherit;
}

.main-nav a {
  margin-left: var(--space-sm);
  text-decoration: none;
  color: inherit;
  font-weight: 500;
}

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

.button {
  display: inline-block;
  padding: var(--space-xs) var(--space-s);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-s);
  border: 1px solid transparent;
}

.button.primary {
  background: var(--color-surface);
  color: var(--color-bg);
}

.button.secondary {
  border-color: var(--color-surface);
  color: var(--color-surface);
}

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

.hero .lead {
  max-width: 640px;
  font-size: var(--text-m);
}

.actions a {
  margin-right: var(--space-sm);
}

/* -------------------------
   Surface section
-------------------------- */

.surface {
  background: var(--color-surface);
}

.surface-bordered {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

/* -------------------------
   Split section
-------------------------- */


.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.split h2 {
  font-size: var(--text-lg);
  margin: 0;
}

.split p {
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .split-grid {
    grid-template-columns: 1fr;
  }
}

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

.section-title {
  font-size: var(--text-lg);
  margin-bottom: 2rem;
}

.services-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.services-grid h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.services-grid h3 a {
  color: inherit;
  text-decoration: none;
}

.services-grid h3 a:hover {
  text-decoration: underline;
}

.services-grid p {
  margin: 0;
  color: var(--color-text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* -------------------------
   Case studies
-------------------------- */

.case-studies-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.case-studies-grid h3 {
  margin-top: 0;
  margin-bottom: var(--space-xs);
}

.case-studies-grid a {
  color: inherit;
  text-decoration: none;
}

.case-studies-grid a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .case-studies-grid {
    grid-template-columns: 1fr;
  }
}

/* -------------------------
   Breadcrumbs
-------------------------- */

.breadcrumbs {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
}

.breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs .sep {
  margin: 0 var(--space-xs);
}

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

.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.site-footer strong {
  color: var(--color-footer-text);
}

.site-footer p {
  margin-top: var(--space-sm);
  max-width: 400px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
}

.footer-nav a {
  color: var(--color-footer-text);
  text-decoration: none;
  margin-bottom: var(--space-sm);
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-meta {
  margin-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Utilities
========================================================= */
