/* * GENERAL */
*,
*::after,
*::before {
  box-sizing: border-box;
}

body {
  margin: 0;
  scroll-behavior: smooth;
  font-family: "Rubik", sans-serif;
  background-color: var(--color2);
  color: var(--color1);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex-grow: 1;
}

::selection {
  background-color: var(--color1);
  color: var(--color6);
}

.wallet.with-card:focus-within {
  outline: solid px white;
  border: solid 4px blue;
}

/** SKIPLINK **/
.visually-hidden:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* * special classes */
.with-margin {
  padding-inline: 5vw;
}

.limit-p-60 p {
  max-width: 60ch;
}

/* * COLORS */
:root {
  --color1: #000;
  --color2: #fff;
  --color3: #5545db;
  --color4: #D11FAA;
  --color5: #A6AFFF;
  --color6: #82DADB;
}

/* * HEADINGS & TEXT */
h1 {
  font-size: 4rem;
  margin-block-end: 16px;
  text-align: center;
}

/* * BUTTONS */

.button {
  margin-block-end: 32px;
  padding: 10px 16px;
  width: fit-content;
  font-weight: bold;
  border-radius: 4px;
  transition: border 0.3s ease;
}

.button:hover {
  margin-block-end: 26px;
  border-radius: 4px;
  border-style: groove;
  border-color: var(--color4);
  border-width: 0 10px 6px 0;
}

.button a {
  text-decoration: none;
  color: var(--color2);
}

.button.primary {
  background-color: var(--color3);
}

.button.secondary {
  background-color: var(--color4);
  border-color: var(--color3);
}

.button.tertiary a {
  text-decoration: none;
  color: var(--color1);
}

.button.tertiary {
  background-color: var(--color2);
  border-color: var(--color5);
}

/* * NAVBAR & FOOTER */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color3);
  font-size: 1rem;
  font-weight: 400;
  border-block-end: groove 12px var(--color4);
}

.navbar ul,
footer ul {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding-inline-start: 0;
}

.navbar ul,
footer ul {
  justify-content: center;
}

.navbar li,
footer li {
  list-style-type: none;
  padding: 10px 16px;
}

.navbar a,
footer a {
  text-decoration: none;
  color: var(--color2);
  font-weight: bold;
}

.navbar a:hover,
.navbar a:active {
  text-decoration: double underline 2px var(--color4);
  color: var(--color5);
}

footer a:hover,
footer a:active {
  text-decoration: double underline 2px var(--color6);
  color: var(--color5);
}

footer a {
  font-weight: 500;
}

.navbar .navlink-left {
  margin-inline-end: auto;
}

/* * FOOTER */
footer {
  background-color: var(--color1);
  color: var(--color2);
}

/* * HOMEPAGE */

.homepage-h1 {
  margin-inline: auto;
  width: fit-content;
  position: relative;
}

.homepage-h1 .play-pause-button {
  position: absolute;
  bottom: -40px;
  z-index: 1;
  bottom: 12px;
  /* transform: translateY(-50%); */
  right: -40px;
}

.homepage .header {
  text-align: center;
  margin-block: 15vh;
}

.homepage .chapo {
  margin-inline: auto;
}

.homepage h1 {
  font-size: 6rem;
}

.span-monster {
  font-family: "Rubik Wet Paint", sans-serif;
  animation: rainbowtext 10s ease 1s infinite;
}

.intro-buttons {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: center;
  height: auto;
}

/* * illustration */
.illu-container {
  width: 90%;
  margin-inline: auto;
  margin-block: 10vh;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  position: relative;
}

.illu-container .play-pause-button {
  position: absolute;
  bottom: -40px;
  z-index: 1;
  left: 50%;
  transform: translateX(-50%);
}

.illu:nth-child(2n+1) {
  /* background-color: var(--color3); */
  transform: rotate(20deg);
  animation: bouncyjumprotateleft 4s ease 0s infinite;
}

