/* Mploy-eeze — hand-written site styles. Palette is drawn from the existing
   logo and illustrations: Mploy blue, the illustrations' navy, sky and amber. */

:root {
  --blue: #0067f4;
  --blue-deep: #0052c4;
  --navy: #0b4870;
  --slate: #4a6585;
  --sky: #cce9ff;
  --tint: #eef6ff;
  --amber: #ffbe55;
  --amber-deep: #ffad2e;
  --line: #d4e5f6;
  --white: #fff;

  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --container: 1160px;
  --gutter: clamp(20px, 4vw, 40px);
  --section-pad: clamp(64px, 9vw, 112px);
  --header-h: 76px;
  --radius: 14px;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

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

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

a {
  color: var(--blue);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--navy);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0;
}

p + p {
  margin-top: 1em;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

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

.lede {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--slate);
}

main [id] {
  scroll-margin-top: var(--header-h);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1 var(--font);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

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

.btn-amber:hover {
  background: var(--amber-deep);
}

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

.btn-ghost:hover {
  border-color: var(--white);
  background: var(--white);
  color: var(--blue);
}

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

.btn-blue:hover {
  background: var(--blue-deep);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--blue);
  color: var(--white);
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
}

.brand-dark {
  display: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  gap: 28px;
}

.site-nav ul a {
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  color: inherit;
  font-weight: 500;
  text-decoration: none;
}

.site-nav ul a:hover {
  border-bottom-color: currentColor;
}

.btn-login {
  min-height: 42px;
  padding: 0 22px;
  background: var(--white);
  color: var(--blue);
}

.site-header.is-scrolled,
.site-header.nav-open {
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(11, 72, 112, 0.08);
}

.is-scrolled .brand-light,
.nav-open .brand-light {
  display: none;
}

.is-scrolled .brand-dark,
.nav-open .brand-dark {
  display: block;
}

.is-scrolled .btn-login,
.nav-open .btn-login {
  background: var(--blue);
  color: var(--white);
}

.nav-toggle {
  display: none;
}

