:root {
  --clay: #e9b7a0;
  --blue: #9cc2d8;
  --lavender: #c9b4e6;
  --ivory: #fbf9f6;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: linear-gradient(135deg, var(--clay), var(--lavender), var(--blue));
  background-size: 300% 300%;
  animation: gradientShift 18s ease infinite;
  color: #222;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

header.hero {
  text-align: center;
  padding: 5rem 1rem 4rem;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

header.hero h1 {
  font-size: 3rem;
  margin: 0 0 0.5rem;
}

.lead {
  font-size: 1.2rem;
  max-width: 40rem;
  margin: 0 auto;
}

.section {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  padding: 2.5rem 1.5rem;
  margin: 2rem auto;
  border-radius: 1rem;
  max-width: 800px;
}

.section h2 {
  margin-top: 0;
  font-size: 1.8rem;
}

.section ul {
  padding-left: 1.2rem;
}

.footer {
  text-align: center;
  padding: 2rem;
  color: #fff;
  font-size: 0.9rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Cards Section */
.cards-section h2 {
  text-align: center;
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  perspective: 1000px;
  cursor: pointer;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 200px;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card:focus .card-inner,
.card:active .card-inner,
.card:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 80%;
  height: 80%;
  border-radius: 1rem;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background: rgba(236, 210, 253, 0.8);
  backdrop-filter: blur(4px);
}

.card-back {
  transform: rotateY(180deg);
}

.card-front.visual-front {
  padding: 0; 
  overflow: hidden; 
  background: transparent; 
}

.card-front.visual-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s ease;
}

.card-front.visual-front::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.1); 
  pointer-events: none;
}

.card:hover .card-front.visual-front img,
.card:focus .card-front.visual-front img {
  transform: scale(1.1);
}
