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

  body {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: var(--font-sans);
    font-size: var(--size-step-0);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
  }

  h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.1;
    color: var(--color-text-main);
    letter-spacing: -0.02em;
  }

  p {
    color: var(--color-text-muted);
  }

  a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
  }

  ul, ol {
    list-style: none;
  }

  button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
  }
}

@layer components {
  .footer {
    border-top: var(--border-thin);
    background: var(--color-bg);
    padding-block: var(--space-2xl) var(--space-l);
    margin-top: var(--space-3xl);

    & .footer__grid {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: var(--space-2xl);
      padding-bottom: var(--space-xl);
      border-bottom: var(--border-thin);

      @media (max-width: 640px) {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
      }
    }

    & .footer__brand {
      display: flex;
      flex-direction: column;
      gap: var(--space-xs);

      & span {
        font-family: var(--font-mono);
        font-size: var(--size-step-1);
        letter-spacing: 0.05em;
      }

      & p {
        font-size: var(--size-step--1);
        color: var(--color-text-muted);
        max-width: 36ch;
        line-height: 1.6;
        margin: 0;
      }
    }

    & .footer__links {
      & h4 {
        font-family: var(--font-mono);
        font-size: var(--size-step--2);
        text-transform: uppercase;
        letter-spacing: 0.15em;
        color: var(--color-accent-blue);
        font-weight: 700;
        margin-bottom: var(--space-m);
      }

      & ul {
        display: flex;
        flex-direction: column;
        gap: var(--space-s);
        margin: 0;
        padding: 0;
      }

      & a {
        font-size: var(--size-step--1);
        color: var(--color-text-muted);
        text-decoration: none;
        transition: color var(--transition-fast);

        &:hover {
          color: var(--color-text-main);
        }
      }
    }

    & .footer__bottom {
      padding-top: var(--space-l);

      & p {
        font-family: var(--font-mono);
        font-size: var(--size-step--2);
        color: var(--color-text-muted);
        margin: 0;
      }
    }
  }
}

@layer utilities {
  .l-container {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: var(--space-m);
  }

  .l-stack > * + * {
    margin-top: var(--stack-space, 1em);
  }

  .text-gradient {
    background: linear-gradient(to bottom right, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .hide-mobile {
    @media (max-width: 768px) {
      display: none !important;
    }
  }
}
