/* Excalibur - Syllabus Archival & AACSB Platform */
/* Professional Dark Theme with Brand Yellow Accent */

:root {
  /* Brand Colors - Matching Logo Gold */
  --primary: #F0E68C;
  --primary-dark: #DAA520;
  --accent-gold: #C6A24D;
  --success: #6ED8A3;
  --warning: #F1B24A;
  --danger: #FF6B6B;
  
  /* Dark Theme Colors */
  --bg-primary: #0F0F11;
  --bg-secondary: #161616;
  --bg-tertiary: #1C1C1C;
  --border-color: #2A2A2A;
  --text-primary: #ECE9E1;
  --text-secondary: #BDB8AA;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(240, 230, 140, 0.2);
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Border Radius */
  --radius: 16px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* Light Theme */
[data-theme="light"] {
  --primary: #C6A24D;
  --accent-gold: #A88936;
  --success: #2D9F6B;
  --warning: #D89B2A;
  --danger: #DC3545;
  
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8F9FA;
  --bg-tertiary: #E9ECEF;
  --border-color: #DEE2E6;
  --text-primary: #212529;
  --text-secondary: #6C757D;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --shadow-glow: 0 0 20px rgba(198, 162, 77, 0.2);
}

/* Light mode text outline for better readability */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6,
[data-theme="light"] p,
[data-theme="light"] li,
[data-theme="light"] a,
[data-theme="light"] span {
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* macOS Safari specific fixes */
@supports (-webkit-backdrop-filter: blur(1px)) {
  /* Improve rendering on macOS Safari */
  button,
  input,
  select,
  textarea {
    -webkit-appearance: none;
    appearance: none;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  color: var(--primary);
  position: relative;
  cursor: default;
}


h1 {
  font-size: 2.75rem;
  letter-spacing: -0.03em;
  position: relative;
  display: inline-block;
}

h1::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--primary);
  animation: underlineGrow 0.6s ease forwards;
}

@keyframes underlineGrow {
  from { width: 0; }
  to { width: 60px; }
}

h2 {
  font-size: 2rem;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-gold);
}

/* Focus Styles for Accessibility */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Layout Components */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xl) 0;
}

.card {
  background: var(--bg-secondary);
  padding: var(--spacing-lg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
  overflow: visible;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--primary);
  z-index: 10;
}

/* Header */
.header {
  background: rgba(15, 15, 17, 0.95);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  transition: background-color var(--transition-normal);
}

/* Logo Sizing */
.logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) 0;
}

.logo {
  height: 40px;
  width: auto;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-lg);
  align-items: center;
}

.nav-link {
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast);
}

.nav-link:hover {
  background-color: var(--bg-secondary);
}

.nav-link.active {
  background-color: var(--primary);
  color: var(--bg-primary);
  font-weight: 600;
}

/* Trust Strip */
.trust-strip {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: var(--spacing-sm) 0;
  text-align: center;
}

.trust-strip-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trust-item::before {
  content: '✓';
  color: var(--success);
  font-weight: bold;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.breadcrumbs-separator {
  color: var(--border-color);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  padding: var(--spacing-2xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(240, 230, 140, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: var(--spacing-md);
  color: var(--primary);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: var(--spacing-lg);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
  color: var(--text-primary);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  font-size: 1rem;
  text-decoration: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.btn-primary {
  background: var(--primary);
  color: var(--bg-primary);
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  background: var(--accent-gold);
  color: var(--bg-primary);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--bg-primary);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Features Section */
.feature-card {
  text-align: center;
  padding: var(--spacing-lg);
}

.feature-icon {
  width: 60px;
  height: 60px;
  min-width: 60px;
  min-height: 60px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-md);
  font-size: 1.5rem;
  color: var(--primary);
  transition: all var(--transition-normal);
  flex-shrink: 0;
}

.feature-icon:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

/* Status Chips */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid;
}

.status-chip.verified {
  background: rgba(110, 216, 163, 0.1);
  border-color: var(--success);
  color: var(--success);
}

.status-chip.needs-fixes {
  background: rgba(241, 178, 74, 0.1);
  border-color: var(--warning);
  color: var(--warning);
}

.status-chip.missing {
  background: rgba(255, 107, 107, 0.1);
  border-color: var(--danger);
  color: var(--danger);
}

.status-chip::before {
  content: '●';
  font-size: 0.75rem;
}

/* Forms */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  color: var(--text-primary);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--spacing-sm);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-xl) 0 var(--spacing-lg);
  margin-top: var(--spacing-2xl);
}

