@charset "utf-8";

/* Custom Properties */
html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* Site Theemes */
.index {
  --hue: 30;
  --body-bg: linear-gradient(
    135deg,
    hsl(var(--hue), 40%, 96%) 0%,
    hsl(var(--hue), 40%, 85%) 100%
  );
  --wrapper-bg: hsl(var(--hue), 35%, 70%);
  --image-bg: hsla(var(--hue), 76%, 97%, 1);
  --image-border: hsla(var(--hue), 30%, 40%, 1);
  --header-bg-image: url("/wfed2/website-reviews/images/index-header.webp");
  --header-bg-color: hsla(var(--hue), 20%, 60%, 0.9);
  --accent-color: hsl(var(--hue), 63%, 48%);
  --text-color: hsl(var(--hue), 48%, 10%);
  --nav-bg: hsl(var(--hue), 24%, 34%);
  --nav-text: hsl(var(--hue), 40%, 96%);
  --review-bg: hsl(var(--hue), 50%, 90%);
  --image-shadow: rgba(41, 41, 41, 1);
  --gap: 1rem;
  --button-text: hsl(var(--hue), 2%, 14%);
}

.envy {
  --hue: 150;
  --body-bg: linear-gradient(
    135deg,
    hsl(var(--hue), 40%, 96%) 0%,
    hsl(var(--hue), 40%, 85%) 100%
  );
  --wrapper-bg: hsl(var(--hue), 40%, 70%);
  --image-bg: hsla(var(--hue), 76%, 97%, 1);
  --image-border: hsla(var(--hue), 30%, 40%, 1);
  --header-bg-image: url("../images/envy-header.webp");
  --header-h1-x: 0;
  --header-h1-y: calc(95px - 50%);
  --accent-color: hsl(var(--hue), 63%, 28%);
  --text-color: hsl(var(--hue), 48%, 15%);
  --nav-bg: hsl(var(--hue), 24%, 34%);
  --nav-text: hsl(var(--hue), 40%, 96%);
  --review-bg: hsl(var(--hue), 50%, 90%);
  --image-shadow: rgba(41, 41, 41, 1);
  --font: "Sour Gummy", sans-serif;
  --gap: 1rem;
  --header-bg-color: hsla(var(--hue), 20%, 60%, 0.9);
}

.veerle {
  --hue: 340;
  --body-bg: linear-gradient(
    135deg,
    hsl(var(--hue), 40%, 96%) 0%,
    hsl(var(--hue), 40%, 85%) 100%
  );
  --wrapper-bg: hsl(var(--hue), 100%, 98%);
  --image-bg: hsla(var(--hue), 76%, 97%, 1);
  --image-border: hsla(var(--hue), 76%, 85%, 1);
  --header-bg-image: url("../images/veerle-header.webp");
  --header-bg-color: hsla(var(--hue), 20%, 60%, 0.9);
  --header-h1-x: 0;
  --header-h1-y: calc(95px - 50%);
  --accent-color: hsl(var(--hue), 63%, 30%);
  --text-color: hsl(var(--hue), 48%, 19%);
  --nav-bg: hsl(var(--hue), 24%, 34%);
  --nav-text: hsl(var(--hue), 40%, 96%);
  --review-bg: hsl(var(--hue), 30%, 85%);
  --image-shadow: rgba(41, 41, 41, 1);
  --font: "Simonetta", sans-serif;
  --gap: 1rem;
}

.stripe {
  --hue: 185;
  --body-bg: linear-gradient(
    135deg,
    hsl(var(--hue), 30%, 85%) 0%,
    hsl(var(--hue), 70%, 70%) 100%
  );
  --wrapper-bg: hsl(var(--hue), 50%, 40%);
  --image-bg: hsla(var(--hue), 85%, 55%, 1);
  --image-border: hsla(var(--hue), 15%, 30%, 1);
  --header-bg-image: url("../images/stripe-header.webp");
  --header-bg-color: hsla(var(--hue), 20%, 60%, 0.9);
  --header-h1-x: 0;
  --header-h1-y: calc(95px - 50%);
  --accent-color: hsl(var(--hue), 80%, 50%);
  --text-color: hsl(var(--hue), 10%, 5%);
  --color-black: hsl(0, 0%, 0%);
  --nav-bg: hsl(var(--hue), 15%, 25%);
  --nav-text: hsl(var(--hue), 85%, 95%);
  --review-bg: hsl(var(--hue), 40%, 95%);
  --image-shadow: rgba(41, 41, 41, 1);
  --font: "Special Elite", sans-serif;
  --gap: 1rem;
}

body {
  min-height: 100vh;
  background: var(--body-bg);
  margin: 0;
  padding: 0;
  font-family: var(--font);
}

/* Content */
.wrapper {
  width: min(calc(100%), 1280px);
  margin: 0 auto;
  background-color: var(--wrapper-bg);
}

/* Header Styles */
header {
  background-image: var(--header-bg-image);
  background-size: cover;
  height: 230px;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  position: relative;
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  /* background: rgba(0, 0, 0, 0.4); */
}

