/* ============================================
   COMMERCIAL DIGITAL SOLUTIONS — Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Colores de marca */
  --navy-deep: #0A2540;
  --navy-mid: #0F3159;
  --navy-panel: #123A5E;
  --turquoise: #14C7B0;
  --turquoise-bright: #1DE0C4;
  --violet: #5B3DE8;
  --violet-bright: #7C5CF5;
  --off-white: #F6F8FB;
  --paper: #FFFFFF;
  --ink: #0A2540;
  --ink-soft: #4A5B70;
  --line: rgba(10, 37, 64, 0.10);
  --line-dark: rgba(255, 255, 255, 0.12);

  /* Gradiente de marca (del logo) */
  --brand-gradient: linear-gradient(120deg, var(--turquoise) 0%, var(--violet) 100%);
  --brand-gradient-soft: linear-gradient(120deg, rgba(20,199,176,0.15) 0%, rgba(91,61,232,0.15) 100%);

  /* Tipografía */
  --font-display: 'Baloo 2', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Espaciado */
  --container-w: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 32px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 4.5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); }
h3 { font-size: 1.35rem; font-weight: 600; }

p { color: var(--ink-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--turquoise);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--brand-gradient);
  border-radius: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ============ SIGNATURE FLOW LINE ============ */
.flow-divider {
  width: 100%;
  height: 64px;
  display: block;
  overflow: hidden;
}
.flow-divider svg { width: 100%; height: 100%; display: block; }
.flow-line-draw {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: drawFlow 2.4s ease forwards;
}
@keyframes drawFlow {
  to { stroke-dashoffset: 0; }
}

/* ============ HEADER / NAV ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 37, 64, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dark);
}
.nav-wrap {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img { height: 40px; width: auto; }
.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  line-height: 1.1;
}
.brand-text span { display: block; font-size: 0.62rem; font-weight: 500; letter-spacing: 0.08em; color: var(--turquoise-bright); text-transform: uppercase; margin-top: 2px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,0.82);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 9px 16px;
  border-radius: 100px;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-links a.active { color: #fff; background: var(--brand-gradient); }

.nav-cta {
  margin-left: 8px;
  padding: 10px 20px !important;
  background: transparent !important;
  border: 1.5px solid var(--turquoise);
  color: var(--turquoise-bright) !important;
}
.nav-cta:hover { background: var(--turquoise) !important; color: var(--navy-deep) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { width: 24px; height: 2px; background: #fff; border-radius: 2px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 100px;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.btn-primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 8px 24px rgba(91, 61, 232, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(91, 61, 232, 0.38); }
.btn-outline {
  background: transparent;
  color: var(--navy-deep);
  border: 1.5px solid var(--line);
}
.btn-outline:hover { border-color: var(--violet); color: var(--violet); }
.btn-outline-light {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.3);
}
.btn-outline-light:hover { border-color: var(--turquoise-bright); color: var(--turquoise-bright); }

/* ============ HERO (general dark) ============ */
.hero {
  position: relative;
  background: var(--navy-deep);
  color: #fff;
  overflow: hidden;
  padding: 100px 0 80px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.28;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,37,64,0.55) 0%, rgba(10,37,64,0.88) 60%, var(--navy-deep) 100%);
}
.hero-content { position: relative; z-index: 2; }
.hero h1 { color: #fff; max-width: 780px; }
.hero .lead { color: rgba(255,255,255,0.78); font-size: 1.15rem; max-width: 620px; margin-top: 20px; }
.hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }

/* Page hero (subpages, shorter) */
.page-hero {
  position: relative;
  background: var(--navy-deep);
  color: #fff;
  padding: 72px 0 56px;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  right: -120px; top: -120px;
  width: 420px; height: 420px;
  background: var(--brand-gradient);
  opacity: 0.14;
  filter: blur(60px);
  border-radius: 50%;
}
.page-hero .eyebrow { color: var(--turquoise-bright); }
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255,255,255,0.72); max-width: 640px; margin-top: 14px; font-size: 1.08rem; }

