/* @import 'normalize.css' layer(normalize); */

@layer normalize, base, demo, grid, setup, scroll, novelty;


@layer scroll {
  :root {
    --power-1-out: linear(
      0 0%,
      0.0027 3.64%,
      0.0106 7.29%,
      0.0425 14.58%,
      0.0957 21.87%,
      0.1701 29.16%,
      0.2477 35.19%,
      0.3401 41.23%,
      0.5982 55.18%,
      0.7044 61.56%,
      0.7987 68.28%,
      0.875 75%,
      0.9297 81.25%,
      0.9687 87.5%,
      0.9922 93.75%,
      1 100%
    );
    --power-2-out: linear(
      0 0%,
      0.0036 9.62%,
      0.0185 16.66%,
      0.0489 23.03%,
      0.0962 28.86%,
      0.1705 34.93%,
      0.269 40.66%,
      0.3867 45.89%,
      0.5833 52.95%,
      0.683 57.05%,
      0.7829 62.14%,
      0.8621 67.46%,
      0.8991 70.68%,
      0.9299 74.03%,
      0.9545 77.52%,
      0.9735 81.21%,
      0.9865 85%,
      0.9949 89.15%,
      1 100%
    );
    --power-3-out: linear(
      0 0%,
      0.0029 13.8%,
      0.0184 21.9%,
      0.0339 25.51%,
      0.0551 28.81%,
      0.0827 31.88%,
      0.1168 34.76%,
      0.1962 39.57%,
      0.3005 44.02%,
      0.4084 47.53%,
      0.6242 53.45%,
      0.7493 57.93%,
      0.8495 62.97%,
      0.8888 65.67%,
      0.9213 68.51%,
      0.9629 73.9%,
      0.9876 80.16%,
      0.998 87.5%,
      1 100%
    );
    --power-4-out: linear(
      0 0%,
      0.0012 14.95%,
      0.0089 22.36%,
      0.0297 28.43%,
      0.0668 33.43%,
      0.0979 36.08%,
      0.1363 38.55%,
      0.2373 43.07%,
      0.3675 47.01%,
      0.5984 52.15%,
      0.7121 55.23%,
      0.8192 59.21%,
      0.898 63.62%,
      0.9297 66.23%,
      0.9546 69.06%,
      0.9733 72.17%,
      0.9864 75.67%,
      0.9982 83.73%,
      1 100%
    );
    --sine: linear(
      0 0%,
      0.2861 18.47%,
      0.4829 32.08%,
      0.6437 44.52%,
      0.7712 56.07%,
      0.8722 67.47%,
      0.9115 73.02%,
      0.9434 78.49%,
      0.9682 83.91%,
      0.9859 89.3%,
      0.9965 94.66%,
      1 100%
    );
  }
  @keyframes fade {
    0%,
    55% {
      opacity: 0;
    }
  }
  @keyframes reveal {
    0%,
    30% {
      scale: 0;
    }
  }
  @keyframes scale-x {
    0%,
    10% {
      width: calc(100vw - (2 * var(--gutter)));
    }
  }
  @keyframes scale-y {
    0%,
    10% {
      height: calc(100vh - (2 * var(--gutter)));
    }
  }
  @media (prefers-reduced-motion: no-preference) {
    [data-enhanced='true'] {
      .grid-scale section:first-of-type {
        min-height: 240vh;
      }

      @supports (animation-timeline: scroll()) and (animation-range: 0 100%) {
        .grid-scale section:first-of-type {
          view-timeline: --runner;
        }

        &[data-center='true'] {
          .scaler img {
            animation-name: scale-x, scale-y;
            animation-fill-mode: both;
            animation-timing-function: var(--power-2-out), var(--power-1-out);
            animation-timeline: --runner, --runner;
            animation-range: entry 100% exit -20%;
          }
        }

        &[data-layers='true'] {
          .grid .layer {
            animation-name: fade, reveal;
            animation-fill-mode: both;
            animation-timeline: --runner, --runner;
            animation-timing-function: var(--sine), var(--power-1-out);
            animation-range: entry 100% exit 0%;
          }
          &[data-stagger='timing'] .grid .layer {
            &:nth-of-type(1) {
              animation-timing-function: var(--sine), var(--power-1-out);
            }
            &:nth-of-type(2) {
              animation-timing-function: var(--sine), var(--power-3-out);
            }
            &:nth-of-type(3) {
              animation-timing-function: var(--sine), var(--power-4-out);
            }
          }
          &[data-stagger='range'] .grid .layer {
            &:nth-of-type(1) {
              animation-range: entry 100% exit 0%;
            }
            &:nth-of-type(2) {
              animation-range: entry 100% exit -10%;
            }
            &:nth-of-type(3) {
              animation-range: entry 100% exit -20%;
            }
          }
        }
      }
    }
  }
}

