/* ==========================================================================
   3C SCAVI S.r.l.s. - Integrated Road Surface & Excavator Hero
   Asfalto superficiale con scavo che taglia la sede stradale verso sinistra
   ========================================================================== */

.hero-excavator-section {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  padding-bottom: 0;
  /* Surface Road Pavement Gradient with fine aggregate texture */
  background: 
    linear-gradient(180deg, 
      var(--c-asphalt-dark) 0%, 
      var(--c-asphalt-main) 50%, 
      var(--c-asphalt-binder) 85%,
      var(--c-strata-gravel) 100%
    );
  border-bottom: 4px solid #786144;
  overflow: hidden;
}

/* Road Survey Grid & Topographic Lines */
.hero-survey-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Horizontal Road Markings across the hero surface */
.hero-road-markings {
  position: absolute;
  top: 25%;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.25),
    rgba(255, 255, 255, 0.25) 50px,
    transparent 50px,
    transparent 90px
  );
  pointer-events: none;
}

.hero-grid-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.35fr;
  align-items: center;
  gap: 2rem;
  position: relative;
  z-index: 2;
  width: 100%;
}

/* Hero Content (Left) */
.hero-content {
  max-width: 620px;
}

.hero-badge-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.hero-title {
  font-size: clamp(2.3rem, 4vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.35rem;
  color: #FFF;
}

.hero-title .text-highlight {
  color: var(--c-brand-yellow);
  position: relative;
  display: inline-block;
}

.hero-title .text-highlight::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 8px;
  background: rgba(245, 158, 11, 0.35);
  z-index: -1;
  transform: skewX(-12deg);
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--c-text-muted);
  line-height: 1.65;
  margin-bottom: 1.85rem;
}

.hero-desc strong {
  color: #FFF;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2.25rem;
  flex-wrap: wrap;
}

.hero-pills-row {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--c-text-muted);
  font-weight: 700;
}

.hero-pill i {
  color: var(--c-brand-yellow);
}

/* ==========================================================================
   HERO EXCAVATION COLUMN & DASHBOARD (Right Side of Hero)
   ========================================================================== */
.hero-excavation-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  position: relative;
}

/* Dedicated Top Dashboard Bar (Controls + Telemetry with ZERO overlap) */
.exc-dashboard-bar {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: linear-gradient(180deg, rgba(26, 17, 12, 0.96) 0%, rgba(16, 10, 6, 0.98) 100%);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.85rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
}

.excavator-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  position: static;
  background: transparent;
  padding: 0;
  border: none;
  flex-wrap: wrap;
}

.exc-telemetry-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(10, 6, 4, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  padding: 0.3rem 0.75rem;
  flex-wrap: wrap;
}

.tel-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.tel-label {
  color: var(--c-text-muted);
  font-size: 0.65rem;
  font-weight: 700;
}

.tel-val {
  color: #FFF;
  font-weight: 800;
}

.tel-val.highlight {
  color: var(--c-brand-yellow);
}

.tel-status {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #10B981;
  font-weight: 800;
  font-size: 0.66rem;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding-left: 0.65rem;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10B981;
  animation: dotPulse 1.4s infinite;
}

/* ==========================================================================
   EXCAVATOR STAGE WRAP (Trench on Left, Heavy Excavator on Right)
   ========================================================================== */
.excavator-stage-wrap {
  position: relative;
  width: 100%;
  height: 420px;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.15rem;
}
/* ==========================================================================
   NATURAL GEOLOGICAL EARTH TRENCH (Trincea di Scavo & Terreno Reale)
   Zero tabelle UI, zero bordi da form: solo vero terreno stradale stratificato
   ========================================================================== */
