﻿
.fluid-grid {
  --fluid-grid-min: 35ch;
  --grid-gap: 2vmax;
}

@layer base-styles {
  @import url("https://fonts.googleapis.com/css2?family=Lato:wght@300&family=Work+Sans:wght@500&display=swap");
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  body {
    margin: 0;
    padding: 5vw;
    display: flex;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    min-height: 100vh;
    font-family: "Lato", sans-serif;
    font-weight: 300;
    font-size: 1.2rem;
    line-height: 1.6;
    background-image: radial-gradient(
      farthest-corner circle at 100% 0%,
      #00009e 0%,
      #27006b 100%
    );
    @supports (color: color-mix(in oklab, red, tan)) {
      background-image: radial-gradient(
        farthest-corner circle at 100% 0% in oklab,
        oklch(22% 0.4 222) 0%,
        oklch(0% 0.5 313) 100%
      );
    }
  }
  img {
    max-width: 100%;
    border: none;
  }
  h2 {
    font-family: "Work Sans", sans-serif;
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.2;
    margin-block: 0 1.4rem;
  }
}
@layer cards {
  article {
    padding: 1.2rem;
    border-radius: 0.5rem;

    background-image: linear-gradient(to top right, #ed00ff 0%, #6000ff 100%);
    border-color: red;
    @supports (color: color-mix(in oklab, red, tan)) {
      background-image: linear-gradient(
        to top right in oklab,
        oklch(73% 0.5 302) 0%,
        oklch(57% 0.39 276) 100%
      );
    }
    border: 0.3rem solid #6000ff;
    box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px,
      rgba(0, 0, 0, 0.23) 0px 6px 6px;
    & img {
      aspect-ratio: 16 / 9;
      object-fit: cover;
      margin-block: 0 1rem;
      border-radius: 0.5rem;
    }
    & p {
      margin-block: 0;
    }
  }

  @container (min-width: 700px) {
    article {
      display: grid;
      grid-template-columns: 1fr 2fr;
      grid-row: auto / span 3;
      gap: 20px;
      & h2 {
        grid-column: 1 / 3;
        margin-block: 0;
      }
      & img {
        grid-row: auto / span 2;
      }
    }
  }
}
