.hero-section::before,
.hero-text-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, var(--hero-overlay-opacity, 0));
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hero-title {
  max-width: 100%;
  margin: 0 0 15px;
  color: var(--hero-title-color, #fff);
  font-size: var(--hero-title-size, 48px);
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.hero-subtitle {
  max-width: 100%;
  min-height: 1.8em;
  margin: 0;
  color: var(--hero-subtitle-color, #fff);
  font-size: var(--hero-subtitle-size, 21px);
  font-weight: 400;
  line-height: 1.8;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.hero-title[hidden], .hero-subtitle[hidden] { display: none; }

[data-title-effect="fade"] .hero-title { animation: hero-title-in 1.3s ease-out both; }
[data-title-effect="float"] .hero-title { animation: hero-title-float 3s ease-in-out infinite; }
[data-subtitle-effect="typing"] .hero-subtitle:not([hidden]) {
  border-right: 2px solid currentColor;
  animation: hero-caret 0.75s step-end infinite;
}
.hero-subtitle.hero-line-fade { animation: hero-line-in 0.8s ease-out both; }

@keyframes hero-title-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hero-title-float { 50% { transform: translateY(-8px); } }
@keyframes hero-line-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hero-caret { 50% { border-color: transparent; } }

@media (prefers-reduced-motion: reduce) {
  .hero-title, .hero-subtitle { animation: none !important; }
}
