/* Homepage-specific styles */

/* ── Hero title animation ─────────────────────────────────────────────────── */
#hero-content h1 .inline-block {
  display: inline-block;
  margin-right: 2px;
}

.hero-title {
  opacity: 0;
  animation: fadeIn 0.5s ease-out forwards;
  animation-delay: 0.3s;
  letter-spacing: normal;
}

.hero-title .word {
  display: inline-block;
  margin-right: 0.1em;
  white-space: nowrap;
}

.hero-title .space {
  display: inline-block;
  width: 0.1em;
  min-width: 0.1em;
}

.hero-title .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(15px);
  animation: charAnimation 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  letter-spacing: -0.01em;
}

.hero-title .extra-space {
  margin-right: 0.4em;
}

.hero-title .text-accent {
  position: relative;
  display: inline-block;
}

.hero-title .text-accent::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  color: transparent;
  text-shadow: 0 0 15px rgba(71, 184, 255, 0.7), 0 0 25px rgba(255, 255, 255, 0.6);
  animation: aura-glow 2s ease-in-out infinite alternate;
  filter: blur(4px);
}

.hero-title .text-accent::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 5%;
  width: 0;
  height: 3px;
  background-color: currentColor;
  animation: lineExpand 1s ease-out forwards;
  animation-delay: 1.5s;
}

.hero-title.animation-completed .space {
  width: 0.1em !important;
  margin-right: 0 !important;
}

@keyframes charAnimation {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes lineExpand {
  to { width: 90%; }
}

@keyframes aura-glow {
  0%   { opacity: 0.6; filter: blur(4px); }
  100% { opacity: 0.9; filter: blur(7px); }
}

/* ── Printer wave cards (navy palette) ────────────────────────────────────── */
.e-card {
  background: transparent;
  box-shadow: 0px 8px 28px -9px rgba(0,0,0,0.45);
  position: relative;
  height: 480px;
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
  transition: all 0.3s ease;
}

.e-card:hover {
  transform: translateY(-10px);
  box-shadow: 0px 15px 35px -5px rgba(0,0,0,0.5);
}

.wave {
  position: absolute;
  width: 540px;
  height: 700px;
  opacity: 0.6;
  left: 0;
  top: 0;
  margin-left: -50%;
  margin-top: -70%;
  background: linear-gradient(744deg, #013477, #013477 55%, #CFE0F7);
  z-index: 1;
}

.wave-color-1 { background: linear-gradient(744deg, #013477, #013477 55%, #CFE0F7); }
.wave-color-2 { background: linear-gradient(744deg, #013477, #013477 55%, #CFE0F7); }
.wave-color-3 { background: linear-gradient(744deg, #013477, #013477 55%, #CFE0F7); }

.printer-image {
  width: 90%;
  max-height: 220px;
  margin: 0 auto;
  padding: 1.5em 0;
  position: relative;
  z-index: 2;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2));
}

.card-content {
  position: relative;
  z-index: 2;
  background: white;
  padding: 1.5rem;
  border-radius: 12px 12px 0 0;
  margin-top: -12px;
  height: calc(100% - 200px);
  display: flex;
  flex-direction: column;
}

.printer-tag {
  align-self: flex-start;
  margin-bottom: 0.75rem;
  background: rgba(0,0,0,0.05);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #013477;
  margin-bottom: 0.75rem;
  font-family: var(--font-heading);
}

.card-desc {
  font-size: 0.875rem;
  color: #013477;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.card-link {
  position: relative;
  font-weight: 600;
  color: #013477;
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: color 0.2s ease;
}

.card-link:hover { color: #013477; }

.card-link svg {
  margin-left: 0.35rem;
  width: 1rem;
  height: 1rem;
}

.wave:nth-child(2), .wave:nth-child(3) { top: 210px; }

.e-card .wave { border-radius: 40%; animation: wave 55s infinite linear; }
.e-card .wave:nth-child(2) { animation-duration: 50s; }
.e-card .wave:nth-child(3) { animation-duration: 45s; }

@keyframes wave {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Anchored card hover */
a:hover .e-card { transform: translateY(-10px); box-shadow: 0px 15px 35px -5px rgba(0, 0, 0, 0.5); }
.e-card.cursor-pointer:hover { outline: 2px solid rgba(59, 130, 246, 0.3); }
a:hover .card-link { color: #013477; }

/* ── Wave SVG / droplet effects ───────────────────────────────────────────── */
.wave-svg { transform: translateY(1px); }
.wave-path { transform-origin: center bottom; transform: translateY(20px); }

.droplet {
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
  z-index: 5;
  animation: droplet-fall 2s ease-in forwards;
  pointer-events: none;
}

@keyframes droplet-fall {
  0%   { transform: translateY(0) scale(0.3); opacity: 0.9; }
  80%  { opacity: 0.9; }
  100% { transform: translateY(150px) scale(0); opacity: 0; }
}

.splash {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.7);
  opacity: 1;
  animation: splash 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes splash {
  0%   { transform: scale(0); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ── Back-to-top button ───────────────────────────────────────────────────── */
.button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgb(20, 20, 20);
  border: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 0px 0px 4px rgba(59, 130, 246, 0.25);
  cursor: pointer;
  transition-duration: 0.3s;
  overflow: hidden;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
}

.svgIcon { width: 12px; transition-duration: 0.3s; }
.svgIcon path { fill: white; }

.button:hover {
  width: 140px;
  border-radius: 50px;
  transition-duration: 0.3s;
  background-color: rgb(59, 130, 246);
  align-items: center;
}

.button:hover .svgIcon { transition-duration: 0.3s; transform: translateY(-200%); }

.button::before {
  position: absolute;
  bottom: -20px;
  content: "Back to Top";
  color: white;
  font-size: 0px;
}

.button:hover::before { font-size: 13px; opacity: 1; bottom: unset; transition-duration: 0.3s; }
.button.visible { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero-title .text-accent,
  .hero-title .text-accent::after { animation: none; }
}
