@media (width < 768px) {
  @layer reset, framework, desktop, mobile, theme;
}

@media (width >= 768px) {
  @layer reset, framework, mobile, desktop, theme;
}

:root {
  --text-primary: #25273c;
  --text-secondary: #8f9196;

  --bg-primary: #fdfcf7;
  --bg-yellow: #f9f6e6;
  --bg-tag-yellow: #f1eaca;
  --bg-card-purple: #f1f1f7;
  --bg-tag-purple: #d2d2f6;

  --outline-default: #ececec;

  --tint-primary: #6061f6;
  --tint-primary-dark: #3a3a64;
  --tint-additional: #5a5bed;
  --inter: 'Inter', sans-serif;
  --jakarta: 'Plus Jakarta Sans', sans-serif;
}

@layer reset {
  html,
  body,
  p {
    margin: 0;
    padding: 0;
  }

  body {
    min-height: 100dvh;
    font-family: var(--inter);
  }

  * {
    box-sizing: border-box;
    position: relative;
  }

  h1,
  h2,
  h3,
  h4 {
    font-family: var(--jakarta);
    font-weight: 700;
    text-wrap: balance;
    letter-spacing: -1px;
  }

  p {
    text-wrap: pretty;
  }

  strong {
    font-weight: 700;
  }

  /* Following are outdated rules */

  a {
    color: rgb(0, 100, 200);
    text-decoration: none;
  }

  a:hover {
    text-decoration: underline;
  }

  a:visited {
    color: rgb(0, 80, 160);
  }

  label {
    display: block;
  }

  input,
  button,
  select,
  textarea {
    font-family: inherit;
    font-size: inherit;
    /*-webkit-padding: 0.4em 0;*/
    /*padding: 0.4em;*/
    /*margin: 0 0 0.5em 0;*/
    box-sizing: border-box;
    /*border: 1px solid #ccc;*/
    /*border-radius: 2px;*/
  }

  input:disabled {
    color: #ccc;
  }

  p {
    margin: 0;
    padding: 0;
  }

  input::placeholder {
    color: #a2a2a2;
  }

  .left + .right {
    flex-grow: 1;
    height: 100vh;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #f1f1f7;
  }

  .right > .content {
    padding: 21px 100px;
  }

  @media (max-width: 1290px) {
    .right > .content {
      padding: 20px;
    }
  }

  body.overflow-hidden {
    overflow: hidden;
  }

  /*TODO: apply mixins and move out*/
  @media (max-width: 767px) {
    .sm-hidden {
      display: none !important;
    }
  }

  @media (max-width: 767px) {
    .sm-block {
      display: block !important;
    }
  }

  @media (max-width: 767px) {
    .sm-inflex {
      display: inline-flex !important;
    }
  }

  .container {
    max-width: 1336px;
    margin: 0 auto;
  }
}

@layer framework {
  .wrapper {
    padding-bottom: 24px;
  }

  h1 {
    font-size: 44px;
    margin-bottom: 64px;
  }

  h1 span {
    color: var(--tint-primary);
  }

  button {
    border: none;
    font-weight: 600;
    font-size: 15px;
    line-height: 2;
    border-radius: 8px;
    padding: 4px 16px;
    cursor: pointer;
  }

  button[disabled] {
    opacity: 0.4;
    cursor: default;
  }

  button.lg {
    font-size: 16px;
    padding: 8px 32px;
  }
}

@layer theme {
  body {
    color: var(--text-primary);
  }

  button.primary {
    color: white;
    background-color: var(--tint-primary);
  }

  button.primary:hover:not([disabled]) {
    background: #2e5a92;
    text-decoration: none;
  }

  button.dark {
    color: white;
    background-color: var(--tint-primary-dark);
  }

  button.dark:hover:not([disabled]) {
    background: #2e5a92;
    text-decoration: none;
  }

  button.primary.outlined {
    background: transparent;
    color: var(--tint-primary);
    border: 1px solid var(--tint-primary);
  }

  button.primary.outlined:hover:not([disabled]) {
    background: transparent;
    color: #2e5a92;
    border-color: #2e5a92;
  }

  .inter {
    font-family: var(--inter);
  }

  .jakarta {
    font-family: var(--jakarta);
  }
}

@media (width >= 768px) {
  @layer desktop {
    .mobile {
      display: none !important;
    }
  }
}

@media (width < 768px) {
  @layer mobile {
    .desktop {
      display: none !important;
    }

    section > h1 {
      font-size: 24px;
      margin-bottom: 36px;
      line-height: 1.4;
    }
  }
}
