@use "normalize";
@use "fonts";
@use "menu";
@use "footer";
@import "vars";

:root {
  background-attachment: fixed;
  --viewportWidth: calc(100vw - var(--scrollbarWidth));

  --c-red1: #ee6570;
  --c-red2: #ff4961;
  --c-red3: #e84258;
  --c-red4: #993e4a;

  --c-gray1: #121212;
  --c-gray2: #333333;
  --c-gray3: #828282;
  --c-gray4: #d1d1d1;
  --c-gray5: #e0e0e0;
  --c-gray6: #f4f4f5;
  --c-gray7: #1e1e1e;

  --c-1: rgba(255, 255, 255);
  --c-text-primary: var(--c-1);
  --c-line-primary: var(--c-1);
  --c-bkg-offset: var(--c-1);

  // #ef4b63 - original color
  --c-text-accent: var(--c-red2);
  --c-line-accent: var(--c-red2);
  --c-bkg-accent: var(--c-red2);

  --c-bkg: var(--c-gray2);
  --c-text-offset: var(--c-gray2);

  --c-3d-shadow: var(--c-red4);

  --c-5: rgba(255, 255, 255, 1);
  --c-text-bright: var(--c-5);

  --c-6: #c2c2c2;

  --c-7: #27b45f;
  --c-success: var(--c-7);

  --c-8: #e43434;
  --c-negative: var(--c-8);

  --c-accent: #6866cc;
  --c-accent-green: #17bd89;

  --c-bitcoin: #f7931a;
  --c-lightning: #7b1af8;

  --c-shadow-1: rgb(0 0 0 / 50%);
  --c-shadow-2: rgb(0 0 0 / 40%);
  --c-shadow-3: rgb(0 0 0 / 20%);

  --c-bkg-light-fade05: rgba(255, 255, 255, 0.05);
  --c-bkg-light-fade1: rgba(255, 255, 255, 0.1);
  --c-bkg-light-fade2: rgba(255, 255, 255, 0.2);
  --c-bkg-light-fade9: rgba(255, 255, 255, 0.9);

  --c-bkg-dark-fade1: rgba(0, 0, 0, 0.1);
  --c-bkg-dark-fade2: rgba(0, 0, 0, 0.2);

  --c-spacer: var(--c-bkg-light-fade05);

  --c-glass: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.05)
  );
  --c-dark-glass: linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.25));

  --sh-2: 0 3rem 2rem 0rem var(--c-shadow-2);
  --sh-1: 0 1rem 2rem 0rem var(--c-shadow-2);

  --s-primary: 0.5;
  --b-primary: 1px solid var(--c-line-primary);
  --b-secondary: 1px dashed var(--c-line-primary);

  --f-hero: "Basis Grotesque Pro";
  --f-bold: "Tusker Grotesk 5500";
  --f-accent: "Montserrat";
  --f-accent2: "Arkibal Mono";
  --f-accent-bold: "Montserrat";
  --f-accent2-bold: "Arkibal Mono Rg";
  --f-copy: "Liberation Mono";
  --f-button: "Basis Grotesque Mono Pro";

  --t-simple: all 0.2s ease-in-out;
}

html {
  font-size: 2vmin;
  font-size: max(2vmin, 10px);
  scroll-behavior: smooth;
  color: var(--c-text-primary);
  font-family: var(--f-accent);
  font-weight: 200;
  overflow: scroll;
  overflow: overlay;
  display: flex;

  /* width */
  ::-webkit-scrollbar {
    width: 1rem;
  }

  /* Track */
  ::-webkit-scrollbar-track {
    background: transparent;
  }

  /* Handle */
  ::-webkit-scrollbar-thumb {
    background: var(--c-bkg-accent);
  }

  /* Handle on hover */
  ::-webkit-scrollbar-thumb:hover {
    background: var(--c-bkg-offset);
  }

  &.menu-is-open {
    .header__logo {
      opacity: 1 !important;
      filter: blur(0px) !important;
    }
  }
}

body {
  background: var(--c-bkg);
}

img {
  display: block;
  width: 100%;
  max-width: 100%;
  //height: auto;
  object-fit: contain;
}

.image-with-shadow img {
  align-self: flex-start;
}

picture {
  display: contents;
}

picture + picture {
  position: absolute;
}

main {
  //transform: translateY(-100vh);
  perspective: 1000px;
}

a {
  text-decoration: none;
  transition: var(--t-simple);
}

a.link-in-svg {
  fill: var(--c-text-accent);
  path {
    transition: var(--t-simple);
  }
  &:hover {
    path {
      fill: var(--c-text-primary);
    }
  }
}

