@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300..700;1,300..700&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap");

@layer root, base, layout, components, utilities;

@layer root {
  /* Design tokens */

  :root {
    --black: #080809;
    --white: #fff;
    --primary: #2fc4ee;
    --secondary: #fff1f1;
    --dark-gray: #1f1f1f;
    --gray: #a3a3b3;
    --light-gray: #f2f3f2;
    --font-display: "Cormorant Garamond", serif;
    --font-body: "DM Sans", sans-serif;
    --border-radius-1: 1rem;
    --border-radius-2: 1.5rem;
    --border-radius-3: 2rem;
    --border-radius-4: 2.5rem;
    --text-sm: 0.875rem;
    --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --text-2xl: clamp(3rem, 2.25rem + 4vw, 4.5625rem);
    --light-gray: #f2f2f2;
    --dark: #0a0a0a;
    --menu-background: var(--dark);
    --menu-text: var(--white);
    --menu-dropdown-background: var(--dark);
    --menu-dropdown-text: var(--white);
    --menu-select-border-top: var(--dark);
    --menu-logo-filter: none;
    --more-like-this-heading: var(--white);
    --description-color: var(--white);
    --title-section-heading: var(--white);
    --footer-logo-filter: none;
    --footer-text: var(--light-gray);
    --body-font-size: 16px;
    --body-color: var(--white);
    --body-background: var(--dark);
    --subheading-font: var(--font-display);
    --contact-input-color: var(--gray);
    --contact-textarea-font-size: 1.3rem;
    --popup-form-background: var(--dark-gray);
  }
}

@layer layout {
  .page-content {
    margin-top: 85px;
  }

  .grid-col-3 {
    width: calc((100% - (2 * 30px)) / 3);

    @media (min-width: 480px) and (max-width: 991px) {
      width: calc((100% - 30px) / 2);
    }

    @media (max-width: 479px) {
      width: 100%;
    }
  }
}

