/* Complete redesign with Avalanche-inspired styles */

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Diagonal Section Transitions */
.diagonal-section-start {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 80px;
  background: white;
  clip-path: polygon(0 0, 100% 80px, 100% 100%, 0 100%);
  z-index: 1;
}

.diagonal-section-end {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 80px;
  background: white;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 80px);
  z-index: 1;
}

/* Flip Card Styles */
.flip-card {
  perspective: 1000px;
  height: 600px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
}

/* Expand Card Styles */
.expand-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.expand-card-preview {
  transition: opacity 0.4s ease;
}

.expand-card-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  overflow-y: auto;
}

.expand-card.expanded {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 600px;
  height: auto;
  max-height: 80vh;
  z-index: 1000;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.expand-card.expanded .expand-card-preview {
  opacity: 0;
  pointer-events: none;
}

.expand-card.expanded .expand-card-content {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Rotate Card Styles */
.rotate-card {
  perspective: 1000px;
  transition: all 0.3s ease;
}

.rotate-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.rotate-card.rotated .rotate-card-inner {
  transform: rotateY(180deg);
}

.rotate-card-front,
.rotate-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.rotate-card-back {
  transform: rotateY(180deg);
}

/* Service Card Animation */
.service-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.service-card-icon {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Team Card Styles */
.team-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.team-card-image {
  overflow: hidden;
}

.team-card-image img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Cookie Popup Styles */
.cookie-popup {
  position: fixed;
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 500px;
  background: white;
  padding: 1.5rem;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid #e5e7eb;
}

.cookie-popup.show {
  bottom: 20px;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: black;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background: #dc2626;
  transform: translateY(-5px);
}

/* Form Error Styles */
.field-error {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 0.25rem;
  display: block;
}

input.border-red-500,
textarea.border-red-500 {
  border-color: #ef4444 !important;
}

/* Smooth Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Text Balance */
.text-balance {
  text-wrap: balance;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .flip-card {
    height: auto;
    min-height: 500px;
  }

  .diagonal-section-start,
  .diagonal-section-end {
    height: 40px;
  }

  .diagonal-section-start {
    clip-path: polygon(0 0, 100% 40px, 100% 100%, 0 100%);
  }

  .diagonal-section-end {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 40px);
  }

  .cookie-popup {
    width: 95%;
    padding: 1rem;
  }

  .scroll-to-top {
    width: 45px;
    height: 45px;
    font-size: 20px;
    bottom: 20px;
    right: 20px;
  }

  .expand-card.expanded {
    width: 95%;
    max-height: 90vh;
  }
}

/* Hover States */
a {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Selection */
::selection {
  background: black;
  color: white;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #000;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #dc2626;
}

/* Focus Styles */
button:focus,
input:focus,
textarea:focus,
a:focus {
  outline: 2px solid black;
  outline-offset: 2px;
}

/* Loading States */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