.natural-trench-scene {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 350px;
  min-width: 320px;
  height: 372px;
  background: #110B07;
  border-left: 3px solid #2C1E14;
  border-right: 3px solid #362518;
  border-bottom: 4px solid #140C07;
  border-top: none;
  box-shadow: 
    inset 0 16px 36px rgba(0, 0, 0, 0.95), 
    0 18px 45px rgba(0, 0, 0, 0.98);
  border-radius: 0 0 8px 8px;
  display: flex;
  flex-direction: column;
  z-index: 3;
  cursor: crosshair;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.natural-trench-scene:hover {
  box-shadow: 
    inset 0 16px 36px rgba(0, 0, 0, 0.95), 
    0 18px 45px rgba(0, 0, 0, 0.98),
    0 0 24px rgba(245, 158, 11, 0.3);
}

/* Trench Top Saw-Cut Asphalt Lip */
.trench-asphalt-top {
  height: 28px;
  background: linear-gradient(180deg, #374151 0%, #1F2937 65%, #111827 100%);
  border-bottom: 2px solid #F59E0B;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.55rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  flex-shrink: 0;
}

.trench-blade-joint {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 800;
  color: #FBBF24;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.hazard-saw-strip {
  width: 18px;
  height: 6px;
  background: repeating-linear-gradient(
    45deg,
    #F59E0B,
    #F59E0B 3px,
    #111 3px,
    #111 6px
  );
  border-radius: 1px;
}

.trench-surveyor-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  color: #FCD34D;
  background: rgba(10, 5, 2, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.5);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Trench Earth Main Body */
.trench-earth-body {
  display: flex;
  flex: 1;
  width: 100%;
  height: calc(100% - 48px);
  position: relative;
  overflow: hidden;
}

/* Left Vertical Surveyor Gauge (Asta metrica graduata sul fianco) */
.trench-elevation-gauge {
  width: 26px;
  background: linear-gradient(180deg, #2A1D14 0%, #1A110B 50%, #0F0906 100%);
  border-right: 1px solid rgba(245, 158, 11, 0.3);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 0;
  flex-shrink: 0;
  user-select: none;
}

.gauge-mark {
  position: absolute;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 3px;
  transform: translateY(-50%);
}

.gauge-mark::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  width: 5px;
  height: 1px;
  background: rgba(245, 158, 11, 0.6);
}

.gauge-mark span {
  font-family: var(--font-mono);
  font-size: 0.50rem;
  font-weight: 800;
  color: #D97706;
}

/* Continuous 5 Geological Strata Stack */
.trench-tiers-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.trench-tier {
  position: relative;
  flex: 1;
  overflow: hidden;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: filter 0.2s ease, background 0.25s ease;
}

.trench-tier:last-child {
  border-bottom: none;
}

.trench-tier:hover {
  filter: brightness(1.15);
}

/* Soil Strata Textures */
.tier-strata-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ==========================================================================
   PHOTOREALISTIC GEOLOGICAL STRATA (Fondi Fotografici Reali dei Sottoservizi)
   ========================================================================== */
.tier-strata-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-size: cover;
  background-position: center;
}

.strata-asphalt-gravel {
  background-image: url('../assets/tier-0-asphalt-gravel.jpg');
}

.strata-gravel-concrete {
  background-image: url('../assets/tier-1-power-gravel.jpg');
}

.strata-sand-bedding {
  background-image: url('../assets/tier-2-fiber-sand.jpg');
}

.strata-clay-compact {
  background-image: url('../assets/tier-3-water-gas-clay.jpg');
}

.strata-bedrock-basalt {
  background-image: url('../assets/tier-4-basalt-bedrock.jpg');
}

/* ==========================================================================
   RAW SOIL COVER (Terreno Naturale Compatto prima dello scavo)
   Texture fotografica reale di terra grezza, con solchi denti benna
   ========================================================================== */
.tier-soil-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 0.85rem;
  background-size: cover;
  background-position: center;
  pointer-events: auto;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.7);
}

#trenchTier-0 .tier-soil-cover { background-image: url('../assets/soil-cover-0.jpg'); }
#trenchTier-1 .tier-soil-cover { background-image: url('../assets/soil-cover-1.jpg'); }
#trenchTier-2 .tier-soil-cover { background-image: url('../assets/soil-cover-2.jpg'); }
#trenchTier-3 .tier-soil-cover { background-image: url('../assets/soil-cover-3.jpg'); }
#trenchTier-4 .tier-soil-cover { background-image: url('../assets/soil-cover-4.jpg'); }

/* Horizontal tooth marks carved into dirt */
.soil-teeth-grooves {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 11px,
    rgba(0, 0, 0, 0.45) 11px,
    rgba(0, 0, 0, 0.45) 13px,
    rgba(255, 255, 255, 0.05) 13px,
    rgba(255, 255, 255, 0.05) 14px
  );
  pointer-events: none;
}

.soil-aggregate-specks {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(rgba(141, 110, 99, 0.45) 1px, transparent 1px),
    radial-gradient(rgba(215, 204, 200, 0.3) 1.5px, transparent 1.5px);
  background-size: 14px 14px, 22px 22px;
  background-position: 0 0, 7px 7px;
  pointer-events: none;
}

