/* ==========================================================================
   DIÉSELTRACK PREMIUM — DEMO A2 (Heavy Duty Industrial)
   Modern Web Guidance 1.0.2: fluid type, oklab gradients, scroll-driven
   animations, CSS scroll snap carousel, native <dialog>, reduced-motion.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  scroll-behavior: auto;
  overflow-x: clip;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 200;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: min(var(--container-max), 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ==========================================================================
   SCROLL PROGRESS BAR (Modern Web Guidance: Scroll Progress Indicator)
   ========================================================================== */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 95;
  background: linear-gradient(90deg var(--in-oklab), var(--accent), #FDE68A);
  transform-origin: 0 50%;
  transform: scaleX(var(--scroll-p, 0));
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    @keyframes dt-scroll-progress {
      from { transform: scaleX(0); }
      to { transform: scaleX(1); }
    }
    .scroll-progress {
      animation: dt-scroll-progress auto linear both;
      animation-timeline: scroll(root);
    }
  }
}

/* ==========================================================================
   4-SECOND ANIMATED WELCOME SPLASH (Sin etiquetas de propuesta + Omitir)
   ========================================================================== */
.dt-splash {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: #060709;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px var(--gutter);
  text-align: center;
  background-image:
    radial-gradient(circle at 50% 42%, rgba(245, 158, 11, 0.16), transparent 56%),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.018) 0 10px, transparent 10px 20px);
  opacity: 1;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}

.dt-splash.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-emblem {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.splash-line {
  width: 34px;
  height: 2px;
  background: var(--accent);
}

.splash-hex {
  width: 36px;
  height: 36px;
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(245, 158, 11, 0.1);
}

.splash-hex svg {
  width: 19px;
  height: 19px;
}

.splash-wordmark {
  position: relative;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(2.25rem, 10vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  max-width: 100%;
  overflow: hidden;
}

.splash-wordmark .accent {
  color: var(--accent);
}

.splash-sub {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: clamp(0.68rem, 2.4vw, 0.84rem);
  letter-spacing: 0.28em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.splash-bar {
  margin-top: 26px;
  width: min(240px, 68vw);
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.splash-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg var(--in-oklab), var(--accent), #FDE68A);
  transform-origin: left;
  transform: scaleX(1);
}

.splash-skip {
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 22px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.splash-skip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes splash-rise {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes splash-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
  }
  @keyframes splash-sheen {
    0% { transform: translateX(-140%) skewX(-20deg); }
    100% { transform: translateX(260%) skewX(-20deg); }
  }

  .splash-emblem {
    animation: splash-rise 0.55s var(--ease-out) both;
  }
  .splash-wordmark {
    animation: splash-rise 0.65s var(--ease-out) 0.1s both;
  }
  .splash-wordmark::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 38%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    animation: splash-sheen 1.5s var(--ease-out) 0.65s 2;
    pointer-events: none;
  }
  .splash-sub {
    animation: splash-rise 0.6s var(--ease-out) 0.25s both;
  }
  .splash-bar-fill {
    animation: splash-progress 4s linear forwards;
  }
}

/* ==========================================================================
   STATE-AWARE STICKY HEADER & NATIVE <dialog> MOBILE DRAWER
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 70;
  background: rgba(8, 9, 11, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.25s var(--ease-out), border-color 0.25s, box-shadow 0.25s;
}

.site-nav.is-stuck {
  background: rgba(8, 9, 11, 0.96);
  border-bottom-color: var(--border-accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 68px;
}

.brand-link {
  text-decoration: none;
  display: inline-flex;
  flex-direction: column;
  min-width: 0;
}

.brand-main {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(1.28rem, 4.2vw, 1.65rem);
  line-height: 1;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.brand-main .accent {
  color: var(--accent);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-top: 3px;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 8px 2px;
  position: relative;
  transition: color 0.2s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-out);
}

.nav-links a:hover,
.nav-links a[aria-current="true"] {
  color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a[aria-current="true"]::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Buttons & microinteractions */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.16s var(--ease-out), box-shadow 0.2s;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform 0.2s var(--ease-out);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.22);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.34);
}

