/* ============================================================
   HOME PAGE — Hero "Forge Cut" Slider + Page Sections
   ============================================================ */

/* ── Hero wrapper ─────────────────────────────────────────── */
.hero-section {
  position: relative;
  width: 100%;
  height: clamp(480px, 70vh, 680px);
  min-height: unset;
  overflow: hidden;
  background: var(--c-base);
  cursor: grab;
  user-select: none;
}
.hero-section:active { cursor: grabbing; }

/* ── Slider container ─────────────────────────────────────── */
.hero-slider {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* ── Forge blade — orange light that cuts across on transition */
.hero-forge-blade {
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--c-brand) 15%,
    var(--c-brand) 85%,
    transparent 100%
  );
  box-shadow:
    0 0 20px rgba(255, 153, 0, 0.9),
    0 0 60px rgba(255, 153, 0, 0.5),
    0 0 120px rgba(255, 153, 0, 0.2);
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
}

/* ── Individual slides ────────────────────────────────────── */
.hero-slide {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  clip-path: inset(0 100% 0 0); /* hidden by default — GSAP reveals */
  will-change: auto; /* GSAP sets will-change dynamically; permanent layers on all 6 slides = GPU overload */
  transition: none !important; /* GSAP owns all transitions — prevents Astra global transition:all from triggering on every clip-path change */
}
.hero-slide.is-active {
  clip-path: inset(0 0% 0 0);
  z-index: 1;
}
/* Clipped slides: skip GPU compositing entirely (clip-path hides visually but browser still composites without this) */
.hero-slide[aria-hidden="true"] .slide-text-block {
  visibility: hidden;
}

/* ── Background image (Ken Burns target) ─────────────────── */
.slide-bg {
  position: absolute;
  inset: -3%; /* bleed for Ken Burns without showing edges */
  z-index: 0;
}
.slide-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  will-change: transform;
}

/* ── Overlay — vignette + warm gradient (reduced for bright default state) ── */
.slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    /* Diagonal sweep — lighter default so image is visible */
    linear-gradient(
      108deg,
      rgba(10, 8, 5, 0.52) 0%,
      rgba(10, 8, 5, 0.40) 30%,
      rgba(10, 8, 5, 0.18) 58%,
      rgba(10, 8, 5, 0.04) 100%
    ),
    /* Bottom anchor dark band — reduced */
    linear-gradient(
      to top,
      rgba(10, 8, 5, 0.60) 0%,
      rgba(10, 8, 5, 0.15) 38%,
      transparent 65%
    ),
    /* Edge vignette — reduced */
    radial-gradient(ellipse at 50% 50%, transparent 38%, rgba(10, 8, 5, 0.30) 100%),
    /* Warm orange breath at bottom-left */
    radial-gradient(ellipse at 18% 85%, rgba(255, 153, 0, 0.07) 0%, transparent 48%);
}

/* ── Dynamic dimmer — transparent by default, fades in on interaction ── */
.slide-overlay-dimmer {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(10, 8, 5, 0.52);
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.hero-section.is-active .slide-overlay-dimmer {
  opacity: 1;
}

/* ── Slide content — bottom aligned ──────────────────────── */
.slide-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(5rem, 10vh, 9rem);
}

/* ── Large decorative number (watermark) ─────────────────── */
.slide-number-bg {
  position: absolute;
  right: -0.03em;
  bottom: -0.08em;
  font-family: var(--font-display);
  font-size: clamp(9rem, 22vw, 22rem);
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 153, 0, 0.13);
  text-stroke: 1px rgba(255, 153, 0, 0.13);
  letter-spacing: -0.02em;
  pointer-events: none;
  user-select: none;
  opacity: 0; /* GSAP animates in */
  white-space: nowrap;
}

/* ── Panel group — wraps text block + CTAs as one vertical flex child ── */
/* CTAs are outside .slide-text-block so the block can be hidden (opacity:0)
   without affecting CTAs. The group keeps them stacked in the slide layout. */
.slide-panel-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 660px;
  position: relative;
  z-index: 1;
}

/* ── Text block ───────────────────────────────────────────── */
.slide-text-block {
  /* max-width + position handled by .slide-panel-group */
  /* ── Industrial instrument-panel treatment ── */
  /* backdrop-filter removed — was causing 6× simultaneous GPU compositing (primary perf killer) */
  background: rgba(6, 4, 2, 0.91);
  border-left: 3px solid var(--c-brand);
  border-top: 1px solid rgba(255, 153, 0, 0.22);
  border-right: 1px solid rgba(255, 153, 0, 0.07);
  border-bottom: 1px solid rgba(255, 153, 0, 0.07);
  border-radius: 0 6px 6px 0;
  padding: 1.75rem 2.25rem 1.75rem 1.75rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 153, 0, 0.18),   /* top inner shimmer */
    inset 1px 0 0 rgba(255, 153, 0, 0.08),   /* left inner glow */
    0 12px 56px rgba(0, 0, 0, 0.65),          /* deep drop shadow */
    0 2px 12px rgba(0, 0, 0, 0.45);
}
/* Shimmer line across top of panel */
.slide-text-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 3px;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 153, 0, 0.70) 0%,
    rgba(255, 153, 0, 0.18) 55%,
    transparent 100%
  );
  border-radius: 0 6px 0 0;
  pointer-events: none;
}