.soil-rock-chunks {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(#5D4037 2px, transparent 2px),
    radial-gradient(#3E2723 3px, transparent 3px),
    radial-gradient(#8D6E63 1.5px, transparent 1.5px);
  background-size: 32px 28px, 48px 40px, 20px 24px;
  background-position: 5px 8px, 20px 14px, 12px 22px;
  opacity: 0.85;
  pointer-events: none;
}

.soil-strike-hint {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.60rem;
  font-weight: 800;
  color: #FCD34D;
  background: rgba(16, 10, 6, 0.88);
  border: 1px dashed rgba(245, 158, 11, 0.6);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  opacity: 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  letter-spacing: 0.03em;
  transition: all 0.25s ease;
  pointer-events: none;
  z-index: 4;
}

/* Only the active / next target tier and hovered tiers show the strike prompt */
.trench-tier.is-next-tier .soil-strike-hint,
.trench-tier:hover .soil-strike-hint {
  opacity: 0.95;
  transform: scale(1.04);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}

.trench-tier.is-next-tier .soil-strike-hint {
  animation: nextTierPulse 1.8s infinite ease-in-out;
}

@keyframes nextTierPulse {
  0%, 100% { border-color: rgba(245, 158, 11, 0.5); box-shadow: 0 0 6px rgba(245, 158, 11, 0.3); }
  50% { border-color: #FDE047; box-shadow: 0 0 16px rgba(245, 158, 11, 0.7); }
}

/* Soil Excavation Cleaving Animation ("Leva la terra") */
@keyframes soilCrumbleSlice {
  0% { transform: translateX(0) scale(1); opacity: 1; filter: brightness(1); }
  25% { transform: translateX(-12px) skewX(-4deg); filter: brightness(1.3) contrast(1.2); }
  60% { transform: translateX(-45px) skewX(-8deg) scale(0.85); opacity: 0.6; }
  100% { transform: translateX(-90px) scale(0.6); opacity: 0; pointer-events: none; }
}

.trench-tier.excavating .tier-soil-cover {
  animation: soilCrumbleSlice 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.trench-tier.tier-unlocked .tier-soil-cover {
  display: none !important;
}

/* ==========================================================================
   UNEARTHED INFRASTRUCTURE (Tubi & Cavi alla luce)
   Nessuna tabella: tubi fotorealistici visibili con marker e callout elegante
   ========================================================================== */
.tier-revealed-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.75rem 0 0.65rem;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.45) 0%, transparent 65%, rgba(0, 0, 0, 0.55) 100%);
}

.trench-tier.tier-unlocked {
  border-bottom-color: rgba(245, 158, 11, 0.35);
}

.trench-tier.tier-unlocked .tier-revealed-layer {
  display: flex;
  animation: unearthSweep 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes unearthSweep {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

.tier-hud-marker {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(12, 7, 4, 0.88);
  border: 1px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
  border-radius: 4px;
  padding: 0.18rem 0.55rem;
  backdrop-filter: blur(5px);
  pointer-events: none;
}

.hud-marker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #06B6D4;
  box-shadow: 0 0 8px #06B6D4;
  animation: markerDotPulse 1.6s infinite ease-in-out;
  flex-shrink: 0;
}

.marker-electric { background: #F59E0B; box-shadow: 0 0 8px #F59E0B; }
.marker-water { background: #38BDF8; box-shadow: 0 0 8px #38BDF8; }
.marker-gas { background: #EF4444; box-shadow: 0 0 8px #EF4444; }
.marker-soa, .marker-quota { background: #10B981; box-shadow: 0 0 8px #10B981; }

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

.hud-marker-code {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  color: #FFF;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.relic-gold-sparkle {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 800;
  color: #FDE047;
  background: rgba(245, 158, 11, 0.3);
  border: 1px solid #F59E0B;
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 0.25rem;
  animation: coinGleam 2s infinite ease-in-out;
}

@keyframes coinGleam {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 3px #F59E0B); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 8px #FDE047); }
}

.tier-inspect-callout {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 800;
  color: #FBBF24;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid var(--c-brand-yellow);
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tier-inspect-callout:hover {
  background: var(--c-brand-yellow);
  color: #110A05;
  transform: scale(1.08);
}

.trench-bedrock-base {
  height: 22px;
  background: #0A0604;
  border-top: 1px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bedrock-ruler-tag {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 800;
  color: #10B981;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   TRENCH SURVEYOR HUD ALERT (Banner compatto ancorato in fondo allo scavo)
   Non copre il cantiere né la macchina: notifica elegante e compatta
   ========================================================================== */
.trench-survey-hud-alert {
  position: absolute;
  bottom: 24px;
  left: 8px;
  right: 8px;
  background: linear-gradient(135deg, rgba(20, 12, 8, 0.98), rgba(12, 7, 4, 0.99));
  border: 1.5px solid var(--c-brand-yellow);
  border-radius: 6px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.95), 0 0 20px rgba(245, 158, 11, 0.35);
  padding: 0.42rem 0.65rem;
  z-index: 25;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.trench-survey-hud-alert.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hud-alert-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.hud-alert-icon {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: rgba(245, 158, 11, 0.2);
  border: 1.5px solid var(--c-brand-yellow);
  color: var(--c-brand-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.hud-alert-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.hud-alert-tag {
  font-family: var(--font-mono);
  font-size: 0.50rem;
  font-weight: 800;
  color: var(--c-brand-yellow);
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.hud-alert-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #FFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.hud-alert-desc {
  display: none;
}

.hud-alert-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

/* ==========================================================================
   HEAVY-DUTY ARTICULATED EXCAVATOR (Right Column, Facing Left)
   ========================================================================== */
.excavator-photoreal-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.excavator-svg-container {
  position: absolute;
  right: -10px;
  bottom: 24px;
  width: 620px;
  height: 430px;
  pointer-events: none;
  z-index: 6;
}

.excavator-cad-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.75));
}

/* Moving Kinematic Joints */
#excBoom, #excStick, #excBucket, #excCab, #excPiston {
  will-change: transform;
}

/* Scooped Soil inside Bucket Cavity */
#bucketSoilLoad {
  transition: opacity 0.2s ease-out;
}

/* Diesel Exhaust Smoke Puffs */
.smoke-puff-1 { animation: smokePuff 2s infinite ease-out; }
.smoke-puff-2 { animation: smokePuff 2.4s infinite ease-out 0.7s; }
.smoke-puff-3 { animation: smokePuff 2.8s infinite ease-out 1.4s; }

@keyframes smokePuff {
  0% { transform: translate(0, 0) scale(0.6); opacity: 0.6; }
  50% { opacity: 0.3; }
  100% { transform: translate(25px, -50px) scale(2.4); opacity: 0; }
}

/* Rotating Amber Warning Beacon Glow */
.anim-beacon-glow {
  animation: beaconGlowPulse 0.9s infinite cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: 424px 214px;
}

@keyframes beaconGlowPulse {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.35); }
}

/* ==========================================================================
   VOLUMETRIC EARTH MOUND (Cumulo di Terra di Scavo Accumulata)
   Montagnola 3D reale di terra e detriti che cresce sul ciglio stradale
   ========================================================================== */
.earth-mound,
.earth-mound-pile {
  position: absolute;
  bottom: 20px;
  left: 295px;
  width: 195px;
  height: 120px;
  z-index: 7;
  cursor: pointer;
  pointer-events: auto;
  transform-origin: 50% 100%;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.earth-mound:hover,
.earth-mound-pile:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.6));
}

.mound-real-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.95));
  pointer-events: none;
}

