:root {
  --color-primary: #1a365d;
  --color-primary-light: #2d4a7a;
  --color-accent: #4a90d9;
  --color-accent-hover: #357abd;
  --color-bg: #ffffff;
  --color-bg-alt: #f7fafc;
  --color-text: #2d3748;
  --color-text-light: #718096;
  --color-text-muted: #a0aec0;
  --color-border: #e2e8f0;
  --color-white: #ffffff;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container-max: 1120px;
  --container-padding: 1.5rem;

  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 5rem;

  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);

  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent-hover);
}

ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-3xl);
}

.section-header__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--spacing-xs);
}

.section-header__subtitle {
  font-size: 1.125rem;
  color: var(--color-text-light);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}

.btn:hover::before {
  transform: translateX(0);
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: var(--color-white);
}

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

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

.btn--full {
  width: 100%;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  height: 72px;
  transition: box-shadow var(--transition);
}

.header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

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

.header__logo-img {
  max-height: 44px;
  width: auto;
}

.header__nav-list {
  display: flex;
  gap: var(--spacing-xl);
}

.header__nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 0.25rem 0;
  position: relative;
}

.header__nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

.header__nav-link:hover::after,
.header__nav-link.active::after {
  width: 100%;
}

.header__nav-link:hover {
  color: var(--color-accent);
}

.header__menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.header__menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition);
}

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

.header__menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

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

/* Hero */
.hero {
  padding: 8rem 0 5rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: var(--color-white);
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
  align-items: center;
}

.hero__content {
  max-width: 560px;
  position: relative;
}

.hero__float-icon {
  position: absolute;
  width: 32px;
  height: 32px;
  color: rgba(255,255,255,0.2);
  pointer-events: none;
  animation: heroIconFloat 4s ease-in-out infinite;
}

.hero__float-icon svg {
  width: 100%;
  height: 100%;
}

.hero__float-icon--1 {
  top: -10%;
  right: 5%;
  animation-delay: 0s;
  width: 28px;
  height: 28px;
}

.hero__float-icon--2 {
  bottom: 20%;
  left: -8%;
  animation-delay: -1.3s;
  width: 24px;
  height: 24px;
  color: rgba(255,255,255,0.15);
}

.hero__float-icon--3 {
  top: 30%;
  right: -6%;
  animation-delay: -2.6s;
  width: 22px;
  height: 22px;
  color: rgba(255,255,255,0.15);
}

@keyframes heroIconFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.2; }
  25% { transform: translateY(-8px) rotate(5deg); opacity: 0.4; }
  50% { transform: translateY(0) rotate(0deg); opacity: 0.2; }
  75% { transform: translateY(8px) rotate(-5deg); opacity: 0.35; }
}

.hero__title {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--spacing-lg);
  background: linear-gradient(180deg, #fff 60%, rgba(255,255,255,0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--spacing-2xl);
  line-height: 1.5;
}

.hero__actions {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  animation: orbFloat 6s ease-in-out infinite;
}

.hero__orb--1 {
  width: 200px;
  height: 200px;
  background: var(--color-accent);
  top: 10%;
  right: 10%;
  animation-delay: 0s;
}

.hero__orb--2 {
  width: 140px;
  height: 140px;
  background: #6ab5ff;
  bottom: 15%;
  left: 5%;
  animation-delay: -2s;
}

.hero__orb--3 {
  width: 100px;
  height: 100px;
  background: #2a5a9a;
  top: 50%;
  left: 40%;
  animation-delay: -4s;
}

@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.1); }
}

.hero__circuit {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
}

.hero__circuit svg {
  width: 280px;
  height: 280px;
  animation: circuitPulse 4s ease-in-out infinite;
  fill: none;
  stroke: rgba(255,255,255,0.15);
  stroke-width: 1;
}

.hero__circuit svg circle {
  fill: rgba(255,255,255,0.3);
}

@keyframes circuitPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

/* About */
.about {
  padding: var(--spacing-3xl) 0;
  background: var(--color-bg);
}

.about__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
  align-items: start;
}

.about__text p {
  margin-bottom: var(--spacing-md);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text);
}

.about__features {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.about__feature {
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-start;
  padding: var(--spacing-lg);
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition);
}

.about__feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.about__feature-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  color: var(--color-accent);
}

.about__feature-icon svg {
  width: 100%;
  height: 100%;
  animation: iconSpin 6s ease-in-out infinite;
}

