/* ===========================
   TOKENS — paleta Alter LATAM
=========================== */
:root {
  /* Brand palette */
  --lime:     #D5EA03;
  --orange:   #FB4806;
  --purple:   #5952FA;
  --lavender: #BBB9FF;
  --gray:     #A7A7A7;
  --peach:    #FFD4BB;
  --offwhite: #F4F4F4;

  /* UI tokens */
  --bg:         #ffffff;
  --surface:    #F4F4F4;
  --border:     #DEDEE8;
  --accent:     #5952FA;
  --accent-2:   #FB4806;
  --text:       #111827;
  --text-muted: #6B7280;
  

  --font: 'Aptos', 'Segoe UI', system-ui, sans-serif;

  --nav-h:  76px;
  --max-w:  1160px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --radius: 14px;
  --ease:   cubic-bezier(0.22, 1, 0.36, 1);
}


/* ===========================
   TIPOGRAFÍA — Aptos (self-hosted)
=========================== */
@font-face {
  font-family: 'Aptos';
  src: url('/fonts/Aptos.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Aptos';
  src: url('/fonts/Aptos-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Aptos';
  src: url('/fonts/Aptos-Italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Aptos';
  src: url('/fonts/Aptos-Bold-Italic.woff2') format('woff2');
  font-weight: 700; font-style: italic; font-display: swap;
}

/* ===========================
   RESET
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  font-family: 'Aptos', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===========================
   UTILITIES
=========================== */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.section-header { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-header--center { text-align: center; }
.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

/* ===========================
   SCROLL REVEAL
=========================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

/* ===========================
   BUTTONS
=========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 3px 16px rgba(89,82,250,0.25);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(89,82,250,0.35); }
.btn--ghost { border: 1.5px solid var(--border); color: var(--text-muted); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--text); }
.btn--full { width: 100%; justify-content: center; }
.btn--loading .btn-text   { display: none; }
.btn--loading .btn-loading { display: inline; }
.btn-loading { display: none; }

/* ===========================
   NAV
=========================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: 0 2px 14px rgba(0,0,0,0.07); }
.nav__inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
/* Logo sin padding — tamaño real */
.nav__logo img { height: 52px; width: auto; }

.nav__links { display: flex; align-items: center; gap: 0.15rem; }
.nav__links a {
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav__links a:hover { color: var(--text); background: var(--surface); }
.nav__cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 0.45rem 1.1rem !important;
  font-weight: 500 !important;
  transition: opacity 0.2s, transform 0.2s !important;
}
.nav__cta:hover { opacity: 0.9; transform: translateY(-1px); }

.nav__burger { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav__burger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }
.nav__mobile {
  display: none;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 1rem var(--gutter) 1.5rem;
}
.nav__mobile ul { display: flex; flex-direction: column; }
.nav__mobile a {
  display: block;
  padding: 0.7rem 0.5rem;
  font-size: 1rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.nav__mobile.open { display: block; }

/* ===========================
   HERO — logo grande, textura de fondo
=========================== */
.hero {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-top: var(--nav-h);
  background-image: url('/assets/hero-bg.jpg');
  background-size: cover;
  background-position: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.55);
}
.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-block: clamp(3rem, 6vw, 5rem);
}
.hero__logo {
  width: clamp(240px, 40vw, 460px);
  height: auto;
  margin-inline: auto;
  margin-bottom: 1.75rem;
}
.hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.65rem;
}
.hero__sub {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 2.25rem;
}
.hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-block: clamp(3rem, 8vw, 6rem);
}
.hero__logo {
  width: clamp(280px, 48vw, 520px);
  height: auto;
  margin-inline: auto;
  margin-bottom: 2rem;
}
.hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.hero__sub {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 2.5rem;
}
.hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero__scroll {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: var(--text-muted);
  animation: bounce 2.5s ease-in-out infinite;
  transition: color 0.2s;
}
.hero__scroll:hover { color: var(--accent); }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

/* ===========================
   PROPÓSITO
=========================== */
.proposito {
  padding: clamp(4rem, 7vw, 7rem) 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.proposito__inner { max-width: 780px; }
.proposito__text {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1.55;
  color: var(--text);
}
.proposito__text em {
  font-style: italic;
  color: var(--accent-2);
}

/* ===========================
   EQUIPO — fotos circulares, layout limpio
   (los PNG tienen recorte circular con fondo transparente)
=========================== */
.equipo {
  padding: clamp(4rem, 7vw, 7rem) 0;
  background: var(--bg);
}
.equipo__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}
.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.75rem 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: box-shadow 0.3s, transform 0.3s var(--ease);
}
.team-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transform: translateY(-3px);
}
/* Foto circular explícita — abraza el formato del PNG */
.team-card__photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1.25rem;
  background: var(--surface);
  flex-shrink: 0;
  border: 3px solid var(--border);
}
.team-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 0;
}
.team-card__body { width: 100%; }
.team-card__body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.team-card__email {
  display: block;
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 0.9rem;
  word-break: break-all;
  transition: opacity 0.2s;
}
.team-card__email:hover { opacity: 0.7; }
.team-card__body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  text-align: left;
}

