:root {
  --bg: #f5f8fb;
  --surface: #ffffff;
  --surface-alt: #eef4f7;
  --text: #14314a;
  --muted: #577187;
  --primary: #1a2c4a;
  --primary-dark: #0f2034;
  --accent: #6a9a38;
  --accent-dark: #527a2b;
  --accent-soft: rgba(106, 154, 56, 0.12);
  --border: #d9e4ec;
  --shadow: 0 18px 45px rgba(13, 37, 63, 0.08);
  --shadow-strong: 0 24px 55px rgba(13, 37, 63, 0.12);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

/* ── Language ──────────────────────────────────────────────────────────── */
.lang { display: none; }
body[data-lang='en'] .lang-en,
body[data-lang='es'] .lang-es { display: block; }
body[data-lang='en'] .nav a .lang-en,
body[data-lang='es'] .nav a .lang-es { display: inline; }

/* ── Layout ────────────────────────────────────────────────────────────── */
.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

/* ── Scroll reveal ─────────────────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ── Hero entrance animation ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}
.hero-enter {
  animation: fadeUp 0.7s ease both;
}
.hero-enter-delay {
  animation-delay: 0.18s;
}

/* ── Header ────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(217, 228, 236, 0.8);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand { display: flex; align-items: center; text-decoration: none; color: inherit; }

.brand-logo-wrap {
  height: 52px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.brand-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  display: block;
}

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

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

.nav a {
  text-decoration: none;
  color: #1a2c4a;
  font-weight: 600;
  font-size: 0.93rem;
  white-space: nowrap;
  transition: color 0.15s;
  position: relative;
  padding-bottom: 2px;
}

.nav a span { color: #1a2c4a; }

.nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav a:hover,
.nav a.is-active { color: var(--primary); }
.nav a.is-active::after,
.nav a:hover::after { transform: scaleX(1); }

.nav a .lang { display: none; }

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

/* Language toggle */
.language-toggle {
  display: inline-flex;
  padding: 0.25rem;
  border-radius: 999px;
  background: #edf3f7;
  border: 1px solid var(--border);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

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

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  padding: 9px 8px;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.hamburger[aria-expanded='true'] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded='true'] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  padding: 5rem 0 4rem;
  background:
    radial-gradient(circle at top right, rgba(106, 154, 56, 0.13), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f5f8fb 100%);
}

.hero-premium {
  position: relative;
  overflow: hidden;
}

/* Subtle dot-grid pattern */
.hero-premium::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(26, 44, 74, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: 0;
}

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

.hero-grid,
.two-col,
.cta-box {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-visual-stack { display: grid; gap: 1rem; }

/* ── Typography ────────────────────────────────────────────────────────── */
.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent-dark);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

h1, h2, h3 { margin-top: 0; line-height: 1.15; }
h1 { font-size: clamp(2.3rem, 5vw, 4rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); margin-bottom: 0.85rem; }

.hero-text,
.section-heading p,
.card p,
.feature p,
.checklist-box,
.contact-card,
.hero-card p { color: var(--muted); }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 10px 24px rgba(106, 154, 56, 0.28);
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { border-color: var(--primary); }

.btn-call {
  background: var(--primary);
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 10px 24px rgba(26, 44, 74, 0.28);
}
.btn-call:hover { background: var(--primary-dark); }

.btn-whatsapp {
  background: #25d366;
  color: white;
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.22);
}
.btn-whatsapp:hover { background: #1fb85a; }
.btn-full { width: 100%; }

/* ── Hero list ─────────────────────────────────────────────────────────── */
.hero-points, .checklist {
  padding-left: 1.2rem;
  margin: 1.25rem 0 0;
}
.hero-points li, .checklist li { margin-bottom: 0.65rem; }

/* ── Cards / Surfaces ──────────────────────────────────────────────────── */
.hero-card, .card, .feature, .checklist-box, .contact-card, .trust-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card-inner, .card, .feature, .checklist-box, .contact-card, .trust-item {
  padding: 1.6rem;
}

.premium-card, .premium-feature, .premium-box, .premium-contact-card, .premium-service-card {
  box-shadow: var(--shadow-strong);
}

.card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 60px rgba(13, 37, 63, 0.14);
}

.badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 700;
}

/* ── Hero stat grid ────────────────────────────────────────────────────── */
.hero-stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 1.25rem;
}
.hero-stat-grid strong { display: block; color: var(--primary); margin-bottom: 0.2rem; }
.hero-stat-grid span { color: var(--muted); font-size: 0.9rem; }

/* ── Trust strip ───────────────────────────────────────────────────────── */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.trust-item { padding: 1rem; text-align: center; }
.trust-item strong { display: block; color: var(--primary); font-size: 0.95rem; margin-bottom: 0.25rem; }
.trust-item span { color: var(--muted); font-size: 0.82rem; }

/* ── Stats bar ─────────────────────────────────────────────────────────── */
.stats-bar {
  background: var(--primary);
  padding: 1.75rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
}

.stat-item strong {
  display: block;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.2rem;
}