@layer setup {
  /* gross calculations here to appease Safari and Firefox */
  :root {
    --container-width: 1600px;
    --gap: clamp(10px, 7.35vw, 80px);
    --gutter: 2rem;
  }
  @media (max-width: 600px) {
    :root {
      --gutter: 1rem;
    }
  }

  .content-grid{
    min-height: 100vh;
    width: 100vw;
    display: flex;
    place-items: center;
    align-content: center;
    position: sticky;
    top: 0;
  }

  .scaler {
    z-index: 2;
    width: 100%;
    height: 100%;
    position: relative;

    img {
      position: absolute;
      top: 50%;
      left: 50%;
      translate: -50% -50%;
      object-fit: cover;
      border-radius: 1rem;
      width: 100%;
      height: 100%;
    }
  }
}

@layer grid {
  /* it's a 5x3 grid using subgrid, always centered */
  .grid {
    --offset: 0;
    width: 1600px;
    max-width: calc(100% - (2 * var(--gutter)));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: var(--gap);
    margin: 0 auto;
    align-content: center;
    /* hmm */
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
  }

  /* .grid img {
    width: 10vw;
    height: 12vw;
  } */

  @media (max-width: 600px) {
    .grid {
      grid-template-columns: repeat(3, 1fr);
      --offset: -1;
    }

    .grid > div:nth-of-type(1) {
      display: none;
    }
  }

  .grid > .layer {
    display: grid;
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    grid-template-columns: subgrid;
    grid-template-rows: subgrid;
  }

  .grid > div:nth-of-type(1) div:nth-of-type(odd) {
    grid-column: 1;
  }
  .grid > div:nth-of-type(1) div:nth-of-type(even) {
    grid-column: -2;
  }

  .grid > div:nth-of-type(2) div:nth-of-type(odd) {
    grid-column: calc(2 + var(--offset));
  }
  .grid > div:nth-of-type(2) div:nth-of-type(even) {
    grid-column: calc(-3 - var(--offset));
  }

  .grid > div:nth-of-type(3) div {
    grid-column: calc(3 + var(--offset));

    &:last-of-type {
      grid-row: -1;
    }
  }

  .grid .scaler {
    position: relative;
    grid-area: 2 / calc(3 + var(--offset));
  }

  .grid img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 1rem;
  }
}

@layer demo {

  .grid-scale,
  section {
    max-width: 100%;
  }

  /* section {
    min-height: 100vh;
  } */

  .content-grid{
    overflow: hidden;
  }

  .content-wrap {
    overflow: clip;
    background:  #000;
    z-index: 2;
  }


}

@layer base {
  :root {
    --font-size-min: 16;
    --font-size-max: 20;
    --font-ratio-min: 1.2;
    --font-ratio-max: 1.33;
    --font-width-min: 375;
    --font-width-max: 1500;
  }


  :where(.fluid) {
    --fluid-min: calc(
      var(--font-size-min) * pow(var(--font-ratio-min), var(--font-level, 0))
    );
    --fluid-max: calc(
      var(--font-size-max) * pow(var(--font-ratio-max), var(--font-level, 0))
    );
    --fluid-preferred: calc(
      (var(--fluid-max) - var(--fluid-min)) /
        (var(--font-width-max) - var(--font-width-min))
    );
    --fluid-type: clamp(
      (var(--fluid-min) / 16) * 1rem,
      ((var(--fluid-min) / 16) * 1rem) -
        (((var(--fluid-preferred) * var(--font-width-min)) / 16) * 1rem) +
        (var(--fluid-preferred) * var(--variable-unit, 100vi)),
      (var(--fluid-max) / 16) * 1rem
    );
    font-size: var(--fluid-type);
  }
/* 
  *,
  *:after,
  *:before {
    box-sizing: border-box;
  } */


  


  /* Utilities */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }
}

[data-stick='true'] div.tp-dfwv {
  position: fixed;
}


.three-step .card {
  display: flex;
  justify-content: space-between;
  min-height: 200px;
  background: transparent;
  border: 2px var(--prim) solid;
}

.three-step .card h2{
  text-align: left;
  font-size: 6rem;
}
.three-step .card h3{
  text-align: right;
}


.three-step .first {
display: flex;
  justify-content: center;
}


