@font-face {
    font-family: "Barlow Semi Condensed";
    font-weight: 500;
    src: url("./font/BarlowSemiCondensed-Medium.ttf");
}
@font-face {
    font-family: "Barlow Semi Condensed";
    font-weight: 600;
    src: url("./font/BarlowSemiCondensed-SemiBold.ttf");
}

:root {
    /* Purple Shades */
    --color-purple-50: hsl(260, 100%, 95%);
    --color-purple-300: hsl(264, 82%, 80%);
    --color-purple-500: hsl(263, 55%, 52%);
  
    /* Neutral Shades */
    --color-neutral-white: hsl(0, 0%, 100%);
    --color-neutral-grey-100: hsl(214, 17%, 92%);
    --color-neutral-grey-200: hsl(0, 0%, 81%);
    --color-neutral-grey-400: hsl(224, 10%, 45%);
    --color-neutral-grey-500: hsl(217, 19%, 35%);
    --color-neutral-dark-blue: hsl(219, 29%, 14%);
    --color-neutral-black: hsl(0, 0%, 7%);

    /* Font */
    --font-family-base: "Barlow Semi Condensed", sans-serif;
    --fw1: 500;
    --fw2: 600;
  }
  

@layer reset {
    *, *::before, *::after {
        box-sizing: border-box;
      }
      
      * {
        margin: 0;
        padding: 0;
        font: inherit;
      }
      
      html {
        color-scheme: dark light; 
        hanging-punctuation: first last;
      }
      
      body {
        min-height: 100vh;
      }
      
      /* Media responsive */
      img, picture, svg, video {
        display: block;
        max-width: 100%;
      }
      
      h1, h2, h3, h4, h5, h6 {
        text-wrap: balance;
      }
      
      ol,
      ul {
       list-style: none;
      }
      
      input, button, textarea, select {
        font: inherit;
      }
      
      p {
        max-width: 75ch;
        text-wrap: pretty; /* Improve line wrapping */
      }
      
      @media (prefers-reduced-motion: no-preference) {
        :has(:target) {
          scroll-behavior: smooth;
          scroll-padding-top: 3rem;
        }
      }
}

@layer base {

    main {
        font-family: var(--font-family-base);
        font-weight: var(--fw1);
     }

    
    h1.sr-only {
        border: 0 !important;
        clip: rect(1px, 1px, 1px, 1px) !important;
        -webkit-clip-path: inset(50%) !important;
        clip-path: inset(50%) !important;
        height: 1px !important;
        margin: -1px !important;
        overflow: hidden !important;
        padding: 0 !important;
        position: absolute !important;
        width: 1px !important;
        white-space: nowrap !important;
    }

    h2 {
        font-size: 1rem;
        font-weight: var(--fw1);
    }
    p {
        font-size: 0.8125rem;
    }

    .testimonial-content p:first-child {
        font-size: 1.15rem;
        font-weight: var(--fw2);
        line-height: 1.3;
        margin-block-end: 1em;
    }
}

@layer container {
    main {
        display: grid;
        place-items: center;
        
    }

    section {
        display: grid;
        place-items: center;
        margin-block: 4em;
        margin-inline: 3em;
      
    }
}

