/* Construct Buddy - Custom Styles */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Base resets */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Flip word animation */
.flip-word {
  display: inline-block;
  overflow: hidden;
  height: 1.3em;
  line-height: 1.3;
  vertical-align: bottom;
  position: relative;
}

.flip-word span {
  display: block;
  height: 1.3em;
  line-height: 1.3;
  animation: flip 9s infinite;
}

@keyframes flip {
  0%, 30% { transform: translateY(0); }
  33%, 63% { transform: translateY(-100%); }
  66%, 96% { transform: translateY(-200%); }
  100% { transform: translateY(0); }
}

/* Subtle gradient overlay for hero */
section:first-of-type::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center top, rgba(59, 130, 246, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

section:first-of-type {
  position: relative;
}

/* Card hover effects */
.grid > div {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.grid > div:hover {
  transform: translateY(-2px);
}

/* Focus states */
input:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Button disabled state */
button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Success state for form button */
button.success {
  background-color: #10b981 !important;
}

/* Responsive typography adjustments */
@media (max-width: 640px) {
  .flip-word {
    display: block;
    margin-top: 0.25rem;
  }
}

/* Subtle animations on scroll (optional enhancement) */
@media (prefers-reduced-motion: no-preference) {
  section {
    animation: fadeIn 0.6s ease-out;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