.footer-content {
  text-align: center;
}

.footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-reveal {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

.scroll-reveal.revealed {
  opacity: 1;
}

/* ARIA Status Containers */
[role="status"] {
  padding: var(--spacing-md);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

[role="status"][aria-live="polite"] {
  transition: all var(--transition-normal);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 999;
  font-size: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent-gold);
  transform: translateY(-3px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  color: var(--text-primary);
  font-size: 1.25rem;
}

.theme-toggle:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg-primary);
  transform: rotate(180deg);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.theme-icon {
  display: inline-block;
  transition: transform var(--transition-normal);
}

/* Responsive Design */

/* Large laptop - ensure 3 columns for grid-3 */
@media (min-width: 1025px) and (max-width: 1439px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet and below */
@media (max-width: 1024px) {
  .container {
    max-width: 100%;
    padding: 0 var(--spacing-md);
  }
  
  .hero h1 {
    font-size: 2.75rem;
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet portrait and below */
@media (max-width: 768px) {
  .nav {
    flex-direction: row;
    justify-content: space-between;
  }
  
  .logo {
    height: 32px;
    max-width: 140px;
    object-fit: contain;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: var(--spacing-md);
    gap: var(--spacing-sm);
    display: none;
    z-index: 100;
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .theme-toggle {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
  
  .hero h1 {
    font-size: 2.25rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  .container {
    padding: 0 var(--spacing-md);
  }
  
  .section {
    padding: var(--spacing-lg) 0;
  }
  
  .hero {
    padding: var(--spacing-lg) 0;
    min-height: auto;
  }
  
  .my-8 {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .card {
    padding: var(--spacing-md);
  }
  
  /* Fix feature icon alignment on mobile */
  .feature-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    font-size: 1.25rem;
  }
  
  /* Remove workflow arrows on mobile - they look bad */
  .workflow-step {
    position: relative;
    margin-bottom: 1rem;
  }
  
  .workflow-step:not(:last-child)::after {
    display: none;
  }
  
  .workflow-step:last-child {
    margin-bottom: 0;
  }
  
  /* Improve flex layouts on mobile */
  .flex {
    flex-wrap: wrap;
  }
  
  /* Better button sizing */
  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
  }
  
  /* Trust strip wrapping */
  .trust-strip-content {
    gap: var(--spacing-sm);
    font-size: 0.8125rem;
  }
}

/* Mobile phones */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.875rem;
    line-height: 1.2;
  }
  
  .hero p {
    font-size: 0.9375rem;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.125rem;
  }
  
  .section {
    padding: var(--spacing-lg) 0;
  }
  
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  .card {
    padding: var(--spacing-sm);
  }
  
  .btn {
    width: 100%;
    text-align: center;
  }
  
  .feature-icon {
    width: 45px;
    height: 45px;
    min-width: 45px;
    min-height: 45px;
    font-size: 1.125rem;
  }
  
  /* Stack flex items on very small screens */
  .flex.gap-4 {
    gap: var(--spacing-sm);
  }
  
  /* Smaller spacing for mobile */
  .space-y-4 > * + * {
    margin-top: var(--spacing-sm) !important;
  }
  
  /* Trust strip single column on very small screens */
  .trust-strip-content {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .trust-item {
    width: 100%;
    text-align: center;
  }
}

/* Large desktops */
@media (min-width: 1440px) {
  .container {
    max-width: 1280px;
  }
  
  .hero h1 {
    font-size: 4rem;
  }
  
  .hero p {
    font-size: 1.375rem;
  }
  
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
.btn:focus-visible,
.nav-link:focus-visible,
.dropdown-toggle:focus-visible,
.dropdown-item:focus-visible,
.form-input:focus-visible,
.form-textarea:focus-visible,
.theme-toggle:focus-visible,
.mobile-menu-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 4px rgba(240, 230, 140, 0.2);
}

/* Remove default focus outline */
.btn:focus,
.nav-link:focus,
.dropdown-toggle:focus,
.dropdown-item:focus {
  outline: none;
}

/* One-time gold sweep */
.sheen{position:relative;display:inline-block;overflow:hidden}
.sheen::after{content:"";position:absolute;inset:0;
  background:linear-gradient(120deg,transparent 45%,var(--primary,#F0E68C) 50%,transparent 55%);
  transform:translateX(-130%);mix-blend-mode:screen;opacity:.7}
.prefers-motion .sheen.mount::after{animation:logo-sheen 1.1s ease-out .15s 1 both}
@keyframes logo-sheen{to{transform:translateX(130%)}}
.sheen img,.sheen picture{display:block}

/* Optional: run the same sweep on the hero H1 text once */
.hero-title.sweep{
  background:linear-gradient(90deg,var(--primary) 20%,#fff 50%,var(--primary) 80%);
  background-size: 200% 100%;
  -webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;
  animation: sweep-text 1.2s ease-out .2s 1 forwards;
}

@keyframes sweep-text {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 0% 0;
  }
}

/* After animation completes, show normal text */
.hero-title.sweep.mount {
  animation: sweep-text 1.2s ease-out .2s 1 forwards, reveal-text 0.1s ease-out 1.4s 1 forwards;
}

@keyframes reveal-text {
  to {
    -webkit-text-fill-color: var(--primary);
    background: none;
  }
}

/* Light mode adjustments */
[data-theme="light"] .hero::before {
  background: radial-gradient(circle at 50% 50%, rgba(198, 162, 77, 0.12) 0%, transparent 70%);
}

[data-theme="light"] .header {
  background: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .card:hover {
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(198, 162, 77, 0.3);
}

[data-theme="light"] .trust-item::before {
  color: var(--success);
}

[data-theme="light"] .feature-icon:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}


/* Additional responsive utilities */
@media (max-width: 768px) {
  /* Ensure text doesn't overflow */
  h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Better spacing for lists */
  ul, ol {
    padding-left: 1.25rem;
  }
  
  /* Improve readability */
  p {
    font-size: 0.9375rem;
    line-height: 1.6;
  }
  
  /* Footer adjustments */
  .footer {
    padding: var(--spacing-lg) 0;
  }
  
  .footer .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }
}

@media (max-width: 480px) {
  .footer .grid-4 {
    grid-template-columns: 1fr;
  }
  
  /* Back to top button positioning */
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
    font-size: 1.25rem;
  }
}

/* Enhanced Animations & Micro-interactions */

/* Fade-up animation for scroll reveals */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation: fadeUp 0.6s ease-out forwards;
}

/* Pulse animation for CTAs */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.btn-primary:hover {
  animation: pulse 0.6s ease-in-out;
}

/* Upload animation */
@keyframes upload {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(-10px);
    opacity: 0.5;
  }
  100% {
    transform: translateY(-20px);
    opacity: 0;
  }
}

.upload-icon:hover {
  animation: upload 1s ease-in-out infinite;
}

/* Encryption lock animation */
@keyframes lockPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(240, 230, 140, 0.4);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(240, 230, 140, 0);
  }
}

.encryption-icon:hover {
  animation: lockPulse 1.5s ease-in-out infinite;
}

/* Hero background flow animation */
@keyframes flowAnimation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.hero-flow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(240, 230, 140, 0.03) 25%,
    transparent 50%,
    rgba(240, 230, 140, 0.03) 75%,
    transparent 100%
  );
  background-size: 200% 200%;
  animation: flowAnimation 15s ease infinite;
  pointer-events: none;
  opacity: 0.6;
}

