/* Mastec Digital — index.html specific styles */

/* Hero */
.hero {
  position: relative;
  min-height: 96vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--header-h);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/hero-bg.jpg") center/cover no-repeat;
  z-index: -3;
  transform: scale(1.06);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 55% at 50% 0%, rgba(251, 0, 68, 0.28), transparent 70%),
    linear-gradient(180deg, rgba(35, 41, 51, 0.55) 0%, rgba(35, 41, 51, 0.88) 55%, rgba(35, 41, 51, 0.98) 100%);
  z-index: -2;
}

.hero-grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at 50% 30%, #232933, transparent 75%);
  opacity: 0.5;
  pointer-events: none;
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
}

.hero .container {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 18px 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 26px;
}

.hero .eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(251, 0, 68, 0.25);
  animation: blink 2.4s infinite;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  color: #fff;
  margin-bottom: 22px;
  max-width: 880px;
  text-wrap: balance;
}

.hero .lead {
  color: var(--text-invert-muted);
  font-size: 1.2rem;
  max-width: 640px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 34px;
}

.hero-actions .btn-primary {
  padding: 17px 38px;
  font-size: 1rem;
}

.hero-actions .btn-play {
  color: #fff;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 56px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-trust .avatars {
  display: flex;
}

.hero-trust .avatars img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  object-fit: cover;
  margin-left: -12px;
}

.hero-trust .avatars img:first-child {
  margin-left: 0;
}

.hero-trust .text {
  text-align: left;
}

.hero-trust .stars {
  color: #ffb100;
  font-size: 0.8rem;
  letter-spacing: 2px;
}

.hero-trust .text p {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: var(--text-invert-muted);
}

.hero-trust .text strong {
  color: #fff;
}

.hero-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px;
  height: 42px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.hero-scroll-cue::before {
  content: "";
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: #fff;
  animation: scrollcue 1.8s infinite;
}

@keyframes scrollcue {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 0; transform: translateY(12px); }
}

@media (max-width: 600px) {
  .hero-scroll-cue { display: none; }
}

/* Module grid — compact glass badge list of every module (used in Sistema Web) */
#sistema-web {
  position: relative;
  isolation: isolate;
}

#sistema-web::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(50% 60% at 85% 10%, rgba(251, 0, 68, 0.07), transparent 70%),
    radial-gradient(45% 55% at 10% 90%, rgba(255, 179, 71, 0.07), transparent 70%);
  pointer-events: none;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0 30px;
}

.module-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 4px 14px rgba(35, 41, 51, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.module-pill i {
  flex-shrink: 0;
  color: var(--red);
  font-size: 1.05rem;
}

.module-pill:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 0, 68, 0.35);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* Stats */
.stats-section {
  position: relative;
  background: var(--ink);
  overflow: hidden;
  isolation: isolate;
}

.stats-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(50% 80% at 15% 0%, rgba(251, 0, 68, 0.22), transparent 65%),
    radial-gradient(40% 70% at 90% 100%, rgba(251, 0, 68, 0.14), transparent 65%);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 34px 28px;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.3s var(--ease);
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.05);
}

.stat-card .icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--red);
  background: rgba(251, 0, 68, 0.12);
  box-shadow: 0 0 0 1px rgba(251, 0, 68, 0.18);
}

