.archaeological-text {
  position: relative;
  font-size: 1.2em;
  line-height: 1.6;
  padding: 2em;
  background: linear-gradient(45deg, #f8f5f0, #fefcf7);
  border: 1px solid #e0d5c0;
  border-radius: 8px;
  margin: 2em 0;
  overflow: hidden;
}

.archaeological-text::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 40%, rgba(139, 69, 19, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(101, 67, 33, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.text-layer {
  position: relative;
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
}

/* Modern Layer (Default) */
.layer-modern {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #2c3e50;
  opacity: 1;
  transform: translateY(0);
}

/* Transitional Layer */
.layer-transitional {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  font-family: Georgia, 'Times New Roman', serif;
  color: #34495e;
  opacity: 0;
  transform: translateY(5px);
  mix-blend-mode: multiply;
}

/* Humanist Layer */
.layer-humanist {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  font-family: 'Brush Script MT', cursive;
  color: #5d4e37;
  opacity: 0;
  transform: translateY(10px);
  mix-blend-mode: overlay;
}

/* Blackletter Layer */
.layer-blackletter {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  font-family: 'Old English Text MT', 'Blackletter', serif;
  color: #3c2415;
  opacity: 0;
  transform: translateY(15px);
  mix-blend-mode: hard-light;
  text-shadow: 1px 1px 0px rgba(139, 69, 19, 0.3);
}

/* Hover states */
.archaeological-text:hover .layer-modern {
  opacity: 0.8;
  transform: translateY(-2px);
}

.archaeological-text:hover .layer-transitional {
  opacity: 0.7;
  transform: translateY(0);
}

.archaeological-text:hover .layer-humanist {
  opacity: 0.5;
  transform: translateY(2px);
}

.archaeological-text:hover .layer-blackletter {
  opacity: 0.3;
  transform: translateY(4px);
}

/* Deep hover for extended interaction */
.archaeological-text:hover:active .layer-modern {
  opacity: 0.4;
}

.archaeological-text:hover:active .layer-transitional {
  opacity: 0.6;
}

.archaeological-text:hover:active .layer-humanist {
  opacity: 0.8;
}

.archaeological-text:hover:active .layer-blackletter {
  opacity: 1;
  transform: translateY(0);
}

.font-timeline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2em 0;
  padding: 1em;
  background: linear-gradient(to right, #f0f0f0, #e8e8e8);
  border-radius: 4px;
  font-size: 0.85em;
}

.timeline-era {
  text-align: center;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.timeline-era.active {
  opacity: 1;
  font-weight: bold;
}

.palimpsest-example {
  position: relative;
  background: #faf8f3;
  padding: 2em;
  margin: 2em 0;
  border: 2px solid #d4c5a0;
  border-radius: 8px;
}

.palimpsest-example::before {
  content: "Scraped parchment";
  position: absolute;
  top: -10px;
  left: 20px;
  background: #faf8f3;
  padding: 0 10px;
  font-size: 0.8em;
  color: #8b6914;
}

.overwritten-text {
  font-family: 'Old English Text MT', serif;
  color: rgba(60, 36, 21, 0.3);
  text-decoration: line-through;
  margin-bottom: 0.5em;
}

.new-text {
  font-family: Georgia, serif;
  color: #2c3e50;
  position: relative;
}

.font-specimen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2em;
  margin: 2em 0;
}

.specimen-card {
  padding: 1.5em;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
}

.specimen-modern {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.specimen-serif {
  font-family: Georgia, 'Times New Roman', serif;
}

.specimen-script {
  font-family: 'Brush Script MT', cursive;
}

.specimen-blackletter {
  font-family: 'Old English Text MT', serif;
}

@media (max-width: 768px) {
  .font-specimen {
    grid-template-columns: 1fr;
  }

  .font-timeline {
    flex-direction: column;
    gap: 0.5em;
  }
}