/* Core styles - loaded on all pages */

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

:root {
  /* Base colors */
  --white: #ffffff;
  --black: #000000;
  --gray-50: #fbfbfd;
  --gray-100: #f5f5f7;
  --gray-200: #e8e8ed;
  --gray-300: #d2d2d7;
  --gray-400: #a1a1a6;
  --gray-500: #86868b;
  --gray-600: #515154;
  --gray-700: #1d1d1f;

  --blue: #0077ed;
  --blue-hover: #0071e3;
  --blue-light: #f0f7ff;
  --green: #30d158;
  --green-light: #ecfdf3;
  --red: #ff3b30;
  --red-light: #fff5f5;
  --orange: #ff9f0a;
  --orange-light: #fff3e0;
  --purple-light: #f3e8ff;

  /* Semantic colors (light mode defaults) */
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-tertiary: #fbfbfd;
  --bg-card: #ffffff;
  --bg-nav: rgba(255, 255, 255, 0.8);
  --bg-input: #ffffff;
  --text-primary: #1d1d1f;
  --text-secondary: #515154;
  --text-muted: #86868b;
  --text-light: #a1a1a6;
  --border-color: #e8e8ed;
  --border-light: rgba(0, 0, 0, 0.06);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --section-padding: 120px;
  --container-max: 1100px;
  --transition: 300ms cubic-bezier(0.25, 0.1, 0.25, 1);

  /* Luxe shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03), 0 2px 6px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.02), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.03), 0 16px 40px rgba(0, 0, 0, 0.06), 0 32px 80px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 4px 20px rgba(0, 119, 237, 0.25);
}

/* Dark mode */
[data-theme="dark"] {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-tertiary: #1a1a1a;
  --bg-card: #141414;
  --bg-nav: rgba(10, 10, 10, 0.85);
  --bg-input: #1a1a1a;
  --text-primary: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-muted: #86868b;
  --text-light: #515154;
  --border-color: #2a2a2a;
  --border-light: rgba(255, 255, 255, 0.08);

  --gray-50: #1a1a1a;
  --gray-100: #141414;
  --gray-200: #2a2a2a;
  --gray-700: #f5f5f7;

  --blue-light: rgba(0, 119, 237, 0.15);
  --green-light: rgba(48, 209, 88, 0.15);
  --red-light: rgba(255, 59, 48, 0.15);
  --orange-light: rgba(255, 159, 10, 0.15);
  --purple-light: rgba(175, 82, 222, 0.15);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.2), 0 16px 40px rgba(0, 0, 0, 0.3), 0 32px 80px rgba(0, 0, 0, 0.4);
}

html { scroll-behavior: smooth; }

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

/* Navigation */
body > nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: saturate(180%) blur(30px);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

body > nav.scrolled { border-bottom-color: var(--border-light); }

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 18px;
}

.logo svg { width: 24px; height: 24px; fill: var(--blue); }

.nav-links { display: flex; gap: 32px; }

.nav-links a {
  text-decoration: none;
  color: var(--gray-500);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover { color: var(--gray-700); }

.nav-cta { display: flex; align-items: center; gap: 16px; }

.nav-link-login {
  text-decoration: none;
  color: var(--blue);
  font-size: 14px;
  font-weight: 500;
}

.nav-btn-primary {
  padding: 9px 18px;
  background: var(--blue);
  color: var(--white);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 980px;
  transition: var(--transition);
}

.nav-btn-primary:hover {
  background: var(--blue-hover);
  box-shadow: var(--shadow-glow);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger span:nth-child(1) { margin-bottom: 5px; }
.hamburger span:nth-child(3) { margin-top: 5px; }

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-cta-mobile {
  display: none;
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

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

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon,
:root:not([data-theme]) .theme-toggle .icon-moon {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.lang-switcher:hover {
  background: var(--bg-secondary);
}

.lang-switcher .flag-icon {
  width: 22px;
  height: 16px;
  border-radius: 2px;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--blue);
  color: var(--white);
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
  border-radius: 14px;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--blue-hover);
  box-shadow: var(--shadow-glow);
}

.btn-primary i { font-size: 14px; }

.cta-note { font-size: 13px; color: var(--gray-400); }

.hero-trust {
  font-size: 13px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.trust-brand {
  color: var(--gray-600);
  font-weight: 600;
  text-decoration: none;
}

.trust-divider { color: var(--gray-300); }

/* Sections */
.section-container {
  max-width: var(--container-max);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 19px;
  color: var(--gray-500);
  font-weight: 400;
}

.section-tag {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue);
  margin-bottom: 8px;
}

/* Contact CTA */
.contact-cta {
  padding: 60px 24px;
}

.contact-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 40px;
  background: var(--gray-50);
  border-radius: 16px;
}

.contact-text h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.contact-text p {
  font-size: 14px;
  color: var(--gray-500);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--bg-card);
  color: var(--gray-700);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}