.stat-card .num {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 900;
  color: #fff;
  display: block;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-card .lbl {
  color: var(--text-invert-muted);
  font-size: 0.82rem;
  margin: 6px 0 0;
}

@media (max-width: 991px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* Business-type carousel ("En diferentes tipos de negocio") — center slide
   scales up and comes into full focus; side slides shrink back and darken
   (via filter, not opacity, so they don't fade toward the page's light
   background — they recede into shadow instead, like the reference). */
.biz-carousel .carousel-clone {
  pointer-events: none;
}

.biz-carousel .carousel-spacer {
  flex: 0 0 auto;
  width: max(10px, calc(50vw - 150px));
}

.biz-carousel .carousel-track {
  padding: 70px 70px 100px;
}

.biz-carousel .carousel-slide {
  position: relative;
  width: 280px;
  filter: brightness(0.5) saturate(0.85);
  transform: scale(0.86);
  transition: transform 0.45s var(--ease), filter 0.45s var(--ease);
}

.biz-carousel .carousel-slide.is-center {
  filter: none;
  transform: scale(1.06);
  z-index: 3;
}

.biz-carousel .carousel-slide.is-center .biz-card {
  box-shadow: 0 25px 60px rgba(251, 0, 68, 0.28), 0 0 0 2px rgba(251, 0, 68, 0.4);
}

.biz-card {
  position: relative;
  isolation: isolate;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 44px rgba(15, 15, 25, 0.28);
  transition: box-shadow 0.35s var(--ease);
}

.biz-card:hover {
  box-shadow: 0 24px 54px rgba(15, 15, 25, 0.34);
}

.biz-card-img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s var(--ease);
}

.biz-card:hover .biz-card-img {
  transform: scale(1.05);
}

.biz-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(35, 41, 51, 0.15);
}

.biz-badge i {
  color: var(--red);
}

.biz-card-scrim {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 40px 16px 16px;
  background: linear-gradient(180deg, transparent, rgba(10, 10, 18, 0.85) 70%);
}

.biz-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  background: rgba(251, 0, 68, 0.85);
  backdrop-filter: blur(4px);
}

.biz-card-scrim h3 {
  font-size: 1rem;
  color: #fff;
  margin: 0;
}

#clientes .section-title {
  max-width: 620px;
}

#clientes .section-title h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
}

/* Clients logo strip — draggable, natural-ratio logo cards */
.logos-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-y;
  user-select: none;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.logos-scroll::-webkit-scrollbar {
  display: none;
}

.logos-scroll.dragging {
  cursor: grabbing;
}

.clients-track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 18px;
  padding: 6px 4px 20px;
}

.client-card {
  flex-shrink: 0;
  width: 160px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.client-card img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  filter: grayscale(100%) contrast(1.05);
  opacity: 0.7;
  pointer-events: none;
  transition: filter 0.4s var(--ease), opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.client-card:hover img {
  filter: grayscale(0%) contrast(1);
  opacity: 1;
  transform: scale(1.06);
}

@media (max-width: 991px) {
  .clients-track {
    gap: 16px;
  }

  .client-card {
    width: 148px;
    height: 88px;
  }
}

@media (max-width: 640px) {
  .clients-track {
    gap: 14px;
  }

  .client-card {
    width: 136px;
    height: 80px;
  }
}

@media (max-width: 400px) {
  .client-card {
    width: 128px;
    height: 74px;
  }
}

#clientes {
  position: relative;
  isolation: isolate;
}

#clientes::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(45% 60% at 15% 15%, rgba(251, 0, 68, 0.06), transparent 70%),
    radial-gradient(45% 55% at 90% 85%, rgba(255, 179, 71, 0.06), transparent 70%);
  pointer-events: none;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 44px;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  font-size: 0.92rem;
  padding: 13px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 10px 26px rgba(35, 41, 51, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  animation: floatCard 5s ease-in-out infinite;
}

.trust-badge:nth-child(1) { animation-delay: 0s; }
.trust-badge:nth-child(2) { animation-delay: 0.3s; }
.trust-badge:nth-child(3) { animation-delay: 0.6s; }
.trust-badge:nth-child(4) { animation-delay: 0.9s; }

.trust-badge i {
  color: var(--red);
  font-size: 1.3rem;
}

@media (prefers-reduced-motion: reduce) {
  .trust-badge {
    animation: none;
  }
}

@media (max-width: 640px) {
  .trust-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 32px;
  }

  .trust-badge {
    justify-content: center;
    padding: 13px 10px;
    font-size: 0.8rem;
    text-align: center;
  }

  .trust-badge i {
    font-size: 1.1rem;
  }
}