.illu:nth-child(2n) {
  /* background-color: var(--color4); */
  transform: rotate(-20deg);
  animation: bouncyjumprotateleft 4s ease 1s infinite;
}

.illu {
  object-fit: contain;
  object-position: top;
  width: 15vw;
  height: 15vw;
  max-width: 200px;
  max-height: 200px;
}

/* * Lastly added cards section */
.last-added {
  background: var(--color3);
  padding-block: 40px;
}

.last-added h2 {
  color: var(--color2);
  text-align: center;
}

.last-added .button {
  margin-inline: auto;
}

/* * EXPLORE PAGE */

/* * form */
.explore form {
  width: 90vw;
  max-width: 700px;
}

.explore fieldset {
  /* background-color: #E34ADB66; */
  background-color: var(--color2);
  border: none;
  border-radius: 20px;
  padding: 10px;
}

.explore fieldset:last-of-type {
  margin-block-start: 20px;
  /* background-color: #E34ADB66; */
  background-color: var(--color5);
}

.searchbar input[type="search"] {
  border: solid 2px var(--color3);
  border-radius: 999px;
  background-color: #ffffffb4;
  padding: 6px 10px;
  font-size: 1rem;
  width: 78%;
}

.searchbar input[type=button] {
  margin-block: 0;
}

.searchbar div {
  height: fit-content;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-block-start: 4px;
}

.filters {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 1rem;
}

