/* =============================================================================
   DEFENDRA AI - PRODUCTION CTA BUTTON STYLES
   
   Two variations:
   1. .defendra-cta-hero - Diagonal lighthouse + edge glow + breathing
   2. .defendra-cta-header - Subtle breathing only
   
   NO PERIMETER TRACE - Solid borders only
   ============================================================================= */

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

/* Dual-Phase Breathing: Inhale 1.5s → Hold 0.5s → Exhale 2s → Rest 0.6s */
@keyframes defendra-breathe {
  0% {
    border-color: oklch(0.7 0.15 195 / 45%);
    box-shadow: 0 0 12px oklch(0.7 0.15 195 / 20%);
  }
  25% {
    border-color: oklch(0.7 0.15 195);
    box-shadow: 0 0 32px oklch(0.7 0.15 195 / 45%);
  }
  40%, 60% {
    border-color: oklch(0.7 0.15 195 / 95%);
    box-shadow: 0 0 30px oklch(0.7 0.15 195 / 42%);
  }
  85% {
    border-color: oklch(0.7 0.15 195 / 50%);
    box-shadow: 0 0 15px oklch(0.7 0.15 195 / 22%);
  }
  100% {
    border-color: oklch(0.7 0.15 195 / 45%);
    box-shadow: 0 0 12px oklch(0.7 0.15 195 / 20%);
  }
}

/* Subtle breathing for header button */
@keyframes defendra-breathe-subtle {
  0% {
    border-color: white;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
  }
  25% {
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  }
  40%, 60% {
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.28);
  }
  85% {
    border-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.18);
  }
  100% {
    border-color: white;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
  }
}

/* Diagonal Lighthouse Sweep */
@keyframes defendra-lighthouse {
  0%, 15% {
    top: -150%;
    left: -150%;
  }
  60% {
    top: 150%;
    left: 150%;
  }
  100% {
    top: 150%;
    left: 150%;
  }
}

/* Edge Glow Sweep - Horizontal */
@keyframes defendra-edge-horizontal {
  0%, 10% {
    left: 0;
    opacity: 0;
  }
  12% {
    opacity: 0.8;
  }
  18% {
    left: calc(100% - 30%);
    opacity: 0;
  }
  100% {
    left: calc(100% - 30%);
    opacity: 0;
  }
}

/* Edge Glow Sweep - Vertical */
@keyframes defendra-edge-vertical {
  0%, 10% {
    top: 0;
    opacity: 0;
  }
  12% {
    opacity: 0.8;
  }
  18% {
    top: calc(100% - 30%);
    opacity: 0;
  }
  100% {
    top: calc(100% - 30%);
    opacity: 0;
  }
}

/* Edge Glow Sweep - Horizontal Reverse */
@keyframes defendra-edge-horizontal-reverse {
  0%, 10% {
    right: 0;
    opacity: 0;
  }
  12% {
    opacity: 0.8;
  }
  18% {
    right: calc(100% - 30%);
    opacity: 0;
  }
  100% {
    right: calc(100% - 30%);
    opacity: 0;
  }
}

/* Edge Glow Sweep - Vertical Reverse */
@keyframes defendra-edge-vertical-reverse {
  0%, 10% {
    bottom: 0;
    opacity: 0;
  }
  12% {
    opacity: 0.8;
  }
  18% {
    bottom: calc(100% - 30%);
    opacity: 0;
  }
  100% {
    bottom: calc(100% - 30%);
    opacity: 0;
  }
}

/* =============================================================================
   HERO CTA BUTTON (Diagonal Lighthouse + Edge Glow)
   Use class: defendra-cta-hero
   ============================================================================= */