/* Workflow visualization */
.workflow-step {
  position: relative;
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-xl);
  transition: all var(--transition-normal);
}

.workflow-step:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.workflow-step::after {
  content: '→';
  position: absolute;
  right: -2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: var(--primary);
  opacity: 0.5;
}

.workflow-step:last-child::after {
  display: none;
}

/* Dropdown menu styles */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  background: transparent;
  border: none;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  font-family: var(--font-primary);
}

.dropdown-toggle:hover {
  background: var(--bg-secondary);
  color: var(--primary);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity var(--transition-normal), visibility var(--transition-normal), transform var(--transition-normal);
  margin-top: 0.5rem;
  z-index: 1000;
  overflow: hidden;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu.active {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  border-bottom: 1px solid var(--border-color);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: var(--bg-tertiary);
  color: var(--primary);
  padding-left: 1.25rem;
  transition: all var(--transition-fast);
  transform: translateX(4px);
}

/* Enhanced footer */
.footer-tagline {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 1rem;
  letter-spacing: 0.02em;
}

.footer-miami {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Stagger animation for lists */
.stagger-item {
  opacity: 0;
  animation: fadeUp 0.5s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }

/* Loading state */
.loading-pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Smooth transitions for theme switching */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Prevent transition on page load */
.preload * {
  transition: none !important;
}

/* Mobile dropdown adjustments */
@media (max-width: 768px) {
  .dropdown-menu {
    position: static;
    margin-top: 0.5rem;
    transform: none;
  }
  
  .dropdown:hover .dropdown-menu {
    transform: none;
  }
  
  .workflow-step {
    padding: 1rem;
  }
  
  .workflow-step::after {
    content: '↓';
    right: 50%;
    top: auto;
    bottom: -1.5rem;
    transform: translateX(50%);
  }
  
  .hero-flow {
    animation-duration: 20s;
  }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
  .hero-flow,
  .workflow-step,
  .stagger-item {
    animation: none !important;
  }
  
  .card:hover {
    transform: none;
  }
}

/* Custom scrollbar for macOS/WebKit browsers */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
  border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ===== ENHANCED ANIMATIONS & LIFE ===== */

/* Floating animation for cards */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Pulse animation for important elements */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Glow animation */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(240, 230, 140, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(240, 230, 140, 0.6);
  }
}

/* Shimmer effect for trust strip */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Floating animation removed - too distracting */

/* Enhanced hover effects for cards */
.card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(240, 230, 140, 0.1), transparent);
  transition: left 0.5s;
}