/* * id cards */
.cards {
  margin-block: 32px;
  margin-inline: auto;
  width: fit-content;
  /* display: flex;
  flex-wrap: wrap;
  justify-content: center; */
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

/* * wallet */
.wallet.with-card {
  width: 520px;
  height: 570px;
  position: relative;
}

.wallet.front {
  width: 520px;
  height: 180px;
  z-index: 1;
  /* display: none; */
  border: solid #0006 3px;
  position: absolute;
}

.wallet.front.one {
  bottom: 80px;
}

.wallet.front.two {
  bottom: 40px;
}

.wallet.front.three {
  bottom: 0px;
}

.wallet.back {
  width: 520px;
  height: 320px;
  border-radius: 40px 40px 0 0;
  position: absolute;
  bottom: 0px;
  background-color: var(--color1);
  z-index: -1;
}

/* * card */
.wallet.card {
  background-color: var(--color2);
  border: solid #fff9 4px;
  border-radius: 10px;
  width: 500px;
  height: 280px;
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translate(-50%, -7%);
  transition: transform ease-out 0.6s, box-shadow 0.4s ease-out;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  overflow: hidden;
}

.wallet.with-card:hover .wallet.card {
  transform: translate(-50%, -95%);
  /* box-shadow: var(--color3) 0 0 50px; */
}

.wallet.with-card a:link,
.wallet.with-card a:visited {
  font-weight: inherit;
  color: inherit;
  text-decoration: none;
}

.card-intro {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.nickname {
  margin-block: 0;
  font-size: 1.8rem;
  font-weight: 900;
}

.postits,
.desc p {
  margin-block: 0 8px;
}

.desc {
  max-height: 38px;
}

.card-intro img {
  height: 100px;
  border: solid #0006 2px;
}

.card-tastes {
  margin-block: 12px 0;
  padding-inline-start: 4px;
}

.postits {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-block: 0 8px;
}

.postit {
  box-shadow: 2px 2px 0;
  padding-inline: 4px;
  padding-block: 4px;
  margin: 0;
  font-weight: bold;
  background-color: var(--color2);
}

.postit.four {
  background-color: var(--color1);
  color: var(--color2);
}

.date-n-author {
  display: flex;
  justify-content: space-between;
}

.date-n-author p {
  margin-block: 0;
  font-size: 0.75rem;
  font-weight: bold;
}

/* * CREATE PAGE */

/* * form */
form {
  margin-inline: auto;
  max-width: 1000px;
}

form p {
  margin-block: 8px 0;
}

fieldset {
  /* background-color: #E34ADB66; */
  background-color: var(--color5);
  border: none;
  border-radius: 20px;
  padding: 40px 20px 20px 20px;
}

.create fieldset:last-of-type {
  margin-block-start: 20px;
  /* background-color: #E34ADB66; */
  background-color: var(--color6);
}

legend {
  position: relative;
  top: 40px;
  font-size: 1.5rem;
  font-weight: bold;
}

.input-divs-wrapper,
.input-divs-wrapper-author {
  width: 100%;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 10px;
}

.input-divs-wrapper-author {
  justify-content: flex-start;
}

.input-divs-wrapper>div,
.input-divs-wrapper-author>div,
.create fieldset:first-of-type>div {
  margin-block-start: 28px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

textarea {
  max-width: 80vw;
}

input[type="text"],
textarea,
select {
  border: solid 2px var(--color2);
  border-radius: 4px;
  background-color: #ffffffb4;
  padding: 6px 10px;
}

input[type="submit"],
input[type="button"] {
  color: var(--color2);
  margin-block-start: 20px;
  border: none;
}

.number-of-characters-desc,
.number-of-characters-nickname,
.number-of-characters-author {
  font-weight: bold;
}


/* pics */
.pics-display-wrapper {
  background-color: #ffffff63;
  border-radius: 20px;
}

.pics-display-wrapper:nth-child(3) {
  padding: 10px 20px 0 20px;
}

.pics-display-wrapper:nth-child(3) p {
  margin-block: 0 10px;
}

.pics-display-wrapper:nth-child(3) {
  padding: 10px 20px;
}

.pics-display-wrapper:nth-child(3) p {
  margin-block: 0 10px;
}

.pics-display-wrapper:nth-child(3) .pics-display div {
  padding-block: 16px;
}

.pics-display-wrapper:nth-child(3) .pics-display p {
  margin-block: auto;
}

.pics-display {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-inline: 24px;
}

.pics-display.monsters {
  height: 250px;
  overflow-y: scroll;
}

.pics-display>div {
  background-color: var(--color2);
  padding: 6px;
  border: solid 1px #999;
  border-radius: 10px;
  text-align: center;
  width: 150px;
}

.pics-display img {
  height: 100px;
  border: solid 1px var(--color1);
}

/* * ABOUT PAGE */
.about main>div {
  margin-block: 10vh;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
}

.about img {
  max-height: 800px;
  max-width: 40vw;
  border: solid 1px #e2e2e2;
  border-radius: 4px;
  background-color: var(--color2);
  box-shadow: 4px 4px 4px #0006;

}

/* * CARD DETAILS PAGE */

.letter {
  margin-inline: auto;
  margin-block: 20px;
  background-color: #ecece5;
  border-radius: 4px;
  padding: 20px;
  box-shadow: 4px 4px 4px #0006;
  max-width: 700px;
}

.letter img {
  width: 250px;
  border-radius: 4px;
  background-color: var(--color2);
  box-shadow: 4px 4px 4px #0006;

}

.letter>div p {
  font-weight: bold;
}

/* * MENTIONS PAGE */
.mentions main {
  margin-inline: auto;
  max-width: 650px;
}

/* * FORM VALIDATED PAGE */
.form-validated main>div {
  text-align: center;
  margin-block-start: 35vh;
}

/* * RESPONSIVE */
@media (width < 1700px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (width < 1130px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .about main>div {
    flex-direction: column;
  }
}

/* * ANIMATIONS */
@keyframes rainbowtext {
  0% {
    color: var(--color1);
  }

  35% {
    color: var(--color3);
  }

  70% {
    color: var(--color4);
  }

  100% {
    color: var(--color1);
  }
}

@keyframes bouncyjumprotateleft {
  0% {
    transform: translateY(0), rotate(-20deg);
  }

  25% {
    transform: translateY(40px), rotate(20deg);
  }

  50% {
    transform: translateY(-20px);
  }

  75% {
    transform: translateY(40px), rotate(20deg);
  }

  100% {
    transform: translateY(0), rotate(-20deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .homepage h1 span {
    animation: none;
  }

  .illu {
    animation: none;
  }
}