header h1 {
  align-self: center;
  font-size: 2.5rem;
  margin: 0;
  padding: 20px;
  line-height: 40px;
  background: var(--header-bg-color);
  color: var(--color-black);
  translate: var(--header-h1-x) var(--header-h1-y);
  border-radius: 15px;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

header a {
  margin-top: auto;
  line-height: 50px;
  background-color: var(--header-bg-color);
  backdrop-filter: blur(2px);
  text-align: right;
  padding: 0 var(--gap);
  text-decoration: none;
  color: var(--color-black);
  font-size: 1.3em;
  font-weight: bold;
}

/* .header-index {
  background-color: hsl(var(--hue), 80%, 70%, 0.7);
  width: 175px;
  margin: auto;
  padding: 5px;
  border-radius: 15px;
  text-align: center;
} */

/* Header Animations */
header h1:target {
  animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Envy Labs Header Animation */
.envy header h1 {
  animation: slideFromLeft 1s ease-out;
}

@keyframes slideFromLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Veerle Header Animation */
.veerle header h1 {
  animation: flicker 2s ease-in-out infinite;
  text-shadow: 0 0 7px var(--accent-color), 0 0 10px var(--accent-color),
    0 0 21px var(--accent-color);
}

@keyframes flicker {
  0%,
  100% {
    opacity: 1;
  }
  41% {
    opacity: 1;
  }
  42% {
    opacity: 0.8;
  }
  43% {
    opacity: 1;
  }
  45% {
    opacity: 0.3;
  }
  46% {
    opacity: 1;
  }
  48% {
    opacity: 0.9;
  }
  49% {
    opacity: 1;
  }
  60% {
    opacity: 0.7;
  }
  61% {
    opacity: 1;
  }
  73% {
    opacity: 1;
  }
  74% {
    opacity: 0.5;
  }
  75% {
    opacity: 1;
  }
  90% {
    opacity: 0.8;
  }
  91% {
    opacity: 1;
  }
}

/* Stripe Press Header Animation */
.stripe header h1 {
  animation: fadeInScale 1s ease-out;
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Header link Hover Animations */
.envy header a:hover {
  animation: pulseGreen 0.5s ease-in-out;
}

.veerle header a:hover {
  animation: wiggllyPink 0.5s ease-in-out;
}

.stripe header a:hover {
  animation: glowBlue 1s ease-in-out infinite;
}

@keyframes pulseGreen {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes wiggllyPink {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-5deg);
  }
  75% {
    transform: rotate(5deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@keyframes glowBlue {
  0% {
    text-shadow: none;
  }
  50% {
    text-shadow: 0 0 10px var(--accent-color);
  }
  100% {
    text-shadow: none;
  }
}

/* Header When Targeted */
header h1:target {
  animation: shakeAndFlash 0.8s ease-out;
}

@keyframes shakeAndFlash {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  20% {
    transform: translateX(-10px);
  }
  40% {
    transform: translateX(10px);
  }
  60% {
    transform: translateX(-10px);
    opacity: 0.3; /* Flash */
  }
  80% {
    transform: translateX(10px);
    opacity: 1; /* Return to normal */
  }
  100% {
    transform: translateX(0);
  }
}

/* Navigation Styles */
nav {
  width: 100%;
  background: var(--nav-bg);
  padding: 0.75rem;
  margin-bottom: 1.5rem;
}

nav ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  list-style: none;
  gap: var(--base-spacing);
  padding: 0;
}

nav li {
  width: 100%;
  text-align: center;
  padding: 0.5rem 0;
}

nav a {
  text-decoration: none;
  color: var(--nav-text);
  font-weight: 500;
}

nav a:hover {
  color: var(--accent-color);
}

nav a.current {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

nav a.current::after {
  content: "▲";
  font-size: 0.8em;
  color: var(--accent-color);
}

/* Review Content */
.review {
  /* margin-bottom: calc(var(--base-spacing) * 2); */
  margin: 20px 30px;
  background-color: var(--review-bg);
  border-radius: 15px;
  padding: 10px;
  list-style: none;
}

.review-content {
  padding: var(--base-spacing);
}

.review-content h2 {
  margin-bottom: var(--base-spacing);
  color: var(--text-color);
  font-size: 1.5rem;
}

.review-content p {
  max-width: 75ch;
  font-size: 17px;
}

code {
  background: var(--image-bg);
  padding: 0.5rem 1rem;
  border: 1px solid var(--image-border);
  border-radius: 5px;
  font-family: monospace;
  font-size: 0.9em;
  color: var(--text-color);
  display: inline-block;
  margin: 0.5rem 0;
}

code:hover {
  background: var(--accent-color);
  color: var(--nav-text);
  transition: all 0.3s ease;
}

.review-featured-image {
  margin: var(--base-spacing) 0;
  padding: 15px;
  background: var(--review-bg);
}

.review-featured-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 19px 19px 17px -13px var(--image-shadow);
}

figure {
  margin: 0;
  background-color: var(--image-bg);
  border: 1px solid var(--image-border);
}

figcaption {
  text-align: center;
  color: var(--text-color);
  margin-top: 0.5rem;
  font-style: italic;
}

/* Rating Styles */
.rating {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rating-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stars {
  display: inline-flex;
  gap: 4px;
  margin-left: 10px;
}

.filled,
.empty {
  animation: fadeInStars 0.5s ease-out forwards;
  transition: transform 0.3s ease;
}

.rating .filled {
  color: var(--accent-color);
  opacity: 0;
  animation: fadeInFilled 0.5s ease-out forwards;
}

.rating .empty {
  color: var(--accent-color);
  opacity: 0;
  animation: fadeInEmpty 0.5s ease-out forwards;
}

.stars span:nth-child(1) {
  animation-delay: 0.1s;
}
.stars span:nth-child(2) {
  animation-delay: 0.2s;
}
.stars span:nth-child(3) {
  animation-delay: 0.3s;
}
.stars span:nth-child(4) {
  animation-delay: 0.4s;
}
.stars span:nth-child(5) {
  animation-delay: 0.5s;
}

@keyframes fadeInFilled {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInEmpty {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 0.4;
    transform: translateY(0);
  }
}

.stars:hover .filled {
  animation: starPulseFilled 0.8s ease-in-out infinite;
}

.stars:hover .empty {
  animation: starPulseEmpty 0.8s ease-in-out infinite;
}

@keyframes starPulseFilled {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes starPulseEmpty {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.3;
  }
  100% {
    transform: scale(1);
    opacity: 0.3;
  }
}

/* Rating Stripe Press */
.sprite-rating {
  display: inline-flex;
  margin-left: 10px;
}

.sprites {
  display: flex;
  gap: 0.5px;
}

.sprite {
  width: 30px;
  height: 30px;
}

.sprite .body {
  fill: #ddd;
  transition: fill 0.3s ease;
}

.sprite .eyes {
  fill: white;
}

.sprite.filledS .body {
  fill: #000;
}

@keyframes floatSprite {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(0, -2px) rotate(2deg);
  }
  75% {
    transform: translate(0, 2px) rotate(-2deg);
  }
}

.sprite.filledS {
  animation: floatSprite 2s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.3s);
}

/* Review Index */
.review-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  padding: 0;
  margin: 20px;
}

.review-grid .review-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}

.review-grid .review-card {
  flex: 1 1 250px;
  max-width: 350px;
  border: 1px solid var(--accent-color);
  border-radius: 10px;
  background: var(--review-bg);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 1.5rem;
}

.card-content p {
  margin-bottom: 30px;
}

.read-more {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--accent-color);
  color: var(--button-text);
  text-decoration: none;
  border-radius: 5px;
  margin: auto 60px 0 60px;
  text-align: center;
}