@layer cards {
  
    .testimonial-grid {
        display: grid;
        max-inline-size: 70rem;
        gap: 1em;
       @media (min-width: 64rem)     {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        grid-template-rows: auto auto;   
        grid-template-areas: "t1 t1 t2 t3" "t4 t5 t5 t3";

       }
        
    }

    .testimonial-grid blockquote {

        background-color: var(--color-neutral-grey-500);
        padding: 1.875em ;
        border-radius: 0.5625rem;
        -webkit-border-radius: 0.5625rem;
        -moz-border-radius: 0.5625rem;
        -ms-border-radius: 0.5625rem;
        -o-border-radius: 0.5625rem;
        box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
    
    header {
        display: flex;
        align-items: center;
        gap: 1em;
        margin-block-end: 1.375em;
    }

    img {
            border-radius: 100%;
            -webkit-border-radius: 100%;
            -moz-border-radius: 100%;
            -ms-border-radius: 100%;
            -o-border-radius: 100%;
        }

    }

    .testimonial-grid blockquote:nth-of-type(1) {
        background-color: var(--color-purple-500);
        position: relative;
        
        @media (min-width: 64rem) {
            background-image: url("./images/bg-pattern-quotation.svg") ;
            background-repeat: no-repeat;
            background-position: top right 5em;
            background-size: 8em;
        }

        h2 {
            color: var(--color-purple-50);
        }

        header p {
            color: var(--color-neutral-grey-100);
         
            
        }

        img {
            border: 2px solid var(--color-purple-300);
        }

        .testimonial-content p:first-child {
            color: var(--color-neutral-white);
        }
        .testimonial-content p:last-child {
            color: var(--color-neutral-grey-200);
            line-height: 1.3;
        }

        @media (min-width: 64rem) {
            grid-area: t1;
        

        }
    }

    .testimonial-grid blockquote:nth-of-type(2) {
        background-color: var(--color-neutral-grey-500);
        
        h2 {
            color: var(--color-neutral-white);
        }

        header p {
            color: var(--color-neutral-grey-200);
         
        }

        img {
            border: 2px solid var(--color-neutral-grey-100);
        }

        .testimonial-content p:first-child {
            color: var(--color-neutral-white);
        }
        .testimonial-content p:last-child {
            color: var(--color-neutral-grey-200);
            line-height: 1.3;
        }
        @media (min-width: 64rem) {
            grid-area: t2;
        }
    }

    .testimonial-grid blockquote:nth-of-type(3) {
        background-color: var(--color-neutral-white);
        
        h2 {
            color: var(--color-neutral-grey-400);
        }

        header p {
            color: var(--color-neutral-grey-500);
         
        }

        img {
            border: 2px solid var(--color-neutral-grey-200);
        }

        .testimonial-content p:first-child {
            color: var(--color-neutral-grey-500);
        }
        .testimonial-content p:last-child {
            color: var(--color-neutral-grey-400);
            line-height: 1.3;
        }

        @media (min-width: 64rem) {
            grid-area: t4;
        }
    }

    .testimonial-grid blockquote:nth-of-type(4) {
        background-color: var(--color-neutral-dark-blue);
        
        h2 {
            color: var(--color-neutral-white);
        }

        header p {
            color: var(--color-neutral-grey-200);
         
        }

        img {
            border: 2px solid var(--color-purple-500);
        }

        .testimonial-content p:first-child {
            color: var(--color-neutral-grey-200);
        }
        .testimonial-content p:last-child {
            color: var(--color-neutral-grey-100);
            line-height: 1.3;
        }
        
        @media (min-width: 64rem) {
            grid-area: t5;
        }
    }

    .testimonial-grid blockquote:nth-of-type(5) {
        background-color: var(--color-neutral-white);

        h2 {
            color: var(--color-neutral-grey-500);
        }

        header p {
            color: var(--color-neutral-grey-400);
         
        }

        img {
            border: 2px solid var(--color-neutral-grey-200);
        }

        .testimonial-content p:first-child {
            color: var(--color-neutral-grey-400);
        }
        .testimonial-content p:last-child {
            color: var(--color-neutral-grey-400);
            line-height: 1.3;
        }

        @media (min-width: 64rem) {
           grid-area: t3;
        }
    }

    footer {
        font-family: var(--font-family-base);
        display: flex;
        justify-content: center;
        flex-direction: column;
        align-items: center;
        @media (min-width: 64rem) {
            flex-direction: row;
         }
        p {
            color: var(--color-neutral-grey-500);
        }
        a {
            color: var(--color-neutral-dark-blue);
            text-decoration: none;
            
        }
    }
 
}