/* AV Analytics – static home page */

:root {
  --green: #26a55c;
  --text: #404040;
  --fold: 80px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
}

img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { font-weight: 300; margin: 0; }

/* Centered 1000px content column */
.wrap {
  width: min(1000px, 100% - 40px);
  margin-inline: auto;
}

/* ---------- Top bar + header ---------- */

.topbar {
  height: 20px;
  background: linear-gradient(to right, #92c800, #26a55c);
}

.site-header { position: relative; }

/* Folded page corner, top right */
.site-header::before,
.site-header::after {
  content: "";
  position: absolute;
  right: 0;
  width: var(--fold);
  height: var(--fold);
  pointer-events: none;
}
.site-header::before {            /* green corner + gray fold */
  top: 0;
  background: linear-gradient(to bottom left, var(--green) calc(50% - .5px), #cdcdcd calc(50% + .5px));
}
.site-header::after {             /* soft shadow under the fold */
  top: var(--fold);
  background: linear-gradient(to bottom left, #f4f4f4 calc(50% - .5px), rgba(244,244,244,0) calc(50% + .5px));
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: 44px;
}

.logo img { display: block; }

.main-nav {
  display: flex;
  gap: 35px;
  margin-top: 15px;
  padding-right: 20px;
  font-size: 18px;
  line-height: 1.3;
}
.main-nav a:hover,
.footer-nav a:hover { color: var(--green); }
.main-nav .current,
.footer-nav .current { color: var(--green); }

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

h1 {
  margin-top: 49px;
  font-size: 40px;
  line-height: 1.2;
  text-align: center;
}

.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 33px;
  padding-bottom: 61px;
}

.service { text-align: center; }

.service h2 {
  font-size: clamp(21px, 2.9vw, 29px);
  line-height: 1.25;
}

.service p {
  margin: 6px 0 20px;
  font-size: 16px;
  line-height: 26px;
}

.service img {
  display: block;
  margin: 0 auto 7px;
}
.service img.arrow { margin-bottom: 11px; }
.service img:last-of-type { margin-bottom: 15px; }

.service ul {
  padding-left: 24px;
  text-align: left;
  list-style: disc;
  font-size: 15.4px;
  line-height: 22px;
}
.service li { margin-bottom: 8px; }

/* Keep headings, text, images and lists lined up across the three columns */
@media (min-width: 761px) {
  .services { grid-template-rows: repeat(6, auto); row-gap: 0; }
  .service {
    display: grid;
    grid-row: span 6;
    grid-template-rows: subgrid;
  }
  .service img { align-self: start; justify-self: center; }
  .service ul { align-self: start; }
}

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

.contact {
  position: relative;
  background: var(--green);
  color: #fff;
  padding: 31px 0 49px;
}

/* white notch, top right */
.contact::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: var(--fold);
  height: var(--fold);
  background: linear-gradient(to bottom left, #fff calc(50% - .5px), rgba(255,255,255,0) calc(50% + .5px));
}

.contact-inner {
  display: flex;
  gap: 32px;
}
.contact-left { flex: 1; }
.contact-right { width: 312px; flex: none; }

.contact h3 {
  font-size: 25.6px;
  line-height: 1.4;
}
.contact p {
  margin: 13px 0 0;
  font-size: 15.8px;
  line-height: 27px;
}
.contact a:hover { text-decoration: underline; }

.legal {
  background: var(--text);
  color: #fff;
  font-size: 15.8px;
}
.legal-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 70px;
}
.footer-nav { display: flex; gap: 20px; font-weight: 300; }

/* ---------- Narrow screens: one column ---------- */

@media (max-width: 1120px) {
  /* keep the nav clear of the folded corner */
  .header-inner { padding-right: 60px; }
}

@media (max-width: 760px) {
  :root { --fold: 40px; }

  .site-header::before,
  .site-header::after { display: none; }

  .header-inner { padding-top: 24px; padding-right: 0; }
  .main-nav { gap: 20px; margin-top: 10px; padding-right: 0; font-size: 17px; }

  h1 { margin-top: 32px; font-size: 28px; }

  .services {
    grid-template-columns: 1fr;
    gap: 44px;
    margin-top: 32px;
    padding-bottom: 48px;
  }
  .service h2 { font-size: 26px; }
  .service ul { width: min(100%, 300px); margin-inline: auto; }

  /* only the finished "after" illustration is shown */
  .hide-mobile { display: none !important; }

  .contact { padding: 32px 0 40px; }
  .contact-inner { flex-direction: column; gap: 24px; }
  .contact-right { width: auto; }
  .contact h3 { font-size: 24px; }

  .legal-inner {
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 18px 0;
    text-align: center;
  }
}
