/* Spring Intellect — design F: light, rounded tiles */

@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #eceee9;
  --tile: #ffffff;
  --field: #f5f6f3;
  --ink: #0f1a14;
  --ink-soft: #3c4a42;
  --muted: #55625a;
  --line: #dde1d8;
  --green: #24b454;
  --green-hi: #36c768;
  --green-deep: #0e6b37;
  --mint: #dcf3e3;
  --mint-hi: #cbedd5;
  --night: #0d1b14;
  --night-hi: #17291f;
  --night-line: #263a2f;
  --on-night: #ecf3ee;
  --on-night-soft: #a8bcb0;
  --on-night-green: #7fe3a3;

  --font: "Figtree", "Segoe UI", system-ui, sans-serif;

  --wrap: 76rem;
  --gutter: clamp(1rem, 3.5vw, 3rem);
  --gap: clamp(0.75rem, 1.3vw, 1rem);
  --section: clamp(3.5rem, 8vw, 6.5rem);
  --radius: clamp(20px, 2.4vw, 28px);
  --header-h: 4.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

:focus-visible {
  outline: 2px solid var(--green-deep);
  outline-offset: 3px;
  border-radius: 8px;
}

.tile--night:focus-visible,
.tile--night :focus-visible {
  outline-color: var(--on-night-green);
}

::selection {
  background: var(--green);
  color: var(--ink);
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--night);
  color: var(--on-night);
  border-radius: 999px;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.icon {
  flex: none;
  width: 1em;
  height: 1em;
}

.label {
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-deep);
}

.tile--night .label {
  color: var(--on-night-green);
}

/* Tiles */

.tile {
  padding: clamp(1.5rem, 2.8vw, 2.5rem);
  border-radius: var(--radius);
  background: var(--tile);
}

.tile--night {
  background: var(--night);
  color: var(--on-night);
}

