/* ============================================================
   DSP S.A. — Hoja de estilos principal
   Desarrollo de Servicios Profesionales Yepes y Vázquez S.A. de C.V.
   ============================================================ */

:root {
  /* Colores de marca */
  --dsp-red-50: #FFF0F0;
  --dsp-red-100: #FFD9D9;
  --dsp-red-300: #FF6666;
  --dsp-red-500: #F50A0A;
  --dsp-red-600: #D90404;
  --dsp-red-700: #B50303;
  --dsp-red-800: #8F0303;

  --dsp-yellow-100: #FFF8D6;
  --dsp-yellow-300: #FCE466;
  --dsp-yellow-400: #F2CB05;
  --dsp-yellow-500: #E6B800;
  --dsp-yellow-700: #9E7D00;

  /* Escala de grises */
  --dsp-white: #FFFFFF;
  --dsp-gray-50: #F9FAFB;
  --dsp-gray-100: #F3F4F6;
  --dsp-gray-200: #E5E7EB;
  --dsp-gray-300: #D1D5DB;
  --dsp-gray-400: #9CA3AF;
  --dsp-gray-500: #6B7280;
  --dsp-gray-600: #4B5563;
  --dsp-gray-700: #374151;
  --dsp-gray-800: #1F232E;
  --dsp-gray-900: #0F1115;

  /* Semánticos */
  --dsp-success: #047857;
  --dsp-success-bg: #D1FAE5;
  --dsp-warning: #B45309;
  --dsp-warning-bg: #FEF3C7;
  --dsp-info: #0369A1;
  --dsp-info-bg: #E0F2FE;

  /* Tipografía */
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.75rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;

  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Espaciado */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Bordes y sombras */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px 0 rgb(15 17 21 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(15 17 21 / 0.08), 0 2px 4px -2px rgb(15 17 21 / 0.04);
  --shadow-lg: 0 10px 15px -3px rgb(15 17 21 / 0.08), 0 4px 6px -4px rgb(15 17 21 / 0.04);
  --shadow-xl: 0 20px 25px -5px rgb(15 17 21 / 0.08), 0 8px 10px -6px rgb(15 17 21 / 0.04);

  /* Layout */
  --max-width: 1280px;
  --header-height: 72px;
}

/* Reset básico */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: 1.65;
  color: var(--dsp-gray-700);
  background-color: var(--dsp-white);
}

img, picture, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--dsp-red-600);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

ul, ol { list-style: none; }

button { font-family: inherit; }

/* Utilitarios de layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container-sm { max-width: 768px; }
.container-md { max-width: 1024px; }

.section {
  padding-block: var(--space-20);
}

.section.alt { background-color: var(--dsp-gray-50); }

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  color: var(--dsp-gray-900);
  line-height: 1.1;
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--dsp-gray-600);
  max-width: 65ch;
  margin-bottom: var(--space-12);
}

.text-center { text-align: center; }
.text-center .section-subtitle { margin-inline: auto; }

/* Tipografía */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--dsp-gray-900);
  line-height: 1.1;
}

h1 { font-size: var(--text-5xl); font-weight: var(--font-bold); }
h2 { font-size: var(--text-4xl); font-weight: var(--font-bold); }
h3 { font-size: var(--text-3xl); font-weight: var(--font-semibold); }
h4 { font-size: var(--text-xl); font-weight: var(--font-semibold); color: var(--dsp-gray-800); }
h5 { font-size: var(--text-base); font-weight: var(--font-semibold); color: var(--dsp-gray-800); }

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: var(--text-lg);
  color: var(--dsp-gray-600);
  line-height: 1.6;
}

.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.text-white { color: var(--dsp-white); }
.text-gray-400 { color: var(--dsp-gray-400); }
.text-gray-500 { color: var(--dsp-gray-500); }
.text-red { color: var(--dsp-red-600); }
.text-yellow { color: var(--dsp-yellow-500); }

.uppercase { text-transform: uppercase; letter-spacing: 0.05em; }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  line-height: 1;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background-color: var(--dsp-red-600);
  color: var(--dsp-white);
}
.btn-primary:hover { background-color: var(--dsp-red-700); }

.btn-secondary {
  background-color: var(--dsp-yellow-400);
  color: var(--dsp-gray-900);
}
.btn-secondary:hover { background-color: var(--dsp-yellow-500); }

