*, 
*::before, 
*::after {
  /* Use a more intuitive box-sizing model */
  box-sizing: border-box;
  /* https://www.youtube.com/watch?v=cH8VbLM1958 */
  min-width: 0;
  /* Remove all margins and padding */
  margin: 0;
  padding: 0;

}

/* Only show focus outline when the user is tabbing (not when clicking) */
/* Except for input and textarea */
*:focus:not(:is(input, textarea)) {
    outline: none;
}

*:focus-visible {
  outline: 1px solid blue;
}

:root {
  font-size: calc(100% / 16 * 10);
}

html {
  /* Allow percentage-based heights */
  /* Setting width: 100% isn't required because it is a default for block-level elements (html and body are block level) */
  height: 100%;

    /* Sets font-size to 10px. 
  Percent units are used to ensure font will scale if user has a custom font-size browser setting (for ally).
  Using 10px as the base to make it easy to set font sizes in elements. Example: for 16px, use 1.6rem, for 32px, use 3.2rem, ...  */
  font-size: calc(100% / 16 * 10);
  line-height: 1.5;
  /* Prevent the browser from synthesizing missing typefaces */
  font-synthesis: none;
  font-smooth: always;
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
  /* Prevent mobile browsers increasing font-size */
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;

  color: black;
}

body {
  height: 100%;

  /* Prevent the rubber band effect when the user scrolls to the top or bottom of the page (WebKit only) */
  overscroll-behavior: none;

  /* UI controls color (example: range input) */
  accent-color: black;

  /* Because overscroll-behavior: none only works on WebKit, a background color is set that will show when overscroll occurs  */
  background: white;
}

p {
  /* Prevents orphans (ensures the final line of text has at least two words). */
  text-wrap: pretty;
  /* Avoid text overflow */
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  /* Stronger effect than 'pretty'. Attempts to make each line of text the same length */
  text-wrap: balance;
}

strong {
  overflow-wrap: break-word;
}

/* Remove unintuitive behaviour such as gaps around media elements.  */
img, picture, video, canvas, svg, iframe {
  display: block;
}

input,
textarea,
button,
button:disabled {
  font: inherit;
  color: inherit;
  border: none;
  border-radius: 0;
  background: none;
}

fieldset {
    border: none;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

/* ------- Variables -------- */

:root {
  --primary-color: #ff0000;
  --secondary-color: #ee7000;
  --bg-color: #faf8f8;
  --bg-color-alt: #efeaea;
  --font-color: #070707;

  --heading-font-family: "Montserrat", sans-serif;
  --text-font-family: "Source Sans 3", sans-serif;
  --mono-font-family: "Source Code Pro", monospace;

  --block-padding: 1.6rem;

  --base-width: 44.8;
  --font-size: 1.2;
  --min-fs: 1.2rem;
  --max-fs: 1.6rem;
  --responsive-font-size: clamp(
    var(--min-fs),
    calc((var(--font-size) / var(--base-width)) * 100vw),
    var(--max-fs));
}

body {
  --scrollbar-width: calc(100vw - 100%);
}

.text-pop{
  --fade-counter: 0;
  --fade-color-start: var(--bg-color-alt);
  --fade-color-mid: var(--secondary-color);
  --fade-color-end: var(--font-color);
}

/* ------- Animations -------- */

@keyframes textPop {
0% {
  color: var(--fade-color-start);
  transform: scale(1);
}
20% {
  color: var(--fade-color-mid);
  transform: scale(1.25);
}
100% {
  color: var(--fade-color-end);
  transform: scale(1);
}
}


/* ------- Styles -------- */

/* 
*
* font size: size * (realWidth/setWidth);
**/

body {
  background: var(--bg-color);

  font-family: var(--text-font-family);
  font-size: var(font-size);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font-family);
  font-weight: 600;
  margin-block-start: 0;
  margin-block-end: 0;
}

/* ------ font classes ------ */

.outline-font {
  text-shadow:
    1px 1px 0 var(--font-color),
    -1px 1px 0 var(--font-color),
    -1px -1px 0 var(--font-color),
    1px -1px 0 var(--font-color);
}

.color-primary {
  color: var(--primary-color);
}

.color-secondary {
  color: var(--secondary-color);
}

.color-bg {
  color: var(--bg-color);
}

.color-light {
  color: #434343;
}

.thin {
  font-weight: 400;
}
.semi-bold {
  font-weight: 600;
}
.bold {
  font-weight: 700;
}

.text-sm {
  font-size: 1.2rem;
}
.text-med {
  font-size: 1.8rem;
}
.text-lg {
  font-size: 2.4rem;
}
.text-xlg {
  font-size: 4.2rem;
}

.lh-sm {
  line-height: 1;
}
.lh-med {
  line-height: 1.1;
}
.lh-lg {
  line-height: 1.5;
}

/* ------ layout classes ------ */

.full-width {
  width: 100%;
}

.hidden {
  visibility: hidden;
}

.margin-x-wide{
  margin-inline: 2.4rem;

  @media screen and (min-width: 76.8rem) {
    margin-inline: 10rem;
  }
}


.my-sm {
  margin-block: 1.6rem;
}

.my-md {
  margin-block: 3.2rem;
}

.mr-md {
  margin-inline: 6.4rem;
}

.text-pop {
  span {
    display: inline-block;

    color: var(--bg-color-alt);
    transition: color 200ms ease-in;
  }
  &.in-view span {
    transform: scale(1);
    animation: textPop 500ms ease-out forwards;
    animation-delay: calc(20ms * var(--char-index));
  }
}