/* Eyebrow */
.slide-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-ui);
  font-size: var(--text-small);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-brand);
  margin: 0 0 0.85rem;
  opacity: 0; /* GSAP */
  transform: translateY(14px);
}
.slide-eyebrow-dash {
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--c-brand);
  flex-shrink: 0;
}

/* Headline — clip-masked line-by-line reveal */
.slide-title {
  margin: 0 0 0.9rem;
  padding: 0;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5.2vw, 4.8rem); /* smaller than global --text-hero to keep panel compact */
  line-height: 0.93;
  letter-spacing: 0.01em;
  color: #FFFFFF;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}
.slide-title-line {
  display: block;
  overflow: hidden;      /* hides the translateY(100%) child */
  line-height: 1.0;
  padding-bottom: 0.06em;
}
.slide-title-inner {
  display: block;
  /* initial state controlled entirely by GSAP (fromTo) */
}

/* Description */
.slide-desc {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: rgba(240, 237, 232, 0.90);
  line-height: 1.65;
  max-width: 540px;
  margin: 0 0 1.4rem;
  opacity: 0;          /* GSAP */
  transform: translateY(14px);
}

/* CTAs — always visible; outside .slide-text-block so they don't inherit block opacity */
/* Padding replaces the bottom padding that was previously inside the block */
.slide-panel-group .slide-ctas {
  padding: 1.1rem 1.75rem 0 1.75rem; /* left-align with block's left border + padding */
}

/* CTAs — always visible; JS panel reveal does not hide these */
.slide-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  opacity: 1;
  transform: none;
}
.slide-cta-main {
  font-size: 0.9rem;
  padding: 13px 28px;
  letter-spacing: 0.06em;
}
.slide-cta-secondary {
  font-size: 0.9rem;
  padding: 11px 22px;
  color: rgba(240, 237, 232, 0.7);
  border-color: rgba(240, 237, 232, 0.28);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.slide-cta-secondary:hover {
  color: var(--c-text-primary);
  border-color: rgba(240, 237, 232, 0.7);
  background: rgba(240, 237, 232, 0.05);
}

/* ── Hero Arrows — circular ────────────────────── */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  background: rgba(10, 8, 4, 0.70); /* solid dark — backdrop-filter removed for perf */
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.hero-arrow--prev { left: 20px; }
.hero-arrow--next { right: 20px; }
.hero-arrow:hover {
  border-color: var(--c-brand);
  background: rgba(255,100,0,0.15);
  box-shadow: 0 0 0 6px rgba(255,100,0,0.15), 0 0 18px rgba(255,100,0,0.3);
}
.arrow-ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--c-brand);
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
}
.hero-arrow:active .arrow-ripple {
  animation: ripple-burst 0.4s ease-out forwards;
}
@keyframes ripple-burst {
  0%   { opacity: 0.4; transform: scale(0); }
  100% { opacity: 0;   transform: scale(2.2); }
}

/* ── Dot navigation ───────────────────────────────────────── */
.hero-dots {
  position: absolute;
  bottom: 2.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 8px;
  align-items: center;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(240, 237, 232, 0.28);
  border: none;
  cursor: pointer;
  padding: 0;
  min-width: 8px;
  transition: background 0.25s, width 0.3s, border-radius 0.3s, box-shadow 0.25s;
}
.hero-dot.is-active {
  width: 30px;
  border-radius: 4px;
  background: var(--c-brand);
  box-shadow: 0 0 12px rgba(255, 153, 0, 0.55);
}
.hero-dot:hover:not(.is-active) { background: rgba(255, 153, 0, 0.5); }
.hero-dot:focus-visible {
  outline: 2px solid var(--c-brand);
  outline-offset: 3px;
}

/* ── Progress bar (bottom edge) ──────────────────────────── */
.hero-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 153, 0, 0.1);
  z-index: 10;
}
.hero-progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(to right, var(--c-brand-dim), var(--c-brand));
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
}

/* ── Slide counter (bottom right) ────────────────────────── */
.hero-counter {
  position: absolute;
  bottom: 1.75rem;
  right: clamp(1.5rem, 4vw, 3.5rem);
  z-index: 10;
  display: flex;
  align-items: baseline;
  gap: 0.15em;
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(240, 237, 232, 0.4);
  font-size: 0.8rem;
  overflow: hidden;
}
.counter-current {
  color: var(--c-brand);
  font-size: 1.1rem;
  display: inline-block;
  line-height: 1.1;
}
.counter-sep { opacity: 0.5; }

