:root,
* {
  margin: 0px;
  padding: 0px;
  --ci-black: #41464c;
  --ci-white: #fff;
  --ci-green: #aebe45;
  --ci-blue: #3c9dd7;
  --ci-space: 1.5rem;
  box-sizing: border-box;
  scrollbar-color: var(--ci-white) var(--ci-black);
  transition: all ease 0.3s;
  -webkit-tap-highlight-color: transparent;
}
body {
  font-family: Montserrat, sans-serif;
  color: var(--ci-black);
  font-size: 14px;
}
a {
  color: var(--ci-green);
  text-decoration: none;
  &:hover {
    color: var(--ci-black);
  }
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 500;
  text-wrap-style: balance;
  margin-bottom: 0.4em;
}
h1 {
  font-size: 2.1em;
  line-height: 1.1em;
}
h2 {
  line-height: 1.2em;
}
p {
  margin-bottom: calc(2 * var(--ci-space));
}
b {
  font-weight: 100;
  opacity: 0.5;
  text-transform: uppercase;
}
ul {
  margin-left: var(--ci-space);
  margin-bottom: calc(2 * var(--ci-space));
}
ul.plus {
  list-style-type: "+  ";
}
.shadow {
  box-shadow: 0 -0.2rem 1rem #00000080;
}

form {
  display: contents;
}

label,
.label {
  margin-bottom: calc(var(--ci-space) / 2);
  display: block;
  line-height: 1.3em;
}
input,
select,
textarea {
  border: 1px solid color-mix(in srgb, var(--ci-black), transparent 70%);
  padding: 10px;
  width: 100%;
  background-color: var(--ci-white);
  color: var(--ci-black);
  margin-bottom: var(--ci-space);
  border-radius: 0px;
  max-width: 600px;
  min-width: unset;
  text-align: left;
  font-family: Montserrat, sans-serif;
  &:focus-visible {
    outline-color: var(--ci-green);
    outline-style: solid;
    outline-width: 1px;
    box-shadow: 0 0 5px var(--ci-green);
    border-color: var(--ci-green);
  }
  &:-webkit-autofill,
  &:-webkit-autofill:focus {
    background-color: var(--ci-black);
  }
  &:user-invalid {
    outline-color: #bb000088;
    outline-style: solid;
    outline-width: 0px;
    border-color: #ba000088;
    background-color: #ffffff;
    box-shadow: 0 0 3px #b60000;
  }
}

textarea {
  min-height: 150px;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  color: black !important;
  -webkit-text-fill-color: black !important;
  -webkit-box-shadow: 0 0 0 1000px white inset !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}

input[type="checkbox"] {
  display: none;
  + label {
    border: 1px solid color-mix(in srgb, var(--ci-black), transparent 70%);
    cursor: pointer;
    padding: 10px;
    text-align: center;
    margin-bottom: calc(var(--ci-space) / 2);
  }
  :last-child + label {
    margin-bottom: var(--ci-space);
  }
  &:checked + label {
    background-color: var(--ci-green);
    color: var(--ci-white);
    border: 1px solid var(--ci-green);
  }
  &:user-invalid + label {
    background-color: #690000;
    color: var(--ci-white);
    border: 1px solid red;
  }
}
.checkboxbox {
  display: flex;
  align-items: center;
  border: 1px solid var(--ci-green);
  margin-bottom: var(--ci-space);
  background-color: #aebe4533;
  input[type="checkbox"] {
    display: unset;
    margin: 0px var(--ci-space) 0 calc(var(--ci-space) * 2);
    width: auto;

    + label {
      margin: 0px;
      border: 0px;
      flex-grow: 1;
      text-align: left;
      background-color: unset;
      padding: 10px var(--ci-space);
      font-size: 10px;
    }
    &:checked + label {
      background-color: var(--ci-green);
    }
    &:user-invalid + label {
      background-color: #690000;
    }
  }
  &:has(> input:checked) {
    background-color: var(--ci-green);
  }
  &:has(> input:user-invalid) {
    background-color: #690000;
  }
}

.switch {
  height: 45px;
  width: 100%;
  border: 1px solid var(--ci-green);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  position: relative;
  margin-bottom: var(--ci-space);
  input {
    display: none;
    &:checked + label {
      color: var(--ci-white);
    }
    &:nth-of-type(2):checked ~ .switch-selection {
      left: 33.333%;
    }
    &:nth-of-type(3):checked ~ .switch-selection {
      left: 66.666%;
    }
  }
  label {
    margin: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 12px;
    text-align: center;
    z-index: 2;
    cursor: pointer;
  }
  .switch-selection {
    background-color: var(--ci-green);
    height: 100%;
    top: 0px;
    left: 0px;
    position: absolute;
    width: 33.333%;
  }
}