.grid-auto-2 {
  display: grid;
  grid-template-columns: 1fr;

  @media screen and (min-width: 768px) {
    grid-template-columns: repeat(2, 1fr);
  }
}

.grid {
  display: grid;

  .span-2 {
    grid-column: span 2;  
  }
  .span-4 {
    grid-column: span 4;  
  }
  .span-6 {
    grid-column: span 6;  
  }

}

.grid-cols-12 {
  grid-template-columns: repeat(12, 1fr);
}

.j-end {
  justify-self: end;
}

.a-end {
  align-self: end;
}

.table {
  tr {
    border-bottom: 0.5px dashed var(--font-color);

    thead & {
      border-style: solid;
    }
    tbody & {
      height: 6rem;
      padding-block: 0.6rem;
    }

  }
}

.tri-column {
  counter-reset: section;
  grid-template-columns: 1fr;

  gap: 1.6rem;

  .card {
    .card__header {
      display: flex;
      justify-content: space-between;
      align-items: center;


      border-bottom: 1px solid var(--font-color);

      font-size: 1.6rem;

      span {
        font-weight: 600;
      }

      &::after {
        counter-increment: section;
        content: attr(data-prefix, "G") counter(section, decimal-leading-zero);

        font-family: var(--mono-font-family);
        font-size: 1.4rem;
      }
    }

    p {
      width: 70%;
      font-size: 1.8rem;
      color: #454545
    }
  }
  @media screen and (min-width: 768px) {
    grid-template-columns: repeat(3, 1fr);

    margin-inline: 15vw;

    .card__header {
      padding-bottom: 0.8rem;
      margin-bottom: 2.4rem;
    }
  }
}

@keyframes wipe-first {
  from {
    transform: translateY(0%);
    filter: grayscale(0);
  }
  to {
    transform: translateY(100%);
    filter: grayscale(1);
  }
}

@keyframes wipe-middle {
  0% {
    transform: translateY(-100%);
    filter: grayscale(1);
  }
  50% {
    transform: translateY(0%);
    filter: grayscale(0);
  }
  to {
    transform: translateY(100%);
    filter: grayscale(1);
  }
}

@keyframes wipe-last {
  from {
    transform: translateY(-100%);
    filter: grayscale(1);
  }
  to {
    transform: translateY(0%);
    filter: grayscale(0);
  }
}

.wipe {
  counter-reset: section;

  padding-block: 1.6rem;
  padding-inline: 1.6rem;

  .wipe-container {
    display: grid;

    grid-template-columns: 1fr;


    h3 {
      width: 50%;
      font-size: 1.4rem;
      font-weight: 600;
      line-height: 1.1;


      padding-bottom: 1.6rem;
    }
  }

  .wipe-image {
    overflow: hidden;

    aspect-ratio: 5/4;

    border-radius: 0.8rem;

    grid-row: 1;

    img {
      object-fit: cover;
    }

    img, > div {
      height: round(calc(100% + 2.4rem), 1px);
      width: round(calc(100% + 2.4rem), 1px);
      aspect-ratio: 1;


      border-radius: 0.8rem;

    }
  }

  .wipe-content {
    padding-block: 1.6rem;

    > div {
      position: relative;
    }

    h4 {
      display: none;
      line-height: 1.1;
    }

    h4, p {
      font-family: var(--text-font-family);
      font-size: 1.5rem;
    }
  }


  @media screen and (min-width: 768px) {
    padding-block: clamp(3.6rem, 8vw, 8.4rem);
    padding-inline: 2.4rem;

      .wipe-container {
        counter-increment: section;
        display: grid;
        view-timeline: --wipe block;
        view-timeline-inset: 8.5rem;

        grid-template-columns: 1fr 0.7fr;


        h3 {
          float: none;
          width: initial;
          font-size: clamp(2rem, 5vw, 4rem);
          font-weight: 700;
          line-height: 1.1;


          padding-bottom: 1.6rem;
          margin-bottom: 1.6rem;
          border-bottom: 1px solid var(--font-color);
        }

        & ~ & {
          .wipe-image img {
            animation-name: wipe-middle;
            transform: translateY(-100%);

            animation-range: exit-crossing -100% exit-crossing 100%;
          }
        }

        &:not(:has(~ &)) {
          .wipe-image img {
            animation-name: wipe-last;
            animation-range: exit-crossing -100% exit-crossing 0%;
          }
        }
      }

      .wipe-content {
        padding-inline: clamp(4.8rem, 8vw, 8.4rem);

        > div {
          position: relative;
          padding: 1.6rem;
          padding-left: 6.4rem;

          &::before {
            content: "P" counter(section, decimal-leading-zero);
            position: absolute;
            left: 0;
            color: #454545;
            font: 1.2rem var(--mono-font-family);
          }
        }

        h4 {
          display: block;
          margin-bottom: 1.6rem;
        }

        h4, p {
          font-family: var(--text-font-family);
          font-size: 1.7rem;
        }
      }

      .wipe-image {
        overflow: hidden;

        aspect-ratio: 1;

        border-radius: 0.8rem;

        grid-row: auto;

        img {
          object-fit: cover;

          @supports (animation-timeline: view()) {
            animation: wipe-first linear both;
            animation-timeline: --wipe;
            animation-range: exit-crossing 0% exit-crossing 100%;
          }
        }

        img, > div {
          height: round(100%, 1px);
          width: round(100%, 1px);
          aspect-ratio: 1;


          border-radius: 0.8rem;

        }
      }
  }
}

