@font-face {
    font-family: "Fredoka";
    src: url("./fonts/Fredoka-VariableFont_wdth,wght.ttf") format("truetype")
}

*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    font-family: "Fredoka", sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
    --background: oklch(0.477 0.204 264.471) ;
    --primaire: oklch(0.985 0 89.876)
}

body {
    margin: 0;
}

.container {
    max-width: 80rem;
    margin-inline: auto;
    padding-inline: 1rem;
}

header {
    background-color: var(--background);
    color: var(--primaire);
}

nav 
    ul {
        display: flex;
        flex-wrap: wrap;
        list-style-type: none;
        margin: 0;
        padding: 0;
    }
    a {
    padding-block: 1rem;
    padding-inline: 2rem;
    text-decoration: none;
    display: inline-block;
    color: inherit;
    }

.row {
  display: flex;
  gap: 2rem;

  > * {
    border: 1px dashed oklch(62.812% 0.25748 29.198);
    padding: 1rem;
  }

  *:first-child {
    flex: 2; 
  }

  *:nth-child(2) {
    flex: 1; 
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

main {
  nav {
    --text: oklch(0.99 0.003 325);
    --bg: oklch(0.45 0.32 40);

    a {
      color: var(--text);
      background-color: var(--bg);
      transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;

      &:hover,
      &:focus-visible {
        color: var(--bg);
        background-color: white;
      }
    }

    li:first-child {
      margin-inline-end: auto;
    }

    li:first-child a {
      font-weight: bold;
    }
  }
}


.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-block: 2rem;
  padding: 0;
  list-style: none;
}

.cards li {
  flex: 1 1 calc(25% - 2rem);
  display: flex;
  flex-direction: column;
  border: 1px solid oklch(70% 0.2 30);
  background-color: white;
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
}

.cards img {
  width: 100%;
  height: 10rem;
  display: 15rem;
}

.cards .content {
  padding: 1rem;
}

.cards h3 {
  margin: 0.5rem 0;
  font-size: 1.2rem;
}

.cards p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

.cards a {
  color: oklch(0.45 0.32 40);
  text-decoration: underline;
  font-size: 0.9rem;
}

.cards .overlay-link {
  position: absolute;
  inset: 0;
  text-indent: -9999px;
}

.cards li {
  border-radius: 0.5rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cards li:hover {
  transform: translateY(-5px); 
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  transform: scale(1.05) translateY(-5px);
}


