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

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

  * {
    margin: 0;
    padding: 0;
  }

  ul,
  ol {
    list-style: none;
  }

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

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

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

  input,
  textarea {
    font: inherit;
  }

  :where(button, a, input, [tabindex]):focus-visible {
    outline: 2px solid hsl(331 100% 59%);
    outline-offset: 3px;
    border-radius: 4px;
  }
}

@layer tokens {
  @font-face {
    font-family: 'Space Grotesk';
    src: url('../fonts/space-grotesk-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
  }

  @font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: optional;
  }

  :root {
    --ink: hsl(240 13% 11%);
    --ink-soft: hsl(240 8% 34%);
    --ink-faint: hsl(240 7% 52%);
    --paper: hsl(240 22% 99%);
    --paper-2: hsl(240 16% 96%);
    --paper-3: hsl(240 15% 93%);
    --line: hsl(240 12% 87%);
    --pink: hsl(331 100% 59%);
    --coral: hsl(6 100% 68%);
    --peach: hsl(20 100% 77%);
    --accent-soft: hsl(331 100% 88%);
    --flame: linear-gradient(115deg, hsl(331 100% 59%), hsl(6 100% 68%) 52%, hsl(20 100% 77%));
    --flame-soft: linear-gradient(115deg, hsl(331 100% 59% / 0.14), hsl(20 100% 77% / 0.12));
    --shadow-s: 0 1px 2px hsl(240 20% 20% / 0.06), 0 4px 14px hsl(240 20% 20% / 0.06);
    --shadow-m: 0 8px 30px hsl(331 40% 30% / 0.12);
    --ff-display: 'Space Grotesk', system-ui, sans-serif;
    --ff-body: 'Inter', system-ui, -apple-system, sans-serif;
    --radius: 0.875rem;
    --radius-s: 0.5rem;
    --shell: 75rem;
    --step-2: clamp(2.4rem, 1.6rem + 3.6vw, 4rem);
    --step-1: clamp(1.9rem, 1.4rem + 2.2vw, 2.9rem);
    --step-0: clamp(1.45rem, 1.2rem + 1.1vw, 1.9rem);
    --gutter: clamp(1.25rem, 0.8rem + 2vw, 2.5rem);
  }
}

@layer base {
  html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
  }

  body {
    color: var(--ink);
    font-family: var(--ff-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    background: var(--paper);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }

  h1,
  h2,
  h3 {
    font-family: var(--ff-display);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
  }

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

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

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

  p {
    max-width: 66ch;
  }

  strong {
    font-weight: 400;
    color: var(--ink);
    background: var(--flame-soft);
    padding: 0.05em 0.28em;
    border-radius: 4px;
  }

  @media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
      animation-duration: 0.001ms !important;
      transition-duration: 0.001ms !important;
    }
  }
}

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

  .band {
    padding-block: clamp(3.5rem, 2rem + 6vw, 6.5rem);
  }

  .band-tight {
    padding-block: clamp(2.5rem, 1.6rem + 3vw, 4rem);
  }

  .stack > * + * {
    margin-top: 1.5rem;
  }
}

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

  .eyebrow {
    display: inline-block;
    margin-bottom: 0.75rem;
    font-family: var(--ff-body);
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--pink);
  }

  .lede {
    max-width: 60ch;
    font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
    color: var(--ink-soft);
  }

  .flame-text {
    background: var(--flame);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .js [data-reveal='in'] {
    opacity: 1;
    transform: none;
  }

  @media (prefers-reduced-motion: reduce) {
    .js [data-reveal] {
      opacity: 1;
      transform: none;
    }
  }
}
