/* ============================================
   VieWebApps — Minimalist Design System
   ============================================ */

:root {
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-accent: #4f46e5;
  --color-accent-hover: #4338ca;
  --color-accent-light: #eef2ff;
  --color-border: #e2e8f0;
  --color-dark: #0f172a;
  --color-dark-card: #1e293b;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 4px 16px rgba(0,0,0,.08);
  --shadow-accent: 0 8px 32px rgba(79,70,229,.25);
  --max-width: 1100px;
  --t: .2s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); color: var(--color-text); background: var(--color-bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

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

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .9375rem; font-weight: 600; line-height: 1;
  padding: .875rem 1.75rem; border-radius: var(--radius);
  border: 2px solid transparent; transition: all var(--t);
  white-space: nowrap;
}
.btn--primary {
  background: var(--color-accent); color: #fff;
}
.btn--primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px); box-shadow: var(--shadow-accent);
}
.btn--ghost {
  background: transparent; color: var(--color-text); border-color: var(--color-border);
}
.btn--ghost:hover { border-color: var(--color-text); }
.btn--accent {
  background: var(--color-accent); color: #fff; width: 100%;
  justify-content: center; font-size: 1rem; padding: 1rem;
}
.btn--accent:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px); box-shadow: var(--shadow-accent);
}
.btn--accent:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---- Sections ---- */
section { padding: 6rem 0; }
.section__header { text-align: center; margin-bottom: 3.5rem; }
.section__label {
  display: inline-block; font-size: .75rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--color-accent); margin-bottom: .75rem;
}
.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800;
  letter-spacing: -.03em; line-height: 1.15;
}
.section__sub {
  font-size: 1.0625rem; color: var(--color-text-muted);
  margin-top: .75rem; max-width: 560px; margin-left: auto; margin-right: auto;
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92); backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), box-shadow var(--t);
}
.nav.scrolled { border-color: var(--color-border); box-shadow: var(--shadow-sm); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav__logo { font-size: 1.2rem; font-weight: 800; color: var(--color-accent); letter-spacing: -.03em; }
.nav__logo span { color: var(--color-text); }
.nav__links { display: flex; gap: 2rem; list-style: none; }
.nav__links a { font-size: .875rem; font-weight: 500; color: var(--color-text-muted); transition: color var(--t); }
.nav__links a:hover { color: var(--color-text); }
.nav__cta {
  font-size: .875rem; font-weight: 600; padding: .5rem 1.25rem;
  background: var(--color-accent); color: #fff !important;
  border-radius: var(--radius); transition: background var(--t);
}
.nav__cta:hover { background: var(--color-accent-hover); }
.nav__hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 8px;
}
.nav__hamburger span { display: block; width: 22px; height: 2px; background: var(--color-text); border-radius: 2px; transition: transform var(--t), opacity var(--t); }
.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav__mobile {
  display: none; flex-direction: column;
  position: absolute; top: 68px; left: 0; right: 0;
  background: #fff; border-bottom: 1px solid var(--color-border);
  padding: 1rem 1.5rem 1.5rem; gap: .25rem; z-index: 99;
}
.nav__mobile.open { display: flex; }
.nav__mobile a { padding: .75rem 0; font-size: 1rem; font-weight: 500; border-bottom: 1px solid var(--color-border); color: var(--color-text-muted); }
.nav__mobile a:last-child { color: var(--color-accent); font-weight: 700; border-bottom: none; }

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: calc(100vh - 68px);
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 60%, #f0fdf4 100%);
  display: flex; align-items: center;
}
.hero__layout { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; width: 100%; }
.hero__tagline {
  font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--color-accent); margin-bottom: 1.25rem;
}
.hero__title {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem); font-weight: 800;
  letter-spacing: -.04em; line-height: 1.08; margin-bottom: 1.25rem;
}
.hero__title em { font-style: normal; color: var(--color-accent); }
.hero__sub { font-size: 1.125rem; color: var(--color-text-muted); max-width: 480px; margin-bottom: 2.5rem; line-height: 1.7; }
.hero__ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero__visual {
  position: relative; height: 380px; display: flex;
  align-items: center; justify-content: center;
}
.hero__blob {
  position: absolute; width: 320px; height: 320px;
  background: radial-gradient(ellipse at center, rgba(99,102,241,.15) 0%, transparent 70%);
  border-radius: 50%; z-index: 0;
}
.hero__card {
  position: absolute; background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: .875rem 1.25rem;
  display: flex; align-items: center; gap: .625rem;
  font-size: .875rem; font-weight: 600; box-shadow: var(--shadow);
  z-index: 1; transition: transform .3s ease;
  animation: float 4s ease-in-out infinite;
}
.hero__card:hover { transform: scale(1.04) !important; }
.hero__card--1 { top: 40px; left: 20px; animation-delay: 0s; }
.hero__card--2 { top: 50%; right: 10px; transform: translateY(-50%); animation-delay: 1.3s; }
.hero__card--3 { bottom: 50px; left: 40px; animation-delay: 2.6s; }
.hero__card-dot { width: 10px; height: 10px; background: var(--color-accent); border-radius: 50%; box-shadow: 0 0 0 3px rgba(79,70,229,.2); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero__card--2 { animation: float2 4s ease-in-out infinite 1.3s; }
@keyframes float2 {
  0%, 100% { transform: translateY(-50%); }
  50% { transform: translateY(calc(-50% - 10px)); }
}

/* ============================================
   SERVICIOS
   ============================================ */
.services { background: var(--color-bg); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.service-card {
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: 2rem; transition: all .25s ease; background: var(--color-bg);
}
.service-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(79,70,229,.06), var(--shadow);
  transform: translateY(-3px);
}
.service-card__icon {
  width: 52px; height: 52px; background: var(--color-accent-light);
  border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem;
}
.service-card__icon svg {
  width: 24px; height: 24px; stroke: var(--color-accent);
  fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.service-card h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: .5rem; }
.service-card > p { font-size: .9375rem; color: var(--color-text-muted); line-height: 1.7; }
.service-card__list { list-style: none; margin-top: 1.25rem; display: flex; flex-direction: column; gap: .5rem; }
.service-card__list li {
  font-size: .875rem; color: var(--color-text-muted);
  display: flex; align-items: center; gap: .625rem;
}
.service-card__list li::before {
  content: ""; flex-shrink: 0; width: 7px; height: 7px;
  background: var(--color-accent); border-radius: 50%;
}

/* ============================================
   SECTORES
   ============================================ */
.sectors { background: var(--color-bg-alt); }
.sectors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.sector-item {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 1.5rem 1rem; text-align: center;
  transition: all var(--t); cursor: default;
}
.sector-item:hover { border-color: var(--color-accent); background: var(--color-accent-light); transform: translateY(-2px); }
.sector-item__icon { font-size: 2rem; margin-bottom: .625rem; line-height: 1; }
.sector-item span { font-size: .8125rem; font-weight: 600; color: var(--color-text); line-height: 1.4; display: block; }

/* ============================================
   POR QUÉ NOSOTROS
   ============================================ */
.whyus { background: var(--color-bg); }
.whyus-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.whyus-grid--3 { grid-template-columns: repeat(3, 1fr); max-width: 860px; margin: 0 auto; }
.whyus-item { text-align: center; padding: 1.5rem; }
.whyus-item__icon { font-size: 2.25rem; margin-bottom: .875rem; line-height: 1; }
.whyus-item h4 { font-size: 1rem; font-weight: 700; margin-bottom: .375rem; }
.whyus-item p { font-size: .875rem; color: var(--color-text-muted); line-height: 1.7; }

/* ============================================
   CONTACTO
   ============================================ */
.contacto { background: var(--color-dark); color: #fff; }
.contacto .section__label { color: #818cf8; }
.contacto .section__title { color: #fff; }
.contacto .section__sub { color: #94a3b8; }

.contact-layout { display: grid; grid-template-columns: 1fr 1.6fr; gap: 4rem; align-items: start; }
.contact-info h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; color: #f1f5f9; }
.contact-info p { color: #94a3b8; font-size: .9375rem; line-height: 1.75; margin-bottom: 1.75rem; }
.contact-features { list-style: none; display: flex; flex-direction: column; gap: .875rem; }
.contact-features li { display: flex; align-items: flex-start; gap: .75rem; font-size: .9rem; color: #cbd5e1; line-height: 1.5; }
.contact-features li::before { content: "✓"; color: #818cf8; font-weight: 800; flex-shrink: 0; margin-top: .1em; }

/* Form */
.form { background: var(--color-dark-card); border-radius: var(--radius-lg); padding: 2.5rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .375rem; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  font-size: .725rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: #94a3b8;
}
.form-group input,
.form-group select,
.form-group textarea {
  background: #0f172a; border: 1.5px solid #334155;
  border-radius: var(--radius-sm); padding: .75rem 1rem;
  font-size: .9375rem; color: #f1f5f9; font-family: var(--font);
  transition: border-color var(--t), box-shadow var(--t);
  outline: none; width: 100%; appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.18);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #475569; }
.form-group select option { background: #1e293b; color: #f1f5f9; }
.form-group textarea { resize: vertical; min-height: 110px; }

/* Phone wrapper: lada + telefono each with its own label */
.phone-wrapper { display: flex; gap: .75rem; align-items: flex-end; }
.phone-sub { display: flex; flex-direction: column; gap: .375rem; }
.phone-sub--grow { flex: 1; min-width: 0; }
.phone-sublabel { font-size: .725rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #94a3b8; }
.phone-lada { width: 95px; flex: 0 0 95px; font-size: .875rem; padding: .75rem .25rem .75rem .5rem; line-height: 1.6; }
.phone-wrapper input[type="tel"] { width: 100%; }
.form-error { font-size: .775rem; color: #f87171; display: none; margin-top: .125rem; }
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea { border-color: #f87171; }
.form-group.has-error .form-error { display: block; }
.form-submit { margin-top: 1rem; }
.form-message {
  display: none; margin-top: 1rem; padding: .875rem 1rem;
  border-radius: var(--radius-sm); font-size: .9rem; font-weight: 500; line-height: 1.5;
}
.form-message.success { background: rgba(16,185,129,.1); color: #6ee7b7; border: 1px solid rgba(16,185,129,.25); }
.form-message.error   { background: rgba(239,68,68,.1);  color: #fca5a5; border: 1px solid rgba(239,68,68,.25);  }

/* ============================================
   FOOTER
   ============================================ */
.footer { background: #020617; color: #475569; padding: 2rem 0; border-top: 1px solid #0f172a; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer__logo { font-size: .95rem; font-weight: 800; color: #6366f1; letter-spacing: -.02em; }
.footer__copy { font-size: .8125rem; }
.footer__email { font-size: .8125rem; color: #6366f1; transition: opacity var(--t); }
.footer__email:hover { opacity: .75; }

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.fade-in { opacity: 0; transform: translateY(22px); transition: opacity .55s ease, transform .55s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero__layout { grid-template-columns: 1fr; gap: 3rem; }
  .hero__visual { display: none; }
  .hero { min-height: auto; padding: 5rem 0; }
}

@media (max-width: 768px) {
  section { padding: 4rem 0; }
  .section__header { margin-bottom: 2.5rem; }
  .nav__links, .nav > .nav__cta { display: none; }
  .nav__hamburger { display: flex; }
  .contact-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: 1; }
  .form { padding: 1.75rem; }
  .footer__inner { flex-direction: column; text-align: center; gap: .5rem; }
  .whyus-grid--3 { grid-template-columns: 1fr 1fr; }
  .sectors-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media (max-width: 480px) {
  .hero__title { font-size: 2.25rem; }
  .hero__ctas { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .services-grid { grid-template-columns: 1fr; }
  .whyus-grid { grid-template-columns: 1fr; }
  .sectors-grid { grid-template-columns: repeat(2, 1fr); }
}
