:root {
  --background: #010722;
  --blue: rgb(108, 201, 255);
  --purple: rgb(155, 28, 180);
  --color: #fff;
}

html[data-theme="light"] {
  --background: #f5f5f5;
  --color: #000;

  header {
    background: rgba(214, 214, 214, 0.4);
    * {
      color: #000;
    }
  }

  .neon-btn {
    color: var(--color-style);
  }

  .news .description,
  .comment p {
    color: #7c7c7c !important;
  }

  footer {
    color: #919191 !important;

    input {
      background: #ccc !important;
    }

    li:first-child {
      color: #000 !important;
    }
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  outline: 0;
}

html {
  container-type: scroll-state;
  container-name: back-to-top;
}

@container back-to-top scroll-state(scrollable: top) {
  .back-to-top {
    opacity: 1 !important;
  }
}

@font-face {
  font-family: "Roboto";
  src: url("assets/fonts/Roboto-VariableFont.ttf");
}

body {
  position: relative;
  display: block;
  max-inline-size: 1280px;
  min-block-size: 100dvh;
  margin-inline: auto;
  background: var(--background);
  font-family: "Roboto";
  font-size: 14px;
  color: var(--color);
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol,
li {
  list-style: none;
}

img,
video {
  object-fit: cover;
  max-width: 100%;
}

header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  color: #e7e7e7;
  background: rgb(1 7 34 / 0.4);
  backdrop-filter: blur(10px);
  z-index: 1;
  container-name: header-scroll-state;
  container-type: scroll-state;

  > .wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px;
    transition: padding 0.3s;

    ul {
      display: flex;
      align-items: center;
      gap: 45px;
    }
  }

  a:hover {
    color: #fff;
  }
}

@container header-scroll-state scroll-state(stuck: top) {
  .wrapper {
    padding: 10px 20px !important;
    border-bottom: 1px solid #000;
  }
}

.neon-btn {
  --color-style: var(--blue);
  padding: 5px 14px;
  display: inline-block;
  border: 3px solid var(--color-style);
  box-shadow: 0 0 10px 1px color-mix(in srgb, var(--color-style) 70%, transparent),
    inset 0 0 15px 1px color-mix(in srgb, var(--color-style) 60%, transparent);
  border-radius: calc(infinity * 1px);
  color: var(--color-style);

  &.purple {
    --color-style: var(--purple);
  }
}

.logo {
  align-items: center;
  display: flex;
  gap: 5px;

  .rings {
    position: relative;
    width: 40px;
    height: 40px;

    .ring {
      width: calc(100% - sibling-index() * 20%);
      aspect-ratio: 1;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%) rotate(calc(sibling-index() * -40deg));
      border-radius: 50%;
      background: conic-gradient(rgb(45, 134, 252), rgb(215, 94, 231), transparent);

      &::before {
        content: "";
        position: absolute;
        inset: 3px;
        background: var(--background);
        border-radius: inherit;
      }
    }
  }

  .text {
    display: flex;
    align-items: center;
    gap: 5px;
    span {
      font-size: 1.25em;
      &:last-child {
        color: #cecece;
      }
    }
  }
}

.site-theme {
  display: flex;
  align-items: center;
  gap: 8px;
  input {
    position: relative;
    appearance: none;
    min-width: 40px;
    &::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 40px;
      height: 20px;
      background: #4f4168;
      transform: translateY(-50%);
      border-radius: 1000px;
    }

    &::after {
      content: "";
      height: 16px;
      aspect-ratio: 1;
      border-radius: 50%;
      background: #000;
      position: absolute;
      transform: translateY(-50%);
      left: 2px;
      transition: left 300ms;
    }

    &:checked::after {
      left: 21px;
    }

    &:checked::before {
      background: #734fb8;
    }
  }
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  display: grid;
  place-content: center;
  background: color-mix(in srgb, var(--background) 90%, #eee);
  cursor: pointer;
  z-index: 9999;
  opacity: 0;
  transition: opacity .4s;
  svg {
    scale: 2;
  }
}