/* ------ p layout classes ------ */
br[data-break] { display: none; }
br[data-break="sm"] { display: inline; }

@media screen and (min-width: 768px) {
  br[data-break="sm"] { display: none; }
  br[data-break="lg"] { display: inline; }
}


/* ------ Misc classes ------ */

.bw-filter {
  filter: grayscale();
}

.center-header {
  font-family: var(--heading-font-family);
  text-align: center;

  h3 {
    font-size: clamp(1.2rem, calc(1.2 / var(--base-width) * 100vw), 1.6rem) !important;
    line-height: 1;
  }

  p{
    font-size: clamp(2.4rem, calc(2.4 / var(--base-width) * 100vw), 5.2rem);
    font-weight: 600;
    margin-block: 0.4rem;

    line-height: 1.1;
  }
}

.inset-alt {
  background-color: var(--bg-color-alt);

  border-radius: 0.8rem;
}

/* ------ Site classes ------ */

.site-header {
  display: flex;
  position: fixed;

  width: calc(100% - 2.4rem);

  margin: 1.4rem;
  padding: 1.4rem;

  z-index: 10;

  justify-content: space-between;

  background-color: transparent;

  .logo {
    height: 2.8rem;

    z-index: 20;

    svg {
      height: 100%;

      fill:#ff0000;
      fill-opacity:1;

      stroke:#000000;
      stroke-width:0.5;
      stroke-dasharray:none;
      stroke-opacity:1;

      transition: fill 500ms ease;
    }
  }

  .mobile-menu {
    display: flex;
    flex-flow: column;

    position: fixed;
    top: 0; bottom: 0;
    left: 0; right: 0;

    padding: 8.5rem 1.6rem 1.6rem;

    transform: translateX(100%);
    transition: transform 500ms ease-in-out;
    background-color: var(--secondary-color);

    span {
      font: 400 1.2rem var(--mono-font-family);

      margin-bottom: 2.4rem;
      border-bottom: 1px solid var(--font-color);
    }

    li {
      font: 500 3.2rem var(--heading-font-family);
    }

    .current-page::before {
      content: "";
      display: inline-block;

      height: 0.4ch;
      aspect-ratio: 1;
      margin: 0.35ch;

      background-color: var(--font-color);
    }

    button {
      margin-top: auto;

      font: 600 2rem var(--heading-font-family);
      padding-block: 0.8rem;

      border: 1px solid var(--font-color);
      border-radius: 0.4rem;
    }
  }

  &.show-mobile-menu {
    overscroll-behavior: contain;
    overflow-y: auto;

    z-index: 30;

    .mobile-menu {
      transform: translateX(0%);
    }

    .logo svg {
      fill: var(--font-color)
    }
  }

  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 0%;

    border-radius: 0.4rem;

    background-color: black;
    z-index: -1;

    transition: ease-in-out 0.2s height;
  }

  @media screen and (min-width: 768px) {
    &.header--reveal::before {
      height: 100%;
    }

    .mobile-menu {
      display: none;
    }
  }
}


.hamburger {
  display: flex;

  width: 2.8rem;
  height: 2.8rem;

  padding: 0.7rem 0.5rem;
  margin-right: 0.4rem;

  border-radius: 10%;

  flex-direction: column;
  justify-content:space-between;

  z-index: 20;
  div {
    height: 0.2rem;
    background-color: var(--font-color);

    transition: background-color 0.5s ease-in-out;
  }

  @media screen and (min-width: 768px) {
    display: none;

    .header--reveal & div {
      background-color: var(--bg-color);
    }
  }
}

.header-nav {
  display: none;
  align-self: center;

  animation: fadeOut 0.2s ease-in-out forwards;
  .header--reveal & {
    animation: fadeIn 0.5s ease-in-out;
  }
  ul {
    display: flex;

    flex-flow: row nowrap;
    gap: 1.6rem;
  }

  a {
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--bg-color-alt);
  }
  @media screen and (min-width: 768px) {
    display: block;
  }
}

.button__contact {
  display: none;
  height: 100;

  padding-inline: 1.4rem;
  font: 1.3rem var(--mono-font-family);

  border: 1px solid var(--bg-color-alt);
  border-radius: 0.8rem;

  background: var(--bg-color-alt);

  transition: 
    background 0.5s ease-in-out,
    color 0.5s ease-in-out;

  .header--reveal & {
    background: transparent;
    color: var(--bg-color-alt);
  }

  &:hover {
    background: var(--font-color);
    color: var(--bg-color-alt);

    .header--reveal & {
      background: var(--bg-color-alt);
      color: var(--font-color);
    }
  }

  @media screen and (min-width: 768px) {
    display: block;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; visibility: visible; }
  to { opacity: 0; visibility: hidden; }
}