@media (max-width: 899px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-left: auto;
    margin-right: -10px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
  }

  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.2s, background-color 0.2s;
  }

  .nav-toggle-bars {
    position: relative;
  }

  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .nav-toggle-bars::before {
    top: -7px;
  }

  .nav-toggle-bars::after {
    top: 7px;
  }

  .nav-open .nav-toggle-bars {
    background: transparent;
  }

  .nav-open .nav-toggle-bars::before {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-open .nav-toggle-bars::after {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px var(--gutter) 24px;
    background: var(--white);
    color: var(--navy);
    box-shadow: 0 16px 24px rgba(11, 72, 112, 0.12);
  }

  .nav-open .site-nav {
    display: flex;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav ul a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .site-nav ul a:hover {
    border-bottom-color: var(--line);
    color: var(--blue);
  }

  .site-nav .btn-login {
    margin-top: 20px;
    min-height: 48px;
  }
}

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

.hero {
  position: relative;
  background: var(--blue);
  color: var(--white);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  padding-top: clamp(24px, 5vw, 64px);
}

.hero-copy {
  padding-bottom: clamp(48px, 8vw, 112px);
}

.hero-title {
  color: var(--white);
  font-size: clamp(3.25rem, 9vw, 6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
}

.hero-lede {
  max-width: 32ch;
  margin-top: 24px;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.5;
}

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

/* The illustration hangs over the bottom edge of the hero into the next section */
.hero-art {
  position: relative;
  z-index: 2;
  align-self: end;
  margin-bottom: -88px;
}

.hero-art img {
  width: 100%;
  max-width: 560px;
  margin-left: auto;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-art img {
    animation: hero-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both;
  }

  @keyframes hero-rise {
    from {
      opacity: 0;
      transform: translateY(28px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

@media (max-width: 899px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .hero-copy {
    padding-bottom: 24px;
  }

  .hero-art {
    margin-bottom: -56px;
  }

  .hero-art img {
    max-width: 380px;
    margin: 0 auto;
  }
}

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

.section {
  padding: var(--section-pad) 0;
}

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

.section-compact {
  padding: clamp(48px, 6vw, 72px) 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(40px, 5vw, 56px);
}

.section-head .lede {
  margin-top: 14px;
}

/* ---------- What we do ---------- */

.services-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: clamp(40px, 6vw, 96px);
}

.services-intro h2 {
  margin-bottom: 20px;
}

.services-intro p {
  max-width: 46ch;
}

.services-intro .lede {
  color: var(--navy);
}

.services-intro .lede + p {
  color: var(--slate);
}

.service {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 20px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.service:first-child {
  padding-top: 0;
  border-top: 0;
}

.service-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--sky);
  color: var(--blue);
}

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

.service h3 {
  margin: 12px 0 10px;
}

.service ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 24px;
  color: var(--slate);
}

.service li {
  position: relative;
  padding-left: 18px;
}

.service li::before {
  content: "";
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--amber);
}

@media (max-width: 899px) {
  .services-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 479px) {
  .service ul {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 64px;
}

.feature {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
}

.feature-art {
  width: 140px;
  aspect-ratio: 1;
}

.feature-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feature h3 {
  margin-bottom: 8px;
}

.feature p {
  color: var(--slate);
}

.feature-cta {
  align-self: center;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.feature-cta p {
  margin: 8px 0 20px;
  color: var(--slate);
}

@media (max-width: 899px) {
  .features {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 479px) {
  .feature {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 18px;
  }

  .feature-art {
    width: 96px;
  }

  .feature-cta {
    padding: 24px;
  }
}

/* ---------- Reviews ---------- */

.reviews {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: start;
  gap: clamp(40px, 6vw, 88px);
}

.review {
  margin: 0;
}

.review blockquote {
  margin: 0;
}

.review-featured::before {
  content: "\201C";
  display: block;
  height: 0.5em;
  color: var(--amber);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 7rem;
  line-height: 1;
}

.review-featured blockquote p {
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
  font-weight: 500;
  line-height: 1.5;
}

.reviews-side {
  display: grid;
  gap: 40px;
}

.reviews-side .review {
  padding-left: 24px;
  border-left: 3px solid var(--amber);
}

.review figcaption {
  display: flex;
  flex-direction: column;
  margin-top: 16px;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.review figcaption strong {
  font-weight: 600;
}

.review figcaption span {
  color: var(--slate);
}

@media (max-width: 899px) {
  .reviews {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Team ---------- */

.team-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 48px;
}

.team {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
}

.person {
  display: flex;
  align-items: center;
  gap: 16px;
  line-height: 1.35;
}

.initials {
  display: grid;
  place-items: center;
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--sky);
  color: var(--blue);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.person strong {
  display: block;
  font-weight: 600;
}

.person .role {
  color: var(--slate);
  font-size: 0.9375rem;
}

/* ---------- Closing call to action ---------- */

.cta {
  padding: clamp(56px, 8vw, 96px) 0;
  background: var(--blue);
  color: var(--white);
}

.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 40px;
}

.cta h2 {
  color: var(--white);
}

.cta p {
  margin-top: 10px;
  font-size: 1.125rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.cta-phone {
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--white);
  font-weight: 500;
  text-decoration: none;
}

.cta-phone:hover {
  border-bottom-color: var(--white);
}

/* ---------- Subpage heading ---------- */

.page-head {
  padding: clamp(32px, 6vw, 72px) 0 clamp(48px, 7vw, 88px);
  background: var(--blue);
  color: var(--white);
}

.page-head h1 {
  max-width: 22ch;
  color: var(--white);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-head .lede {
  margin-top: 16px;
  color: var(--white);
}

.page-head a {
  color: var(--white);
}

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

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: clamp(40px, 6vw, 80px);
}

.contact-aside {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--tint);
}

.contact-aside h2 {
  margin-bottom: 18px;
  font-size: 1.125rem;
}

.contact-aside dl {
  margin: 0;
}

.contact-aside dt {
  color: var(--slate);
  font-size: 0.875rem;
}

.contact-aside dd {
  margin: 0 0 16px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.contact-aside dd:last-child {
  margin-bottom: 0;
}

@media (max-width: 899px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Long-form pages ---------- */

.prose {
  max-width: 70ch;
}

.prose h2,
.prose h3,
.prose h4 {
  margin: 2em 0 0.6em;
  font-size: 1.25rem;
}

.prose p {
  margin: 0 0 1em;
}

.prose p + p {
  margin-top: 0;
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin: 0.3em 0;
}

.prose a {
  overflow-wrap: anywhere;
}

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

.site-footer {
  padding: 64px 0 32px;
  background: var(--navy);
  color: #c9dcef;
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 0.8fr;
  gap: 40px;
}

.footer-heading {
  margin-bottom: 12px;
  color: var(--white);
  font-size: 1rem;
}

.site-footer a {
  color: var(--white);
  text-decoration: none;
}

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

.site-footer li + li {
  margin-top: 6px;
}

.site-footer address {
  font-style: normal;
}

.site-footer address + p {
  margin-top: 8px;
}

.footer-brand img {
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
}

.footer-brand p {
  max-width: 28ch;
}

.footer-base {
  display: flex;
  margin-top: 48px;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.875rem;
}

.footer-base p + p {
  margin-top: 0;
}

@media (max-width: 899px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 479px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