.site-intro {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));

  h1 {
    font-size: 3em;
  }

  p {
    color: #ccc;
    margin-block: 20px;
  }

  a {
    margin: 15px 8px;
  }

  .ai-design {
    display: grid;
    place-content: center;

    .around {
      width: 330px;
      aspect-ratio: 1;
      border-radius: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1px solid transparent;
      background: linear-gradient(var(--background), var(--background)) content-box,
        radial-gradient(
            circle at 40%,
            var(--background),
            color-mix(in srgb, var(--blue) 50%, transparent),
            var(--background),
            color-mix(in srgb, var(--blue) 50%, transparent),
            var(--background),
            color-mix(in srgb, var(--blue) 50%, transparent)
          )
          border-box;
    }

    .rect {
      width: 70%;
      display: flex;
      align-items: center;
      justify-content: center;
      aspect-ratio: 1;
      border-radius: inherit;
      box-shadow: 0 5px 8px 2px rgb(0 0 0 / 0.2);
      border: 4px solid rgb(0, 185, 241);
      position: relative;

      span {
        color: rgb(0, 185, 241);
        font-size: 5rem;
        font-weight: bold;
        filter: drop-shadow(0 0 10px color-mix(in srgb, rgb(0, 185, 241) 70%, transparent));
      }

      .inner {
        display: flex;
        align-items: center;
        justify-content: center;
        aspect-ratio: 1;
        width: 60%;
        border: 2px solid rgb(0, 185, 241);
        border-radius: inherit;
      }

      .multi-line-group {
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 20px;
        position: absolute;

        &.top {
          top: 0;
          transform: translateY(-100%);
        }

        &.bottom {
          bottom: 0;
          transform: translateY(100%);
        }

        &.left {
          height: 100%;
          width: 0;
          justify-content: center;
          flex-direction: column;
          align-items: end;
          right: 100%;
          .line {
            height: 3px;
            width: 30px;
          }
        }

        &.right {
          height: 100%;
          width: 0;
          justify-content: center;
          flex-direction: column;
          align-items: start;
          left: 100%;
          .line {
            height: 5px;
            width: 35px;
          }
        }

        .line {
          background: rgb(0, 185, 241);
          width: 5px;
          height: 35px;
          border-radius: 3px;
        }
      }
    }

    .rect,
    .inner,
    .line {
      --color-style: rgb(0, 185, 241);
      box-shadow: 0 0 25px 1px color-mix(in srgb, var(--color-style) 80%, transparent),
        inset 0 0 15px 1px color-mix(in srgb, var(--color-style) 80%, transparent);
    }
  }
}

@media (width < 880px) {
  .ai-design {
    display: none !important;
  }

  .site-intro {
    text-align: center;
  }

  header .wrapper {
    flex-direction: column;

    .site-theme {
      display: none;
    }

    ul {
      margin-top: 20px;

      li {
        padding-block: 10px;
      }

      li:last-child {
        display: none;
      }
    }
  }
}

section {
  margin-block: 20px;
  padding: 45px 30px;
  transition: 0.8s;

  &.fade {
    transform: translateY(80px);
    opacity: 0;
  }
}

section .heading {
  font-size: 2.5em;
}

.solutions .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  justify-content: center;
  margin-top: 25px;
  gap: 15px;

  .card {
    display: flex;
    gap: 8px;
    padding: 15px;
    hyphens: auto;
    background: transparent;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 5px 1px rgb(0 0 0 / 0.3);
    transition: 0.3s transform;

    &:hover {
      transform: scale(1.02);
    }

    &::before,
    &::after {
      content: "";
      position: absolute;
      width: 200px;
      height: 200px;
      background: radial-gradient(color-mix(in srgb, var(--blue) 50%, transparent), transparent);
      border-radius: 50%;
      filter: blur(35px);
      z-index: -1;
    }

    &::before {
      bottom: -125px;
      left: -80px;
    }

    &::after {
      top: -125px;
      right: -60px;
    }

    .title {
      font-weight: bold;
      margin-bottom: 6px;
      font-size: 1.3em;
    }

    .description {
      background: linear-gradient(to top right, #fff, var(--blue), #fff);
      background-clip: text;
      color: transparent;
    }
  }
}

