:root {
  --red: #DC2626;
  --red-dark: #B91C1C;
  --red-light: #FEF2F2;
  --ink: #111111;
  --gray: #6B7280;
  --gray-light: #9CA3AF;
  --bg-subtle: #FAFAFA;
  --border: #E5E7EB;
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background: #FFFFFF;
}

::selection {
  background: var(--red);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #fff;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--red);
}

/* Header */
#site-header {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
#site-header.is-scrolled {
  border-color: var(--border);
  box-shadow: 0 1px 24px rgba(0, 0, 0, 0.04);
}

.logo-dot {
  color: var(--red);
}

.nav-link {
  position: relative;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.925rem;
  padding-bottom: 4px;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width 0.25s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}
.nav-link.active {
  color: var(--red);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--red);
  color: #fff;
  font-weight: 600;
  font-size: 0.925rem;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 8px 20px -6px rgba(220, 38, 38, 0.45);
}
.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(220, 38, 38, 0.55);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.925rem;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.btn-outline:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  transform: translateY(-2px);
}

.btn-small {
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
}

/* Cards */
.service-card,
.project-card,
.value-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.service-card:hover,
.value-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -24px rgba(17, 17, 17, 0.14);
  border-color: var(--red);
}

.project-card {
  overflow: hidden;
}
.project-card:hover {
  box-shadow: 0 30px 60px -28px rgba(17, 17, 17, 0.2);
}

.project-frame {
  background: #F5F5F5;
}
.project-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1440px;
  height: 1080px;
  border: none;
  transform-origin: top left;
}
.project-live-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(17, 17, 17, 0.75);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 5px 11px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.project-card:hover .project-live-badge {
  opacity: 1;
  transform: translateY(0);
}
.project-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--red);
  animation: mockDotPing 1.6s ease-in-out infinite;
}

/* Filter buttons */
.filter-btn {
  border: 1.5px solid var(--border);
  color: var(--gray);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  transition: all 0.25s ease;
}
.filter-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.filter-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

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

/* Form */
.form-input {
  width: 100%;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.form-input::placeholder {
  color: var(--gray-light);
}
.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
  padding-right: 2.75rem;
  cursor: pointer;
}
.form-select:invalid {
  color: var(--gray-light);
}
.form-input:focus {
  outline: none;
  background: #fff;
  border-color: var(--red);
  box-shadow: 0 0 0 4px var(--red-light);
}

/* Accent dot used in headings */
.accent-dot::after {
  content: '.';
  color: var(--red);
}

/* Mobile menu */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
#mobile-menu.open {
  max-height: 420px;
}

/* Metric counter */
.metric-number {
  font-feature-settings: 'tnum';
}

/* Dashboard-style widget card, reused by the Tiendas Online and Estrategia Digital mockups */
.mock-browser {
  position: relative;
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 48px -24px rgba(17, 17, 17, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mock-content {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mock-line {
  height: 9px;
  border-radius: 999px;
  background: #EEEEEE;
}

/* Qualified-leads funnel (servicios.html — Diseño Web) */
.mock-funnel-card {
  background-color: #FAFAFA;
  background-image: radial-gradient(circle, #DCD7CE 1px, transparent 1px);
  background-size: 18px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mock-funnel-icon {
  position: relative;
  width: 42%;
  height: auto;
  z-index: 1;
}
.mock-visitor {
  position: absolute;
  top: 11%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: mockVisitorFall 3.6s ease-in infinite;
  animation-delay: var(--delay, 0s);
}
.mock-visitor svg {
  width: 100%;
  height: 100%;
}
.mock-lead {
  position: absolute;
  top: 56%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  opacity: 0;
  animation: mockLeadDrop 3.6s ease-out infinite;
  animation-delay: var(--delay, 0s);
}
.mock-lead svg {
  width: 100%;
  height: 100%;
}

@keyframes mockVisitorFall {
  0%   { opacity: 0; transform: translateY(0) scale(1); }
  10%  { opacity: 1; }
  55%  { opacity: 1; transform: translateY(85px) scale(0.75); }
  66%  { opacity: 0; transform: translateY(102px) scale(0.3); }
  100% { opacity: 0; transform: translateY(102px) scale(0.3); }
}

@keyframes mockLeadDrop {
  0%, 4%  { opacity: 0; transform: translateY(0) scale(0.4); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
  14%     { opacity: 1; transform: translateY(6px) scale(1.15); box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.12); }
  22%     { transform: translateY(10px) scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
  55%     { opacity: 1; transform: translateY(40px) scale(1); }
  68%     { opacity: 0; transform: translateY(58px) scale(0.6); }
  100%    { opacity: 0; transform: translateY(58px) scale(0.6); }
}

/* Interactive mockup (servicios.html — Tiendas Online: ticker de ventas) */
.mock-cart-wrap {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mock-cart-wrap.mock-bounce {
  animation: mockCartBounceOnce 0.6s ease;
}
.mock-cart-icon {
  width: 20px;
  height: 20px;
}
.mock-cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 15px;
  height: 15px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 15px;
  text-align: center;
}
.mock-cart-badge.mock-bounce {
  animation: mockBadgeBounceOnce 0.5s ease;
}

@keyframes mockCartBounceOnce {
  0% { transform: translateY(0) rotate(0deg); }
  30% { transform: translateY(-5px) rotate(-10deg); }
  60% { transform: translateY(0) rotate(6deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

@keyframes mockBadgeBounceOnce {
  0% { transform: scale(1); }
  40% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.mock-revenue-pulse {
  animation: mockRevenuePulse 0.6s ease;
}
@keyframes mockRevenuePulse {
  0% { color: var(--red); transform: scale(1.08); display: inline-block; }
  100% { color: var(--ink); transform: scale(1); display: inline-block; }
}

.mock-sparkline {
  height: 42px;
  margin: 6px 0 10px;
}
.mock-sparkline svg {
  width: 100%;
  height: 100%;
}

.mock-toast-stack {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mock-toast {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 8px 20px -10px rgba(17, 17, 17, 0.15);
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.mock-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}
.mock-toast.is-leaving {
  opacity: 0;
  transform: translateX(16px);
}
.mock-toast strong {
  color: var(--red);
}
.mock-toast-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--red);
  flex-shrink: 0;
  animation: mockDotPing 1.6s ease-in-out infinite;
}
@keyframes mockDotPing {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Interactive mockup (servicios.html — Estrategia Digital) */
.mock-kpi-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}
.mock-kpi-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-light);
}
.mock-kpi-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
  margin-top: 2px;
}
.mock-trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--red-light);
  color: var(--red);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  animation: mockTrendPulse 3.6s ease-in-out infinite;
}
.mock-ad-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mock-ad-badge {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mock-ad-badge svg {
  width: 13px;
  height: 13px;
  position: relative;
  z-index: 1;
}
.mock-ad-ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--red);
  opacity: 0;
  animation: mockAdRipple 2.4s ease-out infinite;
}
.mock-sales-caption {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-light);
  margin-bottom: 6px;
}
.mock-bars {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 100px;
}
.mock-bar {
  flex: 1;
  height: var(--h);
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--red) 0%, var(--red-dark) 100%);
  transform-origin: bottom;
  animation: mockBarGrow 3.6s ease-in-out infinite;
}