.btn-outline {
  background-color: transparent;
  border-color: var(--dsp-white);
  color: var(--dsp-white);
}
.btn-outline:hover {
  background-color: var(--dsp-white);
  color: var(--dsp-gray-900);
}

.btn-outline-dark {
  background-color: transparent;
  border-color: var(--dsp-gray-900);
  color: var(--dsp-gray-900);
}
.btn-outline-dark:hover {
  background-color: var(--dsp-gray-900);
  color: var(--dsp-white);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--dsp-white);
  border-bottom: 1px solid var(--dsp-gray-200);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--dsp-gray-900);
}

.logo img { height: 62px; width: auto; }
.logo:hover { text-decoration: none; }

.main-nav {
  display: none;
  align-items: center;
  gap: var(--space-8);
}

.main-nav a {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--dsp-gray-700);
  position: relative;
  padding-block: var(--space-2);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--dsp-red-600);
  text-decoration: none;
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--dsp-red-600);
}

.header-cta { display: none; }

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-md);
}

.menu-toggle:hover { background: var(--dsp-gray-100); }

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dsp-gray-900);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

/* Mobile nav */
.mobile-nav {
  position: fixed;
  inset: var(--header-height) 0 0 0;
  background: var(--dsp-white);
  padding: var(--space-6);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 999;
  overflow-y: auto;
}

.mobile-nav.open { transform: translateX(0); }

.mobile-nav a {
  display: block;
  padding: var(--space-4) 0;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  color: var(--dsp-gray-900);
  border-bottom: 1px solid var(--dsp-gray-200);
}

.mobile-nav a:hover,
.mobile-nav a.active { color: var(--dsp-red-600); text-decoration: none; }

.mobile-nav .btn {
  margin-top: var(--space-6);
  width: 100%;
}

@media (min-width: 1024px) {
  .main-nav { display: flex; }
  .header-cta { display: inline-flex; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none; }
}

/* Hero */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding-block: var(--space-16);
  color: var(--dsp-white);
  background-color: var(--dsp-gray-900);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15,17,21,0.88) 0%, rgba(15,17,21,0.55) 100%);
}

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

.hero-kicker {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--dsp-yellow-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
}

.hero h1 {
  color: var(--dsp-white);
  margin-bottom: var(--space-6);
  max-width: 16ch;
}

.hero .lead {
  color: var(--dsp-gray-300);
  margin-bottom: var(--space-8);
  max-width: 55ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.hero-sm {
  min-height: 45vh;
  text-align: center;
}

.hero-sm h1 {
  max-width: none;
  margin-inline: auto;
}

.hero-sm .lead {
  margin-inline: auto;
  color: var(--dsp-gray-300);
}

/* Trust band */
.trust-band {
  background: var(--dsp-gray-900);
  color: var(--dsp-white);
  padding-block: var(--space-6);
}

.trust-band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-6) var(--space-8);
  text-align: center;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
}

.trust-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--dsp-yellow-400);
  color: var(--dsp-gray-900);
  display: grid;
  place-items: center;
  font-weight: var(--font-bold);
  flex-shrink: 0;
}

/* Cards */
.card {
  background: var(--dsp-white);
  border: 1px solid var(--dsp-gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--dsp-yellow-100);
  color: var(--dsp-yellow-700);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
  font-size: var(--text-2xl);
}

.card h4 { margin-bottom: var(--space-3); }
.card p { font-size: var(--text-sm); margin-bottom: var(--space-5); }

.link-arrow {
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
  color: var(--dsp-red-600);
}

.link-arrow:hover { text-decoration: underline; }

/* Grids */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Servicios */
.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Features */
.feature {
  display: flex;
  gap: var(--space-4);
}

.feature-number {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  color: var(--dsp-red-600);
  line-height: 1;
  flex-shrink: 0;
}

.feature h4 { margin-bottom: var(--space-2); }

/* Stats */
.stat {
  text-align: center;
  padding: var(--space-6);
  background: var(--dsp-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--dsp-gray-200);
}

.stat-value {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: var(--font-bold);
  color: var(--dsp-red-600);
  line-height: 1;
  margin-bottom: var(--space-3);
}

.stat-label {
  font-weight: var(--font-semibold);
  color: var(--dsp-gray-700);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: var(--space-8);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--dsp-gray-300);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-10);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-8) + 5px);
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--dsp-red-600);
  border: 3px solid var(--dsp-white);
  box-shadow: 0 0 0 2px var(--dsp-red-600);
}