/* ── CTAs always visible regardless of panel state ───────── */
.slide-ctas {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* ── Advantages bar height reduction ─────────────────────── */
.advantages-bar {
  padding-top: calc(var(--space-md) * 0.75) !important;
  padding-bottom: calc(var(--space-md) * 0.75) !important;
}
.advantage-item {
  gap: calc(var(--space-sm) * 0.75) !important;
}

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-forge-blade { display: none; }
  .slide-bg-img { transform: none !important; }
  .slide-title-inner { transform: none !important; }
  .slide-eyebrow,
  .slide-desc,
  .slide-ctas { opacity: 1 !important; transform: none !important; }
  .slide-number-bg { opacity: 1 !important; }
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .slide-content { padding-bottom: 5.5rem; }
  .slide-number-bg {
    font-size: clamp(7rem, 38vw, 12rem);
    right: -0.05em;
    bottom: -0.05em;
  }
  .slide-ctas { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .hero-dots { bottom: 1.25rem; }
  .hero-counter { display: none; }
}

/* ============================================================
   SHOP SECTION ON HOMEPAGE
   ============================================================ */
.shop-section {
  padding: 3rem 0 4rem;
}

/* ============================================================
   ADVANTAGES BAR — Icon Keyframe Animations (Batch 5)
   Animations paused until .advantages-bar.is-visible
   ============================================================ */

/* Pause all icon animations until scroll-in */
.icon-truck .wheel-front,
.icon-truck .wheel-rear,
.icon-truck .puff,
.icon-quality .quality-check,
.icon-quality .quality-ring,
.icon-support .phone-body,
.icon-shield .shield-body,
.icon-shield .shield-check {
  animation-play-state: paused;
}
.advantages-bar.is-visible .icon-truck .wheel-front,
.advantages-bar.is-visible .icon-truck .wheel-rear,
.advantages-bar.is-visible .icon-truck .puff,
.advantages-bar.is-visible .icon-quality .quality-check,
.advantages-bar.is-visible .icon-quality .quality-ring,
.advantages-bar.is-visible .icon-support .phone-body,
.advantages-bar.is-visible .icon-shield .shield-body,
.advantages-bar.is-visible .icon-shield .shield-check {
  animation-play-state: running;
}

/* ── Truck: wheel spin ──────────────────────────────────────── */
@keyframes wheel-spin {
  to { transform: rotate(360deg); }
}
.icon-truck .wheel-front {
  animation: wheel-spin 0.9s linear infinite;
}
.icon-truck .wheel-rear {
  animation: wheel-spin 0.9s linear infinite;
}

/* ── Truck: exhaust puffs ───────────────────────────────────── */
@keyframes exhaust-puff {
  0%   { opacity: 0; transform: translateY(0) scale(0.3); }
  30%  { opacity: 0.55; }
  100% { opacity: 0; transform: translateY(-10px) scale(1.4); }
}
.icon-truck .puff-1 {
  animation: exhaust-puff 1.4s ease-out 0s infinite;
}
.icon-truck .puff-2 {
  animation: exhaust-puff 1.4s ease-out 0.45s infinite;
}
.icon-truck .puff-3 {
  animation: exhaust-puff 1.4s ease-out 0.9s infinite;
}

/* ── Quality: check draw then pulse ────────────────────────── */
@keyframes check-draw {
  from { stroke-dashoffset: 14; }
  to   { stroke-dashoffset: 0; }
}
@keyframes check-pulse {
  0%, 100% { stroke-width: 1.5; }
  50%       { stroke-width: 2.4; }
}
@keyframes ring-glow {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}
.icon-quality .quality-check {
  animation: check-draw 0.7s ease-out forwards, check-pulse 2.4s ease-in-out 0.8s infinite;
}
.icon-quality .quality-ring {
  animation: ring-glow 2.4s ease-in-out 0.5s infinite;
}

/* ── Support: phone ring-shake ──────────────────────────────── */
@keyframes phone-ring {
  0%,  50%, 100% { transform: rotate(0deg); }
  5%             { transform: rotate(-18deg); }
  10%            { transform: rotate(15deg); }
  15%            { transform: rotate(-12deg); }
  20%            { transform: rotate(10deg); }
  25%            { transform: rotate(-6deg); }
  30%            { transform: rotate(4deg); }
  35%            { transform: rotate(0deg); }
}
.icon-support .phone-body {
  animation: phone-ring 3s ease-in-out 0.6s infinite;
}

/* ── Shield: pulse + check glow ────────────────────────────── */
@keyframes shield-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.08); }
}
@keyframes shield-check-glow {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; stroke-width: 2; }
}
.icon-shield .shield-body {
  animation: shield-pulse 2.6s ease-in-out 0.4s infinite;
}
.icon-shield .shield-check {
  animation: shield-check-glow 2.6s ease-in-out 0.8s infinite;
}