/* Testimonials */
.testimonial-card {
  position: relative;
  width: min(380px, 84vw);
  background: linear-gradient(160deg, var(--paper) 0%, #fff7f8 100%);
  border: 1px solid rgba(251, 0, 68, 0.12);
  border-radius: var(--radius-lg);
  padding: 40px 34px 34px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 15px 50px rgba(15, 15, 25, 0.06), 0 5px 15px rgba(15, 15, 25, 0.04);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.testimonial-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 70px rgba(251, 0, 68, 0.12), 0 10px 30px rgba(15, 15, 25, 0.08);
  border-color: rgba(251, 0, 68, 0.28);
}

.testimonial-card::before {
  content: "\f6b0";
  font-family: "bootstrap-icons";
  position: absolute;
  top: -20px;
  left: 32px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 10px 25px rgba(251, 0, 68, 0.35);
}

.testimonial-card .stars {
  color: #ffb100;
  margin-bottom: 16px;
  font-size: 0.95rem;
  letter-spacing: 2px;
}

.testimonial-card p {
  position: relative;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.65;
  flex-grow: 1;
}

.testimonial-card .profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(251, 0, 68, 0.1);
}

.testimonial-card .profile img {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
  padding: 4px;
  border: 2px solid transparent;
  background: linear-gradient(160deg, #fff, #f3f4f6) padding-box,
    linear-gradient(135deg, var(--red), var(--red-dark)) border-box;
  box-shadow: 0 8px 18px rgba(15, 15, 25, 0.12), 0 2px 4px rgba(15, 15, 25, 0.08),
    inset 0 1px 2px rgba(255, 255, 255, 0.8);
  -webkit-user-drag: none;
}

.testimonial-card .profile h3 {
  font-size: 0.98rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.testimonial-card .profile h3 .bi-patch-check-fill {
  color: var(--red);
  font-size: 0.85rem;
}

#testimonials .carousel-track {
  padding-top: 36px;
  cursor: grab;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

#testimonials .carousel-track.dragging {
  cursor: grabbing;
}

.testimonial-card .profile h4 {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
}

@media (max-width: 991px) {
  .module-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .module-grid {
    grid-template-columns: 1fr 1fr;
  }

  .biz-carousel .carousel-slide {
    width: 240px;
  }
}

/* ---------- Sistema Web / E-commerce (real screenshots) ---------- */
.ecom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.ecom-grid h2,
.app-grid h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  margin-bottom: 16px;
}

.lead-text {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 26px;
  max-width: 520px;
}

.check-list {
  margin-bottom: 32px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 13px;
  font-size: 0.96rem;
}

.check-list li i {
  color: var(--red);
  margin-top: 3px;
  flex-shrink: 0;
}

.shot-frame {
  position: relative;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.float-wrap {
  position: relative;
  animation: floatCard 5.5s ease-in-out infinite;
}

.browser-mock {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--border);
}

.browser-bar .dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.browser-bar .dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
  background: var(--border);
}