/* ===========================
   CLIENTES — logos más grandes
=========================== */
.clientes {
  padding: clamp(4rem, 7vw, 7rem) 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.marquee-wrapper {
  position: relative;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.marquee-fade {
  position: absolute; top: 0; bottom: 0;
  width: 120px; z-index: 2; pointer-events: none;
}
.marquee-fade--left  { left: 0;  background: linear-gradient(to right, var(--surface) 40%, transparent); }
.marquee-fade--right { right: 0; background: linear-gradient(to left, var(--surface) 40%, transparent); }
.marquee-row { overflow: hidden; }
.marquee-track {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: max-content;
}
.marquee-track--fwd { animation: marquee-fwd 52s linear infinite; }
.marquee-track--rev { animation: marquee-rev 52s linear infinite; }
@keyframes marquee-fwd { from { transform: translateX(0); }    to { transform: translateX(-50%); } }
@keyframes marquee-rev { from { transform: translateX(-50%); } to { transform: translateX(0); }   }
.marquee-track:hover { animation-play-state: paused; }

.marquee-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 2rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  height: 120px;
  min-width: 200px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.marquee-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 14px rgba(89,82,250,0.1);
}
.marquee-item img {
  max-height: 80px;
  max-width: 160px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.6);
  transition: filter 0.3s;
}
.marquee-item:hover img { filter: none; }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none !important; }
}

/* ===========================
   SERVICIOS — imágenes grandes y visibles
=========================== */
.servicios {
  padding: clamp(4rem, 7vw, 7rem) 0;
  background: var(--bg);
}
.servicios__nube {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.25rem 0.65rem;
  margin-bottom: 2.5rem;
  padding: 2rem 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  line-height: 1.25;
}
.servicios__nube span {
  display: inline-block;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: default;
  transition: transform 0.18s var(--ease), color 0.18s, text-shadow 0.18s;
  will-change: transform;
}

/* Hover dramático: escala + glow del color propio */
.servicios__nube span:hover       { transform: scale(1.22); }
.w-dark:hover                     { color: var(--accent); text-shadow: 0 0 22px rgba(89,82,250,0.45); }
.w-teal:hover                     { color: #3b34d4; text-shadow: 0 0 22px rgba(89,82,250,0.5); }
.w-purple:hover { color: var(--accent-2); text-shadow: 0 0 22px rgba(251,72,6,0.5); }
.w-gray:hover { color: var(--accent); text-shadow: 0 0 18px rgba(89,82,250,0.4); }

/* Tamaños */
.w-xxl {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  font-style: italic;
}
.w-xl {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 600;
}
.w-lg  { font-size: clamp(1.05rem, 2vw, 1.4rem);   font-weight: 600; }
.w-md  { font-size: clamp(0.88rem, 1.4vw, 1.05rem); font-weight: 500; }
.w-sm  { font-size: clamp(0.72rem, 1.1vw, 0.84rem); font-weight: 400; }

/* Colores base */
.w-teal   { color: var(--accent); }
.w-purple { color: var(--accent-2); }
.w-dark   { color: var(--text); }
.w-gray   { color: var(--text-muted); }
.servicios__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.servicio-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s var(--ease);
}
.servicio-card:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,0.08);
  transform: translateY(-3px);
}
.servicio-card__img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.servicio-card__img img {
  width: 72%;
  height: 72%;
  object-fit: contain;
  transition: transform 0.4s var(--ease);
}
.servicio-card:hover .servicio-card__img img { transform: scale(1.05); }
.servicio-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.25rem 1.5rem 0.5rem;
}
.servicio-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 1.5rem 1.5rem;
}
.brochure-cta { text-align: center; }

