:root {
  --primary: #00BFA5;
  --primary-glow: rgba(0, 191, 165, 0.3);
  --secondary: #001A33;
  --accent: #64ffda;
  --background: #ffffff;
  --foreground: #020617;
  --card: #f8fafc;
  --card-foreground: #0f172a;
  --border: #e2e8f0;
  --ring: #00BFA5;

  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;

  --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);
  --shadow-primary: 0 10px 15px -3px rgba(0, 191, 165, 0.2);
}

.dark {
  --background: #020617;
  --foreground: #f8fafc;
  --card: #0f172a;
  --card-foreground: #f1f5f9;
  --border: #1e293b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .glass {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(0, 191, 165, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: radial-gradient(circle at 70% 30%, var(--primary-glow) 0%, transparent 70%);
}

.hero-content {
  max-width: 700px;
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Premium Logo Branding */
.logo-display-container {
  position: relative;
  width: 100%;
  max-width: 450px;
  height: 350px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.logo-display-container::before {
  content: '';
  position: absolute;
  width: 150%;
  height: 150%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  opacity: 0.3;
  pointer-events: none;
}

.logo-display-img {
  width: 250px;
  height: auto;
  z-index: 2;
  /* This helps blend white backgrounds if they exist, or adds a punchy look */
  filter: drop-shadow(0 0 15px rgba(0, 191, 165, 0.3));
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-display-container:hover .logo-display-img {
  transform: scale(1.1) rotate(2deg);
}

.white-bg-fix {
  mix-blend-mode: multiply;
  /* Removes white backgrounds on semi-light surfaces */
  filter: contrast(1.1) brightness(1.1);
}

.dark-section-logo-wrapper {
  background: white;
  /* We create a high-contrast 'card' for the logo */
  padding: 2.5rem;
  border-radius: 1.5rem;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
}

.hero p {
  font-size: 1.25rem;
  color: #64748b;
  margin-bottom: 2.5rem;
  max-width: 600px;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 0.8rem 0;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  padding: 0.4rem 0;
  background: rgba(241, 245, 249, 0.85);
  /* Slightly off-white to allow darken to work */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 191, 165, 0.1);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  height: 75px;
  width: auto;
  display: block;
  mix-blend-mode: darken;
  /* Effectively removes white background against the off-white navbar */
  transition: all 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  font-weight: 500;
  transition: all 0.4s ease;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--secondary);
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}

.nav-link:hover {
  color: var(--primary);
}

/* Features/Services */
.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  padding: 2.5rem;
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.icon-box {
  width: 60px;
  height: 60px;
  background: var(--primary-glow);
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

/* Nosotros Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: #475569;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}

.pillar-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  height: 100%;
}

.pillar-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.pillar-card h4 {
  font-size: 1.25rem;
  margin: 1.25rem 0 1rem;
  color: var(--secondary);
}

.pillar-card p {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.6;
}

.pillar-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-glow);
  color: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-image-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-image-container img {
  width: 100%;
  height: auto;
  display: block;
}

/* Proyectos Portfolio Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.project-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.project-img-wrapper {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.project-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-img-wrapper img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
}

.project-info {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--primary-glow);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 99px;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.project-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--secondary);
}

.project-info p {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.project-link {
  margin-top: auto;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-link:hover gap {
  gap: 0.75rem;
}

/* Contact Section */
.contact-section {
  padding: 100px 0;
  background: white;
  position: relative;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 5rem;
  align-items: start;
}

.contact-info-card {
  background: var(--secondary);
  color: white;
  padding: 3rem;
  border-radius: var(--radius-lg);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.contact-info-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: var(--primary-glow);
  filter: blur(60px);
  border-radius: 50%;
  opacity: 0.2;
}

.contact-method {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.contact-text h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.contact-text p {
  color: #94a3b8;
  font-size: 0.95rem;
}

.contact-form {
  background: white;
  padding: 3rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--secondary);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Footer Improvements */
.footer-logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
}

/* Language Switcher */
.lang-switcher {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  margin-right: 1.5rem;
  backdrop-filter: blur(10px);
}

.lang-switcher:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--secondary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.scrolled .lang-switcher {
  border-color: var(--border);
  color: var(--secondary);
}

.scrolled .lang-switcher:hover {
  color: white;
}

/* Floating Shapes */
.shape {
  position: absolute;
  filter: blur(80px);
  z-index: -1;
  border-radius: 50%;
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: var(--primary-glow);
  top: -100px;
  right: -100px;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: rgba(100, 255, 218, 0.1);
  bottom: -50px;
  left: -50px;
}

@media (max-width: 1024px) {
  .hero h1 {
    font-size: 3.5rem;
  }

  .about-grid,
  .contact-grid,
  .excellence-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    padding: 80px 2rem 2rem;
    z-index: 100;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-link {
    width: 100%;
    text-align: center;
    font-size: 1.25rem;
    padding: 1rem 0;
  }

  .nav-links .btn-primary {
    width: 100%;
    margin-top: 1rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .section-title h2 {
    font-size: 2rem;
  }

  .pillars-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .footer-logo-text {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-btns {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}