.btn-primary:hover svg.nudge {
  transform: translateX(3px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.btn-call-nav {
  display: none;
}

.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  touch-action: manipulation;
}

.menu-btn svg {
  width: 20px;
  height: 20px;
}

@media (min-width: 900px) {
  .nav-inner { min-height: 74px; }
  .nav-links { display: flex; }
  .btn { padding: 10px 18px; font-size: 0.8rem; }
  .btn-call-nav { display: inline-flex; }
  .menu-btn { display: none; }
}

/* Native <dialog> Drawer with Top-Layer Animation (Modern Web Guidance) */
dialog.mobile-drawer {
  margin: 0 0 0 auto;
  height: 100dvh;
  max-height: 100dvh;
  width: min(320px, 86vw);
  background: #0D0F13;
  color: var(--text-primary);
  border: 0;
  border-left: 2px solid var(--accent);
  padding: 22px var(--gutter);
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.22s var(--ease-out), transform 0.25s var(--ease-out), display 0.25s allow-discrete, overlay 0.25s allow-discrete;
}

dialog.mobile-drawer[open] {
  opacity: 1;
  transform: translateX(0);
}

@starting-style {
  dialog.mobile-drawer[open] {
    opacity: 0;
    transform: translateX(24px);
  }
}

dialog.mobile-drawer::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-links {
  display: grid;
  gap: 10px;
}

.drawer-links .btn {
  justify-content: flex-start;
  width: 100%;
}

/* ==========================================================================
   HERO — TWO-ZONE CINEMATIC MOBILE FRAMING + FULL-BLEED PARALLAX DESKTOP
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--bg-base);
  border-bottom: 2px solid var(--border-accent);
}

/* Mobile-first: crisp illuminated truck showcase window on top, seamless blend into content */
.hero-media-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 4;
  max-height: 330px;
  overflow: hidden;
  background: #0B0D10;
}

.hero-picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 54% 46%;
  will-change: transform;
  transform: translate3d(0, var(--parallax-y, 0px), 0) scale(1.03);
}

/* Subtle top/bottom fade on mobile so truck, mechanic, grille & glowing headlight shine clearly */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg var(--in-oklab), rgba(8, 9, 11, 0.36) 0%, rgba(8, 9, 11, 0.04) 26%, rgba(8, 9, 11, 0.14) 64%, #08090B 100%);
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, transparent 20%, black 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  margin-top: -26px;
  padding: 0 0 28px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: clamp(0.62rem, 1.9vw, 0.72rem);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(12, 14, 18, 0.92);
  border: 1px solid var(--border-accent);
  border-left: 4px solid var(--accent);
  padding: 7px 12px;
  margin-bottom: 14px;
  max-width: 100%;
}

.hero-tag svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.94;
  letter-spacing: -0.025em;
  font-size: clamp(2.3rem, 8.8vw, 4.9rem);
  text-wrap: balance;
}

.hero h1 .accent-line {
  display: block;
  color: var(--accent);
}

.hero-lead {
  margin: 14px 0 0;
  max-width: 46ch;
  color: var(--text-secondary);
  font-size: clamp(0.92rem, 1.4vw, 1.08rem);
  text-wrap: pretty;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-ctas .btn {
  min-height: 48px;
  padding: 12px 20px;
  font-size: 0.8rem;
  flex: 1 1 auto;
}

@media (min-width: 500px) {
  .hero-ctas .btn {
    flex: 0 0 auto;
  }
}

.hero-pillars {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 660px;
}

.pillar-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  background: rgba(17, 19, 23, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, transform 0.2s var(--ease-out);
}

.pillar-chip:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.pillar-chip svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex: none;
}

.pillar-chip span {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #E5E7EB;
  overflow-wrap: break-word;
}