.card:hover::before {
  left: 100%;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border-color: var(--primary);
}

/* Static gradient background for hero - no auto-animation */
.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(240, 230, 140, 0.05) 0%, transparent 70%);
  pointer-events: none;
  transition: transform 0.3s ease;
}

/* Only rotate on hero hover */
.hero:hover::before {
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Trust strip shimmer effect - only on hover */
.trust-strip {
  position: relative;
  overflow: hidden;
}

.trust-strip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(240, 230, 140, 0.1) 50%, transparent 100%);
  background-size: 1000px 100%;
  pointer-events: none;
}

.trust-strip:hover::before {
  animation: shimmer 2s infinite;
}

/* Pulsing effect for primary buttons */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::after {
  width: 300px;
  height: 300px;
}

/* Workflow arrows - desktop only, positioned correctly */
@media (min-width: 769px) {
  .workflow-step {
    position: relative;
  }
  
  .workflow-step:not(:last-child)::after {
    content: '→';
    position: absolute;
    right: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0.6;
    transition: all 0.3s ease;
    pointer-events: none;
  }
  
  .workflow-step:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(3px);
  }
}

/* Glowing effect for active nav links - only on hover */
.nav-link.active:hover {
  animation: glow 2s ease-in-out infinite;
}

/* Feature icons - simple scale on hover, no rotation */
.feature-icon {
  transition: transform 0.3s ease;
}

.card:hover .feature-icon {
  transform: scale(1.1);
}

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

/* Simple scale on hover - no pulsing */
.kpi-item {
  transition: transform 0.3s ease;
}

.kpi-item:hover {
  transform: scale(1.05);
}

/* Enhanced dropdown animation */
.dropdown-menu {
  animation: slideDown 0.3s ease-out;
  transform-origin: top;
}

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

/* Typing cursor effect for headings (subtle) */
.hero-title {
  position: relative;
  display: inline-block;
}

/* Add subtle parallax to hero background */
@media (min-width: 1024px) {
  .hero-flow {
    transition: transform 0.1s ease-out;
  }
}

/* Smooth transitions for theme toggle */
.theme-toggle {
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: rotate(180deg) scale(1.1);
  background: var(--bg-tertiary);
}

/* Loading state for images */
img {
  transition: opacity 0.3s ease;
}

img:not([src]) {
  opacity: 0;
}

/* Add ripple effect to buttons */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.btn:active::before {
  width: 200px;
  height: 200px;
}

/* Disable animations on mobile for performance */
@media (max-width: 768px) {
  .card {
    animation: none;
  }
  
  .hero::before {
    animation: none;
  }
  
  .trust-strip::before {
    animation-duration: 5s;
  }
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) var(--bg-secondary);
}

/* macOS-specific smooth scrolling enhancement */
@media screen and (-webkit-min-device-pixel-ratio: 2) {
  html {
    scroll-behavior: smooth;
  }
  
  /* Optimize animations for Retina displays */
  .card,
  .btn,
  .nav-link {
    will-change: transform;
  }
}