@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Happiworkers Brand Colors */
  --primary-purple: #533593;
  --deep-navy: #200e47;
  --mint-accent: #2cd788;
  --mint-lighten: #57e59e;
  --lavender-canvas: #f5f3fc;
  --mint-wash: #f3fcfa;
  
  /* Additional colors for design system */
  --white: #ffffff;
  --text-primary: var(--deep-navy);
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 0.75rem;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--lavender-canvas);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 16px;
  background: var(--primary-purple);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  z-index: 1000;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 16px;
  outline: 2px solid var(--mint-accent);
  outline-offset: 2px;
}

/* Layout utilities */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-spacing {
  padding: 5rem 0;
}

@media (max-width: 768px) {
  .section-spacing {
    padding: 3rem 0;
  }
}

/* Header */
.header {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-purple);
  text-decoration: none;
  transition: color 0.2s ease;
}

.logo:hover {
  color: var(--deep-navy);
}

.nav-links {
  display: none;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--primary-purple);
}

.nav-links a:focus {
  outline: 2px solid var(--mint-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

/* Mobile menu button */
.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.mobile-menu-btn:hover {
  background-color: var(--lavender-canvas);
}

.mobile-menu-btn:focus {
  outline: 2px solid var(--mint-accent);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-primary {
  background-color: var(--mint-accent);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--mint-lighten);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:focus {
  outline: 2px solid var(--mint-accent);
  outline-offset: 2px;
}

/* Hero section */
.hero {
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--deep-navy) 100%);
  color: var(--white);
}

.hero-content {
  text-align: center;
  max-width: 4xl;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero .subheading {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
  font-weight: 500;
}

.hero .description {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  opacity: 0.8;
}

/* Why section */
.why-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}

.why-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.why-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.why-card p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* About section */
.about {
  background: var(--white);
}

.about-content {
  display: flex;
  gap: 3rem;
  align-items: center;
  flex-direction: column;
}

@media (min-width: 768px) {
  .about-content {
    flex-direction: row;
  }
}

.about-image {
  flex: 0 0 300px;
}

.about-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.about-text {
  flex: 1;
}

.about h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.about p {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* Testimonials */
.testimonials {
  background: var(--white);
}

.testimonials h2 {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--text-primary);
}

.testimonials-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.testimonial-card {
  background: var(--mint-wash);
  padding: 1.5rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--mint-accent);
  box-shadow: var(--shadow-sm);
}

.testimonial-quote {
  font-style: italic;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.testimonial-author-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-image {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--mint-accent);
  flex-shrink: 0;
}

.testimonial-details {
  flex: 1;
}

.testimonial-author {
  font-weight: 600;
  color: var(--text-primary);
}

.testimonial-role {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* CTA section */
.cta {
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--deep-navy) 100%);
  color: var(--white);
  text-align: center;
}

.cta h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.cta p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Footer */
.footer {
  background: var(--primary-purple);
  color: var(--white);
}

.footer-content {
  display: grid;
  gap: 3rem;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
}

.footer h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer h4 {
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer p {
  opacity: 0.8;
  line-height: 1.6;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.footer a {
  color: var(--white);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.footer a:hover,
.footer a:focus {
  opacity: 1;
}

.footer a:focus {
  outline: 2px solid var(--mint-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  font-size: 1.25rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 2rem;
  text-align: center;
  opacity: 0.6;
}

/* Legal pages */
.legal-content {
  background: var(--white);
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.legal-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.legal-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
}

.legal-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* 404 page */
.error-page {
  text-align: center;
  padding: 5rem 0;
}

.error-page h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.error-page p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
}

/* Watch anchor */
#watch {
  height: 5rem;
  width: 100%;
}

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

/* Focus styles for accessibility */
.user-is-tabbing *:focus {
  outline: 2px solid var(--mint-accent);
  outline-offset: 2px;
}

/* Responsive utilities */
@media (max-width: 640px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
}

/* As Seen On sliding banner animation */
@keyframes slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.logo-track {
  animation-play-state: running;
}

.logo-slider:hover .logo-track {
  animation-play-state: paused !important;
}