.btn-secondary:hover {
  border-color: var(--gray-300);
  background: var(--gray-50);
}

/* Footer */
footer {
  background: var(--bg-secondary);
  padding: 60px 24px 40px;
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 32px;
}

.footer-column h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-column a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 10px;
  transition: var(--transition);
}

.footer-column a:hover {
  color: var(--blue);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
}

.footer-logo svg {
  width: 24px;
  height: 24px;
  fill: var(--blue);
}

.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-brand p a {
  color: var(--blue);
  text-decoration: none;
}

.footer-brand p a:hover {
  text-decoration: underline;
}

.footer-badges {
  display: flex;
  gap: 12px;
  align-items: center;
}

.footer-badges .trust-badge {
  width: 56px;
  height: 63px;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.footer-badges .trust-badge:hover {
  opacity: 1;
}

/* ===== ANIMATIONS ===== */

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

/* Hero content animation */
.hero-content {
  animation: fadeInUp 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.hero-visual {
  animation: fadeInUp 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) 0.2s forwards;
  opacity: 0;
}

/* Page Hero (for subpages) */
.page-hero {
  padding: 160px 24px 80px;
  text-align: center;
}

.page-hero h1 {
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}

.page-hero-subtitle {
  font-size: 20px;
  color: var(--gray-500);
  font-weight: 400;
}

/* Page hero animation */
.page-hero h1,
.page-hero-subtitle {
  animation: fadeInUp 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.page-hero-subtitle {
  animation-delay: 0.1s;
  opacity: 0;
}

/* Link hover underline animation */
.why-link a,
.features-link a,
.footer-column a {
  position: relative;
}

.why-link a::after,
.features-link a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--blue);
  transition: width var(--transition);
}

.why-link a:hover::after,
.features-link a:hover::after {
  width: calc(100% - 20px);
}

.footer-column a {
  transition: var(--transition);
}

.footer-column a:hover {
  color: var(--blue);
}

/* Smooth scroll indicator pulse */
@keyframes subtlePulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Trust brand hover */
.trust-brand {
  transition: var(--transition);
}

.trust-brand:hover {
  color: var(--blue);
}

/* Nav link hover */
.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blue);
  border-radius: 1px;
  transition: width var(--transition);
}

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

/* Active nav link */
.nav-links a.active {
  color: var(--blue);
}

/* ================================ */
/* Skip to content (accessibility)  */
/* ================================ */

.skip-to-content {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 10000;
}

.skip-to-content:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 12px 24px;
  background: var(--blue);
  color: var(--white);
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  z-index: 10000;
}

/* ===== RESPONSIVE ===== */

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

  .nav-links {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
    background: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 24px;
    gap: 0;
    z-index: 999;
  }

  .nav-links.mobile-open {
    display: flex;
  }

  .nav-links a {
    font-size: 24px;
    font-weight: 600;
    padding: 16px 0;
    color: var(--gray-700);
  }

  .nav-links a:hover,
  .nav-links a.active {
    color: var(--blue);
  }

  .nav-cta { display: none; }

  .nav-cta-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--gray-200);
    width: 100%;
  }

  .nav-cta-mobile .nav-link-login {
    font-size: 18px;
    font-weight: 500;
  }

  .nav-cta-mobile .nav-btn-primary {
    font-size: 18px;
    padding: 14px 32px;
    color: var(--white);
  }

  .section-header h2 { font-size: 32px; }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  .footer-brand {
    flex-direction: column;
    gap: 8px;
  }
  .footer-badges {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .section-header h2 { font-size: 28px; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
  }
  .footer-column h4 {
    font-size: 12px;
    margin-bottom: 12px;
  }
  .footer-column a {
    font-size: 13px;
    margin-bottom: 8px;
  }
  .footer-badges {
    flex-wrap: wrap;
    gap: 12px;
  }
}