.range {
  margin-bottom: 30px;
  margin-top: -5px;
  input[type="range"] {
    width: 100%;
    cursor: pointer;
    margin: 0px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: none;
    cursor: pointer;
    overflow: hidden;
    border: unset;
    padding: 0px;
    &::-webkit-slider-thumb {
      height: 20px;
      aspect-ratio: 1;
      border-radius: 50%;
      box-shadow: 0 0 0 4px inset var(--ci-green);
      border-image: linear-gradient(90deg, var(--ci-green) 50%, #ababab 0) 0 1 /
        calc(50% - 4px / 2) 100vw/0 100vw;
      -webkit-appearance: none;
      appearance: none;
    }
    &::-moz-range-thumb {
      height: 20px;
      background: none;
      border-radius: 50%;
      box-shadow: 0 0 0 4px inset var(--ci-green);
      border-image: linear-gradient(90deg, var(--ci-green) 50%, #ababab 0) 0 1 /
        calc(50% - 4px / 2) 100vw/0 100vw;
      -moz-appearance: none;
      appearance: none;
    }
  }
}

.buttons {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ci-space);

  .button {
    flex-grow: 1;
    &:nth-child(2) {
      flex-grow: 4;
    }
  }
}
.button {
  font-size: 1em;
  background-color: var(--ci-green);
  color: var(--ci-white);
  border: 1px solid var(--ci-green);
  padding: 10px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  &:hover {
    background-color: var(--ci-black);
    border-color: var(--ci-black);
    color: var(--ci-white);
  }
  &.back {
    background-color: var(--ci-white);
    color: var(--ci-green);
    &:hover {
      border-color: var(--ci-black);
      background-color: var(--ci-black);
      color: var(--ci-white);
    }
  }
}

.scroll {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  overflow-x: hidden;
  height: 100dvh;
  margin: 0px;
  padding: 0px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;

  header {
    position: sticky;
    top: 0px;
    width: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    background-color: #ffffffe6;
    z-index: 1;
    backdrop-filter: blur(5px);
    .logo {
      background-image: url(BILTECH-Logo.svg);
      height: 40px;
      margin: calc(var(--ci-space) * 1) 0 calc(var(--ci-space) * 1) 0;
      background-size: contain;
      width: 80%;
      background-repeat: no-repeat;
      background-position: center;
    }
    div {
      display: flex;
      margin-bottom: var(--ci-space);
      gap: var(--ci-space);
      a {
        cursor: pointer;
        text-decoration: none;
        &.highlighted {
          color: var(--ci-green);
        }
      }
    }
  }

  .stripes {
    background: linear-gradient(
      0deg,
      hsla(213, 8%, 28%, 1) 0%,
      hsla(213, 8%, 28%, 1) 40%,
      hsla(68, 48%, 51%, 1) 40%,
      hsla(68, 48%, 51%, 1) 60%,
      hsla(0, 0%, 100%, 1) 60%,
      hsla(0, 0%, 100%, 1) 70%,
      hsla(202, 66%, 54%, 1) 70%,
      hsla(202, 66%, 54%, 1) 100%
    );
    display: block;
    width: 100vw;
    padding: 10vh;
    transform: rotate(-5deg) scaleX(1.1) scale3d(1, 1, 1);
    margin: -10vh 0;
  }

  section {
    scroll-snap-align: start;
    width: 100%;
    padding: var(--headerheight) 0dvh;
    > div {
      min-height: calc(100dvh - 2 * var(--headerheight));
    }
    .center-v {
      padding: var(--ci-space);

      display: flex;
      align-items: center;
    }
    .center-h {
      padding: var(--ci-space);
      display: flex;
      justify-content: center;
      margin: 0 auto;
    }
    .column {
      flex-direction: column;
    }
    .space {
      padding: var(--ci-space);
    }
    &.jobs {
      > div > div {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 20px;
        a {
          border: 1px solid #f1f1f1;
          padding: 40px;
          text-align: center;
        }
      }
    }

    &.form-1 {
      text-align: center;
      .button {
        width: 80%;
        max-width: 600px;
      }
    }
    &.form-1,
    &.form-2,
    &.form-3,
    &.form-4,
    &.form-5,
    &.form-6,
    &.form-7,
    &.form-8,
    &.form-9,
    &.form-10 {
      > div > div {
        display: flex;
        flex-direction: column;
        width: 80%;
        max-width: 600px;
      }
    }
  }
  footer {
    scroll-snap-align: center;
    min-height: unset;
    padding: var(--ci-space);
    display: flex;
    width: 100%;
    align-items: center;
    gap: var(--ci-space);
    flex-direction: column;
    justify-content: flex-start;
    img {
      height: calc(var(--ci-space) * 2);
      flex-grow: 1;
      object-fit: contain;
    }
  }
}

@media only screen and (min-width: 800px) {
  .scroll {
    section {
      &.jobs > div > div {
        grid-template-columns: 1fr 1fr;
      }
    }
    footer {
      flex-direction: row;
    }
  }
}

@view-transition {
  navigation: auto;
}

@keyframes out {
  0% {
    opacity: 1;
    z-index: 1;
    filter: blur(0px);
  }

  100% {
    opacity: 0;
    z-index: 1;
    filter: blur(2px);
  }
}

@keyframes in {
  0% {
    opacity: 0;
    z-index: 2;
    filter: blur(2px);
  }

  50%,
  100% {
    opacity: 1;
    z-index: 2;
    filter: blur(0px);
  }
}

::view-transition-old(root) {
  animation: out 1.5s;
  animation-timing-function: cubic-bezier(0.89, 0.01, 0.23, 1.04);
}

::view-transition-new(root) {
  animation: in 1.5s;
  animation-timing-function: cubic-bezier(0.89, 0.01, 0.23, 1.04);
}

@supports (-webkit-touch-callout: none) {
  input[type="date" i] {
    padding: 10px 0;
    max-width: 598px;
    width:calc(100% - 2px);
  }
}
