/* ===========================================================
   TRASEMEX-MX — Hoja de estilos compartida
   =========================================================== */

:root {
  --navy-900: #071730;
  --navy-800: #0f2a4f;
  --navy-700: #163a68;
  --navy-600: #1e4d87;
  --orange-500: #ff6a2b;
  --orange-600: #e6541a;
  --orange-100: #fff1e8;
  --gray-50: #f6f7fa;
  --gray-100: #eef1f5;
  --gray-200: #e2e6ec;
  --gray-400: #9aa5b1;
  --gray-600: #5b6674;
  --gray-800: #232b36;
  --white: #ffffff;
  --success: #1e9e5a;
  --radius-md: 12px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(7, 23, 48, 0.06);
  --shadow-md: 0 14px 32px rgba(7, 23, 48, 0.10);
  --shadow-lg: 0 26px 60px rgba(7, 23, 48, 0.16);
  --max-width: 1180px;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

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

/* ---------- Aparición al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.8,.2,1); }
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

.section { padding: 104px 0; }
.section--tight { padding: 56px 0; }
.section--gray { background: var(--gray-50); }
.section--navy { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: var(--white); position: relative; overflow: hidden; }
.section--navy::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(700px 380px at 88% 8%, rgba(255,106,43,0.18), transparent 65%);
  pointer-events: none;
}
.section--navy .container { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange-600);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--orange-500);
  display: inline-block;
}
.section--navy .eyebrow, .hero .eyebrow, .page-hero .eyebrow { color: #ffb489; }
.section--navy .eyebrow::before, .hero .eyebrow::before, .page-hero .eyebrow::before { background: #ffb489; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; color: var(--navy-900); }
.section--navy h1, .section--navy h2, .section--navy h3, .section--navy h4,
.hero h1, .hero h2, .hero h3, .hero h4,
.page-hero h1, .page-hero h2, .page-hero h3, .page-hero h4 { color: var(--white); }

h1 { font-size: clamp(34px, 5.2vw, 56px); }
h2 { font-size: clamp(26px, 3.6vw, 38px); }
h3 { font-size: 20px; letter-spacing: -0.01em; }

.accent-text {
  background: linear-gradient(100deg, var(--orange-500), #ffb489);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: 18px;
  color: var(--gray-600);
  max-width: 620px;
}
.section--navy .lead, .hero .lead { color: #cbd9ec; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(.2,.8,.2,1), box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn i { transition: transform 0.2s ease; }
.btn:hover { transform: translateY(-3px); }
.btn:hover i { transform: translateX(2px); }
.btn-primary { background: var(--orange-500); color: var(--white); box-shadow: 0 12px 28px rgba(255, 106, 43, 0.32); }
.btn-primary:hover { background: var(--orange-600); box-shadow: 0 16px 34px rgba(255, 106, 43, 0.4); }
.btn-outline { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.4); color: var(--white); backdrop-filter: blur(4px); }
.btn-outline:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.6); }
.btn-navy { background: var(--navy-900); color: var(--white); }
.btn-navy:hover { background: var(--navy-800); }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ---------- Header / Nav ---------- */
.topbar {
  background: var(--navy-900);
  color: #cbd9ec;
  font-size: 13px;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar a { display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: var(--white); }
.topbar-links { display: flex; gap: 22px; flex-wrap: wrap; }

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid rgba(226, 230, 236, 0.8);
  transition: box-shadow 0.25s ease;
}
.header.is-scrolled { box-shadow: 0 8px 24px rgba(7, 23, 48, 0.08); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  transition: padding 0.25s ease;
}
.header.is-scrolled .nav {
  padding: 11px 0;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo img {
  width: 230px;
  height: 65px;
  object-fit: contain;
  object-position: left center;
  display: block;
  transition: transform 0.2s ease;
}

.logo:hover img {
  transform: scale(1.03);
}

/* Logo en celular */
@media (max-width: 768px) {
  .logo img {
    width: 175px;
    height: 52px;
  }
}

.nav-links { display: flex; align-items: center; gap: 0; }
.nav-links a {
  position: relative;
  padding: 10px 11px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--navy-800);
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 11px; right: 11px; bottom: 4px;
  height: 2px;
  background: var(--orange-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-links a:hover { color: var(--orange-600); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--orange-600); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 20px; height: 2px;
  background: var(--navy-900);
  position: relative;
  transition: 0.2s;
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }

/* ---------- Hero (image slider) ---------- */
.hero {
  position: relative;
  color: var(--white);
  overflow: hidden;
  min-height: 640px;
  background: var(--navy-900);
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
  display: flex;
  align-items: center;
  z-index: 1;
}
.hero-slide.active { opacity: 1; z-index: 2; }
.hero-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  display: block;
  transform: scale(1.08);
  transition: transform 7s cubic-bezier(.25,.1,.25,1);
}
.hero-slide.active .hero-slide-img { transform: scale(1); }
@media (prefers-reduced-motion: reduce) {
  .hero-slide-img, .hero-slide.active .hero-slide-img { transform: none; transition: none; }
}
.hero-slide-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, rgba(9,22,43,0.92) 0%, rgba(9,22,43,0.72) 42%, rgba(9,22,43,0.25) 75%);
}
.hero-slide-content { position: relative; z-index: 2; width: 100%; max-width: 620px; padding-top: 40px; padding-bottom: 40px; }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 10px;
}
.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, width 0.25s ease;
}
.hero-dot.active { background: var(--orange-500); width: 26px; border-radius: 4px; }
.hero-badges { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.hero-badge {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  min-width: 140px;
  backdrop-filter: blur(10px) saturate(1.3);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  transition: transform 0.2s ease, background 0.2s ease;
}
.hero-badge:hover { transform: translateY(-2px); background: rgba(255,255,255,0.13); }
.hero-badge strong { display: block; font-family: var(--font-display); font-size: 23px; color: var(--white); }
.hero-badge span { font-size: 12.5px; color: #e5edf8; }

/* ---------- Cards / Grids ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--orange-100);
  color: var(--orange-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  margin-bottom: 20px;
  transition: transform 0.25s ease;
}
.card:hover .card-icon { transform: scale(1.08); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--gray-600); font-size: 15px; }
.card ul { margin-top: 14px; display: grid; gap: 8px; }
.card ul li { font-size: 14px; color: var(--gray-600); display: flex; gap: 8px; }
.card ul li::before { content: "✓"; color: var(--success); font-weight: 700; }

/* ---------- Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  background: var(--navy-900);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  margin-top: -78px;
  position: relative;
  z-index: 5;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.08);
}
.stats div strong { display: block; font-family: var(--font-display); font-size: 38px; letter-spacing: -0.02em; color: var(--orange-500); }
.stats div span { font-size: 13px; color: #cbd9ec; }

/* ---------- Timeline (Empresa) ---------- */
.timeline { position: relative; padding-left: 30px; border-left: 3px solid var(--gray-200); display: grid; gap: 34px; }
.timeline-item { position: relative; }
.timeline-item::before {
  content: "";
  position: absolute; left: -39px; top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--orange-500);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--orange-500);
}
.timeline-item strong { color: var(--navy-900); display: block; margin-bottom: 4px; }
.timeline-item p { color: var(--gray-600); font-size: 14.5px; }

