@layer reset, theme, page;

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

  html,
  body {
    min-block-size: 100%;
    margin: 0;
  }
}

@layer theme {
  :root {
    color-scheme: dark;
    --color-ink: #f5f7f7;
    --color-shadow: #05080a;
    --color-glow: rgba(127, 225, 241, 0.24);
    --font-display: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --title-size: clamp(3.25rem, 10vi, 9.5rem);
    --title-tracking: -0.055em;
  }
}

@layer page {
  body {
    min-block-size: 100dvb;
    overflow: hidden;
    background: var(--color-shadow);
    color: var(--color-ink);
    font-family: var(--font-display);
  }

  .intro {
    container-type: inline-size;
    position: relative;
    display: grid;
    min-block-size: 100dvb;
    place-items: center;
    isolation: isolate;
    overflow: hidden;
  }

  .intro__art,
  .intro__veil {
    position: absolute;
    inset: 0;
  }

  .intro__art {
    z-index: -2;
    background-image: url("./assets/chain-network.webp");
    background-position: center;
    background-size: cover;
    filter: saturate(0.88) contrast(1.06);
    animation: breathe 18s ease-in-out infinite alternate;
  }

  .intro__veil {
    z-index: -1;
    background:
      radial-gradient(circle at center, rgba(5, 8, 10, 0.12) 0 12%, rgba(5, 8, 10, 0.56) 64%, rgba(5, 8, 10, 0.78) 100%),
      linear-gradient(180deg, rgba(5, 8, 10, 0.28), transparent 38%, rgba(5, 8, 10, 0.38));
  }

  .intro__title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 0.04em 0.25em;
    max-inline-size: min(92cqi, 12ch);
    margin: 0;
    padding: 0.35em;
    color: var(--color-ink);
    font-size: var(--title-size);
    font-weight: 650;
    letter-spacing: var(--title-tracking);
    line-height: 0.86;
    text-align: center;
    text-wrap: balance;
    text-shadow:
      0 2px 18px rgba(0, 0, 0, 0.95),
      0 0 64px rgba(0, 0, 0, 0.78),
      0 0 120px var(--color-glow);
  }

  .intro__year {
    font-weight: 250;
    letter-spacing: 0.015em;
  }

  @container (inline-size < 34rem) {
    .intro__art {
      background-position: 52% center;
    }

    .intro__title {
      flex-direction: column;
      align-items: center;
      gap: 0.13em;
      max-inline-size: 100cqi;
      font-size: clamp(3.3rem, 19cqi, 6.25rem);
      line-height: 0.9;
    }
  }

  @keyframes breathe {
    from {
      transform: scale(1.015);
    }

    to {
      transform: scale(1.075);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .intro__art {
      animation: none;
      transform: none;
    }
  }

  @media (prefers-contrast: more) {
    .intro__veil {
      background: rgba(5, 8, 10, 0.68);
    }
  }
}

