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

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('../fonts/ibm-plex-serif-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-weight: 600;
  font-display: optional;
  src: url('../fonts/ibm-plex-serif-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-weight: 700;
  font-display: optional;
  src: url('../fonts/ibm-plex-serif-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

:root {
  --paper-h: 260;
  --paper-s: 16%;
  --paper-l: 96%;
  --ink-h: 266;
  --ink-s: 25%;
  --ink-l: 11%;
  --wine-h: 336;
  --wine-s: 64%;
  --wine-l: 34%;
  --quartz-h: 336;
  --quartz-s: 56%;
  --quartz-l: 80%;
  --grid-h: 265;
  --grid-s: 16%;
  --grid-l: 86%;

  --paper: hsl(var(--paper-h) var(--paper-s) var(--paper-l));
  --ink: hsl(var(--ink-h) var(--ink-s) var(--ink-l));
  --wine: hsl(var(--wine-h) var(--wine-s) var(--wine-l));
  --quartz: hsl(var(--quartz-h) var(--quartz-s) var(--quartz-l));
  --grid-line: hsl(var(--grid-h) var(--grid-s) var(--grid-l));
  --grad-a: hsl(332 68% 46%);
  --grad-b: hsl(330 58% 27%);
  --gradient-wine: linear-gradient(135deg, var(--grad-a), var(--grad-b));

  --font-serif: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-max: 76rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  --radius-sm: 2px;
  --radius-md: 4px;

  --shadow-brut: 4px 4px 0 var(--ink);
  --shadow-brut-quartz: 4px 4px 0 var(--quartz);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 160ms;
  --dur-med: 320ms;

  --step--1: clamp(0.83rem, 0.8rem + 0.16vw, 0.92rem);
  --step-0: clamp(1rem, 0.95rem + 0.24vw, 1.13rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.42rem);
  --step-2: clamp(1.44rem, 1.3rem + 0.68vw, 1.8rem);
  --step-3: clamp(1.9rem, 1.6rem + 1.5vw, 2.6rem);
  --step-4: clamp(2.4rem, 1.9rem + 2.4vw, 3.6rem);
  --step-5: clamp(3rem, 2.2rem + 3.8vw, 4.8rem);
}

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

  * {
    margin: 0;
  }

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  html:focus-within {
    scroll-behavior: smooth;
  }

  body {
    min-height: 100svh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }

  img, picture, svg, video {
    display: block;
    max-width: 100%;
  }

  input, button, textarea, select {
    font: inherit;
    color: inherit;
  }

  button {
    background: none;
    border: 0;
    cursor: pointer;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  ul, ol {
    list-style: none;
    padding: 0;
  }

  table {
    border-collapse: collapse;
  }

  @media (prefers-reduced-motion: reduce) {
    html:focus-within {
      scroll-behavior: auto;
    }
    *, *::before, *::after {
      animation-duration: 0.001ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.001ms !important;
    }
  }
}

@layer base {
  body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: var(--step-0);
    font-optical-sizing: auto;
  }

  h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.01em;
  }

  h1 {
    font-size: var(--step-5);
  }

  h2 {
    font-size: var(--step-3);
  }

  h3 {
    font-size: var(--step-2);
  }

  h4 {
    font-size: var(--step-1);
  }

  p {
    max-width: 62ch;
  }

  strong {
    font-weight: 600;
  }

  ::selection {
    background: var(--quartz);
    color: var(--ink);
  }

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

  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .jump-to-main {
    position: absolute;
    z-index: 1000;
    top: -100px;
    left: 1rem;
    padding: 0.75rem 1.25rem;
    background: var(--ink);
    color: var(--paper);
    font-weight: 600;
    transition: top var(--dur-fast) var(--ease-out);
  }

  .jump-to-main:focus {
    top: 1rem;
  }
}

@layer layout {
  .container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }
}

@media (min-width: 1600px) {
  /* large desktop */
}
