@import url("https://fonts.googleapis.com/css2?family=Raleway&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Jost&family=Raleway&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap");
@import url('shared.css');

body, html {
  margin: 0;
  padding: 0;
  height: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

::selection {
  color: #fff;
  background: hsl(349deg, 100%, 74%);
}

h1,
h2,
h3,
h4,
h5 p {
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
  height: auto;
  align-self: center;
}

a, a:hover {
  text-decoration: none;
}

.flow-content > * + * {
  margin-top: 2rem;
}

li {
  list-style-type: none;
}

body {
  background: hsl(210deg, 11%, 60%);
  font-family: "Outfit", "Raleway", sans-serif;
  position: relative;
}

/* Subtle background glows */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse 500px 400px at 5% 15%, rgba(244, 114, 182, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse 400px 300px at 90% 20%, rgba(253, 224, 71, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse 450px 350px at 80% 85%, rgba(45, 212, 191, 0.15) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

header {
  background-color: #f1f1f1;
  padding: 0.75rem 2.5rem 1.5rem;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}
header h1 {
  color: #212529;
}
header a {
  padding: 0.75rem;
  font-size: 1.1rem;
  border-radius: 4px;
  color: #212529;
}
header a:hover {
  background-color: #ddd;
  color: black;
}
header a.active {
  background-color: dodgerblue;
  color: white;
}

/* Back Link */
.back-link {
  margin: 0.75rem 2.5rem;
  position: relative;
  z-index: 1;
}

.flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  margin: 1rem 2.5rem 2.5rem;
  padding-bottom: 2.5rem;
  position: relative;
  z-index: 1;
}

.container {
  display: flex;
  justify-content: space-between;
  flex-basis: 100%;
  align-items: end;
  gap: 0.1rem;
  padding: 1rem;
  background: #FAF9F6;
}
.container.dark {
  background: #37342c;
  color: #fff;
}
.container.dark .btn {
  color: hsl(198deg, 42%, 60%);
  border-color: hsl(198deg, 42%, 60%);
}
.container.dark .btn:hover {
  background-color: hsl(198deg, 42%, 60%);
  color: #fff;
}

/* Staggered load animation */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 20vmax;
  min-width: 275px;
  cursor: pointer;
  animation: fadeSlideIn 0.5s ease forwards;
  animation-delay: calc(var(--i, 0) * 0.05s);
  opacity: 0;
  border-radius: 4px;
}

/* Gradient border wrapper */
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes rotateBorder {
  to {
    --angle: 360deg;
  }
}

.card img {
  width: 100%;
  transition: transform 0.3s ease;
}

.card:hover {
  box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.25);
  transform: translateY(-4px);
}

/* Animated tracing border on hover using ::after */
.card::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 6px;
  background: conic-gradient(
    from var(--angle, 0deg),
    transparent 0deg,
    transparent 300deg,
    #86efac 300deg,
    #5eead4 320deg,
    #fde047 340deg,
    #fda4af 355deg,
    transparent 360deg
  );
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 3px;
}

.card:hover::after {
  opacity: 1;
  animation: rotateBorder 1.5s linear infinite;
}

/* Avatar zoom on hover */
.card:hover img {
  transform: scale(1.03);
}

/* Ribbon scales with card hover */
.card .ribbon {
  transition: transform 0.3s ease;
}

.card:hover .ribbon {
  transform: rotate(24deg) scale(1.05);
}

h1 {
  color: #fff;
}

h4 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

p {
  margin: 0;
}

/* Button with shine sweep effect */
.btn {
  background-color: transparent;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  color: #3D7A94;
  border-color: #3D7A94;
  cursor: pointer;
  width: 6.8rem;
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.5s ease;
}

.btn:hover {
  background-color: #3D7A94;
  color: #fff;
}

.btn:hover::before {
  left: 100%;
}

.ribbon {
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  position: absolute;
  right: -27px;
  top: -11px;
  text-align: center;
  border-radius: 25px;
  rotate: 24deg;
  background-color: #4A8BAC;
  color: white;
  text-transform: uppercase;
  font-family: "Jost", sans-serif;
  z-index: 20;
}
.ribbon.yellow {
  background-color: #FFF4A3;
  color: #37342c;
}

