/*
 * Marketing site base: reset, element defaults, keyframes and the responsive mk-* helpers.
 * Everything here sits in one cascade layer, so the page / partial stylesheets (unlayered) always win
 * regardless of specificity — the same precedence the old inline styles had. `!important` rules in a
 * layer still win, which the responsive helpers below rely on.
 */

@layer base {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  body {
    margin: 0;
    background: var(--color-surface);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
  }

  a {
    color: var(--color-primary-hover);
    text-underline-offset: 3px;
  }

  a:hover {
    color: var(--color-primary-dark);
  }

  :focus {
    outline: none;
  }

  :focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
  }

  ::selection {
    background: var(--color-selected);
  }

  input,
  button,
  select {
    font: inherit;
  }

  /* Navigation the design draws as <button>s is rendered as real links (crawlable, open-in-new-tab); keep the button look. */
  a[data-btn] {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
  }

  a[data-btn]:hover {
    color: inherit;
  }

  [hidden] {
    display: none !important;
  }
}

@keyframes lrPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@keyframes lrSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes lrPop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Width-dependent values that the prototype computed in JS */
@layer base {
  .mk-nav {
    order: 0;
    width: auto;
    margin-right: auto;
  }

  .mk-prod-menu {
    right: auto;
    width: 360px;
  }

  .mk-chip {
    display: none !important;
  }

  .mk-terms {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .mk-terms-nav {
    position: sticky;
  }

  @media (min-width: 1100px) {
    .mk-chip {
      display: flex !important;
    }
  }

  @media (max-width: 959px) {
    .mk-terms {
      grid-template-columns: minmax(0, 1fr);
    }

    .mk-terms-nav {
      position: static;
    }
  }

  @media (max-width: 639px) {
    .mk-nav {
      order: 3;
      width: 100%;
      margin-right: 0;
    }

    .mk-prod-menu {
      left: 12px !important;
      right: 12px;
      width: auto;
    }
  }
}
