/* ==========================================================================
   BUTTONS & INTERACTIVE ACTION SYSTEM (buttons.css)
   Centralized button design system for thomascherickal.github.io
   WCAG AAA compliant high-contrast gradients, specular glow, and sheen sweep.
   ========================================================================== */

/* Design System Variables Fallback */
:root {
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  --cyan: #38bdf8;
  --cyan-dim: #0284c7;
  --gold: #fbbf24;
  --gold-dim: #d97706;
  --violet: #a5b4fc;
  --green: #34d399;
  --border: rgba(56, 189, 248, 0.18);
  --border-gold: rgba(251, 191, 36, 0.25);
}

/* Base Universal Button Styling */
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.btn,
a.btn,
a.tier-btn {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-clip: padding-box;
  box-sizing: border-box;
  margin: 0;
  padding: 0.75rem 1.75rem;
  min-height: 44px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.28s ease,
              background 0.28s ease,
              border-color 0.28s ease,
              color 0.28s ease,
              filter 0.28s ease;
  will-change: transform, box-shadow;
}

/* Universal Button Animation System: Hover Lift, Glow Bloom & Specular Sheen */
@keyframes btnSheenSweep {
  0% {
    left: -140%;
  }
  100% {
    left: 140%;
  }
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
.btn:hover,
a.btn:hover,
a.tier-btn:hover {
  transform: translateY(-2.5px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 16px rgba(56, 189, 248, 0.35);
}

button::after,
input[type="button"]::after,
input[type="submit"]::after,
input[type="reset"]::after,
.btn::after,
a.btn::after,
a.tier-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -140%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: skewX(-22deg);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

button:hover::after,
input[type="button"]:hover::after,
input[type="submit"]:hover::after,
input[type="reset"]:hover::after,
.btn:hover::after,
a.btn:hover::after,
a.tier-btn:hover::after {
  animation: btnSheenSweep 1.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Universal Focus State for Accessibility */
button:focus-visible,
input[type="button"]:focus-visible,
input[type="submit"]:focus-visible,
input[type="reset"]:focus-visible,
.btn:focus-visible,
a.btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

/* Active State */
button:active,
input[type="button"]:active,
input[type="submit"]:active,
input[type="reset"]:active,
.btn:active,
a.btn:active,
.case-study-cta-left:active {
  transform: translateY(1px) scale(0.98) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

/* Disabled State Across All Browsers */
button:disabled,
input:disabled,
.btn.disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  transform: none;
}

/* Size & Placement Modifiers */
.btn-lg {
  font-size: 0.88rem;
  padding: 0.9rem 2.2rem;
  min-height: 48px;
}

.btn-sm {
  font-size: 0.72rem;
  padding: 0.45rem 1rem;
  min-height: 36px;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ==========================================================================
   BUTTON VARIANTS
   ========================================================================== */

/* btn-primary: Professional Slate-Blue / Cyan Button */
.btn-primary {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-weight: 600;
  border: 4px solid #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.7), 0 0 8px #38bdf8, 0 4px 14px rgba(2, 132, 199, 0.4);
  text-shadow: none;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #0369a1 0%, #075985 100%);
  color: #ffffff;
  border-color: #7dd3fc;
  box-shadow: 0 0 30px rgba(125, 211, 252, 0.95), 0 0 12px #38bdf8, 0 6px 20px rgba(2, 132, 199, 0.5);
  transform: translateY(-2px);
}

/* btn-glow-cyan: Solid Electric Cyan Glowing Button */
.btn-glow-cyan {
  background: #0284c7 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  border: 4px solid #00f0ff !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 0 28px rgba(0, 240, 255, 0.8), 0 0 10px #00f0ff, 0 4px 15px rgba(2, 132, 199, 0.6) !important;
  text-shadow: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box !important;
  max-width: 100% !important;
}

.btn-glow-cyan:hover {
  background: #0369a1 !important;
  color: #ffffff !important;
  border-color: #7dd3fc !important;
  box-shadow: 0 0 38px rgba(0, 240, 255, 1), 0 0 16px #00f0ff, 0 6px 22px rgba(2, 132, 199, 0.7) !important;
  transform: translateY(-2px);
}

/* btn-outline: Sleek Semi-Transparent Corporate Button */
.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: #f8fafc;
  border: 4px solid #38bdf8;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.65), 0 0 8px rgba(56, 189, 248, 0.8), inset 0 0 10px rgba(56, 189, 248, 0.2);
  text-shadow: none;
}

.btn-outline:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: #fbbf24;
  color: #ffffff;
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.95), 0 0 12px #fbbf24;
  transform: translateY(-2px);
}

/* btn-gold / btn-glow-gold: High-Contrast Solid Radiant Gold Button */
.btn-gold,
.btn-glow-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%) !important;
  color: #060912 !important;
  font-weight: 800 !important;
  border: 3px solid #fef08a !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 0 32px rgba(251, 191, 36, 0.9), 0 0 14px #fbbf24, 0 4px 16px rgba(0, 0, 0, 0.7) !important;
  text-shadow: none !important;
  letter-spacing: 0.02em !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box !important;
  max-width: 100% !important;
}