/* ============ SECTIONS ============ */
section { padding: 88px 0; }
.section-light { background: var(--off-white); }
.section-white { background: var(--paper); }
.section-navy { background: var(--navy-deep); color: #fff; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-navy p { color: rgba(255,255,255,0.7); }
.section-panel { background: var(--navy-panel); color: #fff; }
.section-panel h2, .section-panel h3 { color: #fff; }
.section-panel p { color: rgba(255,255,255,0.7); }

.section-head { max-width: 680px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ============ CARDS ============ */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(10,37,64,0.08); border-color: transparent; }

.icon-badge {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--brand-gradient-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.icon-badge svg { width: 26px; height: 26px; }

/* ============ GRID UTILITIES ============ */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============ BUSINESS UNITS (Inicio) ============ */
.unit-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--navy-panel);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.unit-card:hover { transform: translateY(-6px); border-color: var(--turquoise); }
.unit-logo-wrap {
  width: 100%;
  height: 110px;
  border-radius: 10px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
}
.unit-logo-wrap img { max-height: 100%; max-width: 100%; object-fit: contain; }
.unit-card h3 { color: #fff; }
.unit-card p { color: rgba(255,255,255,0.65); font-size: 0.95rem; }
.unit-link {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--turquoise-bright); font-weight: 700; font-size: 0.9rem;
}
.unit-link svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.unit-card:hover .unit-link svg { transform: translateX(4px); }

/* ============ VALUES (Nosotros) ============ */
.value-item {
  display: flex;
  gap: 18px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.value-item:last-child { border-bottom: none; }
.value-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  min-width: 48px;
}
.value-item h4 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 6px; }

/* Mission / Vision cards */
.mv-card {
  border-radius: var(--radius);
  padding: 40px;
  color: #fff;
}
.mv-card.mission { background: linear-gradient(150deg, #123A5E 0%, #0A2540 100%); }
.mv-card.vision { background: linear-gradient(150deg, #3D2B8C 0%, #1a1550 100%); }
.mv-card .icon-badge { background: rgba(255,255,255,0.12); }
.mv-card h3 { color: #fff; margin-bottom: 14px; }
.mv-card p { color: rgba(255,255,255,0.82); }

/* ============ TIMELINE / HISTORY ============ */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: "";
  position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--brand-gradient);
  border-radius: 2px;
}
.tl-item { position: relative; padding-bottom: 40px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute; left: -32px; top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--violet);
}
.tl-item h4 { font-family: var(--font-display); margin-bottom: 6px; }

/* ============ TEAM ============ */
.team-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
}
.team-card .role {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--violet);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.team-card h3 { margin-bottom: 4px; }
.team-card .cred { font-size: 0.86rem; color: var(--ink-soft); margin-bottom: 14px; font-style: italic; }

/* ============ STATS STRIP ============ */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 40px 0;
}
.stat-item { text-align: center; }
.stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.3rem;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-top: 6px; }

/* ============ SERVICES PAGE ============ */
.service-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
  margin-bottom: 22px;
}
.service-head {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 30px;
  cursor: pointer;
  user-select: none;
}
.service-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--turquoise);
  min-width: 40px;
}
.service-head h3 { flex: 1; }
.service-toggle {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--off-white);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s ease, background 0.3s ease;
}
.service-block.open .service-toggle { background: var(--brand-gradient); transform: rotate(45deg); }
.service-block.open .service-toggle svg path { stroke: #fff; }
.service-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.service-block.open .service-body { max-height: 600px; }
.service-body-inner {
  padding: 0 30px 30px 90px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag-pill {
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--off-white);
  color: var(--ink);
  border: 1px solid var(--line);
}

/* ============ CONTACT PAGE ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-item {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.contact-item:last-child { border-bottom: none; }
.contact-item .icon-badge { background: rgba(255,255,255,0.08); flex-shrink: 0; margin-bottom: 0; }
.contact-item h4 { color: #fff; font-family: var(--font-display); font-size: 1rem; margin-bottom: 4px; }
.contact-item p, .contact-item a { color: rgba(255,255,255,0.72); font-size: 0.96rem; }
.contact-item a:hover { color: var(--turquoise-bright); }

.social-row { display: flex; gap: 12px; margin-top: 28px; }
.social-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s ease;
}
.social-btn:hover { background: var(--brand-gradient); border-color: transparent; transform: translateY(-3px); }
.social-btn svg { width: 20px; height: 20px; }

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-dark);
  height: 340px;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.3) invert(0.92) contrast(0.9); }

/* Form */
.form-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 40px;
  border: 1px solid var(--line);
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--off-white);
  transition: border-color 0.2s ease;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--violet);
  background: #fff;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ============ CTA BAND ============ */
.cta-band {
  background: var(--brand-gradient);
  border-radius: 24px;
  padding: 56px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,0.88); }
.cta-band .btn-primary { background: #fff; color: var(--navy-deep); box-shadow: none; }
.cta-band .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.2); }

/* ============ FOOTER ============ */
.site-footer { background: #071A2E; color: rgba(255,255,255,0.6); padding: 64px 0 28px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand img { height: 36px; margin-bottom: 14px; }
.footer-brand p { color: rgba(255,255,255,0.5); font-size: 0.9rem; max-width: 280px; }
.footer-col h5 {
  font-family: var(--font-display);
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.9rem; color: rgba(255,255,255,0.55); transition: color 0.2s ease; }
.footer-col a:hover { color: var(--turquoise-bright); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; font-size: 0.82rem; color: rgba(255,255,255,0.4);
  flex-wrap: wrap; gap: 10px;
}

/* ============ SCROLL REVEAL ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-links { position: fixed; top: 68px; left: 0; right: 0; background: var(--navy-deep); flex-direction: column; align-items: stretch; padding: 16px 24px 24px; gap: 4px; border-bottom: 1px solid var(--line-dark); transform: translateY(-130%); transition: transform 0.3s ease; }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 13px 16px; }
  .nav-toggle { display: flex; }
  .nav-cta { margin-left: 0; margin-top: 8px; text-align: center; justify-content: center; }
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
  .cta-band { padding: 36px 26px; flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  h1 { font-size: 2.1rem; }
}