.mound-survey-flag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(18, 11, 6, 0.96);
  border: 1.5px solid #F59E0B;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.85);
  border-radius: 14px;
  padding: 0.15rem 0.6rem;
  white-space: nowrap;
  pointer-events: none;
  z-index: 8;
}

.mound-flag-icon {
  color: #F59E0B;
  font-size: 0.64rem;
}

.mound-vol-text {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  color: #FEF08A;
  letter-spacing: 0.02em;
}

.mound-click-prompt {
  position: absolute;
  bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 800;
  color: #FDE047;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 4px;
  padding: 2px 6px;
  pointer-events: none;
  opacity: 0.9;
  letter-spacing: 0.02em;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.earth-mound-pile:hover .mound-click-prompt {
  opacity: 1;
}

/* ==========================================================================
   ROAD DECK UNDER EXCAVATOR (La Sede Stradale in Asfalto)
   ========================================================================== */
.stage-road-deck {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38px;
  background: linear-gradient(180deg, #362D26 0%, #241D18 55%, #16120E 100%);
  border-top: 3px solid #F59E0B;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.85);
  cursor: pointer;
  overflow: hidden;
  pointer-events: auto;
}

.stage-road-deck:hover {
  border-top-color: #FBBF24;
}

.road-asphalt-texture {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 6px 6px;
  pointer-events: none;
}

.road-cut-guideline {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 800;
  color: rgba(245, 158, 11, 0.7);
  letter-spacing: 0.04em;
  white-space: nowrap;
  user-select: none;
}

.guideline-dash {
  width: 24px;
  height: 3px;
  background: #F59E0B;
  border-radius: 1px;
}

/* Particle Canvas */
#excavatorParticles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 8;
}

.exc-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--c-border-earth);
  color: var(--c-text-muted);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.exc-btn:hover {
  background: var(--c-brand-yellow);
  color: #1A120B;
  border-color: var(--c-brand-yellow);
}