.btn-gold:hover,
.btn-glow-gold:hover {
  background: linear-gradient(135deg, #fef08a 0%, #fbbf24 50%, #f59e0b 100%) !important;
  color: #000000 !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 44px rgba(251, 191, 36, 1), 0 0 20px #fbbf24, 0 6px 24px rgba(0, 0, 0, 0.8) !important;
  transform: translateY(-2px) !important;
}

/* btn-commission: High-Contrast Dark Slate & Vivid Gold Button */
.btn-commission {
  background: linear-gradient(180deg, #131d2e 0%, #0b121e 100%) !important;
  color: #fbbf24 !important;
  font-weight: 800 !important;
  border: 3px solid #fbbf24 !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.4), 0 4px 14px rgba(0, 0, 0, 0.6) !important;
  text-shadow: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box !important;
  max-width: 100% !important;
}

.btn-commission:hover {
  background: linear-gradient(180deg, #1e2d47 0%, #131d2e 100%) !important;
  color: #fef08a !important;
  border-color: #fef08a !important;
  box-shadow: 0 0 32px rgba(251, 191, 36, 0.85), 0 6px 20px rgba(0, 0, 0, 0.7) !important;
  transform: translateY(-2px) !important;
}

/* btn-linkedin / btn-glow-linkedin: High-Contrast Corporate Blue Button */
.btn-linkedin,
.btn-glow-linkedin {
  background: linear-gradient(180deg, #0a2540 0%, #001e3d 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: 3px solid #38bdf8 !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.55), 0 4px 14px rgba(0, 0, 0, 0.6) !important;
  text-shadow: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box !important;
  max-width: 100% !important;
}

.btn-linkedin:hover,
.btn-glow-linkedin:hover {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.95), 0 6px 20px rgba(0, 0, 0, 0.7) !important;
  transform: translateY(-2px) !important;
}

/* btn-newsletter: Executive Indigo Button */
.btn-newsletter {
  background: linear-gradient(180deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff;
  border: 4px solid #818cf8;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(129, 140, 248, 0.7), 0 0 8px #818cf8, 0 4px 14px rgba(79, 70, 229, 0.4);
  text-shadow: none;
}

.btn-newsletter:hover {
  background: linear-gradient(180deg, #4338ca 0%, #3730a3 100%);
  color: #ffffff;
  border-color: #c7d2fe;
  box-shadow: 0 0 32px rgba(199, 210, 254, 0.95), 0 0 14px #818cf8, 0 6px 20px rgba(79, 70, 229, 0.5);
  transform: translateY(-2px);
}

/* btn-glow-emerald: Solid Vivid Emerald Glowing Button */
.btn-glow-emerald {
  background: #059669 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  border: 4px solid #34d399 !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 0 28px rgba(52, 211, 153, 0.85), 0 0 10px #34d399, 0 4px 15px rgba(5, 150, 105, 0.6) !important;
  text-shadow: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box !important;
  max-width: 100% !important;
}

.btn-glow-emerald:hover {
  background: #047857 !important;
  color: #ffffff !important;
  border-color: #6ee7b7 !important;
  box-shadow: 0 0 38px rgba(52, 211, 153, 1), 0 0 16px #34d399, 0 6px 22px rgba(5, 150, 105, 0.7) !important;
  transform: translateY(-2px);
}

/* btn-glow-violet: Solid Royal Purple Glowing Button */
.btn-glow-violet {
  background: #7e22ce !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  border: 4px solid #c084fc !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 0 28px rgba(192, 132, 252, 0.85), 0 0 10px #c084fc, 0 4px 15px rgba(126, 34, 206, 0.6) !important;
  text-shadow: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box !important;
  max-width: 100% !important;
}

.btn-glow-violet:hover {
  background: #6b21a8 !important;
  color: #ffffff !important;
  border-color: #e9d5ff !important;
  box-shadow: 0 0 38px rgba(192, 132, 252, 1), 0 0 16px #c084fc, 0 6px 22px rgba(126, 34, 206, 0.7) !important;
  transform: translateY(-2px);
}

/* gold-highlight-container: Gold Radiant Highlight Wrapper for Personal AI Actions */
.gold-highlight-container {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 1.25rem 2rem;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 50%, rgba(251, 191, 36, 0.15) 0%, rgba(251, 191, 36, 0.04) 100%);
  border: 2px solid rgba(251, 191, 36, 0.6);
  box-shadow: 0 0 35px rgba(251, 191, 36, 0.28), inset 0 0 20px rgba(251, 191, 36, 0.08);
  max-width: 100%;
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gold-highlight-container:hover {
  border-color: rgba(251, 191, 36, 0.95);
  box-shadow: 0 0 48px rgba(251, 191, 36, 0.45), inset 0 0 28px rgba(251, 191, 36, 0.15);
}

/* Calculator Tier Selector Buttons */
.calc-tier-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.7rem 0.5rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.calc-tier-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: translateY(-1px);
}

.calc-tier-btn.active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18) 0%, rgba(217, 119, 6, 0.22) 100%);
  border-color: #fbbf24;
  color: #fbbf24;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.35);
  font-weight: 800;
}

.calc-tier-btn .tier-tag {
  font-size: 0.68rem;
  opacity: 0.85;
  font-weight: 600;
}

/* Specialized Card and Utility Buttons */
.role-card > .btn,
.role-card > a.btn {
  margin-top: auto;
}

.newsletter-card .btn,
.newsletter-card a.btn {
  width: auto;
  max-width: max-content;
  flex: 0 0 auto;
  white-space: nowrap;
}

.copy-link-btn {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--cyan);
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.copy-link-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: var(--cyan);
  color: #ffffff;
}