@keyframes mockTrendPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes mockAdRipple {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.3); }
}

@keyframes mockBarGrow {
  0%, 100% { transform: scaleY(0.4); opacity: 0.6; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* Booking wizard (contacto.html — Agenda una llamada) */
.booking-pill {
  display: inline-flex;
  align-items: center;
  background: var(--red-light);
  border: 1px solid #FBD5D5;
  color: var(--red);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border-radius: 999px;
}

.booking-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 2.5rem;
}
.booking-step {
  display: flex;
  align-items: center;
  gap: 10px;
}
.booking-step-circle {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--gray-light);
  background: #fff;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.booking-step-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-light);
  transition: color 0.3s ease;
}
.booking-step.active .booking-step-circle {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.booking-step.active .booking-step-label {
  color: var(--ink);
}
.booking-step-line {
  width: 48px;
  height: 1.5px;
  background: var(--border);
}

.booking-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 30px 60px -32px rgba(17, 17, 17, 0.18);
  padding: 2.25rem 2rem;
  overflow: hidden;
}
.booking-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--red);
}
.booking-panel.hidden {
  display: none;
}
.booking-panel-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-light);
  margin-bottom: 0.75rem;
}
.booking-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}
.booking-progress-fill {
  display: block;
  height: 100%;
  background: var(--red);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.booking-back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray);
  transition: color 0.2s ease;
}
.booking-back-link:hover {
  color: var(--red);
}

/* Logo-mark assembling + palette (servicios.html — Diseño de Marca) */
.mock-logo-card {
  background-color: #FAFAFA;
  background-image: radial-gradient(circle, #DCD7CE 1px, transparent 1px);
  background-size: 18px 18px;
}
.mock-logo-mark {
  width: 38%;
  height: auto;
}
.mock-logo-shape {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: mockLogoAssemble 3.6s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.mock-swatch-row {
  display: flex;
  gap: 10px;
}
.mock-swatch-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  animation: mockSwatchPulse 2.4s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes mockLogoAssemble {
  0%        { opacity: 0; transform: scale(0.5) rotate(-15deg); }
  15%, 80%  { opacity: 1; transform: scale(1) rotate(0deg); }
  95%, 100% { opacity: 0; transform: scale(0.5) rotate(15deg); }
}

@keyframes mockSwatchPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.35); }
}

/* Cookie consent banner */
.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  max-width: 560px;
  margin: 0 auto;
  background: #111111;
  color: #fff;
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 24px 48px -16px rgba(17, 17, 17, 0.4);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.cookie-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.cookie-banner p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  margin: 0 0 14px;
}
.cookie-banner a {
  color: #fff;
  text-decoration: underline;
}
.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cookie-banner-actions button {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  border: none;
}
.cookie-accept-btn {
  background: var(--red);
  color: #fff;
}
.cookie-accept-btn:hover {
  background: var(--red-dark, #B91C1C);
}
.cookie-reject-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}
.cookie-reject-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 55;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px -6px rgba(220, 38, 38, 0.45);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--red-dark);
  box-shadow: 0 12px 28px -6px rgba(220, 38, 38, 0.55);
}
.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* WhatsApp floating button */
.whatsapp-float {
  position: fixed;
  right: 17px;
  bottom: 80px;
  z-index: 55;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px -6px rgba(37, 211, 102, 0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.whatsapp-float:hover {
  background: #1EBE5A;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(37, 211, 102, 0.65);
}
.whatsapp-float svg {
  width: 26px;
  height: 26px;
}