.news {
  .container {
    overflow: hidden;
    position: relative;
    display: flex;
    gap: 15px;
    padding: 25px;

    &::before {
      content: "";
      position: absolute;
      height: 100%;
      right: 0;
      box-shadow: 0 0 100px 30px var(--background);
    }

    .box {
      width: 370px;
      min-width: 370px;
      border-radius: 8px;
      padding: 12px 20px;
      box-shadow: 0 0 5px 3px rgb(0 0 0 / 0.3);
      background: color-mix(in srgb, var(--background) 95%, #ccc);
      border: 1px solid transparent;

      &:hover {
        border-color: var(--purple);

        .title {
          color: var(--purple);
        }
      }

      .date {
        padding-block: 10px;
        color: #ccc;
      }

      .title {
        font-size: 1.5em;
        margin-bottom: 10px;
      }

      .description {
        font-size: 0.9em;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        text-overflow: ellipsis;
        overflow: hidden;
        text-align: justify;
        color: #eee;
      }
    }
  }

  .more-link {
    text-align: right;

    a {
      color: var(--blue);
    }
  }
}

.plans .container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 25px;
  gap: 15px;

  &:not(:has(.plan:hover)) .active,
  .plan:hover {
    transform: scale(1.03);
    border-color: var(--purple);
    box-shadow: 0 10px 25px 1px var(--purple) inset;
  }

  .plan {
    min-width: 270px;
    max-width: 33.33%;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 10px 3px rgb(0 0 0 / 0.4);
    flex: 1;
    border: 2px solid transparent;
    transition: 0.3s;
    background: color-mix(in srgb, var(--background) 95%, #ccc);

    .wrapper {
      backdrop-filter: blur(25px);
      height: 100%;
      padding: 25px;
      border-radius: inherit;
      display: flex;
      flex-direction: column;

      .name {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-size: 2em;
        margin-bottom: 15px;

        .label {
          padding: 5px;
          display: inline-block;
          background: var(--purple);
          font-size: 12px;
          border-radius: 4px;
        }
      }

      .price {
        margin-block: 10px;
        .number {
          font-size: 2.5em;
        }
      }

      ul {
        text-align: left;
        line-height: 2;

        li {
          position: relative;
          margin-left: 15px;

          &::before {
            content: "";
            position: absolute;
            width: 256px;
            height: 256px;
            background: url("assets/images/green-tick.png");
            transform-origin: top left;
            transform: scale(0.05);
            left: -20px;
            top: 6px;
          }
        }
      }

      a {
        transition: opacity 0.4s;
        flex: 1;
        display: flex;
        align-items: end;
        justify-content: center;
        margin-block: 20px;
        opacity: 0;
      }
    }

    &:hover a,
    &.active a {
      opacity: 1;
    }
  }
}

.comments {
  .container {
    overflow: hidden;
    position: relative;
    border-radius: 25px;

    &::before {
      content: "";
      position: absolute;
      inset: 0;
      box-shadow: 0 0 170px 40px var(--background) inset;
      z-index: 999;
    }

    > .wrapper {
      display: flex;
      gap: 14px;
      padding: 15px;

      &:first-of-type {
        transform: translateX(-100px);
      }

      &:last-of-type {
        transform: translateX(-300px);
      }

      .comment {
        min-width: 300px;
        background: color-mix(in srgb, var(--background) 90%, #ccc);
        overflow: hidden;
        padding: 2px;
        border-radius: 8px;
        position: relative;

        &:nth-child(2n + 1) {
          min-width: 350px;
        }

        .blob {
          position: absolute;
          width: 250px;
          height: 250px;
          background: var(--purple);
          border-radius: 50%;
          z-index: 1;
          top: 0;
          left: 0;
          filter: blur(35px);
          transform: translate(-50%, -50%);
        }

        > .wrapper {
          padding: 25px;
          position: relative;
          z-index: 2;
          background: inherit;
          border-radius: inherit;

          .info {
            display: flex;
            margin-bottom: 10px;
            align-items: center;

            img {
              border-radius: 50%;
              width: 50px;
              height: 50px;
              border: 2px solid var(--purple);
            }

            .details {
              flex: 1;
              text-align: center;
              display: flex;
              flex-direction: column;

              .intro {
                font-size: 0.75rem;
                color: #ccc;
              }
            }
          }

          p {
            display: -webkit-box;
            -webkit-box-orient: vertical;
            line-clamp: 3;
            -webkit-line-clamp: 3;
            overflow: hidden;
            text-overflow: ellipsis;
            font-size: 0.9em;
            color: #eee;
          }
        }
      }
    }
  }
}

footer {
  border-top: 1px solid #ccc;
  color: #ccc;

  .container {
    padding: 35px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;

    .group {
      flex: 1;
      text-align: center;
      min-width: 200px;

      .socials {
        display: flex;
        gap: 25px;
        margin-block: 25px;

        .item {
          scale: 1.5;
          cursor: pointer;
          transition: color .3s;

          &:hover {
            color: var(--purple);
          }
        }
      }

      &:first-child {
        text-align: left;
      }

      .logo {
        margin-block: 15px;
      }

      li {
        margin-block: 5px;

        &:first-child {
          margin-bottom: 8px;
          font-size: 1.1em;
          color: #fff;
        }
      }

      form {
        padding-block: 15px;

        > * {
          margin-bottom: 15px;
        }

        p {
          text-align: left;
          display: block;
        }

        input {
          width: 100%;
          padding: 10px 25px;
          border-radius: 1000px;
          border: none;
          background: #171f41;
          color: #fff;
          accent-color: #fff;

          &:focus {
            border: 1px solid var(--blue);
          }
        }

        button {
          background: var(--blue);
          color: #fff;
        }
      }
    }
  }

  .copyright {
    text-align: center;
    padding: 25px;
    border-top: 1px solid #242424;
  }
}