.about__feature:nth-child(2) .about__feature-icon svg {
  animation-duration: 8s;
}

.about__feature:nth-child(3) .about__feature-icon svg {
  animation-duration: 10s;
}

@keyframes iconSpin {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(10deg) scale(1.1); }
  50% { transform: rotate(0deg) scale(1); }
  75% { transform: rotate(-10deg) scale(1.1); }
  100% { transform: rotate(0deg) scale(1); }
}

.about__feature h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.about__feature p {
  font-size: 0.875rem;
  color: var(--color-text-light);
}

/* Services */
.services {
  padding: var(--spacing-3xl) 0;
  background: var(--color-bg-alt);
  position: relative;
  overflow: hidden;
}

.services::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(74,144,217,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,144,217,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
}

.service-card {
  background: var(--color-white);
  padding: var(--spacing-2xl);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(74,144,217,0.06), transparent);
  pointer-events: none;
  transition: top 0.6s ease;
}

.service-card:hover::after {
  top: 100%;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

.service-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--spacing-lg);
  color: var(--color-accent);
}

.service-card__icon svg {
  width: 100%;
  height: 100%;
  transition: transform var(--transition);
}

.service-card:hover .service-card__icon svg {
  transform: scale(1.15);
  animation: techPulse 1.5s ease-in-out infinite;
}

@keyframes techPulse {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(74,144,217,0.3)); }
  50% { filter: drop-shadow(0 0 8px rgba(74,144,217,0.6)); }
}

.service-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
}

.service-card__desc {
  font-size: 0.9375rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* Contact */
.contact {
  padding: var(--spacing-3xl) 0;
  background: var(--color-bg);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

.contact__item {
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-start;
}

.contact__item-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--color-accent);
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact__item-icon svg {
  width: 20px;
  height: 20px;
}

.contact__item h3 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: 0.25rem;
}

.contact__item p {
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 0.1rem;
}

.contact__item a {
  color: var(--color-text);
  font-weight: 500;
}

.contact__item a:hover {
  color: var(--color-accent);
}

.contact__whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #25D366;
  color: white !important;
  vertical-align: middle;
  margin-left: 6px;
  transition: transform var(--transition);
}

.contact__whatsapp:hover {
  transform: scale(1.2);
  color: white !important;
  background: #20bd5a;
}

.contact__whatsapp svg {
  display: block;
}

.contact__hours {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.contact__hours div {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-md);
  font-size: 0.9375rem;
}

.contact__hours div span:first-child {
  font-weight: 600;
  color: var(--color-primary);
}

/* Form */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(74,144,217,0.15);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #e53e3e;
}

.form-error {
  font-size: 0.8125rem;
  color: #e53e3e;
  min-height: 1.2em;
}

.form-success {
  display: none;
  font-size: 0.9375rem;
  color: #38a169;
  text-align: center;
  padding: var(--spacing-sm);
  background: #f0fff4;
  border-radius: var(--radius);
}

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

/* Footer */
.footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.85);
  padding-top: var(--spacing-3xl);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--spacing-3xl);
  padding-bottom: var(--spacing-2xl);
}

.footer__brand p {
  margin-top: var(--spacing-md);
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer__logo {
  opacity: 0.95;
}

.footer__links h4,
.footer__contact h4 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: var(--spacing-md);
}

.footer__links ul li {
  margin-bottom: var(--spacing-sm);
}

.footer__links a,
.footer__contact a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9375rem;
}

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

.footer__contact p {
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: var(--spacing-lg) 0;
  text-align: center;
}

.footer__bottom p {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
}

/* WhatsApp floating button */
.whatsapp-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
  transition: transform var(--transition), box-shadow var(--transition);
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37,211,102,0.55);
  color: white;
}

.whatsapp-btn svg {
  width: 28px;
  height: 28px;
}

/* Responsive */
@media (max-width: 768px) {
  .header__menu-toggle {
    display: flex;
  }

  .header__nav {
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--color-white);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
  }

  .header__nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .header__nav-list {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__content {
    max-width: 100%;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__visual {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 6rem 0 3rem;
  }

  .about__content {
    grid-template-columns: 1fr;
  }

  .contact__grid {
    grid-template-columns: 1fr;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .footer__brand p {
    max-width: 100%;
  }

  .section-header__title {
    font-size: 1.625rem;
  }

  .section-header {
    margin-bottom: var(--spacing-2xl);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .hero__title {
    font-size: 2.25rem;
  }

  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