.search-clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem;
  font-size: 0.9rem;
  transition: var(--transition);
}

.search-clear-btn:hover {
  color: #ffffff;
}

/* ==========================================================================
   RESPONSIVE LAYOUT MODIFIERS
   ========================================================================== */

@media (max-width: 768px) {
  .hero-ctas .btn,
  .hero-ctas a.btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  .btn,
  a.btn,
  a.tier-btn {
    padding: 0.7rem 1.25rem;
    font-size: 0.74rem;
    white-space: normal;
    word-break: break-word;
  }

  .btn-lg {
    padding: 0.8rem 1.5rem;
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  .btn,
  a.btn,
  a.tier-btn {
    transition: none !important;
    animation: none !important;
  }

  button::after,
  input[type="button"]::after,
  input[type="submit"]::after,
  input[type="reset"]::after,
  .btn::after,
  a.btn::after,
  a.tier-btn::after {
    display: none !important;
  }
}

/* btn-topmate: Dedicated Topmate 1-on-1 Consultation */
.btn-topmate {
  background: rgba(228, 67, 50, 0.15) !important;
  border: 1.5px solid #e44332 !important;
  color: #ffffff !important;
  font-weight: 700;
  transition: all 0.28s ease;
}

.btn-topmate:hover {
  background: #e44332 !important;
  border-color: #ff6b5b !important;
  box-shadow: 0 0 24px rgba(228, 67, 50, 0.7), 0 6px 18px rgba(0, 0, 0, 0.5) !important;
  transform: translateY(-2.5px) scale(1.02);
}

/* btn-pricing-cta: Dedicated Transparent Rates Navigation */
.btn-pricing-cta {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1.5px solid var(--border-gold, rgba(251, 191, 36, 0.35)) !important;
  color: var(--text-primary, #ffffff) !important;
  font-weight: 700;
  transition: all 0.28s ease;
}

.btn-pricing-cta:hover {
  background: rgba(251, 191, 36, 0.16) !important;
  border-color: var(--gold, #fbbf24) !important;
  color: #ffffff !important;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.7), 0 6px 18px rgba(0, 0, 0, 0.5) !important;
  transform: translateY(-2.5px) scale(1.02);
}