.contact {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;

  min-height: 100%;
  width: 100%;

  padding: 1.6rem;
  padding-bottom: 0;

  background-color: black;

  z-index: 100;

  &.show {
    visibility: visible;
    animation: fadeIn 0.35s forwards ease-in-out;

    .contact__container {
      transform: translateY(0%);
    }
  }

  &.hide {
    animation: fadeOut 0.55s forwards;
  }

  &.first-load {
    visibility: hidden;
    opacity: 0;
  }

  .contact__close {
    display: flex;
    position: absolute;

    top: 0;
    right: 0;

    margin: 1.6rem;
    flex-flow: row nowrap;
    justify-content: flex-end;
    align-items: center;

    gap: 0.8rem;

    font-family: var(--mono-font-family);

    z-index: 100;
    span {
      text-transform: uppercase;
      font-weight: 600;
      font-size: 1rem;
    }

    button {
      font-size: 2.4rem;
      padding: 0.2rem 1rem;
      color: var(--bg-color);
      background-color: var(--font-color);

      border-radius: 0.8rem;

      &:hover {
        background-color: var(--secondary-color);
      }
    }
  }

  .contact__container {
    display: grid;
    position: relative;

    height: 100%;

    grid-template-columns: 1fr;
    grid-template-rows: 1fr 3fr;

    align-content: center;

    padding: 3.2rem;
    background-color: var(--bg-color);

    border-radius: 0.8rem;

    transform: translateY(100%);
    transition: transform 0.45s ease-in-out;
  }

  .contact__heading {
    display: grid;

    grid-template-columns: 1fr;

    font-family: var(--heading-font-family);

    z-index: 40;
    .first {
      align-self: end;
    }

    .last {
      &::before {
        content: "↑";
      }
    }

    .first:after, .last::before {
        display: inline-block;
        font-family: var(--mono-font-family);
        height: 1.5ch;
        overflow: hidden;
        margin-right: 0rem;

        vertical-align: middle;

        transform: rotate(90deg);
    }

    span {
      display: block;
      font-size: 4.4rem;
      font-weight: 700;
      line-height: 0.85;
    }
  }

  p {
    font-family: var(--heading-font-family);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.1;

    margin-bottom: 1.6rem;
  }

  .contact__data {
    margin-top: 1rem;
    padding-top: 0.6rem;
    height: 15%;
    border-top: 1px solid var(--font-color);

    > a, > div {
      display: grid;

      grid-template-columns: repeat(3, 1fr);

      span, a {
        display: inline-block;

        font-size: 1.4rem;
        line-height: 1.1;
      }

      a {
        text-decoration: underline;
      }

      :not(.ignore):first-child {
        font-weight: 700;
      }

    }

    > div a:last-child {
      justify-self: center;

      font-size: 1.3rem;
      line-height: 1.1;
      white-space: nowrap;
      text-decoration: none;
    }

    &:last-child span:last-child {
        text-decoration: underline;
    }
  }

  @media screen and (max-width: 443px){
    .contact__data {
      > div, > a {
        grid-template-columns: 1fr 1fr !important;

        gap: 0.8rem;

        a:last-child {
          display: block;
          grid-row: 2;
          grid-column: 2;

          justify-self: start;
        }

        > *:not(:first-child) {
          margin-left: auto;
          text-align: right;
        }
      }
    }
  }

  @media screen and (min-width: 768px){
    .contact__container {
      grid-template-columns: 1fr 1fr;
    }

    .contact__heading {
      grid-column: span 2;
      grid-template-columns: 1fr 1fr;

      .first, .last {
        align-self: end;
      }
      .last {
        padding-bottom: 0.5rem;
        &::before {
          content: none;
        }
      }
      .first {
        justify-self: end;
        &::after {
          content: "↑";
          margin-inline: 2.4rem;
        }
      }
    }

    .contact__info {
      grid-column: 2;
      margin-top: 2.4rem;

      p {
        max-width: 60%;
      }
    }
  }
}

.hero-section {
  position: relative;

  height: 100vh;
  height: 100dvh;

  background-color: var(--font-color);
  color: var(--bg-color);

  img {
    position: relative;
    right: 60%;
    width: 200vw;

    mask-image: linear-gradient(to bottom, var(--font-color) 60%, transparent 100%);
  }

  .hero-tagline {
    display: flex;
    position: absolute;
    flex-direction: column;

    top: 45%;
    right: 50%;
    transform: translateX(50%);

    max-width: 55rem;
    margin: auto;

    padding: var(--block-padding);

    font-family: var(--heading-font-family);
    font-weight: 600;
    font-size: clamp(0.5rem, calc((100vw - 1.6rem) / 44), 1.25rem);

    span {
      display: inline-block;
    }

    .tag-1 {
      font-size: 3.6em;
      padding-left: 10%;
    }

    .tag-2 {
      font-size: 5em;
      font-style: italic;
      line-height: 1.25;
      color: var(--primary-color);
    }

    .tag-3 {
      font-size: 2.4em;
      font-weight: 400;

      padding-left: 4.6rem;
      
      .typing {
        position: relative;

        font-family: var(--mono-font-family);
        font-weight: 600;
        font-size: 1.2em;
        color: var(--secondary-color);

        white-space: nowrap;

        &::after {
          content: "";
          display: block;
          position: absolute;
          width: 1px;
          height: 70%;

          top: 15%;
          right: -0.4rem;
          background-color: var(--bg-color);
          animation: blink 1s infinite;
        }
      }
    }
  }

  @media screen and (min-width: 768px) {
    img {
      right: 0;
      width: 100%;
    }

    .hero-tagline {
      right: calc(66% - 2.4rem);

      .tag-3 {
        white-space: nowrap;
      }
    }
  }
}

@keyframes blink {
  50% { opacity: 0; }
}

