/* Base Theme (Blue) */
:root {
  /* Brand palette */
  --brand-300: #7ab6ff;
  --brand-500: #2f7cff;
  --brand-700: #1b4fb3;
  --brand-900: #0f2e73;
  --brand-current: var(--brand-500);

  /* Neutrals */
  --bg: #0b1220;
  --bg-alt: #111a2d;
  --surface: #0f182b;
  --text: #e6edf7;
  --muted: #a9b4c8;
  --border: #23314f;

  /* Layout */
  --container: 1160px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-1: 0 10px 24px rgba(0,0,0,.35);
  --shadow-2: 0 20px 40px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #091020 0%, #0b1220 40%, #0e1628 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(150%) blur(10px);
  background: rgba(9, 16, 32, 0.8);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.logo { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0,0,0,.4)); }
.brand-title { font-weight: 700; letter-spacing: .4px; }

.nav { display: flex; gap: 20px; }
.nav-link {
  padding: 10px 16px;
  border-radius: 10px;
  color: var(--muted);
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--brand-current);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}

.nav-link:hover,
.nav-link:active {
  color: #fff;
  background: rgba(47, 124, 255, 0.1);
  transform: translateY(-2px);
}

.nav-link:hover::before,
.nav-link:active::before {
  width: 80%;
}

.nav-link:active {
  transform: translateY(0) scale(0.95);
}

.controls { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 20px; cursor: pointer; }

/* Hero */
.hero {
  position: relative; min-height: 68vh; display: grid; place-items: center; overflow: hidden;
  background: url('fondo.jpg') center/cover no-repeat;
}

.hero-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(1000px 420px at 15% 20%, color-mix(in srgb, var(--brand-current) 50%, transparent) 0%, transparent 60%),
              linear-gradient(180deg, rgba(11,18,32,.8), rgba(11,18,32,.9));
}
.hero-content { position: relative; text-align: center; padding: 64px 0; }
.hero-title { font-size: clamp(28px, 5vw, 48px); margin: 0 0 12px; }
.hero-subtitle { font-size: 16px; color: var(--muted); margin: 0 0 24px; }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px; font-weight: 600; }
.btn-primary { background: var(--brand-current); color: #fff; box-shadow: var(--shadow-1); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-outline { color: var(--text); border: 1px solid var(--border); background: rgba(255,255,255,.06); }
.btn-outline:hover { border-color: color-mix(in srgb, var(--brand-current) 60%, var(--border)); }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: linear-gradient(180deg, var(--bg-alt), var(--bg)); }
.section-title { font-size: 28px; margin: 0 0 12px; }
.section-desc { color: var(--muted); margin: 0 0 28px; }

.grid {
  display: grid;
  gap: 30px;
}

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

/* Staggered animation for grid items */
.card, .project {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.card:nth-child(1), .project:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2), .project:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3), .project:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4), .project:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5), .project:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6), .project:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .menu-toggle { display: inline-block; }
  .nav { display:none; }
}

@media (max-width: 640px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid { gap: 20px; }
}

/* Cards with animations */
.card, .project {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,.04);
  box-shadow: var(--shadow-1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.card::before, .project::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, var(--brand-current) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  pointer-events: none;
}

.card:hover, .project:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(47, 124, 255, 0.2), var(--shadow-2);
  border-color: var(--brand-current);
}

.card:hover::before, .project:hover::before {
  opacity: 0.08;
}

.card-media {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.5s ease;
}

.card:hover .card-media {
  transform: scale(1.1);
}

.card-body {
  padding: 20px;
  position: relative;
  z-index: 2;
}

.card-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 600;
  transition: color 0.3s ease;
}

.card:hover .card-title {
  color: var(--brand-current);
}

.card-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

/* Projects with elegant hover effects */
.project-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease;
  filter: brightness(0.9);
}

.project:hover .project-img {
  transform: scale(1.08);
  filter: brightness(1.1);
}

.project-body {
  padding: 20px;
  position: relative;
  z-index: 2;
  background: linear-gradient(to top, rgba(11,18,32,0.95), rgba(15,24,43,0.9));
}

.project-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 600;
  transition: color 0.3s ease;
}

.project:hover .project-title {
  color: var(--brand-current);
}

.project-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

/* About with elegant layout */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 40px;
  background: rgba(255,255,255,.02);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.about::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(47, 124, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.about-img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  position: relative;
  z-index: 1;
}

.about-img:hover {
  transform: scale(1.03) rotate(-1deg);
  box-shadow: 0 30px 80px rgba(47, 124, 255, 0.3);
}

