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

:root {
  --color-primary: #6366f1;
  --color-primary-dark: #4f46e5;
  --color-primary-light: #818cf8;
  --color-accent: #06b6d4;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-error: #ef4444;
  --color-success: #22c55e;
  --max-width: 1200px;
  --header-height: 72px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-primary-dark);
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
}

/* ===== Utility ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  text-align: center;
  margin-bottom: 0.75rem;
}

.section__subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

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

.btn--outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn--white {
  background: #fff;
  color: var(--color-primary);
}

.btn--white:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.logo span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color 0.2s;
}

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

.nav a.btn--primary {
  color: #fff;
}

.nav .btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger svg {
  width: 24px;
  height: 24px;
  color: var(--color-text);
}

/* Mobile nav */
@media (max-width: 767px) {
  .hamburger {
    display: block;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav--open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav a {
    font-size: 1.125rem;
    padding: 0.5rem 0;
  }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: calc(90vh - var(--header-height));
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.12) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(255,255,255,0.08) 0%, transparent 40%);
  animation: heroFloat 15s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(2%, -1%); }
  66% { transform: translate(-1%, 2%); }
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 4rem 1.5rem;
}

.hero__title {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  color: #fff;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== About ===== */
.about__content {
  max-width: 720px;
  margin: 0 auto 3rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1.0625rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.team-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.team-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.team-card__name {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.team-card__role {
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

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

/* Values */
.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.value-item {
  text-align: center;
  padding: 1.5rem;
}

.value-item__icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(6,182,212,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.25rem;
}

.value-item__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

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

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

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.service-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
  color: #fff;
}

.service-card__title {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.service-card__text {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

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

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-info__item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-info__icon {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(6,182,212,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.125rem;
}

.contact-info__label {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.125rem;
}

.contact-info__value {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.form-success {
  display: none;
  padding: 1rem 1.25rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid var(--color-success);
  color: #166534;
  border-radius: 0.5rem;
  margin-top: 1rem;
  font-weight: 500;
  animation: fadeIn 0.3s ease;
}

.form-success.visible {
  display: block;
}

/* ===== Footer ===== */
.footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

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

.footer__brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.footer__brand span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
}

.footer__desc {
  font-size: 0.9375rem;
  max-width: 320px;
}

.footer h4 {
  color: #fff;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
}

/* ===== CRM Hero ===== */
.crm-hero {
  background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.crm-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 40% 60%, rgba(255,255,255,0.1) 0%, transparent 50%);
  animation: heroFloat 15s ease-in-out infinite;
}

.crm-hero .container {
  position: relative;
  z-index: 1;
}

.crm-hero__title {
  font-size: clamp(2rem, 5vw, 3rem);
  color: #fff;
  margin-bottom: 0.75rem;
}

.crm-hero__subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.125rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ===== CRM Features ===== */
.crm-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.crm-feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.crm-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.crm-feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.crm-feature-card__title {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.crm-feature-card__text {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

/* ===== CRM Login ===== */
.crm-login {
  background: var(--color-bg-alt);
  padding: 5rem 0;
}

.login-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.login-card__title {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 0.25rem;
}

.login-card__subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin-bottom: 2rem;
}

.login-card .btn {
  width: 100%;
  padding: 0.875rem;
  margin-top: 0.5rem;
}

.login-card__footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.875rem;
}

.login-card__footer a {
  color: var(--color-primary);
  font-weight: 500;
}

.login-error {
  display: none;
  padding: 0.75rem 1rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--color-error);
  color: #991b1b;
  border-radius: 0.5rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.login-error.visible {
  display: block;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Shake animation */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.shake {
  animation: shake 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