/* Tablet & Desktop Hero: full-bleed cinematic + moderate scroll parallax */
@media (min-width: 640px) {
  .hero-pillars {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (min-width: 900px) {
  .hero {
    min-height: clamp(620px, 82svh, 760px);
    display: flex;
    align-items: center;
  }
  .hero-media-wrap {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    max-height: none;
    z-index: 0;
  }
  .hero-picture img {
    object-position: 68% 46%;
  }
  .hero-scrim {
    background:
      linear-gradient(90deg var(--in-oklab), #08090B 0%, rgba(8, 9, 11, 0.92) 32%, rgba(8, 9, 11, 0.42) 62%, rgba(8, 9, 11, 0.12) 100%),
      linear-gradient(180deg var(--in-oklab), rgba(8, 9, 11, 0.34) 0%, transparent 25%, rgba(8, 9, 11, 0.78) 100%);
  }
  .hero-grid-overlay {
    mask-image: linear-gradient(90deg, black 0%, transparent 62%);
  }
  .hero-content {
    margin-top: 0;
    width: 100%;
    padding: 52px 0 46px;
  }
  .hero h1 {
    font-size: clamp(3.3rem, 5.2vw, 4.9rem);
  }
}

/* Moderate CSS Scroll-Driven Parallax on desktop (Modern Web Guidance) */
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    @keyframes hero-parallax {
      from { transform: translate3d(0, 0px, 0) scale(1.04); }
      to { transform: translate3d(0, 56px, 0) scale(1.10); }
    }
    .hero-picture img {
      animation: hero-parallax auto linear both;
      animation-timeline: scroll(root);
      animation-range: 0px 700px;
    }
  }
}

.hazard-stripe {
  height: 6px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 12px, #121418 12px 24px);
  opacity: 0.85;
}

/* ==========================================================================
   SECTIONS & SCROLL-DRIVEN REVEAL ANIMATIONS
   ========================================================================== */
.section {
  padding: clamp(44px, 7vw, 80px) 0;
  scroll-margin-top: 76px;
}

.surface-band {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.eyebrow::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--accent);
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(1.8rem, 3.8vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* Reveal animations — opt-in strictly under prefers-reduced-motion: no-preference */
@media (prefers-reduced-motion: no-preference) {
  .reveal-item {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
    transition-delay: calc(var(--stagger, 0) * 65ms);
  }
  .reveal-item.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   3-STEP PROCESS
   ========================================================================== */
.steps-grid {
  display: grid;
  gap: 16px;
  margin-top: 26px;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

.step-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--accent);
  padding: 22px;
  border-radius: var(--radius-sm);
  transition: border-color 0.25s, transform 0.25s var(--ease-out);
}

.step-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.step-card h3 {
  margin: 12px 0 6px;
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.step-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-wrap: pretty;
}

/* ==========================================================================
   SERVICES — COMPACT INDUSTRIAL FILTERS + ANIMATED CAROUSEL + DESKTOP GRID
   ========================================================================== */
.services-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.services-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 20px;
}

/* Compact industrial filter rail (from Direction B concept, Heavy Duty A aesthetic) */
.filter-rail {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  max-width: 100%;
  padding: 2px 0 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filter-rail::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  min-height: 40px;
  padding: 0 13px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}

.filter-btn .count {
  font-size: 0.66rem;
  opacity: 0.75;
}

.filter-btn:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
}

.filter-btn[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.filter-btn[aria-pressed="true"] .count {
  opacity: 1;
}

.carousel-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.carousel-counter {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  min-width: 62px;
  text-align: center;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s, transform 0.15s;
}

.icon-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.icon-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

/* Mobile Carousel Viewport: edge-to-edge scroller with exact lateral gutter padding */
.carousel-shell {
  position: relative;
  margin-inline: calc(var(--gutter) * -1);
}

.services-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
  padding-top: 6px;
  padding-bottom: 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
}

.services-track::-webkit-scrollbar {
  display: none;
}

.service-card {
  flex: 0 0 calc(100% - 46px);
  max-width: 340px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition:
    transform 0.35s var(--ease-out),
    opacity 0.35s var(--ease-out),
    border-color 0.25s,
    box-shadow 0.35s var(--ease-out);
}

.service-card[hidden] {
  display: none;
}

/* Mobile active-card emphasis (Modern Web Guidance: Carousel Snap Highlights) */
@media (max-width: 767px) {
  .service-card[data-active="false"] {
    opacity: 0.72;
    transform: scale(0.955);
  }
  .service-card[data-active="true"] {
    opacity: 1;
    transform: scale(1);
    border-color: var(--border-accent);
    border-top-color: var(--accent);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(245, 158, 11, 0.22);
  }
}

.service-card:hover {
  border-color: var(--border-accent);
  border-top-color: var(--accent);
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0D0F12;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(1.06) contrast(1.04);
  transition: transform 0.5s var(--ease-out), filter 0.35s;
}

.service-card[data-active="true"] .card-media img,
.service-card:hover .card-media img {
  filter: brightness(1.12) contrast(1.06);
}

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

.card-media::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(180deg, transparent, rgba(17, 19, 23, 0.75));
  pointer-events: none;
}

.card-spec {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: rgba(8, 9, 11, 0.88);
  color: var(--accent);
  border: 1px solid var(--border-accent);
  padding: 4px 8px;
  border-radius: 2px;
}

.card-icon {
  position: absolute;
  bottom: 10px;
  left: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}

.card-icon svg {
  width: 20px;
  height: 20px;
}

.card-body {
  padding: 16px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.22rem;
  line-height: 1.12;
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
  hyphens: auto;
}

.card-body p {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  text-wrap: pretty;
}

.card-cta {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  touch-action: manipulation;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.card-cta svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  transition: transform 0.2s var(--ease-out), color 0.2s;
}

