/* FILE: /frontend/static/css/homepage-redesign.css */
/* ClinicalMatch.ai Homepage Redesign - v1.0 */

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
  --font-display: 'Anton', sans-serif;
  --font-body: 'Poppins', sans-serif;
  --color-primary: #0066FF;
  --color-primary-dark: #0052CC;
  --color-primary-light: #E6F0FF;
  --color-accent: #00D4FF;
  --color-text: #1a1a2e;
  --color-text-muted: #64748b;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 40px rgba(0,102,255,0.1);
  --shadow-lg: 0 20px 60px rgba(0,102,255,0.15);
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ========================================
   BASE TYPOGRAPHY
   ======================================== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  padding-top: 80px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.2;
}

/* Display Headlines (Hero) */
.hero-headline,
h1.display,
.display-heading {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero-headline .highlight {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   STICKY GLASS HEADER
   ======================================== */
header,
nav,
.navbar,
#header-main {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}

header.scrolled,
nav.scrolled,
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
}

/* ========================================
   NAVIGATION LINKS
   ======================================== */
nav a,
.nav-link {
  position: relative;
  font-weight: 500;
  color: var(--color-text);
  transition: color 0.3s ease;
  padding-bottom: 4px;
}

nav a::after,
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

nav a:hover,
.nav-link:hover {
  color: var(--color-primary);
}

nav a:hover::after,
.nav-link:hover::after {
  width: 100%;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn,
button,
.cta-button,
[class*="btn-"] {
  font-family: var(--font-body);
  font-weight: 600;
  position: relative;
  overflow: hidden;
  transition: var(--transition-base);
  transform: translateY(0);
  border-radius: 8px;
}

.btn:hover,
button:hover,
.cta-button:hover,
[class*="btn-"]:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active,
button:active {
  transform: translateY(0);
}

/* Primary Button Shine Effect */
.btn-primary,
.cta-button {
  background: var(--color-primary);
  color: white;
}

.btn-primary::before,
.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before,
.cta-button:hover::before {
  left: 100%;
}

.btn-primary:hover,
.cta-button:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 10px 40px rgba(0, 102, 255, 0.3);
}

/* ========================================
   SECTION HEADINGS
   ======================================== */
h2,
h3,
.section-title {
  transition: var(--transition-base);
}

h2:hover,
h3:hover,
.section-title:hover {
  color: var(--color-primary);
  transform: translateX(4px);
}

/* ========================================
   CARDS
   ======================================== */
.card,
.feature-card,
.trust-card,
.testimonial-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid transparent;
  transition: var(--transition-base);
}

.card:hover,
.feature-card:hover,
.trust-card:hover,
.testimonial-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 102, 255, 0.1);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section,
#home-hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section::before,
#home-hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(0, 102, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.hero-image {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* ========================================
   STATS SECTION
   ======================================== */
.stats-section,
#home-stats-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  padding: 3rem 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  display: block;
}

.stat-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
}

/* ========================================
   LOADING STATES
   ======================================== */
.btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn.loading::after {
  content: '';
  position: absolute;
  right: 1rem;
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }

  .hero-headline,
  h1.display {
    font-size: 32px;
  }

  .stat-number {
    font-size: 2.5rem;
  }
}

/* ========================================
   SCROLL FADE-IN ANIMATIONS
   ======================================== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}