@layer components {
  /* Buttons */

  .btn {
    font-weight: 600;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--border-radius-4);
    border: 1px solid var(--primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.15rem 2.35rem;
    font-size: var(--text-base);
    transition: all 0.2s ease-out;
    width: fit-content;
    text-transform: none;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    margin: 0;

    &:hover {
      transform: scale(1.1);
    }

    &.large {
      margin: 0;
      background: var(--white);
      border: 2px solid var(--primary);
      font-size: 1.5rem;
      color: var(--primary);
      padding: 1.25rem 3rem;
      border-radius: var(--border-radius-1);
    }

    &.btn-login {
      cursor: pointer;
      background: 0 0;
      border-radius: 100%;
      min-width: 40px;
      height: 40px;
      box-sizing: border-box;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 2px solid var(--white);
      padding: 0;

      img {
        max-width: 15px;
      }
    }

    &.outline {
      background: 0 0;
      border: 2px solid var(--primary);
      color: var(--primary);
    }

    &.loginBtn {
      cursor: pointer;
      background: var(--primary);
      padding: 12px;
      border-radius: 8px;
      width: 100%;
      max-width: none;
      margin: 15px auto;
      box-shadow: none;
    }
  }

  .hero-subpage {
    padding-block: 60px 0;

    .wrapper .text-container p {
      color: var(--white);
    }
  }

  .app-list .app-list-item a {
    border-bottom-color: var(--dark-gray);

    img {
      box-shadow: 0 5px 0 var(--dark-gray);
    }
  }

  .card {
    background: var(--black);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem 1rem;
    border-radius: var(--border-radius-2);
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow: hidden;

    &.large {
      border-radius: 30px;
      box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
      padding: 60px;
      gap: 50px;
    }
  }

  .card-image {
    border: none;
    padding: 0;
    border-radius: var(--border-radius-2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    img {
      border-radius: var(--border-radius-2);
      object-fit: cover;
      width: 100%;
      height: 100%;
      max-height: 300px;
    }
    .card-image-body {
      padding: 1.5rem 1rem;
      display: flex;
      flex-direction: column;
      gap: 15px;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 4;
      -webkit-box-orient: vertical;
      .card-header {
        display: flex;
        flex-direction: column;
        gap: 15px;
        .card-icon {
          width: 60px;
          height: 60px;
          display: flex;
          align-items: center;
          justify-content: center;
          background: var(--secondary);
          border-radius: var(--border-radius-2);
        }

        .card-title {
          font-size: 24px;
        }
      }

      .card-content {
        font-size: 0.9rem;
        color: var(--gray);
      }

      .card-footer {
        display: flex;
        align-items: center;
      }

      .card-description {
        font-size: 0.9rem;
        color: var(--gray);
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;

        h3 {
          margin-block: 0.5rem;
        }
      }
    }
  }

  .btn-img {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: block;
    flex: 1 1 240px;
    min-width: min(220px, 100%);
    max-width: 240px;
    box-sizing: border-box;
    text-decoration: none;
    border-radius: 0;
    overflow: hidden;
    transition: 0.2s ease-in-out;
    color: var(--white);
    font-family: var(--font-display);
    text-align: left;

    .btn-img__media {
      aspect-ratio: 1.075 / 1;
      background: var(--light-gray);
      border-radius: 1.25rem;
      overflow: hidden;
      position: relative;
    }

    img {
      display: block;
      height: 100%;
      object-fit: cover;
      transition: transform 0.2s ease-in-out;
      width: 100%;
    }

    .btn-img__play {
      align-items: center;
      background: var(--white);
      border-radius: 50%;
      display: flex;
      height: 3.5rem;
      justify-content: center;
      left: 50%;
      position: absolute;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 3.5rem;

      &::after {
        border-bottom: 0.45rem solid transparent;
        border-left: 0.7rem solid var(--black);
        border-top: 0.45rem solid transparent;
        content: "";
        margin-left: 0.2rem;
      }
    }

    .btn-img__title {
      font-size: var(--text-base);
      line-height: 1.35;
      margin-top: 1rem;
      text-align: center;
    }

    &:hover,
    &:focus-visible {
      img {
        transform: scale(1.04);
      }
    }

    &:focus-visible {
      outline: 0.2rem solid var(--primary);
      outline-offset: 0.3rem;
    }

    @media screen and (max-width: 767px) {
      flex-basis: 100%;
    }
  }

  .eyebrow {
    color: var(--eyebrow-color, var(--gray));
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
  }

  .media-item {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;

    img {
      flex: 0 0 90px;
      width: 90px;
      height: 90px;
      object-fit: cover;
      border-radius: 10px;
    }

    > div {
      display: flex;
      flex-direction: column;
      gap: 12px;
      min-width: 0;
    }

    h3 {
      font-size: 1.5rem;
      font-weight: 500;
    }

    &:hover,
    &:focus-visible {
      color: inherit;

      .eyebrow {
        text-decoration: underline;
      }
    }
  }

  /* Category explorer — light band with round category thumbnails */

  .category-explorer {
    --eyebrow-color: currentColor;
    background: var(--white);
    color: var(--black);
    padding-block: 100px;

    h2 {
      font-size: var(--text-2xl);
      line-height: 1;
    }

    .category-list {
      display: grid;
      gap: 3rem;
      grid-template-columns: repeat(auto-fit, minmax(8.75rem, 1fr));
      padding: 2px;
    }

    .category-item {
      text-align: center;

      &:hover,
      &:focus-visible {
        color: inherit;

        .category-thumb {
          transform: scale(1.05);
        }
      }
    }

    .category-thumb {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 8.75rem;
      height: 8.75rem;
      padding: 0.375rem;
      border: 1.5px solid currentColor;
      border-radius: 50%;
      overflow: hidden;
      transition: transform 180ms ease;

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
      }
    }
  }

  /* Page hero */

  .page_hero {
    position: relative;
    padding-block-start: 6rem;
    padding-block-end: 6rem;

    @media (max-width: 1199px) {
      padding-block: 4rem;
    }

    &.login-page {
      width: 100%;
      margin: 30px auto 0;
      border-radius: var(--border-radius-3);
      padding: 30px 50px;
      position: relative;
      z-index: 1;

      @media (max-width: 767px) {
        padding: 15px;
        padding-bottom: 30px;
      }
    }

    .hero-bck {
      position: relative;
      width: 100%;
      max-width: 480px;
      flex: 1;
      z-index: 3;
      height: auto;

      @media (max-width: 991px) {
        width: 100%;
        margin: 0 auto;
      }

      .text-box {
        position: absolute;
        bottom: 0;
        left: 0;
        background: var(--secondary);
        z-index: 9;
        padding: 10px;
        border-radius: var(--border-radius-1);
        width: 100%;
        max-width: 280px;

        &:hover {
          background: var(--primary);
          color: var(--white);
        }

        h3 {
          font-size: 18px;
          margin-bottom: 5px;
        }

        p {
          font-size: 12px;
          margin: 0;
        }
      }

      img {
        --x: -50%;
        --y: -50%;
        position: absolute;
        top: 50%;
        left: 50%;
        z-index: 3;
        max-width: 100%;
        transform: translate(var(--x), var(--y)) rotate(0deg);

        @media (max-width: 991px) {
          position: relative;
          top: 0;
          left: 50%;
          --x: -50%;
          --y: 0%;
          max-width: 400px;
          margin: 0 auto;
        }

        @media (max-width: 480px) {
          max-width: 240px;
        }
      }
    }

    .hero-content {
      flex: 1;
      text-align: left;
      position: relative;
      z-index: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 30px;

      @media (min-width: 768px) and (max-width: 1199px) {
        align-items: center;
        text-align: center;
        min-height: auto;
      }

      @media (max-width: 767px) {
        align-items: center;
        text-align: center;
        min-height: auto;
      }

      h1 {
        font-size: 5em;

        @media (max-width: 1199px) {
          font-size: 4em;
        }

        @media (max-width: 767px) {
          font-size: 3em;
        }
      }

      p {
        font-size: 1.758em;
        margin: 0;
        max-width: 700px;
      }

      .btn {
        margin: 0;
        font-size: 1.5rem;
        text-transform: uppercase;
        background: var(--primary);
        color: var(--white);
        padding: 1.25rem 3rem;
        border-radius: var(--border-radius-4) !important;
      }
    }
  }
}

@layer utilities {
  /* Utilities */

  .mobile-column {
    @media (max-width: 991px) {
      flex-direction: column;
    }
  }

  /* Grid & Spacing Utilities */

  .mt-5 {
    margin-top: 5rem;
  }

  /* Text & Color Utilities */

  .text-primary {
    color: var(--primary);
  }

  .text-accent {
    color: var(--primary);
  }
}