.browser-bar .dots i:nth-child(1) { background: #ff5f57; }
.browser-bar .dots i:nth-child(2) { background: #febc2e; }
.browser-bar .dots i:nth-child(3) { background: #28c840; }

.browser-bar .url {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.browser-shot {
  display: block;
  width: 100%;
  height: auto;
}

.shop-float-phone {
  position: absolute;
  right: -22px;
  bottom: -30px;
  width: 116px;
  border-radius: 16px;
  overflow: hidden;
  border: 4px solid var(--paper);
  box-shadow: var(--shadow-lg);
  transform: rotate(-4deg);
  transition: transform 0.4s var(--ease);
}

.shot-frame:hover .shop-float-phone {
  transform: rotate(0deg) translateY(-4px);
}

.shop-float-phone img {
  display: block;
  width: 100%;
  height: auto;
}

/* Floating info chips, reused across the showcase sections */
@keyframes floatChip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes floatChipCenter {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

.float-chip {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  animation: floatChip 3.6s ease-in-out infinite;
  white-space: nowrap;
}

.float-chip i {
  color: var(--red);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.float-chip strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.2;
}

.float-chip span {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.chip-tl { top: -18px; left: 28px; animation-delay: 0.2s; }
.chip-bl { bottom: -18px; left: 28px; animation-delay: 0.6s; }

.chip-toast {
  left: 50%;
  bottom: 30px;
  animation-name: floatChipCenter;
}

.chip-stat {
  top: 26px;
  right: -8px;
  animation-delay: 0.4s;
}

/* ---------- App móvil (strong red-based, ultra-premium) ---------- */
#app-movil {
  background: linear-gradient(160deg, #fb0044 0%, #96082f 45%, #400418 100%);
}

#app-movil.section-glow::before {
  background: radial-gradient(closest-side, rgba(255, 90, 130, 0.4), transparent);
}

#app-movil::after {
  content: "";
  position: absolute;
  z-index: -1;
  bottom: -160px;
  right: -100px;
  width: 560px;
  height: 560px;
  background: radial-gradient(closest-side, rgba(255, 176, 32, 0.24), transparent 70%);
  pointer-events: none;
}

#app-movil .eyebrow-sm {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
}

#app-movil h2 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--red), #ffb347);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#app-movil .lead-text {
  color: var(--text-invert-muted);
}

.app-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 70px;
  align-items: center;
}

.app-phone-col {
  display: flex;
  justify-content: center;
}

.phone-stack {
  position: relative;
  width: 300px;
}

.phone-mock {
  width: 250px;
  border-radius: 42px;
  background: linear-gradient(160deg, #2a2d3e, #10131c);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px;
  box-shadow: var(--shadow-lg);
}

.phone-mock--behind {
  position: absolute;
  top: 26px;
  left: -10px;
  width: 220px;
  transform: rotate(-9deg);
  opacity: 0.92;
  z-index: 1;
  filter: brightness(0.92);
  transition: transform 0.6s var(--ease);
}

/* Wrapper handles the smooth hover "spread" via transition; the phone
   inside keeps its own independent idle sway animation, so the two
   motions compose instead of one abruptly replacing the other. */
.phone-spread {
  position: relative;
  margin-left: 44px;
  z-index: 2;
  transform-origin: 50% 100%;
  transition: transform 0.6s var(--ease);
}

.phone-mock--front {
  transform-origin: 50% 100%;
  animation: phoneSway 6.5s ease-in-out infinite;
}

@keyframes phoneSway {
  0%, 100% { transform: rotate(-3deg) translateX(-6px); }
  50% { transform: rotate(3deg) translateX(6px); }
}

/* On hover, the phones smoothly spread apart to reveal each other */
.phone-stack:hover .phone-spread {
  transform: translateX(26px) rotate(4deg);
}

.phone-stack:hover .phone-mock--behind {
  transform: rotate(-16deg) translateX(-22px) translateY(-6px);
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 20px;
  background: #10131c;
  border-radius: 0 0 16px 16px;
  z-index: 3;
}

.phone-screen {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  line-height: 0;
}

.phone-screen img {
  display: block;
  width: 100%;
  height: auto;
}

.app-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 28px 0 32px;
}

.app-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.app-feature:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(251, 0, 68, 0.4);
  box-shadow: 0 16px 32px rgba(251, 0, 68, 0.15);
}

.app-feature i {
  color: var(--red);
  font-size: 1.3rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.app-feature strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 3px;
  color: #fff;
}

.app-feature span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-invert-muted);
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  padding: 13px 24px;
  border-radius: 14px;
  cursor: default;
}

.store-btn i {
  font-size: 1.7rem;
  color: var(--red);
}

.store-btn small {
  display: block;
  font-size: 0.62rem;
  opacity: 0.8;
  font-weight: 500;
  color: var(--text-invert-muted);
}

.store-btn span {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
  color: #fff;
}

/* ---------- Sistemas a medida (dark + particles, like the hero) ---------- */
#a-medida {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(60% 55% at 50% 0%, rgba(251, 0, 68, 0.22), transparent 70%),
    linear-gradient(180deg, #262b35 0%, #1c2028 55%, #14161b 100%);
}

#a-medida .container {
  position: relative;
  z-index: 2;
}

#a-medida .eyebrow-sm {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(251, 0, 68, 0.3);
  color: var(--red);
}

#a-medida h2 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--red), #ffb347);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.process-heading {
  text-align: center;
  margin: 28px 0 28px;
}