.defendra-cta-hero {
  position: relative;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: white;
  background: transparent;
  border: 2px solid oklch(0.7 0.15 195);
  border-radius: 11px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: defendra-breathe 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Diagonal Lighthouse Effect */
.defendra-cta-hero::before {
  content: '';
  position: absolute;
  top: -150%;
  left: -150%;
  width: 80%;
  height: 80%;
  background: linear-gradient(
    135deg,
    oklch(0.7 0.15 195 / 0%) 0%,
    oklch(0.7 0.15 195 / 0%) 40%,
    oklch(0.7 0.15 195 / 15%) 50%,
    oklch(0.7 0.15 195 / 0%) 60%,
    oklch(0.7 0.15 195 / 0%) 100%
  );
  z-index: 1;
  animation: defendra-lighthouse 6s ease-in-out infinite;
  pointer-events: none;
  transform: rotate(45deg);
}

/* Text Layer */
.defendra-cta-hero > span {
  position: relative;
  z-index: 3;
}

/* Arrow Icon */
.defendra-cta-hero > svg {
  position: relative;
  z-index: 3;
  transition: transform 0.3s ease;
}

.defendra-cta-hero:hover > svg {
  transform: translateX(4px);
}

/* Hover State */
.defendra-cta-hero:hover {
  background: oklch(0.7 0.15 195 / 5%);
  border-color: oklch(0.8 0.15 195);
  box-shadow: 0 0 40px oklch(0.7 0.15 195 / 40%);
}

.defendra-cta-hero:hover::before {
  background: linear-gradient(
    135deg,
    oklch(0.7 0.15 195 / 0%) 0%,
    oklch(0.7 0.15 195 / 0%) 40%,
    oklch(0.8 0.15 195 / 18%) 50%,
    oklch(0.7 0.15 195 / 0%) 60%,
    oklch(0.7 0.15 195 / 0%) 100%
  );
}

/* Edge Glow Elements */
.defendra-cta-hero .defendra-edge {
  position: absolute;
  background: oklch(0.7 0.15 195);
  box-shadow: 0 0 15px oklch(0.7 0.15 195 / 80%);
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}

.defendra-cta-hero .defendra-edge-top {
  top: -2px;
  left: 0;
  width: 30%;
  height: 4px;
  border-radius: 2px;
  animation: defendra-edge-horizontal 5s ease-in-out infinite;
}

.defendra-cta-hero .defendra-edge-right {
  top: 0;
  right: -2px;
  width: 4px;
  height: 30%;
  border-radius: 2px;
  animation: defendra-edge-vertical 5s ease-in-out infinite 1.25s;
}

.defendra-cta-hero .defendra-edge-bottom {
  bottom: -2px;
  right: 0;
  width: 30%;
  height: 4px;
  border-radius: 2px;
  animation: defendra-edge-horizontal-reverse 5s ease-in-out infinite 2.5s;
}

.defendra-cta-hero .defendra-edge-left {
  bottom: 0;
  left: -2px;
  width: 4px;
  height: 30%;
  border-radius: 2px;
  animation: defendra-edge-vertical-reverse 5s ease-in-out infinite 3.75s;
}

.defendra-cta-hero:hover .defendra-edge {
  background: oklch(0.8 0.15 195);
  box-shadow: 0 0 18px oklch(0.8 0.15 195 / 90%);
}

/* =============================================================================
   HEADER CTA BUTTON (Subtle Breathing Only)
   Use class: defendra-cta-header
   ============================================================================= */

.defendra-cta-header {
  position: relative;
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: white;
  background: transparent;
  border: 1.5px solid white;
  border-radius: 11px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: defendra-breathe-subtle 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Text Layer */
.defendra-cta-header > span {
  position: relative;
  z-index: 3;
}

/* Hover State */
.defendra-cta-header:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.25);
}

/* =============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================= */

@media (max-width: 768px) {
  .defendra-cta-hero {
    padding: 0.875rem 2rem;
    font-size: 0.9rem;
  }
  
  .defendra-cta-header {
    padding: 0.5rem 1.25rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .defendra-cta-hero {
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
  }
  
  .defendra-cta-header {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
  }
}

/* =============================================================================
   ACCESSIBILITY
   ============================================================================= */

.defendra-cta-hero:focus-visible,
.defendra-cta-header:focus-visible {
  outline: 2px solid oklch(0.8 0.15 195);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .defendra-cta-hero,
  .defendra-cta-hero::before,
  .defendra-cta-hero .defendra-edge,
  .defendra-cta-header {
    animation: none !important;
  }
  
  .defendra-cta-hero {
    border-color: oklch(0.7 0.15 195);
    box-shadow: 0 0 20px oklch(0.7 0.15 195 / 30%);
  }
  
  .defendra-cta-header {
    border-color: white;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
  }
}