.stat-item span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ── Sections ──────────────────────────────────────────────────────────── */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--surface-alt); }
.section-heading { max-width: 700px; margin-bottom: 1rem; }

/* ── Service groups ────────────────────────────────────────────────────── */
.service-group { margin-bottom: 3rem; }
.service-group:last-child { margin-bottom: 0; }

.service-group-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.service-group-icon-wrap {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(26, 44, 74, 0.1), rgba(106, 154, 56, 0.18));
  color: var(--primary);
}

.service-group-icon-wrap svg { width: 22px; height: 22px; }

.service-group-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0 0 0.15rem;
}

.service-group-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

/* No orphan centering - handled per-group via modifier classes */

/* ── Cards grid ────────────────────────────────────────────────────────── */
.cards-grid, .feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

/* 4-column variant for groups with exactly 4 cards (Cloud group) */
.cards-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-area-grid { margin-top: 1.5rem; }

.service-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(26, 44, 74, 0.1), rgba(106, 154, 56, 0.16));
  color: var(--primary);
  margin-bottom: 1rem;
}
.service-icon svg { width: 26px; height: 26px; }
.card h3, .feature h3 { margin-bottom: 0.75rem; }

/* ── CTA / Contact ─────────────────────────────────────────────────────── */
.cta-section { padding-bottom: 5rem; }

.cta-box {
  background: linear-gradient(135deg, #1a2c4a 0%, #0f2034 100%);
  color: white;
  border-radius: 28px;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-strong);
}

.cta-box .eyebrow, .cta-box p, .cta-box h2 { color: white; }

.contact-inline {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.contact-detail-item {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  font-size: 0.93rem;
}

.contact-label {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  min-width: 72px;
}

.cta-box .contact-detail-item a {
  color: #ffffff !important;
  text-decoration: none;
}
.cta-box .contact-detail-item a:hover { text-decoration: underline; }
.contact-detail-item span:not(.contact-label) { color: #fff; }

.contact-card { box-shadow: none; }
.contact-card p, .contact-card strong, .contact-card span { color: var(--text); }
.contact-card a { color: var(--primary); }

.contact-form {
  display: grid;
  gap: 0.9rem;
}

.contact-form label {
  display: grid;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.contact-form textarea { resize: vertical; min-height: 110px; }

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(106, 154, 56, 0.18);
}

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

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}

.footer-brand-name {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #ffffff;
  margin: 0 0 0.4rem;
}

.footer-brand p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.footer-links h4, .footer-contact h4 {
  color: white;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 1rem;
}

.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-links li { font-size: 0.86rem; color: rgba(255, 255, 255, 0.6); }

.footer-links .lang, .footer-contact .lang { display: none; }
body[data-lang='en'] .footer-links .lang-en,
body[data-lang='en'] .footer-contact .lang-en,
body[data-lang='es'] .footer-links .lang-es,
body[data-lang='es'] .footer-contact .lang-es { display: inline; }

.footer-contact p { margin: 0 0 0.5rem; font-size: 0.88rem; color: rgba(255, 255, 255, 0.6); }
.footer-contact a { color: rgba(255, 255, 255, 0.85); text-decoration: none; transition: color 0.15s; }
.footer-contact a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.1rem 0;
}

.footer-bottom .container {
  display: flex;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
  flex-wrap: wrap;
}

.footer-bottom .lang { display: none; }
body[data-lang='en'] .footer-bottom .lang-en,
body[data-lang='es'] .footer-bottom .lang-es { display: inline; }

/* ── Floating Action Buttons ───────────────────────────────────────────── */
.fab-group {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: flex-end;
}

.fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  max-width: 56px;
  padding: 0 16px;
  border-radius: 999px;
  overflow: hidden;
  gap: 0;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  color: white;
  white-space: nowrap;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  transition: max-width 0.35s ease, gap 0.35s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.fab:hover {
  max-width: 260px;
  gap: 0.65rem;
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

.fab svg { flex-shrink: 0; }
.fab-label { overflow: hidden; }

.fab-whatsapp { background: #25d366; }
.fab-call { background: var(--primary); }

/* ── Back to top ───────────────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 200;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.back-to-top:hover { background: var(--primary); color: white; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero-grid, .two-col, .cta-box { grid-template-columns: 1fr; }
  .cards-grid, .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .stat-item { padding: 1rem; border: 1px solid rgba(255,255,255,0.08); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .hamburger { display: flex; }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem 1.25rem;
    gap: 0.85rem;
    box-shadow: 0 8px 24px rgba(13, 37, 63, 0.1);
    z-index: 99;
  }

  .nav.is-open { display: flex; }
  .site-header { position: relative; }

  .cards-grid, .feature-grid, .cards-grid-4 { grid-template-columns: 1fr; }
  .trust-strip { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
}

@media (max-width: 540px) {
  .hero { padding-top: 3rem; }
  .container { width: min(1120px, calc(100% - 1.2rem)); }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; }
  .cta-box { padding: 1.75rem 1.25rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

}
