@font-face {
  font-family: "Avenir Comparetech";
  src: url("Fonts/Avenir/AvenirLTProBook.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Avenir Comparetech";
  src: url("Fonts/Avenir/AvenirLTProHeavy.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand-blue: #202d79;
  --brand-blue-deep: #182461;
  --brand-green: #7ce7be;
  --white: #ffffff;
  --blue-muted: #b8c0e8;
  --page-padding: clamp(1.5rem, 5vw, 5.5rem);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  background: var(--brand-blue);
  color-scheme: dark;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background: var(--brand-blue);
  color: var(--white);
  font-family: "Avenir Comparetech", sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--brand-green);
  color: var(--brand-blue);
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--white);
  color: var(--brand-blue);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.5;
  transform: translateY(-180%);
}

.skip-link:focus {
  outline: 3px solid var(--brand-green);
  outline-offset: 3px;
  transform: translateY(0);
}

.page-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(1.25rem, 3.5vh, 2.75rem) var(--page-padding) 1.5rem;
}

.page-shell::before {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: -1;
  width: min(34vw, 34rem);
  background: var(--brand-blue-deep);
  content: "";
}

.brand {
  width: clamp(10.5rem, 17vw, 15.5rem);
}

.brand__logo {
  display: block;
  width: 100%;
  height: auto;
}

.message {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 7rem);
  padding-block: clamp(3rem, 8vh, 7rem);
}

.message__copy {
  max-width: 48rem;
}

h1 {
  max-width: 11ch;
  margin: 0;
  color: var(--white);
  font-size: clamp(3rem, 7.1vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}

.message__copy p {
  max-width: 35rem;
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
  color: var(--blue-muted);
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.search-scene {
  position: relative;
  justify-self: end;
  width: min(33vw, 29rem);
  min-width: 18rem;
  aspect-ratio: 1;
}

.comparison-bars {
  position: absolute;
  top: 50%;
  left: 0;
  display: flex;
  align-items: center;
  gap: clamp(0.45rem, 1vw, 0.8rem);
  width: 84%;
  transform: translateY(-50%);
}

.comparison-bars span {
  flex: 1;
  height: 9.5rem;
  border-radius: 0.7rem;
  background: var(--white);
  opacity: 0.12;
  transition:
    opacity 180ms ease-out,
    transform 180ms ease-out;
}

.comparison-bars span:nth-child(2) {
  height: 12rem;
  opacity: 0.22;
}

.comparison-bars span:nth-child(3) {
  height: 15rem;
  background: var(--brand-green);
  opacity: 0.42;
}

.comparison-bars span:nth-child(4) {
  height: 11rem;
  opacity: 0.28;
}

.comparison-bars span:nth-child(5) {
  height: 7.5rem;
  opacity: 0.14;
}

.comparison-bars span.is-inspected {
  opacity: 0.78;
  transform: translateY(-0.2rem) scaleY(1.025);
}

.search-lens {
  position: absolute;
  top: 18%;
  left: 13%;
  width: 58%;
  aspect-ratio: 1;
  border: clamp(0.75rem, 1.2vw, 1.1rem) solid var(--brand-green);
  border-radius: 50%;
  transform: translate3d(var(--inspect-x, 0), var(--inspect-y, 0), 0);
  animation: inspect 1100ms cubic-bezier(0.16, 1, 0.3, 1) 250ms backwards;
}

.search-scene.is-pointer-enabled .search-lens {
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.search-lens::after {
  position: absolute;
  right: -30%;
  bottom: -18%;
  width: 43%;
  height: clamp(0.75rem, 1.2vw, 1.1rem);
  border-radius: 999px;
  background: var(--white);
  content: "";
  transform: rotate(45deg);
  transform-origin: left center;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgb(255 255 255 / 18%);
  padding-top: 1.25rem;
  color: var(--blue-muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

@keyframes inspect {
  from {
    filter: blur(0.4rem);
    transform: translateX(-24%) rotate(-8deg);
    opacity: 0;
  }
  to {
    filter: blur(0);
    transform: translateX(0) rotate(0);
    opacity: 1;
  }
}

@media (max-width: 52rem) {
  .page-shell::before {
    top: auto;
    width: 100%;
    height: 28vh;
  }

  .message {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-block: clamp(2.5rem, 8vh, 5rem);
  }

  .message__copy {
    z-index: 1;
  }

  h1 {
    max-width: 12ch;
    font-size: clamp(2.8rem, 13vw, 5rem);
  }

  .search-scene {
    position: absolute;
    right: -7rem;
    bottom: 4rem;
    width: 20rem;
    min-width: 0;
    opacity: 0.42;
  }
}

@media (max-width: 30rem) {
  .brand {
    width: 10rem;
  }

  .message__copy p {
    max-width: 23rem;
  }

  .search-scene {
    right: -9rem;
    bottom: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .search-lens {
    animation: none;
    filter: none;
    transform: none;
    opacity: 1;
  }

  .comparison-bars span {
    transition: none;
  }
}
