/* Handycode - Brand System Styles */

:root {
  /* Brand Colors */
  --handy-teal: #0a7ea4;
  --bright-blue: #4cc9f0;
  --ios-blue: #007AFF;
  --pure-white: #FFFFFF;
  --true-black: #000000;
  --charcoal: #11181C;
  --off-white: #ECEDEE;
  --icon-gray-light: #687076;
  --icon-gray-dark: #9BA1A6;
  --border-light: #EEEEEE;
  --border-dark: #333333;

  /* Legacy mappings for compatibility */
  --primary: var(--handy-teal);
  --primary-dark: #085f7a;
  --text-dark: var(--charcoal);
  --text-muted: var(--icon-gray-light);
  --bg-light: #f8fafc;

  /* Brand System Spacing */
  --spacing-xs: 8px;
  --spacing-s: 12px;
  --spacing-m: 16px;
  --spacing-l: 20px;
  --spacing-xl: 30px;

  /* Brand System Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-circle: 30px;

  /* Legacy radius mappings */
  --border-radius: var(--radius-sm);
  --border-radius-lg: var(--radius-md);

  --box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  --box-shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  color: var(--text-dark);
  scroll-behavior: smooth;
  font-size: 16px;
  font-weight: 400;
}

/* Typography - Brand System Scale */
.display-3 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.display-5 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.lead {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

h1, .h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

h2, .h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

h5, .h5 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

/* Header */
.navbar {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95) !important;
  transition: all 0.3s ease;
}

.navbar-brand {
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}

.nav-link {
  font-weight: 500 !important;
  color: var(--text-dark) !important;
  transition: color 0.3s ease;
  position: relative;
  padding: 0.75rem 1rem !important;
}

.nav-link:hover {
  color: var(--primary) !important;
}

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

.nav-link:hover::after {
  width: calc(100% - 2rem);
  left: 1rem;
}

/* Buttons */
.btn {
  font-weight: 600;
  letter-spacing: 0.025em;
  transition: all 0.3s ease;
  border-radius: var(--radius-sm);
  border-width: 2px;
  padding: 10px 20px;
  gap: var(--spacing-xs);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-lg {
  padding: var(--spacing-s) var(--spacing-l);
}

.btn-primary {
  background: var(--handy-teal);
  border: none;
  box-shadow: 0 4px 14px rgba(10, 126, 164, 0.25);
  color: var(--pure-white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(10, 126, 164, 0.35);
  color: var(--pure-white);
}

.btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25);
}

.btn-outline-dark {
  border-color: var(--text-dark);
  color: var(--text-dark);
  background: transparent;
}

.btn-outline-dark:hover {
  background: var(--text-dark);
  border-color: var(--text-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(31, 41, 55, 0.25);
}

/* Hero Section */
.hero-section {
  background: #f8fafc;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

.stats-container {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--box-shadow);
}

.placeholder-image {
  box-shadow: var(--box-shadow-lg);
  animation: float 6s ease-in-out infinite;
}

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

/* Feature Cards */
.feature-card {
  transition: all 0.3s ease;
  border-radius: var(--border-radius-lg);
}

.feature-card:hover {
  transform: translateY(-10px);
}

.feature-icon {
  transition: all 0.3s ease;
  box-shadow: var(--box-shadow);
}

.feature-card:hover .feature-icon {
  transform: scale(1.05);
  box-shadow: var(--box-shadow-lg);
}

/* Cards */
.card {
  border-radius: var(--border-radius-lg);
  border: none;
  transition: all 0.3s ease;
  box-shadow: var(--box-shadow);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-lg);
}

.card.border-primary {
  border: 2px solid var(--primary) !important;
  position: relative;
  overflow: hidden;
}

.card.border-primary::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: calc(var(--border-radius-lg) + 2px);
  z-index: -1;
}

/* Footer */
footer {
  background: #1f2937 !important;
}

footer .footer-text {
  color: #9ca3af !important;
  margin-bottom: 0.5rem;
}

footer .footer-link {
  color: #ffffff !important;
  text-decoration: none !important;
  transition: color 0.3s ease;
  display: inline-block;
  padding: 0.25rem 0;
}

footer .footer-link:hover {
  color: var(--primary) !important;
  text-decoration: none !important;
}

footer p {
  color: #9ca3af !important;
}

footer a {
  color: #ffffff !important;
}

/* Override Bootstrap's text-muted in footer */
footer .text-muted {
  color: #9ca3af !important;
}

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

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    padding-top: 100px !important;
    min-height: auto !important;
  }

  .display-3 {
    font-size: 2.5rem !important;
  }

  .stats-container {
    margin-top: 2rem;
  }

  .btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  section[style*="padding: 100px 0"] {
    padding: 60px 0 !important;
  }
}

@media (max-width: 576px) {
  .display-3 {
    font-size: 2rem !important;
  }

  .lead {
    font-size: 1.1rem;
  }

  .d-flex.gap-3 {
    flex-direction: column;
    align-items: center;
    gap: 1rem !important;
  }

  .btn {
    width: 100%;
    max-width: 280px;
  }
}

/* Smooth Scroll Offset for Fixed Header */
html {
  scroll-padding-top: 80px;
}