.timeline-year {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--dsp-red-600);
}

.timeline-item h4 { margin-bottom: var(--space-2); }

/* Clientes */
.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  padding: var(--space-6);
  background: var(--dsp-white);
  border: 1px solid var(--dsp-gray-200);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.client-logo:hover {
  border-color: var(--dsp-red-300);
  box-shadow: var(--shadow-md);
}

.client-logo span {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--dsp-gray-700);
  text-align: center;
}

/* Documentación */
.doc-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--dsp-white);
  border: 1px solid var(--dsp-gray-200);
  border-radius: var(--radius-lg);
}

.doc-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--dsp-red-50);
  color: var(--dsp-red-600);
  border-radius: var(--radius-md);
  font-size: var(--text-xl);
  flex-shrink: 0;
}

.doc-card h4 { margin-bottom: var(--space-1); }
.doc-card p { font-size: var(--text-sm); color: var(--dsp-gray-500); }

/* Formularios */
.form-group { margin-bottom: var(--space-5); }

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--dsp-gray-700);
  margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: var(--text-base);
  color: var(--dsp-gray-900);
  background: var(--dsp-white);
  border: 1px solid var(--dsp-gray-300);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--dsp-red-600);
  box-shadow: 0 0 0 3px var(--dsp-red-100);
}

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

.form-hint {
  font-size: var(--text-xs);
  color: var(--dsp-gray-500);
  margin-top: var(--space-1);
}

/* Página de contacto */
.contact-grid {
  display: grid;
  gap: var(--space-10);
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.contact-item {
  display: flex;
  gap: var(--space-4);
}

.contact-item-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--dsp-red-50);
  color: var(--dsp-red-600);
  border-radius: var(--radius-md);
  font-size: var(--text-lg);
  flex-shrink: 0;
}

.contact-item h4 { margin-bottom: var(--space-1); }
.contact-item p { font-size: var(--text-sm); color: var(--dsp-gray-600); }

.map-embed {
  width: 100%;
  height: 300px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--dsp-gray-200);
}

/* CTA section */
.cta-section {
  background: var(--dsp-red-600);
  color: var(--dsp-white);
  padding-block: var(--space-16);
  text-align: center;
}

.cta-section h2 {
  color: var(--dsp-white);
  margin-bottom: var(--space-6);
}

.cta-section .lead {
  color: var(--dsp-red-100);
  margin-inline: auto;
  margin-bottom: var(--space-8);
}

/* Footer */
.site-footer {
  background: var(--dsp-gray-900);
  color: var(--dsp-gray-300);
  padding-block: var(--space-16);
}

.footer-grid {
  display: grid;
  gap: var(--space-10);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: var(--space-10);
}

.footer-brand img {
  height: 64px;
  width: auto;
  margin-bottom: var(--space-4);
}

.footer-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--dsp-white);
  margin-bottom: var(--space-4);
}

.footer-links li { margin-bottom: var(--space-2); }

.footer-links a {
  color: var(--dsp-gray-400);
  font-size: var(--text-sm);
}

.footer-links a:hover {
  color: var(--dsp-white);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--dsp-gray-800);
  padding-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--dsp-gray-500);
}

.footer-bottom a { color: var(--dsp-gray-400); }

/* Aviso de privacidad */
.privacy-content h2 {
  font-size: var(--text-3xl);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
}

.privacy-content h3 {
  font-size: var(--text-xl);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.privacy-content ul {
  list-style: disc;
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.privacy-content li { margin-bottom: var(--space-2); }

/* Botón volver arriba */
.back-to-top {
  position: fixed;
  right: var(--space-6);
  bottom: var(--space-6);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--dsp-red-600);
  color: var(--dsp-white);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  box-shadow: var(--shadow-lg);
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover { background: var(--dsp-red-700); }

/* Utilidades responsive */
@media (max-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2, .section-title { font-size: var(--text-3xl); }
  .hero { min-height: 60vh; }
  .hero-sm { min-height: 40vh; }
  .section { padding-block: var(--space-12); }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}

/* Skip link accesibilidad */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--dsp-red-600);
  color: var(--dsp-white);
  padding: var(--space-2) var(--space-4);
  z-index: 1001;
  transition: top 0.2s ease;
}

.skip-link:focus { top: 0; }

/* Animaciones sutiles */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* Utilitarios de espaciado */
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