.about-section {
  width: calc(100% - 1.6rem);
  margin: 0.8rem;
  padding: 0.8rem;

  border-radius: 0.8rem;
  background: var(--bg-color-alt);

  canvas {
    width: calc(100% + 1.6rem);
    height: min(round(40vw, 1px), 60rem);
    
    margin-inline: -0.8rem;
  }

  .section-branding, .section-heading {
    text-align: center;
  }

  .section-heading {
    font-size: clamp(1.2rem, calc(1.2 / var(--base-width) * 100vw), 1.6rem);
    line-height: 1;
  }

  .section-branding {
    font-size: clamp(2.4rem, calc(2.4 / var(--base-width) * 100vw), 6.4rem);
    margin-block: 0.4rem;

    line-height: 1.2;
  }

  p {
    --font-size: clamp(1.8rem, calc(1.9 / var(--base-width) * 100vw), 3rem); 
    padding: 0.8rem;
    font-size: 1.4rem;
    font-size: var(--font-size);

    font-weight: 400;

    line-height: 1;


    margin-block: var(--font-size);

    margin-inline-start: 1.6rem;
  }

  ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  li {
    h3 {
      font-size: clamp(1.2rem, calc(1.4 / var(--base-width) * 100vw), 1.6rem);
    }
    span{
      display: inline-block;
      margin-block: 0.4rem;
      color: #434343;
      font-size: 1.3rem;
      font-size: clamp(1.1rem, calc(1.3 / var(--base-width) * 100vw), 1.4rem);
      line-height: 1.35;
    }
  }

  .about-section__first {
    .about-section__content {
      padding-block-end: 12.8rem;
      margin-block-end: 12rem;
      border-bottom: 0.1rem solid var(--font-color);
    }
  }

  .about-section-list-2 {
    counter-reset: section;

    justify-content: space-around;
    gap: 0.8rem;

    li {
      display: flex;
      border-top: 0.1rem solid var(--font-color);
      flex: 1 1 45%;
      align-content: flex-start;

      align-items: flex-start;
      div {
        margin-inline: auto;
        max-width: 20rem;

        align-self: flex-start;
        flex: 1 1 90%;
      }

      &::before {
        counter-increment: section;
        content: "A" counter(section, decimal-leading-zero);

        flex-shrink: 0;

        margin-right: 0.4rem;
        padding-top: 0.3rem;
        font-family: var(--mono-font-family);
        font-size: 1rem;
        font-size: clamp(0.9rem, calc(1 / var(--base-width) * 100vw), 1.2rem);
      }
    }
  }

  @media screen and (min-width: 768px) {
    width: calc(100% - 2 * (0.8rem + min(10vw - 7.68rem, 1.6rem)));
    margin: calc(0.8rem + min(10vw - 7.68rem, 1.6rem));
    padding-bottom: 10rem;

    li {
      h3 {
        white-space: nowrap;
        font-size: clamp(1.2rem, calc(1.3 / var(--base-width) * 100vw), 1.8rem);
      }
      span{
        font-size: clamp(1.1rem, calc(1.2 / var(--base-width) * 100vw), 1.7rem);
      }
    }

    .about-section__first {
      margin-top: calc(-10rem - min(10vw - 7.68rem, 6rem));
      margin-block-end: 12rem;

      .about-section__content {
        display: flex;
        margin-block-start: 4.8rem;
        margin-inline: 10rem;

        padding-block-end: 12.8rem;
        margin-block-end: 12rem;
        border-bottom: 0.1rem solid var(--font-color);

        justify-content: space-between;
      }

      p {
        margin-inline: 0;
        margin-block: 0;
        
      }
      .about-section__list {
        flex-grow: 3;
        flex-basis: 60%;

        justify-content: flex-end;
      }

    }
    
    .about-section-list-2 {
      margin-inline: 8rem;
    }
  }
}

.solutions-section {
  counter-reset: section;
  margin-top: 4.8rem;

  h2 {
    padding-left: 0.8rem;
    font-size: clamp(4.8rem, calc(5.2 / var(--base-width) * 100vw), 6rem);
    line-height: 1.1;
  }

  .solution {
    padding: 0.8rem;
    border-top: 1px solid var(--font-color);

    min-height: 44.8rem;

    h3 {
      font-size: clamp(2rem, calc(2.4 / var(--base-width) * 100vw), 2.8rem);
      font-weight: 400;

      &::before {
        counter-increment: section;
        content: "S" counter(section, decimal-leading-zero);

        flex-shrink: 0;

        margin-right: 0.4rem;
        font-family: var(--mono-font-family);
        font-size: 1rem;
        font-size: clamp(0.9rem, calc(1 / var(--base-width) * 100vw), 1.2rem);

        display: inline;
        vertical-align: middle;
      }
    }

    p {
      width: 83%;

      margin-top: 2.4rem;
      margin-block: 2.4rem 2rem;
      margin-inline-start: auto;
      font-size: clamp(1.2rem, calc(1.6 / var(--base-width) * 100vw), 1.8rem);

    }

    .image-wrap {
      border-radius: 0.8rem;
      overflow: hidden;
    }

    .image {
      position: relative;
      width: 100%;
      border-radius: 0.8rem;
      overflow: hidden;


      img {
        width: 100%;
        aspect-ratio: 1.5/1;
        object-fit: cover;

        border-radius: 0.8rem;
      }

      .overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;

        border-radius: 0.8rem;

        pointer-events: none;
      }

      .filter-solutions & {
        .image {
          filter: contrast(110%);

          img {
            filter: grayscale(100%);
          }

          .overlay {
            background-color: rgba(215, 0, 0, 0.75);
            mix-blend-mode: multiply;
          }
        }
      }
    }

    .solution-content {
      figure {
        display: none;
      }
    }

  }

  @media screen and (min-width: 1280px) {
    .solution {
      .solution-content {
        figure {
          display: block;
        }
      }
    }
  }

  @media screen and (min-width: 768px) {
    width: calc(100% - 2 * (0.8rem + min(10vw - 7.68rem, 1.6rem)));
    margin: calc(0.8rem + min(10vw - 7.68rem, 1.6rem));
    margin-top: 10rem;

    .solution {
      display: flex;
      position: relative;
      align-items: stretch;
      padding: 0;
      overflow: hidden;

      min-height: 0;
      
      z-index: 0;

      .image-wrap {
        position: relative;

        height: 47vw;
        min-width: 47vw;
        flex: 0 0 50%;


      }

      .solution-content {
        display: grid;
        align-items: center;

        max-height: 47vw;

        grid-template-columns: 1fr;
        grid-template-rows: min-content min-content;

        padding-top: 1.6rem;
        padding-left: 1.6rem;

        h3 {
          flex: 1 0 50%;
        }

        figure {
          align-self: end;
          justify-self: end;

          width: 19.2rem;
          max-width: 30%;
          aspect-ratio: 1;

          margin-right: 10vw;

          img {
            width: 100%;
          }

          figcaption {
            font-size: 1.4rem;
            &::before {
              content: "FIG" counter(section, decimal-leading-zero) ". ";
              font: 400 1.2rem var(--mono-font-family);
              color: #454545;
            }
          }
        }
      }

      .image {
        overflow: hidden;
        width: 47vw;
        height: 47vw;
        aspect-ratio: 1;

        img {
          width: 47vw;
          height: 47vw;
          object-fit: cover;
          object-position: center;
        }
      }
    }

    .fixed .image {
      position: fixed;

      top: 9.6rem;
    }
    &.stop .fixed .image {
      position: relative;
      transform: translateY(-100vh);
    }
  }
}

