*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 14px;
  line-height: 1.8;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover {
  color: var(--green);
}

p {
  margin: 0 0 1em;
}

h1, h2, h3, h4 {
  font-family: var(--heading);
  font-weight: 400;
  color: var(--heading-color);
  line-height: 1.25;
  clear: both;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  z-index: 1000;
}

.skip-link:focus {
  top: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.wrap {
  width: min(1000px, calc(100% - 32px));
  margin-inline: auto;
}

.side-socials {
  position: fixed;
  right: 0;
  top: 40%;
  z-index: 99;
  width: 42px;
  padding: 5px;
  opacity: 0.5;
  transition: opacity 0.5s ease-in-out;
}

.side-socials:hover,
.side-socials:focus-within {
  opacity: 1;
}

.social-link {
  position: relative;
  display: block;
  line-height: 0;
  margin-top: -6px;
  padding: 6px;
}

.social-link img {
  position: relative;
  z-index: 2;
  width: 26px;
  height: 26px;
  display: block;
}

.social-hover {
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-link:hover .social-hover,
.social-link:focus .social-hover {
  background: var(--green);
  transform: rotate(90deg);
  z-index: 1;
}

.branding {
  max-width: var(--container);
  margin: 0 auto;
  min-height: 118px;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: block;
  line-height: 0;
  flex: 0 0 auto;
}

.logo img {
  width: 378px;
  height: auto;
}

.header-contact {
  width: 33%;
  text-align: right;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}

.header-contact p {
  margin: 0;
}

.nav-toggle {
  display: none;
  width: 100%;
  height: 44px;
  padding: 0 4%;
  border: 0;
  background: var(--menu);
  cursor: pointer;
  text-align: left;
}

.nav-toggle span.bars,
.nav-toggle span.bars::before,
.nav-toggle span.bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
}

.nav-toggle span.bars::before,
.nav-toggle span.bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span.bars::before { top: -6px; }
.nav-toggle span.bars::after { top: 6px; }

.main-nav {
  background: var(--menu);
}

.main-nav ul {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

.main-nav a {
  display: block;
  color: var(--ink);
  font-family: var(--heading);
  font-size: 16px;
  text-transform: uppercase;
  text-decoration: none;
}

.main-nav a span {
  display: block;
  padding: 17px 18px;
}

.main-nav li:hover {
  background: var(--menu-hover);
}

.main-nav li:hover > a {
  color: var(--ink);
}

.main-nav li.is-current {
  background: var(--menu-current);
}

main {
  padding: 40px 0 28px;
  min-height: 280px;
}

.page-heading {
  margin: 0 0 30px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 32px;
  text-align: left;
}

.entry h1 {
  margin: 0 0 25px;
  font-size: 32px;
  text-align: left;
}

.entry h1.accent {
  color: var(--green);
  margin: 0;
}

.lead {
  text-align: center;
  margin-bottom: 40px;
}

.welcome {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
  margin-bottom: 30px;
}

.hero-logo {
  margin-top: 39px;
  width: 313px;
  max-width: 100%;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.saiba {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  padding: 12px;
  line-height: 1.2;
  transition: background-color 0.4s;
}

.saiba:hover {
  background: var(--green);
  color: #fff;
}

.services-head {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-bottom: 30px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin-bottom: 30px;
}

.split p,
.justify {
  text-align: justify;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}

.card {
  text-align: center;
}

.card a {
  display: block;
  line-height: 0;
}

.card img {
  width: 100%;
  height: auto;
  display: block;
}

.card h2 {
  margin: 14px 0 0;
  font-size: 20px;
  text-align: center;
}

.about-copy::after {
  content: "";
  display: block;
  clear: both;
}

.about-copy .alignleft {
  float: left;
  margin: 4px 22px 12px 0;
  line-height: 0;
}

.about-copy .alignleft img {
  width: 300px;
  height: auto;
  display: block;
}

.svc-intro {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
  margin-bottom: 30px;
}

.svc-intro img {
  width: 100%;
  height: auto;
  display: block;
}

.svc-intro p {
  margin-top: 10px;
}

.svc-block {
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
  margin-bottom: 30px;
}

.svc-block h2 {
  margin: 0 0 0.45em;
  font-size: 24px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.43fr) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}

.contact-grid strong {
  color: var(--ink);
  font-weight: 700;
}

.contact-grid a[href^="mailto:"] {
  text-decoration: underline;
}

.contact-logo {
  width: 254px;
  max-width: 100%;
  height: auto;
  margin-top: 8px;
  display: block;
}

.map-frame {
  width: 100%;
  height: 428px;
  border: 0;
  display: block;
}

.empty h1 {
  margin: 8px 0 12px;
  font-size: 26px;
}

.searchform {
  position: relative;
  display: block;
  max-width: 300px;
  margin-top: 8px;
}

.searchform input[type="search"] {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 56px 0 10px;
  font-size: 18px;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  border: 1px solid #ccc;
  border-color: #ccc #eee #eee #ccc;
}

.searchform input[type="search"]:hover {
  background: rgba(247, 247, 247, 0.4);
}

.searchform button {
  position: absolute;
  right: 0;
  top: 0;
  width: 52px;
  height: 52px;
  border: 0;
  background: var(--ink);
  color: #f7f7f7;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.searchform button:hover {
  background: #999;
}

.searchform svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.results {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.results a {
  display: inline-block;
  margin-bottom: 0.4em;
  text-decoration: underline;
}

.site-footer {
  background: var(--footer);
  color: var(--text);
}

.footer-widgets {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 0 30px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 2%;
}

.footer-widgets .widget {
  padding: 0 20px;
}

.widget-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 400;
  color: var(--heading-color);
  border-bottom: 1px solid #ccc;
  line-height: normal;
}

.widget-title span {
  display: inline-block;
  line-height: 2.2;
  padding: 0 10px 0 0;
  position: relative;
  top: 1px;
  border-bottom: 1px solid var(--ink);
}

.footer-about {
  margin-bottom: 40px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5em;
}

.footer-links a {
  color: #000;
  text-transform: uppercase;
}

.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-contact a {
  color: #000;
  text-decoration: underline;
}

.footer-contact a:hover {
  color: var(--ink);
}

.footer-bar {
  background: var(--footer-dark);
}

.footer-socials {
  background: var(--footer-social);
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 18px 0 16px;
}

.footer-socials .social-link {
  margin: 0;
  padding: 0;
}

.footer-socials .social-hover {
  width: 28px;
  height: 28px;
}

.footer-socials img {
  width: 22px;
  height: 22px;
}

.to-top {
  position: fixed;
  right: 40px;
  bottom: 18px;
  z-index: 251;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, color 0.2s ease;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.28);
}

.to-top.is-on {
  opacity: 1;
  pointer-events: auto;
}

.to-top:hover {
  color: #999;
}

.to-top svg {
  width: 16px;
  height: 16px;
  display: block;
  margin: 0 auto;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 48px 70px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: min(900px, 100%);
  max-height: calc(100vh - 96px);
  width: auto;
  height: auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  background: #fff;
}

.lightbox button {
  position: absolute;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 32px;
  line-height: 1;
  width: 44px;
  height: 44px;
}

.lb-close { top: 12px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

@media (max-width: 800px) {
  .side-socials {
    display: none;
  }

  .branding {
    flex-direction: column;
    align-items: center;
    min-height: 0;
    padding: 18px 16px 8px;
    text-align: center;
  }

  .logo img {
    width: min(280px, 90%);
  }

  .header-contact {
    width: 95%;
    text-align: left;
    margin: 8px auto 12px;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
  }

  .main-nav {
    display: none;
  }

  .main-nav.is-open {
    display: block;
    padding-bottom: 5px;
  }

  .main-nav ul {
    display: block;
    width: auto;
    margin: 0 5px;
  }

  .main-nav li,
  .main-nav a {
    width: 100%;
  }

  .main-nav a span {
    padding: 15px 10px;
    text-align: left;
  }

  main {
    padding: 16px 0 24px;
  }

  .wrap {
    width: min(1000px, calc(100% - 20px));
  }

  .welcome,
  .split,
  .cards,
  .svc-intro,
  .contact-grid,
  .footer-widgets {
    grid-template-columns: 1fr;
  }

  .about-copy .alignleft {
    float: none;
    margin: 0 0 16px;
  }

  .about-copy .alignleft img,
  .hero-logo,
  .contact-logo {
    width: 100%;
  }

  .page-heading,
  .entry h1 {
    font-size: 28px;
  }

  .footer-widgets .widget {
    padding: 0 8px 18px;
  }

  .to-top {
    right: 12px;
    bottom: 12px;
  }

  .lightbox {
    padding: 56px 16px;
  }
}