.card-cta:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.card-cta:hover svg {
  color: var(--accent-ink);
  transform: translateX(3px);
}

.carousel-dots {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding-right: 112px;
}

.carousel-dot {
  width: 16px;
  height: 6px;
  border-radius: 2px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  touch-action: manipulation;
  transition: width 0.25s var(--ease-out), background-color 0.25s;
}

.carousel-dot[aria-current="true"] {
  width: 34px;
  background: var(--accent);
}

/* Tablet & Desktop: Switch seamlessly from horizontal carousel to responsive grid */
@media (min-width: 768px) {
  .carousel-controls,
  .carousel-dots {
    display: none;
  }
  .carousel-shell {
    margin-inline: 0;
  }
  .services-track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    overflow: visible;
    padding: 0;
  }
  .service-card {
    flex: none;
    max-width: none;
    opacity: 1 !important;
    transform: none !important;
  }
  .service-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5);
  }
}

@media (min-width: 1100px) {
  .services-track {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }
}

/* ==========================================================================
   ORDER DISPATCH / QUOTE & APPOINTMENT FORM
   ========================================================================== */
.dispatch-section {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}

.dispatch-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 960px) {
  .dispatch-grid {
    grid-template-columns: 5fr 7fr;
    gap: 36px;
  }
}

.direct-channels {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.channel-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  min-height: 64px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s var(--ease-out);
}

.channel-card:hover {
  border-color: var(--accent);
  transform: translateX(3px);
}

.channel-ico {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex: none;
}

.channel-ico svg {
  width: 20px;
  height: 20px;
}

.channel-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.channel-val {
  display: block;
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--text-primary);
}

.preview-box {
  margin-top: 20px;
  background: #0B0D10;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: border-color 0.3s;
}

.preview-box.is-updated {
  border-color: var(--accent);
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.preview-box-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
}

.copy-mini-btn {
  background: transparent;
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  min-height: 34px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.copy-mini-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.preview-box pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  line-height: 1.5;
}

.order-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: clamp(18px, 3.2vw, 30px);
}

.form-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.form-row-2 {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .form-row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.field label,
.field .field-legend {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #E5E7EB;
  margin-bottom: 6px;
}

.field .opt {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.74rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea {
  min-height: 82px;
  resize: vertical;
}

.field input:user-invalid,
.field select:user-invalid {
  border-color: #F87171;
}

.modality-chips {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .modality-chips {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mod-chip {
  min-height: 44px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  touch-action: manipulation;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.mod-chip[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.form-status {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: #FCD34D;
  min-height: 1.2em;
}

.form-footnote {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* ==========================================================================
   CONFIGURABLE PWA INSTALL MODULE
   ========================================================================== */
.pwa-band {
  padding: 28px 0;
}

.pwa-band[hidden] {
  display: none;
}

.pwa-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent);
  padding: 20px clamp(18px, 3vw, 26px);
  border-radius: var(--radius-sm);
}

.pwa-copy {
  flex: 1 1 260px;
  min-width: 0;
}

.pwa-card h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-transform: uppercase;
  font-weight: 800;
}

.pwa-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.pwa-help {
  flex-basis: 100%;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.pwa-help[hidden] {
  display: none;
}

.pwa-help p + p {
  margin-top: 8px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 46px 0 max(48px, calc(28px + env(safe-area-inset-bottom)));
  border-top: 2px solid var(--border-accent);
  background: var(--bg-base);
}

.site-footer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  opacity: 0.28;
  z-index: 0;
}

.site-footer::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg var(--in-oklab), #08090B 0%, rgba(8, 9, 11, 0.82) 55%, rgba(8, 9, 11, 0.62) 100%);
}

.footer-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.footer-inner h2 {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.05;
}

.footer-note {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   SMART NON-OBSTRUCTIVE FLOATING WHATSAPP BUTTON
   Se oculta suavemente en Splash, en la sección #solicitud y en el <footer>
   ========================================================================== */
.wa-dock {
  position: fixed;
  right: var(--gutter);
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: var(--wa-bg);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.82rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
  touch-action: manipulation;
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out), background-color 0.2s;
}

.wa-dock:hover {
  background: var(--wa-bg-hover);
  transform: translateY(-2px);
}

.wa-dock svg {
  width: 19px;
  height: 19px;
  flex: none;
}

.wa-dock.is-yielded {
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .dt-splash,
  .reveal-item,
  .service-card,
  .wa-dock,
  dialog.mobile-drawer {
    transition-duration: 0.01ms !important;
  }
  .hero-picture img {
    transform: none !important;
  }
}
