/* Custom styles and animations for Townsite static site */

/* ========== ANIMATIONS ========== */

/* Fade in from left */
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Fade in from right */
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Fade in up */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Fade in up large */
@keyframes fadeInUpLarge {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Jiggle animation for phone icon */
@keyframes jiggle {
  0%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(-12deg); }
  20% { transform: rotate(12deg); }
  30% { transform: rotate(-10deg); }
  40% { transform: rotate(10deg); }
  50% { transform: rotate(-6deg); }
  60% { transform: rotate(6deg); }
  70% { transform: rotate(-3deg); }
  80% { transform: rotate(3deg); }
  90% { transform: rotate(0deg); }
}

/* Ping animation for status dot */
@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Spin animation */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== ANIMATION CLASSES ========== */

.animate-fade-in-left {
  animation: fadeInLeft 0.5s ease-out forwards;
}

.animate-fade-in-right {
  animation: fadeInRight 0.5s ease-out 0.1s forwards;
  opacity: 0;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in-up-large {
  animation: fadeInUpLarge 0.8s ease-out 0.3s forwards;
  opacity: 0;
}

.animate-jiggle {
  animation: jiggle 0.6s ease-in-out;
}

.animate-ping-dot {
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* ========== POPOVER ========== */

.popover-trigger {
  cursor: pointer;
  border-bottom: 1px dashed #4D00FF;
  padding-bottom: 2px;
  transition: opacity 0.2s;
  position: relative;
}

.popover-trigger:hover {
  opacity: 0.8;
}

.popover-content {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #0C0026;
  color: white;
  padding: 12px;
  border-radius: 8px;
  width: max-content;
  max-width: 240px;
  font-size: 14px;
  line-height: 1.4;
  z-index: 50;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.popover-trigger:hover .popover-content {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Popover arrow */
.popover-content::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #0C0026;
}

/* ========== BUTTON HOVER EFFECTS ========== */

.cta-button {
  transition: all 0.3s ease;
}

.cta-button:hover {
  background-color: #3D00CC !important;
  transform: scale(1.05);
}

.cta-button:hover .phone-icon {
  animation: jiggle 0.6s ease-in-out;
}

/* ========== BROWSER FRAME HOVER ========== */

.browser-preview-container .preview-image {
  transition: all 0.3s ease;
}

.browser-preview-container:hover .preview-image {
  filter: blur(4px);
}

.browser-preview-container .hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.browser-preview-container:hover .hover-overlay {
  background: rgba(0, 0, 0, 0.5);
}

.browser-preview-container .view-btn {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: auto;
}

.browser-preview-container:hover .view-btn {
  opacity: 1;
}

.view-btn:hover .arrow-icon {
  transform: translate(2px, -2px);
}

.arrow-icon {
  transition: transform 0.2s ease;
}

/* ========== LINK HOVER EFFECTS ========== */

.nav-link:hover {
  opacity: 0.7;
}

.nav-link:hover .key-icon {
  transform: translateX(2px);
}

.key-icon {
  transition: transform 0.3s ease;
}

.sample-link:hover {
  text-decoration: underline;
}

.sample-link:hover .arrow-icon {
  transform: translate(2px, -2px);
}

/* ========== RECEIPT TEAR EDGE ========== */

.receipt-tear {
  clip-path: polygon(0% 0%, 5% 100%, 10% 0%, 15% 100%, 20% 0%, 25% 100%, 30% 0%, 35% 100%, 40% 0%, 45% 100%, 50% 0%, 55% 100%, 60% 0%, 65% 100%, 70% 0%, 75% 100%, 80% 0%, 85% 100%, 90% 0%, 95% 100%, 100% 0%);
}

/* ========== FONT UTILITIES ========== */

.font-geist-extralight {
  font-family: 'Geist', sans-serif;
  font-weight: 200;
}

.font-geist-thin {
  font-family: 'Geist', sans-serif;
  font-weight: 100;
}

.font-geist-light {
  font-family: 'Geist', sans-serif;
  font-weight: 300;
}

.font-geist-regular {
  font-family: 'Geist', sans-serif;
  font-weight: 400;
}