.exc-btn.active {
  background: var(--c-brand-yellow);
  color: #1A120B;
  border-color: var(--c-brand-yellow);
}

/* Screen / Stage Rumble Effect on Impact */
.excavator-stage-wrap.rumble {
  animation: stageRumble 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes stageRumble {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-5px, 4px); }
  40% { transform: translate(5px, -3px); }
  60% { transform: translate(-3px, 3px); }
  80% { transform: translate(3px, -1px); }
}

/* ==========================================================================
   DISCOVERY INVENTORY STRIP (Connects Excavator Game to Cut Section)
   ========================================================================== */
.dig-inventory-bar {
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  background: linear-gradient(180deg, rgba(26, 16, 10, 0.95), rgba(18, 10, 6, 0.98));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  position: relative;
  z-index: 5;
}

.inventory-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.inventory-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--c-brand-yellow);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  letter-spacing: 0.04em;
}

.inventory-subtitle {
  font-size: 0.8rem;
  color: var(--c-text-muted);
}

.inventory-slots-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

.inventory-slot {
  background: rgba(40, 24, 15, 0.6);
  border: 1.5px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.inventory-slot.locked {
  opacity: 0.65;
  filter: grayscale(0.5);
}

.inventory-slot.locked:hover {
  opacity: 0.9;
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(50, 30, 18, 0.8);
  transform: translateY(-2px);
}

.inventory-slot.unlocked {
  opacity: 1;
  filter: none;
  background: linear-gradient(145deg, rgba(50, 32, 20, 0.9), rgba(30, 18, 10, 0.95));
  border: 1.5px solid var(--c-brand-yellow);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
  transform: translateY(-2px);
}

.inventory-slot.unlocked:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
  border-color: #FBBF24;
}

.slot-depth {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--c-text-muted);
  background: rgba(0, 0, 0, 0.4);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

.inventory-slot.unlocked .slot-depth {
  color: var(--c-brand-yellow);
  background: rgba(245, 158, 11, 0.15);
}

.slot-icon {
  font-size: 1.35rem;
  color: var(--c-text-muted);
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, color 0.2s ease;
}

.inventory-slot.unlocked .slot-icon {
  color: var(--c-brand-yellow);
  transform: scale(1.15);
}

/* Individual Slot Accent Colors when unlocked */
.inventory-slot[data-slot="0"].unlocked .slot-icon { color: #06B6D4; } /* Fiber Cyan */
.inventory-slot[data-slot="1"].unlocked .slot-icon { color: #F59E0B; } /* Electric Yellow */
.inventory-slot[data-slot="2"].unlocked .slot-icon { color: #3B82F6; } /* Water Blue */
.inventory-slot[data-slot="3"].unlocked .slot-icon { color: #EF4444; } /* Gas Orange/Red */
.inventory-slot[data-slot="4"].unlocked .slot-icon { color: #10B981; } /* Bedrock Quota Emerald */

.slot-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.slot-name {
  font-size: 0.72rem;
  font-weight: 800;
  color: #E5E7EB;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100%;
}

.slot-status {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--c-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.inventory-slot.unlocked .slot-status {
  color: #10B981;
}

/* Cross-Section Highlight Pulse when inspecting an unearthed item */
.highlight-inspect {
  animation: inspectPulse 2.5s ease-in-out !important;
}

@keyframes inspectPulse {
  0%, 100% { outline: 3px solid transparent; box-shadow: none; }
  25%, 75% { outline: 3px solid #F59E0B; box-shadow: 0 0 25px rgba(245, 158, 11, 0.85); }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content {
    margin: 0 auto;
  }
  .hero-badge-group, .hero-actions, .hero-pills-row {
    justify-content: center;
  }
  .excavator-stage-wrap {
    height: 420px;
  }
  .inventory-slots-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .excavator-stage-wrap {
    height: 350px;
  }
  .exc-telemetry {
    display: none;
  }
  .pit-discovery-card {
    width: 260px;
    padding: 0.9rem;
    bottom: 95px;
  }
  .inventory-slots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