.team-section {
  .tagline {
    display: flex;

    flex-direction: column;
    justify-content: center;
    align-items: center;

    aspect-ratio: 2;

    background-image: url("../images/bitmap.svg");
    background-size: 100vw;
    background-position: top;
    background-repeat: no-repeat;

    h3 {
      font-size: 1.2rem;
    }
    h2 {
      font-size: clamp(2.4rem, calc(3.6 / var(--base-width) * 100vw), 4.2rem);
      line-height: 1;

      text-align: center;

      color: var(--bg-color-alt);
    }
  }
  img {
    margin-top: -5vw;
  }
  canvas {
    position: absolute;

    width: 100%;
    height: 100%; 

    top: 0;
    left: 0;

  }

  @media screen and (min-width: 768px) {
    .tagline {
      aspect-ratio: 3;
    }

    img {
      aspect-ratio: 16/10;
    }
  }
}

.links-section {
  margin-block: 14.8rem;

  .link {
    display: grid;
    position: relative;

    grid-template-columns: 0.2fr 1fr 0.2fr;

    justify-content: space-between;
    align-items: center;

    height: 22.2rem;
    width: calc(100% - 1.6rem);

    margin-block: 0.8rem;
    margin-inline: 0.8rem;

    padding: 1.6rem;

    color: var(--bg-color);


    container-type: size;

    span {
      font-family: var(--mono-font-family);
      font-size: 2.2rem;
    }

    h3 {
      font-size: 1.8rem;

      justify-self: center;
    }

    .link__bg {
      position: absolute;
      width: 100%;
      height: 100%;

      left: 0;

      img {
        filter: grayscale();
        width: 100%;
        height: 100%;

        object-fit: cover;
      }

      &::after {
        content: "";
        position: absolute;

        top: 0;
        width: 100%;
        height: 100%;

        background-color: rgba(197, 0, 0, 0.66);
        mix-blend-mode: multiply;

        transition: background-color 320ms ease-in;
      }
    }

    &:hover {
      .link__bg::after {
        background-color: rgba(0, 0, 0, 0.66);
      }
    }

    .link__arrow {
      height: 1.6rem;
      width: 1.6rem;

      justify-self: right;

      background-image: url(../images/arrow.svg);
    }

    > *:not(.link__bg) {
      transform: translateY(calc(var(--pointer-y, 0) * 50cqh));
      transition: transform 320ms ease-out;
      will-change: transform;
    }
  }

  @media screen and (min-width: 768px) {
    display: flex;
    justify-content: center;
    padding-inline: 10%;

    gap: 6.4rem;

    .link {
      width: calc(30% - 1.6rem);
      max-width: 40rem;

      flex: 0 1 40%;
    }
  }
}