/* Footer Styles */
footer {
  margin-top: calc(var(--base-spacing) * 2);
}

footer p {
  display: flex;
  flex-direction: column;
  align-items: center;
}

footer a {
  color: var(--text-color);
  text-decoration: none;
  margin: 8px 0;
}

footer a:hover {
  color: var(--accent-color);
}

/* Footer Scrool to top */
footer a[href="#top"] {
  color: var(--text-color);
  padding: 0.5rem;
  border-radius: 50%;
  background: var(--header-bg-color);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  font-weight: bold;
  font-size: 1.2rem;
}

footer a[href="#top"]::after {
  content: "🔝";
  filter: hue-rotate(55deg) saturate(70%) brightness(0.2);
}

footer a[href="#top"]:hover {
  background: var(--nav-bg);
}

footer a[href="#top"]:hover::after {
  filter: brightness(0) invert(1);
}

/* Media Queries */
@media screen and (min-width: 768px) {
  body {
    padding: calc(var(--base-spacing) * 2);
  }

  .header-index {
    width: 300px;
  }
  nav ul {
    flex-direction: row;
    justify-content: center;
  }

  nav li {
    width: auto;
    padding: 0 3rem;
  }

  .review {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
  }

  .review-content {
    flex: 1 1 300px;
  }

  .review-featured-image {
    flex: 1 1 300px;
  }

  .review:last-of-type {
    display: flex;
    justify-content: center;
    text-align: center;
  }

  .review:last-of-type .review-content {
    max-width: 75ch;
  }

  .review-content {
    flex: 1 1 300px;
  }

  .sprite {
    width: 50px;
    height: 50px;
  }

  footer p {
    flex-direction: row;
    align-items: center;
  }

  footer a {
    padding: 0 10px;
  }

  footer a:first-child {
    margin-right: auto;
    margin-left: 10px;
  }
}

@media screen and (min-width: 1024px) {
  .wrapper {
    width: 90%;
    max-width: 1200px;
  }

  .review-content {
    padding: calc(var(--base-spacing) * 2);
  }
}
