/* ===== OurVoice 1.0 — Global Styles ===== */

/* CSS Variables (from Figma theme) */
:root {
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-base: 16px;

  /* Brand colors — indigo palette */
  --indigo-50: #eef2ff;
  --indigo-100: #e0e7ff;
  --indigo-200: #c7d2fe;
  --indigo-400: #818cf8;
  --indigo-500: #6366f1;
  --indigo-600: #4f46e5;
  --indigo-700: #4338ca;
  --indigo-900: #312e81;

  /* Neutrals */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --black: #000000;

  /* Semantic */
  --bg-primary: var(--white);
  --bg-secondary: var(--gray-50);
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-500);
  --border-color: var(--gray-200);
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);

  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-full: 9999px;

  --max-width: 80rem; /* 1280px */
  --nav-height: 4rem;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  color: var(--text-primary);
  background: var(--bg-secondary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ===== Navigation ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.nav__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.nav__icon {
  width: 2rem;
  height: 2rem;
  color: var(--indigo-600);
}

.nav__title {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--indigo-900);
  letter-spacing: -0.025em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__link {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--duration-fast), background var(--duration-fast);
}

.nav__link:hover {
  color: var(--indigo-600);
}

.nav__link--cta {
  background: var(--indigo-50);
  color: var(--indigo-700);
  padding: 0.5rem 1rem;
}

.nav__link--cta:hover {
  background: var(--indigo-100);
  color: var(--indigo-700);
}

/* Mobile menu toggle */
.nav__mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
}

.nav__mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: transform var(--duration-normal) var(--ease-out), opacity var(--duration-fast);
}

.nav__mobile-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav__mobile-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav__mobile-toggle {
    display: flex;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--white);
    padding: 1rem;
    box-shadow: var(--shadow-md);
    gap: 0.5rem;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__link {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
  }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn--primary {
  background: var(--indigo-600);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--indigo-700);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.btn--outline {
  background: var(--white);
  color: var(--indigo-700);
  border: 2px solid var(--border-color);
}

.btn--outline:hover {
  border-color: var(--indigo-500);
  box-shadow: var(--shadow-md);
}

/* ===== Footer ===== */
.footer {
  background: var(--gray-900);
  color: var(--white);
  padding: 2rem 0;
  margin-top: auto;
}

.footer__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.footer__icon {
  color: var(--indigo-400);
}

.footer__title {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}

.footer__links a {
  font-size: 0.875rem;
  color: var(--gray-300);
  transition: color var(--duration-fast);
}

.footer__links a:hover {
  color: var(--white);
}

.footer__copy {
  width: 100%;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .footer__container {
    flex-direction: column;
    text-align: center;
  }
  .footer__links {
    justify-content: center;
  }
}

/* ===== Scroll Animations ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Utility ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}