/* ---------- Value / mission-vision ---------- */
.mv-card { border-radius: var(--radius-lg); padding: 32px; }
.mv-card.mission { background: var(--orange-100); }
.mv-card.vision { background: var(--gray-100); }
.mv-card h3 { margin-bottom: 10px; }
.mv-card p { color: var(--gray-600); }

/* ---------- Table (Servicios) ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { text-align: left; padding: 16px 20px; font-size: 14.5px; }
thead th { background: var(--navy-900); color: var(--white); font-weight: 600; }
tbody tr:nth-child(even) { background: var(--gray-50); }
tbody td { color: var(--gray-600); border-bottom: 1px solid var(--gray-200); }
tbody tr:last-child td { border-bottom: none; }

/* ---------- Gallery ---------- */
.gallery-tile {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  box-shadow: var(--shadow-sm);
  background-color: var(--navy-800);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.gallery-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: 0; display: block; }
.gallery-tile::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 40%, rgba(10,31,61,0.88)); }
.gallery-tile span { position: relative; z-index: 2; padding: 18px; font-weight: 600; font-size: 14.5px; }
.gallery-tile .icon { position: absolute; top: 18px; left: 18px; z-index: 2; font-size: 18px; background: rgba(255,255,255,0.16); width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }

/* ---------- Photo strip (tira de fotos reales) ---------- */
.photo-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.photo-strip figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); background: var(--navy-800); position: relative; aspect-ratio: 4/3; }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.photo-strip figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 12px 14px;
  font-size: 13px; font-weight: 600; color: var(--white);
  background: linear-gradient(180deg, transparent, rgba(10,31,61,0.85));
}
@media (max-width: 980px) { .photo-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .photo-strip { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--navy-800); }
.field input, .field select, .field textarea {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 14.5px;
  color: var(--gray-800);
  background: var(--gray-50);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--orange-500);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(255, 106, 43, 0.12);
}
.field small { color: var(--gray-400); font-size: 12px; }
.form-note { font-size: 13px; color: var(--gray-400); margin-top: 10px; }
.form-status { display: none; margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-md); font-size: 14px; font-weight: 600; }
.form-status.show { display: block; }
.form-status.ok { background: #e6f7ee; color: var(--success); }
.form-status.err { background: #fdeceb; color: #c0392b; }

/* ---------- Testimonials ---------- */
.quote-card { background: var(--white); border-radius: var(--radius-lg); padding: 28px; border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm); }
.quote-card p { color: var(--gray-600); font-style: italic; margin-bottom: 16px; }
.quote-who { display: flex; align-items: center; gap: 12px; }
.quote-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--navy-800); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.quote-who strong { display: block; font-size: 14px; color: var(--navy-900); }
.quote-who span { font-size: 12.5px; color: var(--gray-400); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--orange-500), var(--orange-600));
  border-radius: var(--radius-lg);
  padding: 48px;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(420px 240px at 110% -10%, rgba(255,255,255,0.25), transparent 70%);
  pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: var(--white); margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,0.9); }

