@font-face {
  font-family: "PP Neue Montreal";
  src: url("../fonts/ppneuemontreal-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PP Neue Montreal";
  src: url("../fonts/ppneuemontreal-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --gray: #dadada;
  --blackish: #101010;
  --dark-gray: #7b7b7b;
  --gutter: 1rem;
  /* right column: 20% of the page, but never narrower than SAY HELLO needs */
  --aside: minmax(17rem, 20%);
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background-color: var(--gray);
  color: var(--blackish);
  font-family: "PP Neue Montreal", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
  height: 100svh;
  padding: var(--gutter);
}

.cols {
  display: grid;
  grid-template-columns: 1fr var(--aside);
  column-gap: var(--gutter);
}

/* the falling pills sit above the copy, below anything clickable */
#canvas-target {
  position: fixed;
  inset: 0;
  z-index: 1;
}
.header,
.aside {
  position: relative;
  z-index: 2;
}

/* header */
.header {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-self: start;
}
.logo {
  display: block;
  color: var(--blackish);
}
.logo svg {
  display: block;
  width: 64px;
  height: 32px;
}
.logo-text {
  font-size: 1rem;
  line-height: 140%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-out, visibility 0s 0.3s;
}
@media (hover: hover) and (min-width: 992px) {
  .logo:hover + .logo-text {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease-in, visibility 0s;
  }
}

/* main */
.main {
  align-content: start;
  padding-top: calc(20vh - 3rem);
}

.intro {
  max-width: 34rem;
  margin: 0;
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 125%;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
.intro + .intro {
  margin-top: 1rem;
}
.intro-link {
  position: relative;
  z-index: 2;
}
.intro-link:focus-visible {
  outline: 2px solid var(--blackish);
  outline-offset: 2px;
}

.aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(4rem, 22vh, 11rem);
}

.say-hello {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 2rem;
  border: 2px solid var(--blackish);
  border-radius: 9999px;
  background: transparent;
  color: var(--blackish);
  font: inherit;
  font-size: 2rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.say-hello:hover {
  background-color: var(--blackish);
  color: var(--gray);
}
.say-hello:active {
  transform: scale(0.97);
}
.say-hello:focus-visible,
.link:focus-visible,
.logo:focus-visible {
  outline: 2px solid var(--blackish);
  outline-offset: 4px;
}

.connect {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
.connect-title {
  margin: 0 0 0.5rem;
  color: var(--dark-gray);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 130%;
}
.link {
  position: relative;
  padding: 4px 0;
  font-size: 1rem;
  line-height: 140%;
  text-transform: uppercase;
}
/* underline that grows from the side the cursor came in */
.link::after,
.intro-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: var(--from, left) center;
  transition: transform 0.2s ease-in;
}
.intro-link::after {
  bottom: 0.05em;
}
.link:hover::after,
.intro-link:hover::after {
  transform: scaleX(1);
  transition-timing-function: ease-out;
}

/* footer */
.footer {
  align-items: end;
  font-size: 0.875rem;
  line-height: 130%;
}
.footer p {
  margin: 0;
}

/* tablet */
@media (max-width: 991px) {
  .cols {
    grid-template-columns: 1fr;
  }
  .main {
    grid-template-rows: auto 1fr;
    row-gap: 3rem;
  }
  .intro {
    font-size: 1.5rem;
  }
  .aside {
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: flex-end;
    align-self: end;
    gap: 2rem;
    padding-bottom: 3rem;
  }
  .say-hello {
    margin-top: 0;
    font-size: 1.5rem;
  }
  .footer {
    grid-template-columns: 1fr auto;
  }
}

/* mobile */
@media (max-width: 767px) {
  .main {
    padding-top: 4rem;
  }
  .say-hello {
    border-width: 1px;
    font-size: 1.25rem;
  }
  .link {
    font-size: 0.875rem;
  }
  .footer {
    font-size: 0.8125rem;
  }
}

@media (max-width: 479px) {
  .intro {
    font-size: 1.25rem;
  }
  .aside {
    flex-direction: column-reverse;
    align-items: flex-start;
  }
  .footer {
    grid-template-columns: 1fr;
    row-gap: 1rem;
  }
  .footer .location {
    order: -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
  }
}