.tile--mint {
  background: var(--mint);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.5rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.btn .icon {
  transition: transform 0.18s ease;
}

.btn:hover .icon {
  transform: translateX(3px);
}

.btn--primary {
  background: var(--green);
  color: var(--ink);
}

.btn--primary:hover {
  background: var(--green-hi);
}

.btn--dark {
  background: var(--night);
  color: var(--on-night);
}

.btn--dark:hover {
  background: #1f3829;
}

.btn--soft {
  background: var(--bg);
  color: var(--ink);
}

.btn--soft:hover {
  background: var(--line);
}

.btn--sm {
  padding: 0.7rem 1.2rem;
  font-size: 0.9375rem;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(236 238 233 / 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand img {
  width: 2rem;
  height: 2rem;
}

.brand__name {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
}

/* Header lockup: the tagline sits beside the name, behind a hairline.
   The two are lined up on their baselines, then the smaller tagline is raised
   a touch so the middles of the letters match. */
.brand__text {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
}

.brand__tagline {
  position: relative;
  top: -0.085em;
  padding-left: 0.85rem;
  border-left: 1px solid rgb(15 26 20 / 0.22);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
}

/* Below desktop widths the tagline tucks under the name instead */
@media (max-width: 62rem) {
  .brand__text {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }

  .brand__tagline {
    top: 0;
    padding-left: 0;
    border-left: 0;
    font-size: 0.75rem;
    line-height: 1.2;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 2rem;
}

.site-nav ul a {
  display: inline-block;
  padding: 0.4rem 0;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-nav ul a:hover {
  color: var(--green-deep);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--tile);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -6px;
}

.nav-toggle__bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 56rem) {
  .js .nav-toggle {
    display: inline-flex;
  }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem 1.5rem 1.75rem;
    border-radius: var(--radius);
    background: var(--tile);
    box-shadow: 0 30px 60px -25px rgb(15 26 20 / 0.45);
  }

  .js .site-nav.is-open {
    display: flex;
  }

  .js .site-nav ul {
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
  }

  .js .site-nav ul a {
    padding: 0.55rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ink);
  }
}

/* Hero: a grid of tiles */

.hero {
  padding-top: 0.25rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  grid-template-rows: minmax(13rem, 1fr) auto auto auto;
  gap: var(--gap);
}

.tile--lead {
  grid-row: 1 / span 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(2.5rem, 6vw, 5rem);
  min-height: clamp(26rem, 42vw, 33rem);
}

.hero h1 {
  max-width: 15ch;
  font-size: clamp(2.375rem, 5.4vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.hero h1 em {
  font-style: normal;
  color: var(--green-deep);
}

.hero__lede {
  max-width: 32rem;
  margin-top: 1.5rem;
  font-size: clamp(1.125rem, 1.5vw, 1.25rem);
  line-height: 1.5;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tile--globe {
  --globe: #ffffff;
  position: relative;
  min-height: 12rem;
  padding: 0;
  background: var(--green);
  overflow: hidden;
}

.tile--globe canvas {
  position: absolute;
  left: 10%;
  top: 9%;
  width: 128%;
  max-width: none;
  aspect-ratio: 1;
}

.tile--phone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
  padding: 1.15rem clamp(1.25rem, 2vw, 1.75rem);
  text-decoration: none;
  transition: background-color 0.18s ease;
}

.tile--phone.tile--night:hover {
  background: var(--night-hi);
}

.tile--phone.tile--mint:hover {
  background: var(--mint-hi);
}

.tile__label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-deep);
}

.tile--night .tile__label {
  color: var(--on-night-soft);
}

.tile__number {
  font-size: clamp(1.25rem, 1.9vw, 1.5rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.tile--partners {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.75rem 2.5rem;
  padding-block: 1.4rem;
}

.partners__list {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1.75rem;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink-soft);
}

@media (max-width: 56rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: none;
  }

  .tile--lead,
  .tile--globe {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .tile--lead {
    min-height: 0;
  }

  /* The globe tile is now wide and short, so the globe is sized from its height and centred */
  .tile--globe {
    min-height: 13rem;
  }

  .tile--globe canvas {
    left: 50%;
    top: 12%;
    width: auto;
    height: 230%;
    transform: translateX(-50%);
  }

  .tile--partners {
    flex-direction: column;
  }

  .partners__list {
    justify-content: flex-start;
  }
}

@media (max-width: 34rem) {
  .tile--phone {
    grid-column: 1 / -1;
  }
}

/* Sections */

.section {
  padding-top: var(--section);
}

.section:last-child {
  padding-bottom: var(--section);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  align-items: start;
  gap: 1.5rem clamp(2rem, 6vw, 5rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding-inline: clamp(0rem, 1.5vw, 1rem);
}

.section-head--solo {
  grid-template-columns: minmax(0, 1fr);
}

.section h2 {
  margin-top: 0.85rem;
  font-size: clamp(2.125rem, 4.4vw, 3.375rem);
}

.section-head__text {
  padding-top: 2rem;
  font-size: 1.125rem;
  color: var(--muted);
}

@media (max-width: 56rem) {
  .section-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-head__text {
    padding-top: 0;
  }
}

/* Services */

.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

.svc {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

.svc__icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.75rem;
  border-radius: 14px;
  background: var(--mint);
  color: var(--green-deep);
}

.svc__icon svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svc h3 {
  font-size: clamp(1.375rem, 2vw, 1.5625rem);
  line-height: 1.15;
}

.svc p {
  font-size: 1rem;
  color: var(--muted);
}

.svc ul {
  display: grid;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.svc li {
  position: relative;
  padding-left: 1.25rem;
  line-height: 1.4;
}

.svc li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--green);
}

.svc-cta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  min-height: 13rem;
  background: var(--green);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.18s ease;
}

.svc-cta:hover {
  background: var(--green-hi);
}

.svc-cta strong {
  font-size: clamp(1.75rem, 2.8vw, 2.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.svc-cta span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.svc-cta .icon {
  width: 1.5rem;
  height: 1.5rem;
  transition: transform 0.18s ease;
}

.svc-cta:hover .icon {
  transform: translateX(4px);
}

/* Wide screens: the first service is a double-width tile with its points set to one side */
@media (min-width: 70.0625rem) {
  .svc--wide {
    grid-column: span 2;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    align-content: start;
    column-gap: clamp(1.5rem, 3vw, 2.5rem);
  }

  .svc--wide > * {
    grid-column: 1;
  }

  .svc--wide > ul {
    grid-column: 2;
    grid-row: 1 / -1;
    align-content: center;
    gap: 0.9rem;
    margin: 0;
    padding: 1.75rem;
    border-radius: 20px;
    background: var(--bg);
    font-size: 1.0625rem;
  }
}

@media (max-width: 70rem) {
  .svc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .svc--wide,
  .svc-cta {
    grid-column: 1 / -1;
  }

  .svc-cta {
    min-height: 10rem;
  }
}

@media (max-width: 40rem) {
  .svc-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Recognition */

.quotes {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}

.quote {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.quote blockquote p {
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.quote figcaption {
  display: grid;
  gap: 0.1rem;
  margin-top: auto;
  font-size: 0.9375rem;
}

.quote__name {
  font-weight: 700;
}

.quote__role {
  color: var(--muted);
}

.quote--lead {
  grid-column: span 7;
  grid-row: span 2;
  gap: 2.5rem;
}

.quote--lead blockquote p {
  font-size: clamp(1.625rem, 3.1vw, 2.625rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.quote--lead .quote__name {
  color: var(--on-night-green);
}

.quote--lead .quote__role {
  color: var(--on-night-soft);
}

.quote--row {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  padding-block: 1.75rem;
}

.quote--row blockquote p {
  font-size: clamp(1.1875rem, 2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.quote--row figcaption {
  margin-top: 0;
}

.quote--row .quote__name {
  color: var(--green-deep);
}

@media (max-width: 56rem) {
  .quote,
  .quote--lead {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

/* Contact */

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--gap);
}

.contact__info {
  display: flex;
  flex-direction: column;
}

.contact__lede {
  max-width: 26rem;
  margin-top: 1.25rem;
  font-size: 1.125rem;
  color: var(--on-night-soft);
}

.contact__lines {
  margin-top: auto;
  padding-top: 2.5rem;
}

.contact__lines div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.1rem 1.5rem;
  padding-block: 0.7rem;
  border-top: 1px solid var(--night-line);
}

.contact__lines dt {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-night-soft);
}

.contact__lines dd {
  font-size: clamp(1.0625rem, 1.7vw, 1.3125rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.contact__lines a {
  display: inline-block;
  padding-block: 0.3rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact__lines a:hover {
  color: var(--on-night-green);
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 1.25rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field--full,
.form-actions {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.9375rem;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #8d9a90;
  border-radius: 14px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.field input:hover,
.field textarea:hover {
  border-color: var(--ink-soft);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--green-deep);
  box-shadow: 0 0 0 3px rgb(36 180 84 / 0.35);
}

.field--hp {
  position: absolute;
  left: -200vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.form-actions .btn {
  flex: none;
}

.form-status {
  flex: 1 1 14rem;
  min-width: 0;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--muted);
}

.form-status[data-state="ok"] {
  color: var(--green-deep);
}

.form-status[data-state="error"] {
  color: #b3261e;
}

@media (max-width: 56rem) {
  .contact__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 34rem) {
  .contact-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Footer */

.site-footer {
  font-size: 0.9375rem;
  color: var(--muted);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  padding-block: 0 2rem;
}

.site-footer .brand__name {
  color: var(--ink);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}

.site-footer ul a {
  display: inline-block;
  padding-block: 0.5rem;
  font-weight: 600;
  text-decoration: none;
}

.site-footer ul a:hover {
  color: var(--green-deep);
}

/* Scroll reveal */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}