/* ---------- Footer ---------- */
.footer { background: var(--navy-900); color: #b9c7dc; padding: 64px 0 24px; }
.footer .grid-4 { gap: 40px; margin-bottom: 40px; }
.footer h4 { color: var(--white); font-size: 15px; margin-bottom: 16px; }
.footer ul { display: grid; gap: 10px; }
.footer a { color: #b9c7dc; font-size: 14px; }
.footer a:hover { color: var(--white); }
.footer p { font-size: 14px; color: #93a4bd; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: #7f92ad; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--white); margin-bottom: 14px; }

/* ---------- Floating WhatsApp ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.5);
  z-index: 200;
  transition: transform 0.2s ease;
  animation: wa-pulse 2.6s ease-in-out infinite;
}
.whatsapp-float:hover { transform: scale(1.08); animation-play-state: paused; }
@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 10px 26px rgba(37, 211, 102, 0.5), 0 0 0 0 rgba(37, 211, 102, 0.45); }
  50% { box-shadow: 0 10px 26px rgba(37, 211, 102, 0.5), 0 0 0 10px rgba(37, 211, 102, 0); }
}
@media (prefers-reduced-motion: reduce) { .whatsapp-float { animation: none; } }

/* ---------- Breadcrumb / page hero ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: var(--white);
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(600px 340px at 90% 0%, rgba(255,106,43,0.22), transparent 65%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero .crumbs { font-size: 13px; color: #9fb2cc; margin-bottom: 14px; }
.page-hero .crumbs a:hover { color: var(--white); }
.page-hero p.lead { color: #cbd9ec; }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0 !important; }
.text-center { text-align: center; }
.tag {
  display: inline-block;
  background: var(--gray-100);
  color: var(--navy-800);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  margin: 3px 6px 3px 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero { min-height: 560px; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 36px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .hero h1, .page-hero h1 { font-size: 28px; }
  .hero-badges { gap: 8px; }
  .hero-badge { min-width: 0; flex: 1 1 100px; padding: 12px 12px; }
}

@media (max-width: 760px) {
  .hero-slide-scrim { background: linear-gradient(180deg, rgba(9,22,43,0.55) 0%, rgba(9,22,43,0.92) 65%); }
  .topbar-links { display: none; }
  .nav-links { position: fixed; top: 0; right: 0; height: 100vh; width: 78%; max-width: 320px; background: var(--white); flex-direction: column; align-items: flex-start; padding: 90px 24px 24px; box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform 0.25s ease; z-index: 99; }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { width: 100%; }
  .nav-toggle { display: flex; }
  .nav-cta .btn span.btn-text { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .stats { grid-template-columns: 1fr 1fr; padding: 28px; }
  .section { padding: 64px 0; }
}
