/* Fonts are self-hosted so the site has no third-party dependencies */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --green: #8cc63f;
  --green-dark: #74ad28;
  --blue: #3b8fd9;
  --grey: #8a9099;
  --navy: #0f1c2e;
  --navy-2: #172838;
  --navy-3: #22364b;
  --ink: #1c2733;
  --text: #4a5562;
  --light: #f3f6f8;
  --line: #e1e6eb;
  --white: #ffffff;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --wrap: 74rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 10px;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

a {
  color: var(--blue);
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--green);
  color: var(--navy);
  padding: 0.5rem 1rem;
  z-index: 20;
  font-weight: 700;
}

.skip:focus {
  left: 0.5rem;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

/* Header */
.site-head {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
}

.site-head.solid {
  position: static;
  background: var(--navy);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5.5rem;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo svg {
  height: 34px;
  width: auto;
  display: block;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: #dfe6ec;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
  padding: 0.3rem 0;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--green);
}

.site-nav .nav-cta {
  background: var(--green);
  color: var(--navy);
  font-weight: 700;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
}

.site-nav .nav-cta:hover {
  background: var(--white);
  color: var(--navy);
}

/* Buttons */
.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.95rem 1.6rem;
  border-radius: 6px;
  border: 2px solid transparent;
}

.btn-green {
  background: var(--green);
  color: var(--navy);
}

.btn-green:hover {
  background: var(--green-dark);
  color: var(--navy);
}

.btn-outline {
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.btn-dark {
  background: var(--navy);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--navy-3);
  color: var(--white);
}

/* Hero */
.hero {
  position: relative;
  background:
    radial-gradient(60rem 30rem at 85% 20%, rgba(59, 143, 217, 0.22), transparent 60%),
    radial-gradient(40rem 26rem at 10% 90%, rgba(140, 198, 63, 0.14), transparent 60%),
    linear-gradient(180deg, #0c1726 0%, var(--navy) 100%);
  color: #c9d3dc;
  padding: 10rem 0 12rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 3rem;
  align-items: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--green);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  border-radius: 4px;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.5rem, 5.5vw, 4.2rem);
  font-weight: 800;
  font-stretch: 108%;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-top: 1.4rem;
}

.hero-copy p {
  font-size: 1.2rem;
  max-width: 36rem;
  margin: 1.4rem 0 2.2rem;
}

.hero .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-art svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Service cards overlapping the hero */
.services {
  position: relative;
  margin-top: -8rem;
  padding-bottom: 5rem;
}

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

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  box-shadow: 0 18px 40px -18px rgba(15, 28, 46, 0.35);
  border-top: 4px solid var(--green);
}

.card .icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--navy);
  display: grid;
  place-items: center;
  margin-bottom: 1.2rem;
}

.card .icon svg {
  width: 28px;
  height: 28px;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}

.card p {
  margin: 0;
}

.card .tools {
  display: block;
  margin-top: 0.9rem;
  font-size: 0.88rem;
  color: var(--grey);
}

.card.extra {
  border-top-color: var(--blue);
}

/* Generic sections */
.section {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
}

.section-light {
  background: var(--light);
}

.section-head {
  max-width: 44rem;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(2rem, 3.8vw, 2.75rem);
  font-stretch: 105%;
}

.section-head h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: var(--green);
  border-radius: 2px;
  margin: 1.1rem auto 0;
}

.section-head p {
  margin: 1.1rem 0 0;
  font-size: 1.1rem;
}

/* About */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.about h2 {
  font-size: clamp(2rem, 3.6vw, 2.6rem);
  font-stretch: 105%;
}

.about p {
  margin: 1.2rem 0 0;
}

.checks {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  display: grid;
  gap: 0.8rem;
}

.checks li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  color: var(--ink);
  font-weight: 500;
}

.checks svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 0.15rem;
}

.about-panel {
  background: var(--navy);
  border-radius: 14px;
  padding: clamp(1.8rem, 4vw, 2.6rem);
  color: #c9d3dc;
  position: relative;
  overflow: hidden;
}

.about-panel::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(140, 198, 63, 0.15);
}

.about-panel h3 {
  color: var(--white);
  font-size: 1.35rem;
  margin-bottom: 1.4rem;
  position: relative;
}

.figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem 1.2rem;
  margin: 0;
  position: relative;
}

.figures div {
  border-left: 3px solid var(--green);
  padding-left: 1rem;
}

.figures dt {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
}

.figures dd {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
}

/* Process */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem;
  border: 1px solid var(--line);
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green);
  color: var(--navy);
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 1.1rem;
}