/* ===========================
   CONTACTO
=========================== */
.contacto {
  padding: clamp(4rem, 7vw, 7rem) 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.contacto__inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}
.contacto__info h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1.75rem;
}
.contacto__datos { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.contacto__datos li {
  display: flex; align-items: flex-start;
  gap: 0.7rem; color: var(--text-muted);
  font-size: 0.9rem; line-height: 1.6;
}
.contacto__datos svg { flex-shrink: 0; margin-top: 2px; color: var(--accent); }
.contacto__social { display: flex; gap: 0.65rem; flex-wrap: wrap; }
.social-btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px; font-size: 0.84rem;
  color: var(--text-muted); transition: all 0.2s;
}
.social-btn:hover { border-color: var(--accent); color: var(--text); background: var(--bg); }

.contacto__form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.form-group:last-of-type { margin-bottom: 1.25rem; }
label { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
.required { color: var(--accent); }
input, textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem; color: var(--text);
  transition: border-color 0.2s; outline: none;
  width: 100%; resize: vertical;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 0.5; }
input:focus, textarea:focus { border-color: var(--accent); background: var(--bg); }
input.error, textarea.error { border-color: #dc2626; }
.form-status { margin-top: 1rem; font-size: 0.875rem; text-align: center; min-height: 1.4rem; }
.form-status.success { color: var(--accent); }
.form-status.error   { color: #dc2626; }

/* ===========================
   FOOTER — logo más grande
=========================== */
.footer {
  padding: 2.25rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}
.footer__logo img { height: 44px; width: auto; opacity: 0.85; }
.footer__center { text-align: center; justify-self: center; }
.footer__copy {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.footer__copy a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer__copy a:hover { color: var(--accent); }
.ccs-sello { justify-self: end; }

/* ── Sello CCS ── */
.ccs-sello__logo {
  width: 64px;
  height: auto;
  cursor: pointer;
  transition: transform 0.2s var(--ease), filter 0.2s;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
  display: block;
}
.ccs-sello__logo:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.25));
}

@media (max-width: 640px) {
  .footer__inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 1rem;
  }
  .ccs-sello { justify-self: center; }
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1024px) {
  .equipo__grid    { grid-template-columns: 1fr 1fr; }
  .servicios__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .contacto__inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .equipo__grid    { grid-template-columns: 1fr; }
  .servicios__grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ── Sello CCS ── (estilos en .footer__inner arriba) */

/* ===========================
   MODAL CCS
=========================== */
.ccs-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.ccs-modal[hidden] { display: none; }

.ccs-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
  cursor: pointer;
}
.ccs-modal__box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 14px;
  padding: 2rem;
  width: 100%;
  max-width: 560px;
  max-height: 90svh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  animation: modalIn 0.25s var(--ease);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.ccs-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  font-size: 1rem;
  color: #003c88;
  font-weight: 700;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  padding: 0.25rem;
  transition: opacity 0.2s;
}
.ccs-modal__close:hover { opacity: 0.6; }

.ccs-modal__loader {
  display: inline-block;
  margin: 1rem auto;
  padding: 0.75rem 1.25rem;
  border: 2px solid #003c88;
  border-radius: 10px;
  color: #003c88;
  font-weight: 500;
  font-size: 0.9rem;
  background: #f5f8ff;
}
.ccs-modal__loader[hidden] { display: none; }

.ccs-modal__msg {
  font-size: 0.85rem;
  font-weight: 500;
  color: #003c88;
  margin: 0.5rem 0 1rem;
  min-height: 1.2rem;
}
.ccs-modal__canvas {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  border: 2px solid #003c88;
  border-radius: 8px;
}
.ccs-modal__canvas[hidden] { display: none; }
.ccs-modal__download {
  margin-top: 1.25rem;
  display: inline-flex;
}
.ccs-modal__download[hidden] { display: none; }