p a {
  color: var(--c-text-accent);
  position: relative;
  &::before {
    display: inline-block;
    position: absolute;
    background: linear-gradient(130deg, #EE6570, #FF4961, #993E4A);
    height: 3px;
    border-radius: 2px;
    top: 100%;
    left: 0;
    width: 100%;
  }
  &::before {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 3px;
    border-radius: 2px;
    bottom: 0;
    left: 0;
    background-color:linear-gradient(130deg, #EE6570, #FF4961, #993E4A);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
  }

  &:hover::before {
    transform: scaleX(1);
    transform-origin: bottom left;
  }
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0;
  text-transform: uppercase;
  em {
    color: var(--c-text-accent);
    font-style: normal;
  }
}

h1,
h2 {
  text-transform: none;
}

ul {
  margin: 0;
  padding: 0;
  li {
    list-style: none;
  }
}

header {
  position: fixed;
  width: 100vw;
  z-index: 2;
  padding-top: 1rem;
  
  a.header__logo {
    opacity: 0;
    filter: blur(10px);
    margin-left: 1rem;
    display: flex;
    align-items: center;
    position: relative;

    svg {
      width: 8rem;
      position: absolute;
      path {
        transition: var(--t-simple);
        stroke-width: 0;
        stroke: transparent;
      }
      path:last-child {
        //filter: drop-shadow(0 0 0.6rem rgb(0 0 0 / 80%));
      }
    }
    &:hover {
      svg path {
        stroke-width: 0.2rem;
        stroke: var(--c-text-primary);
      }
      svg path:last-child {
        stroke: var(--c-text-accent);
      }
    }
  }
}

.header__top {
  top: $banner-height;
}

section#banner {
  z-index: 10;
  position: fixed;
  width: 100vw;
  top: 0;
  height: $banner-height;

  a {
    cursor: pointer;
  }

  .link-container {
    position: relative;
  }

 .link-container .overlay {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
  }

  .link-container .inner {
    position: relative;
    pointer-events: none;
    z-index: 1;
  }

  .link-container .inner a {
    pointer-events: all;
    position: relative;
  }

  .banner__content {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--c-accent);
    color: var(--c-1);

    p {
      max-width: 100vw;
      font-size: 1rem;
    }

    span {
      color: var(--c-1);
      font-weight: 700;
    }
  }
}

@media screen and (max-width: 500px) {
  section#banner p {
    padding: 0 2rem 0 2rem;
    text-align: center;
  }
}

nav {
  --padding: 1rem;
  //width: calc(100% - 2 * var(--padding) - 15px);
  width: 100vw;
  box-sizing: border-box;
  font-family: var(--f-accent);
  font-weight: 300;
  line-height: 1;
  text-transform: uppercase;
  padding: var(--padding);
  display: flex;
  justify-content: space-between;

  ul {
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
    li {
      list-style: none;
      display: flex;
      a {
        color: var(--c-text-bright);
        font-size: 1.5rem;
        padding: 0em 0.5em 0em 0.5em;
        display: flex;
        gap: 0.5em;
        align-items: center;
        svg {
          height: 0.7em;
        }

        path {
          fill: var(--c-text-bright);
          transition: var(--t-simple);
        }

        &.em {
          background-color: var(--c-text-accent);
          margin-right: 1rem;
          &:hover {
            color: var(--c-text-accent);
            background-color: var(--c-text-bright);
          }
        }
        &:hover {
          color: var(--c-text-accent);
          path {
            fill: var(--c-text-accent);
          }
        }
      }
    }
  }
  &.scrolled-menu {
    backdrop-filter: blur(10px);
    background-color: var(--c-bkg-dark-fade1);
  }
}

.opened-menu {
  opacity: 0;
  width: 0;
  transform: translateX(3rem);
  //overflow: hidden;
  white-space: nowrap;
  //margin-left: -1rem;
}
.closed-menu {
  //overflow: hidden;
  white-space: nowrap;
}

#hero-image {
  position: relative;
  display: flex;
  scale: 0.95;
  opacity: 0;
  filter: blur(10px);
  img {
    width: 50rem;
    max-width: 90vw;
    //margin-top: 6rem;
  }
}

.img-shadow {
  filter: blur(2rem) brightness(0);
  z-index: -1;
  position: absolute;
  top: 5rem;
  opacity: 0.5;
}

.form-alert {
  padding: 1.5rem;
  font-size: 1.5rem;
  font-weight: 500;
  display: none;

  &.form-alert--success {
    background-color: var(--c-success);
  }

  &.form-alert--error {
    background-color: var(--c-negative);

    a {
      font-weight: 700;
    }
  }

  &.form-alert--visible {
    display: block;
  }
}

.p--standalone {
  font-size: 1.8rem;
  line-height: 1.4;
}

.center {
  width: fit-content;
  align-self: center;
}

.text-center {
  text-align: center;
}

@media only screen and (max-width: 500px) {
  .header__logo img {
    width: 11rem !important;
  }
  .hide-on-mobile {
    display: none;
  }
  nav ul {
    gap: 0;
    justify-content: flex-end;
    li a {
      font-size: 2rem;
    }
  }
}

.image-with-shadow {
  display: flex;
  position: relative;
}

/* Safari 9+ */
@supports (-webkit-hyphens: none) {
  body {
    overflow-x: hidden;
  }
  section#support,
  section#be-your-own {
    transform: translate(0, 0);
  }
  section#support img {
    max-width: 40vh !important;
  }

  section#bitcoin::after {
    bottom: -99vh;
  }

  @media screen and (min-width: 900px) {
    #be-your-own {
      --rows-above: 2 !important;
    }
  }

  @media screen and (max-width: 1300px) {
    #be-your-own {
      --rows-above: 1 !important;
    }
  }
}

.pb1 {
  padding-bottom: 1rem;
}

.pt1 {
  padding-top: 1rem;
}

.pt2 {
  padding-top: 2rem;
}

.pt3 {
  padding-top: 3rem;
}