.steps h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.steps p {
  margin: 0;
  font-size: 1rem;
}

/* Technologies */
.tech {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tech li {
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 1.15rem;
  color: var(--ink);
  font-weight: 600;
  background: var(--white);
}

/* CTA band */
.cta-band {
  background: var(--green);
  padding: 3.5rem 0;
}

.cta-band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cta-band h2 {
  color: var(--navy);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  max-width: 40rem;
}

.cta-band p {
  margin: 0.5rem 0 0;
  color: var(--navy);
  font-size: 1.1rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  text-align: center;
}

.contact-card .icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(140, 198, 63, 0.16);
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
}

.contact-card .icon svg {
  width: 26px;
  height: 26px;
}

.contact-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.contact-card a,
.contact-card span {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.contact-card a:hover {
  color: var(--blue);
}

/* Footer */
.site-foot {
  background: var(--navy);
  color: #9fb0bf;
  font-size: 0.95rem;
}

.foot-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
  padding: 4rem 0 3rem;
}

.foot-top p {
  margin: 1rem 0 0;
  max-width: 24rem;
}

.foot-top h3 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.foot-top ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.site-foot a {
  color: #c9d3dc;
  text-decoration: none;
}

.site-foot a:hover {
  color: var(--green);
}

.foot-bottom {
  border-top: 1px solid var(--navy-3);
  padding: 1.4rem 0;
  font-size: 0.88rem;
}

/* Page header for inner pages */
.page-head {
  background: var(--navy);
  padding: 3.5rem 0 4rem;
  color: #c9d3dc;
}

.page-head h1 {
  color: var(--white);
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-stretch: 105%;
  max-width: 54rem;
}

.page-head .meta {
  margin: 1rem 0 0;
}

.page-head .back {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1rem;
}

/* Blog list */
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter button {
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 600;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  cursor: pointer;
}

.filter button[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

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

.posts a {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
}

.posts a:hover {
  border-color: var(--green);
}

.posts .thumb {
  aspect-ratio: 16 / 9;
  background: var(--navy-2);
  overflow: hidden;
}

.posts .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  display: block;
}

.posts .body {
  padding: 1.3rem 1.4rem 1.5rem;
}

.posts .topic {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green-dark);
}

.posts h3 {
  font-size: 1.08rem;
  line-height: 1.35;
  margin: 0.4rem 0 0.6rem;
}

.posts time {
  font-size: 0.88rem;
  color: var(--grey);
}

/* Article */
.prose {
  max-width: 48rem;
  padding: 3rem 0 4.5rem;
  color: #33404d;
}

.prose p,
.prose li {
  line-height: 1.75;
}

.prose h2,
.prose h3 {
  margin: 2.2rem 0 0.8rem;
}

.prose img {
  display: block;
  margin: 1.5rem 0;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--light);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.code {
  position: relative;
  margin: 1.5rem 0;
}

.prose pre {
  background: var(--navy);
  color: #e4e8ec;
  padding: 1.1rem 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0;
}

.prose pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--green);
  color: var(--navy);
  border: 0;
  border-radius: 4px;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.7rem;
  text-align: left;
}

.related {
  background: var(--light);
  border-radius: var(--radius);
  padding: 1.5rem 1.8rem;
  margin-top: 3rem;
}

.related h2 {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
}

.related ul {
  margin: 0;
  padding-left: 1.2rem;
}

/* 404 */
.notfound {
  padding: 6rem 0;
  text-align: center;
}

.notfound h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}

.notfound p {
  max-width: 34rem;
  margin: 1rem auto 2rem;
}

/* Motion: one page-load reveal for the hero art */
@media (prefers-reduced-motion: no-preference) {
  .hero-art .trace {
    stroke-dasharray: var(--len);
    stroke-dashoffset: var(--len);
    animation: draw 1.4s cubic-bezier(0.6, 0, 0.2, 1) forwards;
    animation-delay: var(--delay);
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* Responsive */
@media (max-width: 980px) {
  .hero .wrap,
  .about {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-art {
    max-width: 30rem;
  }
  .cards,
  .posts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .foot-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .site-nav ul {
    gap: 1.1rem;
    flex-wrap: wrap;
  }
  .site-nav .nav-cta {
    display: none;
  }
  .hero {
    padding: 9rem 0 10rem;
  }
  .cards,
  .posts,
  .steps,
  .contact-grid,
  .figures {
    grid-template-columns: minmax(0, 1fr);
  }
  .foot-top {
    grid-template-columns: minmax(0, 1fr);
  }
}
