@layer reset, tokens, base, layout, components;

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

  body,
  h1,
  h2,
  p {
    margin: 0;
  }

  button {
    font: inherit;
    color: inherit;
    cursor: pointer;
  }
}

@layer tokens {
  :root {
    color-scheme: dark;

    --color-text: #f2f4f6;
    --color-muted: #9ba3ad;
    --color-accent: #2ec4c4;
    --color-panel: rgb(18 24 30 / 0.26);
    --color-card: rgb(8 10 13 / 0.36);
    --color-line: rgb(255 255 255 / 0.1);
    --color-sheen: rgb(255 255 255 / 0.08);
    --page-bg:
      radial-gradient(40% 30% at 52% 0%, #b3c0c6, transparent 70%),
      radial-gradient(28% 40% at 88% 32%, #4f6d7d, transparent 70%),
      radial-gradient(34% 46% at 14% 52%, #2a4555, transparent 70%),
      radial-gradient(26% 28% at 62% 88%, #66777f, transparent 70%),
      radial-gradient(20% 24% at 36% 24%, #3f5866, transparent 70%),
      linear-gradient(#3b4a55, #121a20);

    --space-2xs: 0.25rem;
    --space-xs: 0.5rem;
    --space-s: 0.75rem;
    --space-m: 1rem;
    --space-l: 1.5rem;
    --space-xl: 1.75rem;
    --space-2xl: 2rem;

    --text-s: 0.85rem;
    --text-m: 0.95rem;
    --text-l: 1.35rem;
    --text-xl: 1.5rem;

    --radius-s: 12px;
    --radius-m: 18px;
    --radius-l: 28px;
    --radius-full: 999px;

    --measure: 68ch;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --duration-m: 0.5s;
  }
}

@layer base {
  body {
    min-block-size: 100dvh;
    font: var(--text-m) / 1.45 "Inter", system-ui, sans-serif;
    color: var(--color-text);
    background: var(--page-bg);
    background-attachment: fixed;
  }

  a {
    color: var(--color-accent);
  }

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

  :is(h1, h2) {
    text-wrap: balance;
  }

  p {
    text-wrap: pretty;
  }

  body > header {
    display: grid;
    gap: var(--space-s);
    max-inline-size: var(--measure);
    margin-inline: auto;
    padding: var(--space-2xl) var(--space-m) var(--space-l);

    & h1 {
      font-size: var(--text-xl);
      font-weight: 600;
    }

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