.about-text {
  position: relative;
  z-index: 2;
}

.about-text p {
  margin: 0 0 16px;
  line-height: 1.8;
  font-size: 16px;
  color: var(--muted);
}

.about-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 860px) {
  .about {
    grid-template-columns: 1fr;
    padding: 30px 20px;
  }
}

/* Contact */
.contact { display: grid; grid-template-columns: 1fr .8fr; gap: 24px; }
.contact-form { border: 1px solid var(--border); background: rgba(255,255,255,.04); padding: 16px; border-radius: var(--radius); box-shadow: var(--shadow-1); }
.form-row { display: grid; gap: 8px; margin: 0 0 14px; }
.form-row input, .form-row textarea { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.form-row input::placeholder, .form-row textarea::placeholder { color: #8ea1c3; }
.contact-info { border: 1px solid var(--border); background: rgba(255,255,255,.04); padding: 16px; border-radius: var(--radius); box-shadow: var(--shadow-1); }
.info-item { margin: 0 0 10px; color: var(--muted); }

/* Virtual Assistant Section */
.av-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 50px;
  padding: 40px;
  background: rgba(255,255,255,.02);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.av-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(47, 124, 255, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.av-hero-image {
  position: relative;
  z-index: 1;
}

.av-hero-image img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  transition: transform 0.5s ease;
}

.av-hero-image img:hover {
  transform: scale(1.03);
}

.av-hero-content {
  position: relative;
  z-index: 2;
}

.av-subtitle {
  font-size: 26px;
  margin: 0 0 16px;
  color: var(--brand-current);
  font-weight: 600;
}

.av-intro {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

.av-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 50px;
}

.av-feature {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.av-feature::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, var(--brand-current) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.av-feature:hover {
  transform: translateY(-4px);
  border-color: var(--brand-current);
  box-shadow: 0 10px 30px rgba(47, 124, 255, 0.15);
}

.av-feature:hover::before {
  opacity: 0.05;
}

.av-feature-icon {
  font-size: 36px;
  line-height: 1;
  flex-shrink: 0;
  filter: grayscale(0.3);
  transition: all 0.3s ease;
}

.av-feature:hover .av-feature-icon {
  filter: grayscale(0);
  transform: scale(1.1);
}

.av-feature-content {
  position: relative;
  z-index: 1;
}

.av-feature-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--text);
  transition: color 0.3s ease;
}

.av-feature:hover .av-feature-title {
  color: var(--brand-current);
}

.av-feature-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

.av-cta {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 50px;
  background: linear-gradient(135deg, rgba(47, 124, 255, 0.08) 0%, rgba(27, 79, 179, 0.05) 100%);
  border: 1px solid var(--brand-current);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.av-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(47, 124, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.av-cta-content {
  position: relative;
  z-index: 2;
}

.av-cta-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
}

.av-cta-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 24px;
}

.av-cta-image {
  position: relative;
  z-index: 1;
}

.av-cta-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  transition: transform 0.5s ease;
}

.av-cta-image img:hover {
  transform: scale(1.05) rotate(2deg);
}

@media (max-width: 960px) {
  .av-hero,
  .av-cta {
    grid-template-columns: 1fr;
  }
  
  .av-features {
    grid-template-columns: 1fr;
  }
  
  .av-hero,
  .av-cta {
    padding: 30px 20px;
  }
}

@media (max-width: 640px) {
  .av-feature {
    flex-direction: column;
    gap: 12px;
  }
  
  .av-feature-icon {
    font-size: 32px;
  }
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: rgba(255,255,255,.03); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.footer-nav { display: flex; gap: 16px; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: #fff; }

/* Legal Section */
.legal-section {
  background: rgba(11, 18, 32, 0.9);
  border-top: 1px solid var(--border);
  padding: 20px 0;
}

.legal-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.legal-icons {
  display: flex;
  gap: 15px;
  align-items: center;
}

.legal-icon {
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all 0.3s ease;
  opacity: 0.8;
  background: white;
  padding: 2px;
}

.legal-icon:hover {
  opacity: 1;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.cookie-policy {
  font-size: 13px;
  color: var(--muted);
  text-align: right;
}

.cookie-policy a {
  color: var(--brand-current);
  text-decoration: underline;
  transition: color 0.3s ease;
  cursor: pointer;
}

.cookie-policy a:hover {
  color: #fff;
}

@media (max-width: 768px) {
  .legal-container {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-policy {
    text-align: center;
  }
  
  .legal-icons {
    justify-content: center;
  }
}