.site-footer {
  position: relative;

  height: 100vh;
  padding: 1.6rem;

  overflow-y: hidden;

  color: var(--bg-color);
  background-color: var(--font-color);

  z-index: 20;

  .footer-spacer {
    height: 100%;
  }

  .curtain {
    position: relative;
    top: 0;

    transform: translateY(-200%);

    will-change: transform;
  }

  .upper {
    position: relative;
    height: 80vh;
    background-color: transparent;

    .grid {
      display: grid;
      position: relative;

      height: 100%;

      grid-template-columns: repeat(3, 1fr);
      grid-template-rows: repeat(3, 1fr);

      img {
        padding-top: 2.4rem;
        height: 30vw;
        max-height: 20rem;
        width: 100%;

        grid-column: span 2;
        align-self: center;
        justify-self: start;

      }

      .tagline {
        display: inline-flex;
        flex-flow: column nowrap;

        align-self: center;
        justify-self: center;
        margin-left: -25vw;

        grid-area: 2 / 2 / span 2 / span 2;
        
        font-weight: 800;
        font-size: clamp(5.6rem, calc(5.6 / var(--base-width) * 100vw), 10rem);
        line-height: 0.85;

        color: var(--bg-color);

        text-shadow:
          -1px -1px 0 #000,
          1px -1px 0 #000,
          -1px 1px 0 #000,
          1px 1px 0 #000;
          
        .typing {
          position: relative;

          font-family: var(--mono-font-family);
          font-weight: 600;
          font-size: 0.6em;
          color: var(--secondary-color);

          &::after {
            content: "";
            display: block;
            position: absolute;
            width: 1px;
            height: 70%;

            top: 15%;
            right: -0.4rem;
            background-color: var(--bg-color);
            animation: blink 1s infinite;
          }
        }
      }
    }
  }

  .lower {
    display: flex;

    flex-direction: column;
    justify-content: space-between;

    height: calc(20vh - 1.6rem);

    border-top: 0.1rem solid var(--bg-color);
    background-color: transparent;

    .links {
      display: flex;
      gap: 2.4rem;

      font-size: 1.6rem;

      p {
        font: 600 1rem var(--mono-font-family);

        margin-left: auto;
      }
    }

    .colophon {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: flex-end;

      p {
        max-width: 100%;
        flex: 1 1 auto;

        font-size: 1.2rem;
      }
    }

  }

  .canvas-container {
    position: absolute;

    height: 100%;
    margin-left: -1.6rem;

    filter: blur(0.5px);

    &::after {
      content: "";
      position: absolute;
      height: 100%;
      width: 100%;
      top: 0;

      background: linear-gradient(0deg,
        rgba(7, 7, 7, 1) 0%,
        rgba(7, 7, 7, 0.85) 5%,
        rgba(7, 7, 7, 0.50) 20%,
        rgba(7, 7, 7, 0.10) 100%);
    }
  }

  @media screen and (min-width: 768px) {
    .grid img {
      height: 20vw !important;
      grid-column: span 1 !important;
    }
  }
}


.alt-main {
  padding-top: 8.5rem;
  padding-inline: 1.6rem;

  > section:not(.alt-hero) {
    padding-block: 3.6rem;

    border-top: 1px solid var(--font-color);
  }

  > section {
    header {
      margin-bottom: 3.2rem;

      h3 {
        font-size: clamp(4.8rem, calc(4.8 / var(--base-width) * 100vw), 6.8rem);
        font-weight: 600;
        line-height: 1;
      }
    }
  }

  .hero-video {
    --parallax-start: 0%;
  }

  @media screen and (min-width: 768px) {
    section:not(.alt-hero) {
      padding-block: 12rem;

      header {
        min-height: 20rem;
        margin-bottom: 9.6rem;
      }
    }
  }
}

.alt-hero {
  --parallax-start: -85px;

  width: 100%;
  overflow: hidden;

  padding-bottom: 3.6rem;

  img {
    width: 100%;
  }

  @media screen and (min-width: 768px) {
    padding-bottom: 10rem;
  }
}

.team {
  padding-top: 1.6rem !important;

  .team__intro {
    align-self: end;
    
    font-size: 1.5rem;
    line-height: 1.2;

    p {
      padding-top: 1rem;

      font-size: 1.6rem;
      font-weight: 400;
      color: #434343;
    }
  }

  article {
    h3 {
      font-size: clamp(2.4rem, calc(2.4 / var(--base-width) * 100vw), 5.8rem);
      line-height: 1.1;
    }
  }

  .team__photos {
    display: grid;

    padding-top: 2.4rem;
    gap: 2.4rem;
    grid-template-columns: repeat(4, 1fr);
  }

  .team__card {
    display: flex;
    flex-flow: column;

    grid-column: span 2;

    &.center {
      grid-column: 2 / span 2;
    }

    span {
      font-size: 1.8rem;
      line-height: 1;
    }
  }
  
  .team__card__image {
    width: 100%;
    aspect-ratio:  1;
    overflow: hidden;

    img {
      width: 100%;
      height: 100%;

      object-fit: cover;
      object-position: top center;
    }
  }

  .team__card__name {
    font-weight: 600;

    padding-top: 0.4rem;
  }

  .team__card__position {
    font-weight: 400;
    color: #434343;
  }

  @media screen and (min-width: 768px) {
    article {
      padding-inline: 15vw;
    }
    .team__photos {
      gap: 2.4rem 5vw;
    }
    .team__card__image {
      aspect-ratio:  9/10;
    }
  }
}

.partners {
  background-color: transparent;
  header {
    margin-left: 1.6rem;
  }
  .partners__card {
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    justify-content: start;
    align-content: start;

    padding: 3.2rem;
    gap: 1.6rem;

    background-color: var(--bg-color-alt);
    border-radius: 0.8rem;
    img {
      width: 100%;
      height: 12.8rem;
      padding: 0.8rem;
      justify-self: center;
    }
    h4 {
      font-size: clamp(1.2rem, calc(1.2 / var(--base-width) * 100vw), 1.6rem);
      font-size: 1.6rem;
      align-self: center;
    }
    p {
      font-size: clamp(1.2rem, calc(1.2 / var(--base-width) * 100vw), 1.6rem);
      font-size: 1.6rem;

      grid-column: span 2;
    }
  }
  @media screen and (min-width: 768px) {
    .partners__card {
      grid-template-columns: 1fr 1fr;

      padding: 3.2rem;

      img {
        max-width: 15vw;
        padding: 0.8rem;
        justify-self: center;
        align-self: center;
      }
      h4 {
        font-size: clamp(1.2rem, calc(1.2 / var(--base-width) * 100vw), 1.6rem);
        align-self: center;
      }
      p {
        font-size: clamp(1.2rem, calc(1.2 / var(--base-width) * 100vw), 1.6rem);
      }
    }
  }
}