.process-heading-label {
  display: inline-flex;
  align-items: center;
  padding: 7px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(251, 0, 68, 0.3);
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Multi-device showcase: PC, tablet and phone running the same system.
   Each device sits in its own ".device-spread" wrapper so the hover
   "spread apart" transition (on the wrapper) composes cleanly with each
   device's own continuous idle float (on the inner element) instead of
   one abruptly replacing the other. */
.device-stage {
  position: relative;
  margin: 0 34px 30px 6px;
}

.device-spread {
  transition: transform 0.6s var(--ease);
}

.device-spread--pc {
  position: relative;
  z-index: 1;
}

.device-spread--tablet {
  position: absolute;
  z-index: 2;
  right: -30px;
  bottom: -40px;
  width: 190px;
}

.device-spread--phone {
  position: absolute;
  z-index: 3;
  left: -26px;
  bottom: -30px;
  width: 96px;
}

.device-stage:hover .device-spread--pc {
  transform: translateY(-6px) scale(1.015);
}

.device-stage:hover .device-spread--tablet {
  transform: translate(20px, 24px) rotate(4deg);
}

.device-stage:hover .device-spread--phone {
  transform: translate(-18px, 18px) rotate(-5deg);
}

.device-tablet {
  border-radius: 16px;
  overflow: hidden;
  border: 5px solid #1c1c26;
  box-shadow: var(--shadow-lg);
  animation: floatCard 6s ease-in-out infinite;
  animation-delay: 0.2s;
}

.device-tablet img {
  display: block;
  width: 100%;
  height: auto;
}

.device-phone {
  border-radius: 20px;
  background: linear-gradient(160deg, #2a2d3e, #10131c);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  animation: floatCard 5s ease-in-out infinite;
  animation-delay: 0.5s;
}

.device-phone .phone-notch {
  width: 40px;
  height: 10px;
  top: 6px;
}

.device-phone .phone-screen {
  border-radius: 14px;
}

.process-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 6px;
}

.process-step {
  position: relative;
  padding: 28px 20px 24px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.process-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), #ff6b8a);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.process-step:hover {
  transform: translateY(-8px);
  border-color: rgba(251, 0, 68, 0.3);
  box-shadow: var(--shadow-lg);
}

.process-step:hover::before {
  transform: scaleX(1);
}

.process-step:hover .process-icon {
  transform: scale(1.08);
}

.process-arrow {
  color: var(--border);
  font-size: 1.3rem;
}

.step-num {
  position: absolute;
  top: 14px;
  right: 16px;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.6rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.3px rgba(251, 0, 68, 0.28);
}

.process-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 10px 22px rgba(251, 0, 68, 0.28);
  transition: transform 0.35s var(--ease);
}

.process-step h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.process-step p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0;
}

#a-medida .process-step {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#a-medida .process-step:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(251, 0, 68, 0.4);
  box-shadow: 0 16px 32px rgba(251, 0, 68, 0.18);
}

#a-medida .process-step p {
  color: var(--text-invert-muted);
}

#a-medida .process-arrow {
  color: rgba(255, 255, 255, 0.28);
}

#a-medida .step-num {
  -webkit-text-stroke: 1.3px rgba(251, 0, 68, 0.4);
}

@media (max-width: 991px) {
  .ecom-grid,
  .app-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .app-phone-col {
    order: -1;
  }

  .process-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .process-arrow {
    display: none;
  }
}

@media (max-width: 600px) {
  .lead-text {
    max-width: none;
  }

  .app-feature-grid {
    grid-template-columns: 1fr;
  }

  .phone-stack {
    width: 260px;
    margin: 0 auto;
  }

  .phone-mock {
    width: 220px;
  }

  .phone-mock--behind {
    width: 190px;
    left: -6px;
    top: 22px;
  }

  .phone-spread {
    margin-left: 36px;
  }

  .shop-float-phone {
    width: 92px;
    right: -12px;
    bottom: -20px;
  }

  .device-stage {
    margin: 0 24px 24px 0;
  }

  .device-spread--tablet {
    right: -18px;
    bottom: -28px;
    width: 140px;
  }

  .device-spread--phone {
    left: -16px;
    bottom: -20px;
    width: 74px;
  }

  .process-grid {
    grid-template-columns: 1fr;
  }
}