@keyframes track {
  to {
    transform: translateX(calc(
      50cqw - (var(--item-width) / 2)
      - (
        ((var(--item-width) + var(--gap)) * (var(--spinner-items) - 1))
      )
    ));
  }
}

.spinner {
  --spinner-items: 1;
  --item-width: 41.6rem;
  --gap: 1.6rem;

  view-timeline-name: --spinner;
  view-timeline-axis: block;

  height: calc(100dvh + (var(--spinner-items) * 33.3dvh));

  position: relative;

  .spinner__sticky {
    position: sticky;
    overflow: hidden;

    top: 8.5rem;
    bottom: 0;

    width: calc(100% + 3.2rem);
    margin-left: -1.6rem;

    container-type: inline-size;
  }
  .spinner__track{
    display: inline-flex;

    width: max-content;
    
    flex-flow: row nowrap;
    gap: var(--gap);

    transform: translateX(calc(50cqw - (var(--item-width) / 2)));

    > div {
      flex: 0 0 var(--item-width);
    }

    @supports (animation-timeline: view()) {
      animation: track linear both;
      animation-timeline: --spinner;
      animation-range: exit-crossing 0% exit 0%;
    }
  }

  @media screen and (max-width: 448px) {
    --item-width: calc(100vw - 3.2rem);
  }
}

.careers {
  h3 {
    padding-bottom: 1.6rem !important;
  }
  .table {
    font-size: clamp(1.2rem, calc(1.2 / var(--base-width) * 100vw), 1.6rem);
    font-weight: 600;
  }

  .careers-none {
    font-size: 1.6rem;
  }

  @media screen and (min-width: 768px) {
    h3 {
      padding-bottom: 0 !important;
    }
  }
}

@keyframes featureHero {
  from {
      transform: translate(10%, 0) scale(1);
  }
  to {
    transform: translate(-25%, 30%) scale(0.5);
  }
}

@keyframes featureFloat {
  from {
      transform: translateY(50%);
  }
  to {
    transform: translateY(-200%);
  }
}

.feature {
  view-timeline-name: --feature;
  view-timeline-axis: block;

  display: flex;
  position: relative;

  flex-flow: column;

  overflow: hidden;

  .feature__hero {
    @supports (animation-timeline: view()) {
      animation: featureHero linear both;
      animation-timeline: --feature;
      animation-range: exit-crossing -8.5rem exit 0%;
    }

    img {
      width: 80%;
    }
  }

  .feature__bottom {
    display: inline-block;
    position: relative;

    height: calc(max(25vw, 17.5vh));
    aspect-ratio: 2.2/1;

    margin-left: auto;
    flex-grow: 0;
    flex-shrink: 0;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }

  p {
    display: inline-block;
    margin-inline: auto;

    padding-block: 10rem;

    font-family: var(--heading-font-family);
    font-size: clamp(2.4rem, calc(3.2 / var(--base-width) * 100vw), 5.2rem);
    font-weight: 600;

    text-align: center;
    line-height: 1;
  }

  @media screen and (min-width: 768px) {
    .feature__float {
      display: initial;
    }
  }
}

.privacy {
  header {
    max-width: 44.8rem;
    margin: auto;
    min-height: initial !important;
    margin-bottom: 1.6rem !important;

    h3 {
      font-size: clamp(4.8rem, calc(4.8 / var(--base-width) * 100vw), 6.2rem) !important;
    }
  }

  article {
    max-width: 44.8rem;

    margin: auto;
    font-size: 1.6rem;
    line-height: 1.2;

    span {
      font: 600 1.6rem var(--heading-font-family);
    }

    ul {
      list-style: square;

      margin-left: 1.8rem;
      line-height: 1.4;
    }
  }
}

/* ------- Parallax -------- */
@keyframes parallax {
  from {
    transform: translateY(0%);
  } to {
    transform: translateY(50%);
  }
}
:root {
  --parallax-start: 0%;
}
.parallax-container {
  view-timeline-name: --parallax;
  view-timeline-axis: block;
  .parallax-layer {
    overflow: hidden;
    max-height: 100%;
  }

  .parallax-img {
    object-fit: cover;
    
    @supports (animation-timeline: view()) {
      animation: parallax linear both;
      animation-timeline: --parallax;
      animation-range: exit-crossing var(--parallax-start) exit-crossing 100%;
    }
  }
}

/* ------- Reveal -------- */
@keyframes revealPhoto {
  from {
    transform: scale(0.8) translateY(-50%); 
    clip-path: inset(50% 0 50% 0);
  }
  to {
    transform: scale(1);
    clip-path: inset(0 0 0 0);
  }
}
.reveal {
  --enter: 10%;
  --exit: 60%;
  --progress: 0;

  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  transform-origin: center;
  will-change: transform, clip-path;

  @supports (animation-timeline: view()) {
    & {
      animation-name: revealPhoto;
      animation-duration: 1s;
      animation-timing-function: linear;
      animation-fill-mode: both;

      animation-timeline: view();
      animation-range: entry-crossing 0% exit-crossing -84px;
    }
  }
}
